Minor changes
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
# One Sky IT's Aether App - SvelteKit v2
|
# One Sky IT's Aether App - SvelteKit v2
|
||||||
|
|
||||||
This uses SvelteKit version 2, TailwindCSS, and Skelton.
|
This uses SvelteKit version 2.x with Svelte version 5.x, TailwindCSS, and Skelton.
|
||||||
|
|
||||||
|
|
||||||
# Current Modules
|
# Current Modules
|
||||||
|
|||||||
@@ -38,6 +38,9 @@ Waiting to upgrade to 4.x when ShadCN is ready. ShadCN is still being worked on
|
|||||||
* https://ui.shadcn.com/docs/tailwind-v4
|
* https://ui.shadcn.com/docs/tailwind-v4
|
||||||
|
|
||||||
|
|
||||||
|
## CodeMirror 6.x (text and code editor)
|
||||||
|
* https://codemirror.net
|
||||||
|
|
||||||
## ShadCN (Tailwind Components)
|
## ShadCN (Tailwind Components)
|
||||||
* https://ui.shadcn.com/docs
|
* https://ui.shadcn.com/docs
|
||||||
* https://github.com/shadcn-ui/ui
|
* https://github.com/shadcn-ui/ui
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "ae-app-svelte5",
|
"name": "ae-app-svelte5",
|
||||||
"version": "0.2.507",
|
"version": "0.2.513",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite dev",
|
"dev": "vite dev",
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
// *** Import Svelte version 5 specific
|
// *** Import Svelte version 5 specific
|
||||||
import { browser } from '$app/environment';
|
import { browser } from '$app/environment';
|
||||||
|
|
||||||
import { onMount, onDestroy, createEventDispatcher } from 'svelte';
|
import { onMount, onDestroy } from 'svelte';
|
||||||
import {
|
import {
|
||||||
EditorView, keymap, highlightSpecialChars, drawSelection,
|
EditorView, keymap, highlightSpecialChars, drawSelection,
|
||||||
highlightActiveLine, dropCursor, rectangularSelection,
|
highlightActiveLine, dropCursor, rectangularSelection,
|
||||||
@@ -38,8 +38,10 @@ import { languages } from '@codemirror/language-data';
|
|||||||
// import { } from '@codemirror/gutter'; // Merged into @codemirror/view
|
// import { } from '@codemirror/gutter'; // Merged into @codemirror/view
|
||||||
import { basicSetup } from 'codemirror';
|
import { basicSetup } from 'codemirror';
|
||||||
import { markdown, markdownLanguage } from '@codemirror/lang-markdown';
|
import { markdown, markdownLanguage } from '@codemirror/lang-markdown';
|
||||||
import { javascript } from '@codemirror/lang-javascript';
|
// import { css } from '@codemirror/lang-css';
|
||||||
import { json } from '@codemirror/lang-json';
|
// import { javascript } from '@codemirror/lang-javascript';
|
||||||
|
// import { json } from '@codemirror/lang-json';
|
||||||
|
// import { html } from '@codemirror/lang-html';
|
||||||
import { oneDark } from "@codemirror/theme-one-dark";
|
import { oneDark } from "@codemirror/theme-one-dark";
|
||||||
|
|
||||||
// Props
|
// Props
|
||||||
@@ -64,8 +66,6 @@ export let tab_size: number = 4;
|
|||||||
let classes = "";
|
let classes = "";
|
||||||
export { classes as class };
|
export { classes as class };
|
||||||
|
|
||||||
const dispatch = createEventDispatcher<{ change: string }>();
|
|
||||||
|
|
||||||
let editor_element: HTMLDivElement;
|
let editor_element: HTMLDivElement;
|
||||||
let editorView: EditorView;
|
let editorView: EditorView;
|
||||||
|
|
||||||
@@ -152,8 +152,10 @@ $: editor_extensions = [
|
|||||||
// placeholderExt(placeholder),
|
// placeholderExt(placeholder),
|
||||||
// language,
|
// language,
|
||||||
markdown({base: markdownLanguage, codeLanguages: languages}),
|
markdown({base: markdownLanguage, codeLanguages: languages}),
|
||||||
javascript({typescript: true}),
|
// javascript({typescript: true}),
|
||||||
json({ jsx: true }),
|
// json(),
|
||||||
|
// css(),
|
||||||
|
// html(),
|
||||||
theme,
|
theme,
|
||||||
|
|
||||||
...extensions
|
...extensions
|
||||||
@@ -193,7 +195,7 @@ onMount(() => {
|
|||||||
if (transaction.docChanged) {
|
if (transaction.docChanged) {
|
||||||
new_content = editorView.state.doc.toString();
|
new_content = editorView.state.doc.toString();
|
||||||
const newContent = editorView.state.doc.toString();
|
const newContent = editorView.state.doc.toString();
|
||||||
dispatch('change', newContent);
|
// dispatch('change', newContent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user