More package and configuration related updates.

This commit is contained in:
Scott Idem
2024-12-03 10:28:56 -05:00
parent c6631e221c
commit e4797e178d
7 changed files with 421 additions and 610 deletions

2
package-lock.json generated
View File

@@ -81,7 +81,7 @@
"svelte-tiptap": "^2.1.0",
"tailwind-merge": "^2.5.5",
"tailwind-variants": "^0.3.0",
"tailwindcss": "^3.4.10",
"tailwindcss": "^3.4.15",
"tailwindcss-animate": "^1.0.7",
"tslib": "^2.4.1",
"typescript": "^5.0.0",

View File

@@ -76,7 +76,7 @@
"svelte-tiptap": "^2.1.0",
"tailwind-merge": "^2.5.5",
"tailwind-variants": "^0.3.0",
"tailwindcss": "^3.4.10",
"tailwindcss": "^3.4.15",
"tailwindcss-animate": "^1.0.7",
"tslib": "^2.4.1",
"typescript": "^5.0.0",

View File

@@ -1,461 +0,0 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
@tailwind variants;
@layer base {
:root {
--background: 0 0% 100%;
--foreground: 224 71.4% 4.1%;
--muted: 220 14.3% 95.9%;
--muted-foreground: 220 8.9% 46.1%;
--popover: 0 0% 100%;
--popover-foreground: 224 71.4% 4.1%;
--card: 0 0% 100%;
--card-foreground: 224 71.4% 4.1%;
--border: 220 13% 91%;
--input: 220 13% 91%;
--primary: 220.9 39.3% 11%;
--primary-foreground: 210 20% 98%;
--secondary: 220 14.3% 95.9%;
--secondary-foreground: 220.9 39.3% 11%;
--accent: 220 14.3% 95.9%;
--accent-foreground: 220.9 39.3% 11%;
--destructive: 0 72.2% 50.6%;
--destructive-foreground: 210 20% 98%;
--ring: 224 71.4% 4.1%;
--radius: 0.5rem;
--sidebar-background: 0 0% 98%;
--sidebar-foreground: 240 5.3% 26.1%;
--sidebar-primary: 240 5.9% 10%;
--sidebar-primary-foreground: 0 0% 98%;
--sidebar-accent: 240 4.8% 95.9%;
--sidebar-accent-foreground: 240 5.9% 10%;
--sidebar-border: 220 13% 91%;
--sidebar-ring: 217.2 91.2% 59.8%;
}
.dark {
--background: 224 71.4% 4.1%;
--foreground: 210 20% 98%;
--muted: 215 27.9% 16.9%;
--muted-foreground: 217.9 10.6% 64.9%;
--popover: 224 71.4% 4.1%;
--popover-foreground: 210 20% 98%;
--card: 224 71.4% 4.1%;
--card-foreground: 210 20% 98%;
--border: 215 27.9% 16.9%;
--input: 215 27.9% 16.9%;
--primary: 210 20% 98%;
--primary-foreground: 220.9 39.3% 11%;
--secondary: 215 27.9% 16.9%;
--secondary-foreground: 210 20% 98%;
--accent: 215 27.9% 16.9%;
--accent-foreground: 210 20% 98%;
--destructive: 0 62.8% 30.6%;
--destructive-foreground: 210 20% 98%;
--ring: 216 12.2% 83.9%;
--sidebar-background: 240 5.9% 10%;
--sidebar-foreground: 240 4.8% 95.9%;
--sidebar-primary: 224.3 76.3% 48%;
--sidebar-primary-foreground: 0 0% 100%;
--sidebar-accent: 240 3.7% 15.9%;
--sidebar-accent-foreground: 240 4.8% 95.9%;
--sidebar-border: 240 3.7% 15.9%;
--sidebar-ring: 217.2 91.2% 59.8%;
}
}
@layer base {
* {
@apply border-border;
}
body {
@apply bg-background text-foreground;
}
}
/* There are no more Tailwind layers. */
html,
body {
@apply h-full overflow-hidden;
/* font-family: 'Liberation Sans', sans-serif; */
/* font-family: 'Noto Sans', sans-serif; */
}
html.super_access #appShell {
background-color: hsla(0, 100%, 50%, 0.5);
}
html.manager_access #appShell {
background-color: hsla(0, 50%, 75%, 0.5);
}
html.administrator_access #appShell {
background-color: hsla(40, 50%, 85%, 0.5);
}
html.trusted_access #appShell {
background-color: hsla(20, 50%, 85%, 0.25);
}
/* default theme */
/* @font-face {
font-family: 'Liberation Sans', sans-serif;
font-family: 'Noto Sans', sans-serif;
src: url('/fonts/liberation/LiberationSans-Regular.ttf');
src: url('/fonts/noto/NotoSans-Regular.ttf');
font-display: swap;
} */
/* modern theme */
@font-face {
font-family: 'Quicksand';
src: url('/fonts/Quicksand.ttf');
font-display: swap;
}
/* :root [data-theme='modern'] { */
/* --theme-rounded-base: 20px;
--theme-rounded-container: 4px; */
/* --theme-font-family-base: 'Liberation Sans', sans-serif; */
/* --theme-font-family-heading: 'Liberation Sans', sans-serif; */
/* } */
.card-footer {
border-top: 1px solid hsla(0, 0%, 0%, 0.5);
margin-top: 1em;
padding-top: 1em;
opacity: .5;
}
/* Tailwind: This "fixes" Tailwind's default group button styles that do not seem to allow hidding buttons. */
.btn-group a.hidden, .btn-group button.hidden {
display: none;
}
.ae_d_none {
display: none;
}
/* Allow content to scroll horizontal if too wide */
.ae_h_scrollfix {
max-width: 100%;
overflow-x: auto;
}
/* These helps with the Skeleton Tailwind modal utility. */
.ae_modal_scrollfix {
/* Allow modal content to scroll if it's too long */
overflow-y: auto;
max-height: 96vh;
/* max-height: 99%; */
}
.ae_debug {
/* A darker pink outline */
outline: thin dashed;
outline-color: hsla(0, 100%, 50%, 0.15);
/* A light pink background color */
background-color: hsla(0, 100%, 50%, 0.15);
}
.ae_debug:hover {
/* A darker pink outline */
outline-color: hsla(0, 100%, 50%, 0.50);
/* A light pink background color */
background-color: hsla(0, 100%, 50%, 0.40);
}
/* Deal with being in an iframe */
#appShell #shell-header.iframe {
display: none;
}
#appShell #shell-footer.iframe {
display: none;
}
/* Remove the background from the body in all cases */
/* body[data-theme] { */
/* background: none; */
/* background-image: none; */
/* } */
/* Remove the background from the body if using iframes */
/* body[data-theme]:has(#page.iframe) { */
/* background: none; */
/* background-image: none; */
/* background-image: url('https://static.oneskyit.com/c/CHOW/images/CHOW_2024_yellow_background.png'); */
/* background-size: cover; */
/* } */
main {
/* background: none;
background-color: hsla(0, 0%, 100%, 0.92); */
}
main>section {
background: none;
background-color: hsla(0, 0%, 100%, 0.92);
padding: .5em;
}
/* @media (min-width: 640px) {
main>div, main>section {
padding: 0;
max-width: 100%;
}
} */
/* @media (min-width: 768px) {
main>div, main>section {
padding: 0;
max-width: 100%;
}
} */
.ae_sponsorships {
/* background: none; */
/* background-color: hsla(0, 0%, 100%, 0.92); */
/* background-image: url('https://static.oneskyit.com/c/CHOW/images/CHOW_2024_yellow_background.png'); */
/* background-size: cover; */
}
pre.pre_wrap {
white-space: pre-wrap;
word-break: normal;
word-wrap: normal;
border: none;
max-width: 100%;
overflow-x: auto;
}
input.required {
/* border-right: solid medium var(--color-warning-500); */
/* color: var(--color-warning-500); */
}
input:required {
/* background-color: var(--alert-color-lightest); */
/* border: solid 2px red; */
/* outline: dashed thin var(--alert-color-lighter); */
/* border-right: solid medium var(--alert-color-mid); */
/* border-right: solid medium var(--warning-color-mid); */
/* border-right: solid medium var(--error-color-mid); */
}
/* input:required:hover {
background-color: var(--alert-color-lighter);
border-right: solid thick var(--alert-color-darker);
} */
/* input:required::before {
display: block;
content: '*';
color: var(--warning-color-darker);
top: 5px;
left: 5px;
} */
.input_required::after {
content: '*';
color: rgb(var(--color-error-500) / 0.9);
position: relative;
/* top: 0em; */
left: .25em;
}
/* Make the group a flex row by default */
/* div.btn-group { */
/* display: flex; */
/* gap: 0; */
/* flex-direction: row; */
/* justify-content: space-around; */
/* align-items: center; */
/* margin: 0;
padding: 0; */
/* } */
/* Make all button elements except for the the first button element not rounded on the left. */
/* Make all button elements except for the fhe last button element not rounded on the right. */
/* These helps with the Skeleton (Tailwind?) button group element. */
.btn-group button {
border-radius: 0;
border: none;
}
/* .md:btn-group button,
.lg:btn-group button {
border-radius: 0;
border: none;
} */
/* div.btn-group button:first-child {
border-top-left-radius: .25rem;
border-bottom-left-radius: .25rem;
}
div.btn-group button:last-child {
border-top-right-radius: .25rem;
border-bottom-right-radius: .25rem;
} */
.ae_obj_prop .label {
}
.ae_obj_prop .value {
font-weight: bold;
}
.ae_md_hide {
/* outline: medium dashed green; */
/* display: none; */
}
@media (max-width: 767px) {
.ae_md_hide {
/* outline: medium dashed red; */
display: none;
}
}
@media (min-width: 768px) {
.ae_lg_hide {
/* outline: medium dashed blue; */
display: none;
}
}
/* Use the div.ae_quick_modal_container to block background clicks when using the section.ae_quick_popover. */
div.ae_quick_modal_container {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 100;
background-color: hsla(0, 0%, 0%, .5);
}
/* The section.ae_quick_popover should be above the rest of the content and centered on the page. */
section.ae_quick_popover {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
z-index: 100;
background-color: hsla(0, 0%, 100%, .95);
padding: 1rem;
border-radius: .5rem;
box-shadow: 0 0 1rem hsla(0, 0%, 0%, .5);
min-height: 98%;
min-width: 98%;
}
section.ae_quick_popover_small {
position: fixed;
top: 1em;
left: 50%;
transform: translate(-50%, 0%);
z-index: 100;
background-color: hsla(0, 0%, 100%, .95);
padding: 1rem;
border-radius: .5rem;
box-shadow: 0 0 1rem hsla(0, 0%, 0%, .5);
min-height: 24rem;
max-height: 95%;
min-width: 50%;
max-width: 95%;
}
.fade_50 {
opacity: 0.5;
}
.fade_50:hover {
opacity: 1;
}
.auth_view_only {
display: none;
}
.ae_root--auth_access .auth_view_only {
display: initial;
}
img.qr_code {
/* outline: solid thin hsla(30, 100%, 50%, .1); */
/* width: 1.50in; */
}
img.qr_code:hover {
/* outline: solid thin green; */
/* width: 2.50in; */
}
img.qr_code:focus {
/* outline: solid thin red; */
/* width: 2.50in; */
}
.dim {
opacity: 0.5;
color: hsla(0, 0%, 50%, .95);
}
.dim_warning {
opacity: 0.5;
/* color: hsla(0, 100%, 50%, .95); */
/* background should be hash marks */
background-image: repeating-linear-gradient(-45deg, hsla(0, 100%, 50%, .25), hsla(0, 100%, 50%, .25) 10px, transparent 10px, transparent 20px);
}
@media (max-width: 767px) {
.sk_header.hide_sm {
display: none;
}
.sk_header.show_sm {
display: initial;
}
.sk_header.show_md {
display: none;
}
}
@media (min-width: 768px) {
.sk_header.hide_md {
display: none;
}
.sk_header.show_md {
display: initial;
}
.sk_header.show_sm {
display: none;
}
}

View File

@@ -73,4 +73,389 @@
body {
@apply bg-background text-foreground;
}
}
}
/* There are no more Tailwind layers. */
html,
body {
@apply h-full overflow-hidden;
/* font-family: 'Liberation Sans', sans-serif; */
/* font-family: 'Noto Sans', sans-serif; */
}
html.super_access #appShell {
background-color: hsla(0, 100%, 50%, 0.5);
}
html.manager_access #appShell {
background-color: hsla(0, 50%, 75%, 0.5);
}
html.administrator_access #appShell {
background-color: hsla(40, 50%, 85%, 0.25);
}
html.trusted_access #appShell {
background-color: hsla(20, 50%, 85%, 0.25);
}
/* default theme */
/* @font-face {
font-family: 'Liberation Sans', sans-serif;
font-family: 'Noto Sans', sans-serif;
src: url('/fonts/liberation/LiberationSans-Regular.ttf');
src: url('/fonts/noto/NotoSans-Regular.ttf');
font-display: swap;
} */
/* modern theme */
@font-face {
font-family: 'Quicksand';
src: url('/fonts/Quicksand.ttf');
font-display: swap;
}
/* :root [data-theme='modern'] { */
/* --theme-rounded-base: 20px;
--theme-rounded-container: 4px; */
/* --theme-font-family-base: 'Liberation Sans', sans-serif; */
/* --theme-font-family-heading: 'Liberation Sans', sans-serif; */
/* } */
.card-footer {
border-top: 1px solid hsla(0, 0%, 0%, 0.5);
margin-top: 1em;
padding-top: 1em;
opacity: .5;
}
/* Tailwind: This "fixes" Tailwind's default group button styles that do not seem to allow hiding buttons. */
.btn-group a.hidden, .btn-group button.hidden {
display: none;
}
.ae_d_none {
display: none;
}
/* Allow content to scroll horizontal if too wide */
.ae_h_scrollfix {
max-width: 100%;
overflow-x: auto;
}
/* These helps with the Skeleton Tailwind modal utility. */
.ae_modal_scrollfix {
/* Allow modal content to scroll if it's too long */
overflow-y: auto;
max-height: 96vh;
/* max-height: 99%; */
}
.ae_debug {
/* A darker pink outline */
outline: thin dashed;
outline-color: hsla(0, 100%, 50%, 0.15);
/* A light pink background color */
background-color: hsla(0, 100%, 50%, 0.15);
}
.ae_debug:hover {
/* A darker pink outline */
outline-color: hsla(0, 100%, 50%, 0.50);
/* A light pink background color */
background-color: hsla(0, 100%, 50%, 0.40);
}
/* Deal with being in an iframe */
#appShell #shell-header.iframe {
display: none;
}
#appShell #shell-footer.iframe {
display: none;
}
/* Remove the background from the body in all cases */
/* body[data-theme] { */
/* background: none; */
/* background-image: none; */
/* } */
/* Remove the background from the body if using iframes */
/* body[data-theme]:has(#page.iframe) { */
/* background: none; */
/* background-image: none; */
/* background-image: url('https://static.oneskyit.com/c/CHOW/images/CHOW_2024_yellow_background.png'); */
/* background-size: cover; */
/* } */
main {
/* background: none;
background-color: hsla(0, 0%, 100%, 0.92); */
}
main>section {
background: none;
background-color: hsla(0, 0%, 100%, 0.92);
padding: .5em;
}
/* @media (min-width: 640px) {
main>div, main>section {
padding: 0;
max-width: 100%;
}
} */
/* @media (min-width: 768px) {
main>div, main>section {
padding: 0;
max-width: 100%;
}
} */
.ae_sponsorships {
/* background: none; */
/* background-color: hsla(0, 0%, 100%, 0.92); */
/* background-image: url('https://static.oneskyit.com/c/CHOW/images/CHOW_2024_yellow_background.png'); */
/* background-size: cover; */
}
pre.pre_wrap {
white-space: pre-wrap;
word-break: normal;
word-wrap: normal;
border: none;
max-width: 100%;
overflow-x: auto;
}
input.required {
/* border-right: solid medium var(--color-warning-500); */
/* color: var(--color-warning-500); */
}
input:required {
/* background-color: var(--alert-color-lightest); */
/* border: solid 2px red; */
/* outline: dashed thin var(--alert-color-lighter); */
/* border-right: solid medium var(--alert-color-mid); */
/* border-right: solid medium var(--warning-color-mid); */
/* border-right: solid medium var(--error-color-mid); */
}
/* input:required:hover {
background-color: var(--alert-color-lighter);
border-right: solid thick var(--alert-color-darker);
} */
/* input:required::before {
display: block;
content: '*';
color: var(--warning-color-darker);
top: 5px;
left: 5px;
} */
.input_required::after {
content: '*';
color: rgb(var(--color-error-500) / 0.9);
position: relative;
/* top: 0em; */
left: .25em;
}
/* Make the group a flex row by default */
/* div.btn-group { */
/* display: flex; */
/* gap: 0; */
/* flex-direction: row; */
/* justify-content: space-around; */
/* align-items: center; */
/* margin: 0;
padding: 0; */
/* } */
/* Make all button elements except for the the first button element not rounded on the left. */
/* Make all button elements except for the fhe last button element not rounded on the right. */
/* These helps with the Skeleton (Tailwind?) button group element. */
.btn-group button {
border-radius: 0;
border: none;
}
/* .md:btn-group button,
.lg:btn-group button {
border-radius: 0;
border: none;
} */
/* div.btn-group button:first-child {
border-top-left-radius: .25rem;
border-bottom-left-radius: .25rem;
}
div.btn-group button:last-child {
border-top-right-radius: .25rem;
border-bottom-right-radius: .25rem;
} */
.ae_obj_prop .label {
}
.ae_obj_prop .value {
font-weight: bold;
}
.ae_md_hide {
/* outline: medium dashed green; */
/* display: none; */
}
@media (max-width: 767px) {
.ae_md_hide {
/* outline: medium dashed red; */
display: none;
}
}
@media (min-width: 768px) {
.ae_lg_hide {
/* outline: medium dashed blue; */
display: none;
}
}
/* Use the div.ae_quick_modal_container to block background clicks when using the section.ae_quick_popover. */
div.ae_quick_modal_container {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 100;
background-color: hsla(0, 0%, 0%, .5);
}
/* The section.ae_quick_popover should be above the rest of the content and centered on the page. */
section.ae_quick_popover {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
z-index: 100;
background-color: hsla(0, 0%, 100%, .95);
padding: 1rem;
border-radius: .5rem;
box-shadow: 0 0 1rem hsla(0, 0%, 0%, .5);
min-height: 98%;
min-width: 98%;
}
section.ae_quick_popover_small {
position: fixed;
top: 1em;
left: 50%;
transform: translate(-50%, 0%);
z-index: 100;
background-color: hsla(0, 0%, 100%, .95);
padding: 1rem;
border-radius: .5rem;
box-shadow: 0 0 1rem hsla(0, 0%, 0%, .5);
min-height: 24rem;
max-height: 95%;
min-width: 50%;
max-width: 95%;
}
.fade_50 {
opacity: 0.5;
}
.fade_50:hover {
opacity: 1;
}
.auth_view_only {
display: none;
}
.ae_root--auth_access .auth_view_only {
display: initial;
}
img.qr_code {
/* outline: solid thin hsla(30, 100%, 50%, .1); */
/* width: 1.50in; */
}
img.qr_code:hover {
/* outline: solid thin green; */
/* width: 2.50in; */
}
img.qr_code:focus {
/* outline: solid thin red; */
/* width: 2.50in; */
}
.dim {
opacity: 0.5;
color: hsla(0, 0%, 50%, .95);
}
.dim_warning {
opacity: 0.5;
/* color: hsla(0, 100%, 50%, .95); */
/* background should be hash marks */
background-image: repeating-linear-gradient(-45deg, hsla(0, 100%, 50%, .25), hsla(0, 100%, 50%, .25) 10px, transparent 10px, transparent 20px);
}
@media (max-width: 767px) {
.sk_header.hide_sm {
display: none;
}
.sk_header.show_sm {
display: initial;
}
.sk_header.show_md {
display: none;
}
}
@media (min-width: 768px) {
.sk_header.hide_md {
display: none;
}
.sk_header.show_md {
display: initial;
}
.sk_header.show_sm {
display: none;
}
}

View File

@@ -7,29 +7,29 @@ import ShadEditor from '$lib/components/shad-editor/shad-editor.svelte';
// Import Tiptap related modules
import { Editor } from "@tiptap/core";
import StarterKit from "@tiptap/starter-kit";
import Bold from '@tiptap/extension-bold';
import BulletList from '@tiptap/extension-bullet-list';
import CodeBlock from '@tiptap/extension-code-block';
import Code from '@tiptap/extension-code';
import Color from '@tiptap/extension-color';
import Document from '@tiptap/extension-document';
import Heading from '@tiptap/extension-heading';
import Highlight from '@tiptap/extension-highlight';
import History from '@tiptap/extension-history';
import Italic from '@tiptap/extension-italic';
import Link from '@tiptap/extension-link';
import ListItem from '@tiptap/extension-list-item';
import OrderedList from '@tiptap/extension-ordered-list';
import Paragraph from '@tiptap/extension-paragraph';
import Strike from '@tiptap/extension-strike';
import Text from '@tiptap/extension-text';
import TextStyle from '@tiptap/extension-text-style';
import Typography from '@tiptap/extension-typography';
import Underline from '@tiptap/extension-underline';
// import { Editor } from "@tiptap/core";
// import StarterKit from "@tiptap/starter-kit";
// import Bold from '@tiptap/extension-bold';
// import BulletList from '@tiptap/extension-bullet-list';
// import CodeBlock from '@tiptap/extension-code-block';
// import Code from '@tiptap/extension-code';
// import Color from '@tiptap/extension-color';
// import Document from '@tiptap/extension-document';
// import Heading from '@tiptap/extension-heading';
// import Highlight from '@tiptap/extension-highlight';
// import History from '@tiptap/extension-history';
// import Italic from '@tiptap/extension-italic';
// import Link from '@tiptap/extension-link';
// import ListItem from '@tiptap/extension-list-item';
// import OrderedList from '@tiptap/extension-ordered-list';
// import Paragraph from '@tiptap/extension-paragraph';
// import Strike from '@tiptap/extension-strike';
// import Text from '@tiptap/extension-text';
// import TextStyle from '@tiptap/extension-text-style';
// import Typography from '@tiptap/extension-typography';
// import Underline from '@tiptap/extension-underline';
import "./element_tiptap_editor.scss";
import './element_tiptap_editor.scss';
// https://tiptap.dev/docs/examples/basics/default-text-editor
// https://tiptap.dev/docs/examples/basics/formatting
@@ -120,129 +120,11 @@ if (show_button_kv) {
export let new_html: string = '';
onMount(() => {
editor = new Editor({
// element: element,
// extensions: [
// // StarterKit,
// Bold, // part of StarterKit
// Code, // part of StarterKit
// CodeBlock, // part of StarterKit
// Italic, // part of StarterKit
// Strike, // part of StarterKit
// Underline, // part of StarterKit
// BulletList, // part of StarterKit
// // Color.configure({ types: [TextStyle.name, ListItem.name] }),
// // TextStyle.configure({ types: [ListItem.name] }),
// // Heading.configure({ levels: [1, 2, 3, 4, 5, 6] }),
// Highlight,
// History.configure({
// depth: 100,
// newGroupDelay: 500
// }),
// Link.configure({
// openOnClick: false,
// autolink: true,
// defaultProtocol: 'https',
// protocols: ['http', 'https'],
// isAllowedUri: (url, ctx) => {
// try {
// // construct URL
// const parsedUrl = url.includes(':') ? new URL(url) : new URL(`${ctx.defaultProtocol}://${url}`)
// // use default validation
// if (!ctx.defaultValidate(parsedUrl.href)) {
// return false
// }
// // disallowed protocols
// const disallowedProtocols = ['ftp', 'file', 'mailto']
// const protocol = parsedUrl.protocol.replace(':', '')
// if (disallowedProtocols.includes(protocol)) {
// return false
// }
// // only allow protocols specified in ctx.protocols
// const allowedProtocols = ctx.protocols.map(p => (typeof p === 'string' ? p : p.scheme))
// if (!allowedProtocols.includes(protocol)) {
// return false
// }
// // disallowed domains
// const disallowedDomains = ['example-phishing.com', 'malicious-site.net']
// const domain = parsedUrl.hostname
// if (disallowedDomains.includes(domain)) {
// return false
// }
// // all checks have passed
// return true
// } catch (error) {
// return false
// }
// },
// shouldAutoLink: url => {
// try {
// // construct URL
// const parsedUrl = url.includes(':') ? new URL(url) : new URL(`https://${url}`)
// // only auto-link if the domain is not in the disallowed list
// const disallowedDomains = ['example-no-autolink.com', 'another-no-autolink.com']
// const domain = parsedUrl.hostname
// return !disallowedDomains.includes(domain)
// } catch (error) {
// return false
// }
// },
// }),
// ListItem,
// Document,
// OrderedList, // part of StarterKit
// Paragraph,
// Text,
// Typography,
// ],
// content: html_text,
// onTransaction: ({ editor, transaction }) => {
// // console.log('onTransaction');
// // force re-render so `editor.isActive` works as expected
// // editor = editor;
// // let updated_html = editor.getHTML();
// // if (updated_html == '<p></p>') {
// // new_html = '';
// // } else {
// // new_html = updated_html;
// // }
// },
// onUpdate: ({ editor }) => {
// // console.log('onUpdate', editor.getHTML());
// // let updated_html = editor.getHTML();
// // if (updated_html == '<p></p>') {
// // new_html = '';
// // } else {
// // new_html = updated_html;
// // }
// }
});
});
onDestroy(() => {
if (editor) {
editor.destroy();
}
});
function getContent() {
if (editor) {
return editor.getHTML();
}
return '';
}
let mouse_entered_timer: any;
let mouse_enter_wait: number = 500;
let mouse_leave_wait: number = 2000;

View File

@@ -1,18 +1,20 @@
<script lang="ts">
/** @type {import('./$types').PageData} */
export let data: any;
let log_lvl = 1;
// console.log(`ae_idaa_bb +page.svelte data:`, data);
let log_lvl = 0;
if (log_lvl) {
console.log(`ae_idaa_bb +page.svelte data:`, data);
}
import { browser } from '$app/environment';
// import { browser } from '$app/environment';
import { Modal } from 'flowbite-svelte';
import type { key_val } from '$lib/ae_stores';
import { ae_util } from '$lib/ae_utils/ae_utils';
// import type { key_val } from '$lib/ae_stores';
// import { ae_util } from '$lib/ae_utils/ae_utils';
import { liveQuery } from "dexie";
import { core_func } from '$lib/ae_core/ae_core_functions';
// import { core_func } from '$lib/ae_core/ae_core_functions';
import { db_posts } from "$lib/ae_posts/db_posts";
import { ae_snip, ae_loc, ae_sess, ae_api, ae_trig, slct, slct_trigger } from '$lib/ae_stores';
import { idaa_loc, idaa_sess, idaa_slct, idaa_trig, idaa_prom } from '$lib/ae_idaa_stores';

View File

@@ -1,3 +1,5 @@
/** @type {import('tailwindcss').Config} */
import { join } from 'path'
import { fontFamily } from "tailwindcss/defaultTheme";
import forms from '@tailwindcss/forms';
@@ -9,6 +11,7 @@ import { skeleton } from '@skeletonlabs/tw-plugin';
import { myCustomTheme } from './osit_ae_theme_3';
// Most of this was generated by the Shadcn CLI. I merged the rest back from from the original tailwind.config.js.
// export default {
const config: Config = {
darkMode: ["class"],
content: [