diff --git a/packages/loro-demo/.gitignore b/packages/loro-demo/.gitignore deleted file mode 100644 index 8f6c617e..00000000 --- a/packages/loro-demo/.gitignore +++ /dev/null @@ -1,12 +0,0 @@ -.DS_Store -node_modules -/build -/.svelte-kit -/package -.env -.env.* -!.env.example -.vercel -.output -vite.config.js.timestamp-* -vite.config.ts.timestamp-* diff --git a/packages/loro-demo/.npmrc b/packages/loro-demo/.npmrc deleted file mode 100644 index b6f27f13..00000000 --- a/packages/loro-demo/.npmrc +++ /dev/null @@ -1 +0,0 @@ -engine-strict=true diff --git a/packages/loro-demo/Dockerfile b/packages/loro-demo/Dockerfile deleted file mode 100644 index 1c163d05..00000000 --- a/packages/loro-demo/Dockerfile +++ /dev/null @@ -1,29 +0,0 @@ -# build the sapper app -FROM node AS base -ENV PNPM_HOME="/pnpm" -ENV PATH="$PNPM_HOME:$PATH" -RUN corepack enable -COPY ./../.. /app/ -WORKDIR /app - -# FROM base AS prod-deps -# RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --prod --frozen-lockfile - -FROM base AS build -ENV CI=1 -RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile -# RUN cd packages/website; --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile - -RUN cd packages/website; pnpm run build - - -# copy node_modules/ and other build files over -FROM node:alpine - -WORKDIR /app - -COPY --from=build /app/packages/website/build . -COPY --from=build /app/packages/website/package.json ./package.json - -EXPOSE 3000 -CMD ["node", "."] \ No newline at end of file diff --git a/packages/loro-demo/package.json b/packages/loro-demo/package.json deleted file mode 100644 index 9ae3b549..00000000 --- a/packages/loro-demo/package.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "name": "website", - "version": "0.0.1", - "scripts": { - "dev": "vite dev", - "build": "vite build", - "preview": "vite preview", - "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", - "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch" - }, - "devDependencies": { - "@collabs/collabs": "^0.13.4", - "@collabs/ws-client": "^0.13.4", - "@fontsource/fira-mono": "^4.5.10", - "@neoconfetti/svelte": "^1.0.0", - "@sveltejs/adapter-auto": "^3.0.0", - "@sveltejs/adapter-node": "^4.0.1", - "@sveltejs/kit": "^2.0.0", - "@sveltejs/vite-plugin-svelte": "^3.0.0", - "@types/color-hash": "^1.0.5", - "@types/lodash": "^4.14.202", - "@types/quill": "^2.0.14", - "@types/uuid": "^9.0.8", - "svelte": "^4.2.7", - "svelte-check": "^3.6.0", - "tslib": "^2.4.1", - "typescript": "^5.0.0", - "vite": "^5.0.3", - "vite-plugin-top-level-await": "^1.4.1", - "vite-plugin-wasm": "^3.3.0" - }, - "type": "module", - "dependencies": { - "@steeze-ui/svelte-icon": "^1.5.0", - "color-hash": "^2.0.2", - "lodash": "^4.17.21", - "loro-crdt": "^0.11.1", - "prosemirror-commands": "^1.5.2", - "prosemirror-dropcursor": "^1.8.1", - "prosemirror-gapcursor": "^1.3.2", - "prosemirror-history": "^1.3.2", - "prosemirror-inputrules": "^1.4.0", - "prosemirror-keymap": "^1.2.2", - "prosemirror-model": "^1.19.4", - "prosemirror-schema-basic": "^1.2.2", - "prosemirror-schema-list": "^1.3.0", - "prosemirror-state": "^1.4.3", - "prosemirror-transform": "^1.8.0", - "prosemirror-view": "^1.33.1", - "quill": "^1.3.7", - "uuid": "^9.0.1" - } -} diff --git a/packages/loro-demo/src/app.d.ts b/packages/loro-demo/src/app.d.ts deleted file mode 100644 index 743f07b2..00000000 --- a/packages/loro-demo/src/app.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -// See https://kit.svelte.dev/docs/types#app -// for information about these interfaces -declare global { - namespace App { - // interface Error {} - // interface Locals {} - // interface PageData {} - // interface PageState {} - // interface Platform {} - } -} - -export {}; diff --git a/packages/loro-demo/src/app.html b/packages/loro-demo/src/app.html deleted file mode 100644 index 5889edbd..00000000 --- a/packages/loro-demo/src/app.html +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - %sveltekit.head% - - -
%sveltekit.body%
- - diff --git a/packages/loro-demo/src/lib/Hero.svelte b/packages/loro-demo/src/lib/Hero.svelte deleted file mode 100644 index b068cca4..00000000 --- a/packages/loro-demo/src/lib/Hero.svelte +++ /dev/null @@ -1,60 +0,0 @@ - - -
- -
-

JadedBlueEyes

-
Finally, a website!
-
-
- - diff --git a/packages/loro-demo/src/lib/LiveEditor.svelte b/packages/loro-demo/src/lib/LiveEditor.svelte deleted file mode 100644 index bdb4a7dc..00000000 --- a/packages/loro-demo/src/lib/LiveEditor.svelte +++ /dev/null @@ -1,211 +0,0 @@ - - -
- - -
-
-
-
- - diff --git a/packages/loro-demo/src/lib/logo.svg b/packages/loro-demo/src/lib/logo.svg deleted file mode 100644 index 771b016a..00000000 --- a/packages/loro-demo/src/lib/logo.svg +++ /dev/null @@ -1,387 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/loro-demo/src/lib/menu/Menu.svelte b/packages/loro-demo/src/lib/menu/Menu.svelte deleted file mode 100644 index da9f9529..00000000 --- a/packages/loro-demo/src/lib/menu/Menu.svelte +++ /dev/null @@ -1,46 +0,0 @@ - - - - - diff --git a/packages/loro-demo/src/lib/menu/MenuIcon.svelte b/packages/loro-demo/src/lib/menu/MenuIcon.svelte deleted file mode 100644 index c6b27b7d..00000000 --- a/packages/loro-demo/src/lib/menu/MenuIcon.svelte +++ /dev/null @@ -1,8 +0,0 @@ - - - - {text} - diff --git a/packages/loro-demo/src/lib/menu/index.ts b/packages/loro-demo/src/lib/menu/index.ts deleted file mode 100644 index 1b69c041..00000000 --- a/packages/loro-demo/src/lib/menu/index.ts +++ /dev/null @@ -1,67 +0,0 @@ -import { Plugin, type Command } from "prosemirror-state"; -import { setBlockType, toggleMark } from "prosemirror-commands"; -import { richTextSchema as schema } from "../prosemirror/schema"; - -import Menu from "./Menu.svelte"; -import type { EditorView } from "prosemirror-view"; - -class MenuView { - items: { command: Command; text: string; name: string; }[]; - editorView: EditorView; - dom: HTMLDivElement; - menu: Menu; - constructor(items: { command: Command; text: string; name: string; }[], editorView: EditorView) { - this.items = items; - this.editorView = editorView; - this.update(); - - const onCommand = (command: (arg0: any, arg1: any, arg2: any) => void) => { - editorView.focus(); - command(editorView.state, editorView.dispatch, editorView); - }; - - this.dom = document.createElement("div"); - this.menu = new Menu({ - target: this.dom, - props: { - items, - onCommand - } - }); - } - - update() { - // this.items.forEach(({ command, dom }) => { - // let active = command(this.editorView.state, null, this.editorView); - // dom.style.display = active ? "" : "none"; - // }); - } - - destroy() { - this.dom.remove(); - } -} - -function menuPlugin(items: { command: Command; text: string; name: string; }[]) { - return new Plugin({ - view(editorView) { - let menuView = new MenuView(items, editorView); - editorView.dom?.parentNode?.insertBefore(menuView.dom, editorView.dom); - return menuView; - } - }); -} - -let menu = menuPlugin([ - { command: toggleMark(schema.marks.strong), text: "B", name: "strong" }, - { command: toggleMark(schema.marks.em), text: "i", name: "em" }, - { command: toggleMark(schema.marks.code), text: " - import { onMount, onDestroy, createEventDispatcher } from 'svelte' - // import { createSingleLineEditor } from './state' - import { EditorView } from "prosemirror-view" - import { EditorState } from "prosemirror-state" - import { createRichTextEditor } from './editor'; - import type { LoroText } from 'loro-crdt'; - - - const dispatch = createEventDispatcher() - - /** @type string */ - export let className = "ui-editor" - - /** @type Loro */ - export let state; - /** @type string */ - export let document; - - /** @type EditorState */ - export let editorState = createRichTextEditor(document, state) - - /** @type string */ - export let placeholder = '' - - /** Reference to the editor view - * @type EditorView|null */ - export let view: EditorView | null = null - - /** Debounce change events (set to zero for immediate updates) */ - export let debounceChangeEventsInterval = 50 - - /** Reference to the editor component - * @type HTMLDivElement | null */ - export let editor: HTMLDivElement | null = null - - /** Initial EditorView props */ - export let editorViewProps = {} - - /** Focus the content-editable div */ - export function focus() { - view && view.focus() - } - - /** Blur the content-editable div */ - export function blur() { - editor && editor.blur() - } - - /** - * Tracks the timeout id of the last time the change event was dispatched - * @type {number | undefined} - */ - let dispatchLastEditTimeout: number | undefined - - /** Tracks whether changes to editor state were not yet dispatched */ - let isDirty = false - - // @ts-ignore - $: if (view && editorState && !isDirty) { - view.updateState(editorState) // necessary to keep the DOM in sync with the editor state on external updates - } - - /** - * Tracks whether the editor is empty (i.e. has a content size of 0) - * @type {boolean} - */ - let editorIsEmpty: boolean - // @ts-ignore - $: editorIsEmpty = editorState ? editorState.doc.content.size === 0 - || (editorState.doc.textContent === "" && editorState.doc.content.size < 3) : true - - /** Dispatches a change event and resets whether the editor state is dirty */ - const dispatchChangeEvent = () => { - if (isDirty) { - dispatch('change', {editorState}) - isDirty = false - } - } - - /** - * Captures custom events from plugins and dispatches them with a new event type (based on event.detail.type) - * @param event {CustomEvent} - */ - const onCustomEvent = (event: CustomEvent) => { - if (event.detail) { - const {type, ...detail} = event.detail - dispatch(type || 'custom', detail) - } - } - - onMount(() => { - // @ts-ignore - view = new EditorView({mount: editor}, { - ...editorViewProps, - state: editorState, - dispatchTransaction: (transaction) => { - // @ts-ignore - editorState = view.state.apply(transaction) - - // @ts-ignore - const contentHasChanged = !editorState.doc.eq(view.state.doc) - - if (contentHasChanged) { - isDirty = true - if (debounceChangeEventsInterval > 0) { - if (dispatchLastEditTimeout) clearTimeout(dispatchLastEditTimeout) - dispatchLastEditTimeout = setTimeout(dispatchChangeEvent, 50) - } else { - setTimeout(dispatchChangeEvent, 0) - } - } - - // @ts-ignore - view.updateState(editorState) - - dispatch('transaction', {view, editorState, isDirty, contentHasChanged}) - }, - }) - }) - - onDestroy(() => { - // @ts-ignore - if (view) - view.destroy() - }) - - --> - - - - - \ No newline at end of file diff --git a/packages/loro-demo/src/lib/prosemirror/editor.ts b/packages/loro-demo/src/lib/prosemirror/editor.ts deleted file mode 100644 index 16afac8f..00000000 --- a/packages/loro-demo/src/lib/prosemirror/editor.ts +++ /dev/null @@ -1,100 +0,0 @@ -// import type { Delta, Loro, LoroText } from "loro-crdt"; - -// import { EditorState, TextSelection, Plugin } from "prosemirror-state"; -// import { DOMParser, DOMSerializer, Node, Schema } from "prosemirror-model"; -// import { richTextSchema, EXPAND_CONFIG } from "./schema"; - -// import { keymap } from "prosemirror-keymap"; -// import { baseKeymap } from "prosemirror-commands"; -// import { history, redo, undo } from "prosemirror-history"; -// import { dropCursor } from "prosemirror-dropcursor" -// import { gapCursor } from "prosemirror-gapcursor" - -// import { richTextKeyMapPlugin } from "./keymap"; - - -// import { PluginKey } from 'prosemirror-state' -// const syncPluginKey = new PluginKey('loro-sync') - -// /** -// * Create an empty editor state with rich text editing capabilities -// * @param html {string} -// * @param plugins {array} -// * @return {EditorState} -// */ -// export const createRichTextEditor = (document: string, state: Loro, plugins = []) => { -// state.configTextStyle(EXPAND_CONFIG) - - -// const syncPlugin = new Plugin({ -// key: syncPluginKey, -// state: { -// init(config, instance) { -// let richtext = state.getText(document); -// richtext. -// instance.doc = new Node() -// richtext.subscribe(state, (event) => { -// for (const change of event.events) { -// console.log(change) -// } -// // if (!event.local && event.diff.type == "text") { -// // console.log(state.peerId, "CRDT_EVENT", event); -// // const eventDelta = event.diff.diff; -// // const delta: Delta[] = []; -// // let index = 0; -// // for (let i = 0; i < eventDelta.length; i++) { -// // const d = eventDelta[i]; -// // const length = d.delete || d.retain || d.insert!.length; -// // // skip the last newline that quill automatically appends -// // if ( -// // d.insert && -// // d.insert === "\n" && -// // // index === quill.getLength() - 1 && -// // i === eventDelta.length - 1 && -// // d.attributes != null && -// // Object.keys(d.attributes).length > 0 -// // ) { -// // delta.push({ -// // retain: 1, -// // attributes: d.attributes, -// // }); -// // index += length; -// // continue; -// // } - -// // delta.push(d); -// // index += length; -// // } - -// // // quill.updateContents(new Delta(delta), "this" as any); -// // // const a = this.richtext.toDelta(); -// // // const b = this.quill.getContents().ops; -// // // console.log(this.doc.peerId, "COMPARE AFTER CRDT_EVENT"); -// // // if (!assertEqual(a, b as any)) { -// // // quill.setContents(new Delta(a), "this" as any); -// // // } -// // } -// }); -// }, -// apply(tr, value, oldState, newState) { -// console.log(tr, value, oldState, newState) -// }, -// } -// }); - -// return EditorState.create({ -// schema: richTextSchema, -// // doc, -// // selection, -// plugins: [ -// // history(), -// keymap({}), // {"Mod-z": undo, "Mod-y": redo, "Mod-Shift-z": redo} -// keymap(baseKeymap), -// dropCursor(), -// gapCursor(), -// syncPlugin, -// richTextKeyMapPlugin, -// ...plugins -// ] -// }); -// } \ No newline at end of file diff --git a/packages/loro-demo/src/lib/prosemirror/keymap.ts b/packages/loro-demo/src/lib/prosemirror/keymap.ts deleted file mode 100644 index 85641b76..00000000 --- a/packages/loro-demo/src/lib/prosemirror/keymap.ts +++ /dev/null @@ -1,111 +0,0 @@ -import { - wrapIn, setBlockType, chainCommands, toggleMark, exitCode, - joinUp, joinDown, lift, selectParentNode -} from "prosemirror-commands"; -import { wrapInList, splitListItem, liftListItem, sinkListItem } from "prosemirror-schema-list"; -import { undo, redo } from "prosemirror-history"; -import { undoInputRule } from "prosemirror-inputrules"; -import { richTextSchema } from "./schema"; -import { keymap } from "prosemirror-keymap" - -import type { Command, EditorState, Transaction } from "prosemirror-state"; -import type { EditorView } from "prosemirror-view"; -import type { Schema } from "prosemirror-model"; -const mac = typeof navigator != "undefined" ? /Mac/.test(navigator.platform) : false; -type keyMap = { [x: string]: { combo: string, command: Command }[] }; - -const addKey = (keyMap: keyMap, name: string, combo: string, command: Command) => { - if (!keyMap[name]) keyMap[name] = []; - keyMap[name].push({ combo, command }); -} - -const createKeyMapConfiguration = (schema: Schema) => { - let config: keyMap = {} - - addKey(config, 'undo', "Mod-z", undo) - - addKey(config, "redo", "Shift-Mod-z", redo); - addKey(config, "undoInputRule", "Backspace", undoInputRule); - - if (!mac) addKey(config, "redo", "Mod-y", redo); - - addKey(config, "joinUp", "Alt-ArrowUp", joinUp); - addKey(config, "joinDown", "Alt-ArrowDown", joinDown); - addKey(config, "lift", "Mod-BracketLeft", lift); - addKey(config, "selectParentNode", "Escape", selectParentNode); - - if (!!schema.marks.strong) { - addKey(config, "toggleMarkStrong", "Mod-b", toggleMark(schema.marks.strong)); - addKey(config, "toggleMarkStrong", "Mod-B", toggleMark(schema.marks.strong)); - } - - if (!!schema.marks.em) { - addKey(config, "toggleMarkEm", "Mod-i", toggleMark(schema.marks.em)); - addKey(config, "toggleMarkEm", "Mod-I", toggleMark(schema.marks.em)); - } - if (!!schema.marks.code) - addKey(config, "toggleMarkCode", "Mod-`", toggleMark(schema.marks.code)); - - if (!!schema.nodes.bullet_list) - addKey(config, "wrapInListUnordered", "Shift-Ctrl-8", wrapInList(schema.nodes.bullet_list)); - - if (!!schema.nodes.ordered_list) - addKey(config, "wrapInListOrdered", "Shift-Ctrl-9", wrapInList(schema.nodes.ordered_list)); - - if (!!schema.nodes.blockquote) - addKey(config, "wrapInBlockquote", "Ctrl->", wrapIn(schema.nodes.blockquote)); - - if (!!schema.nodes.hard_break) { - let br = schema.nodes.hard_break - const cmd = chainCommands(exitCode, (state, dispatch) => { - if (dispatch) - dispatch(state.tr.replaceSelectionWith(br.create()).scrollIntoView()) - return true - }) - - addKey(config, "hardBreak", "Mod-Enter", cmd); - addKey(config, "hardBreak", "Shift-Enter", cmd); - if (mac) addKey(config, "hardBreak", "Ctrl-Enter", cmd); - } - - if (!!schema.nodes.list_item) { - addKey(config, "splitListItem", "Enter", splitListItem(schema.nodes.list_item)); - addKey(config, "liftListItem", "Mod-[", liftListItem(schema.nodes.list_item)); - addKey(config, "sinkListItem", "Mod-]", sinkListItem(schema.nodes.list_item)); - } - if (!!schema.nodes.paragraph) - addKey(config, "setBlockTypeParagraph", "Shift-Ctrl-0", setBlockType(schema.nodes.paragraph)); - - if (!!schema.nodes.code_block) - addKey(config, "setBlockTypeCode", "Shift-Ctrl-\\", setBlockType(schema.nodes.code_block)); - - if (!!schema.nodes.heading) - for (let i = 1; i <= 6; i++) { - addKey(config, `setHeading${i}`, `Shift-Ctrl-${i}`, setBlockType(schema.nodes.heading, { level: i })); - } - - if (!!schema.nodes.horizontal_rule) { - addKey(config, "insertHorizontalRuler", "Mod-_", (state, dispatch) => { - let hr = schema.nodes.horizontal_rule; - if (dispatch) - dispatch(state.tr.replaceSelectionWith(hr.create()).scrollIntoView()); - return true; - }) - } - - return config -} - -const getKeyMapFromConfig = (config: keyMap) => { - const keys = Object.keys(config); - let bindings: { [ combo: string]: Command} = {}; - keys.forEach(key => { - config[key].forEach(entry => { - bindings[entry.combo] = entry.command; - }) - }) - return keymap(bindings); -} - -const richTextKeyMapConfiguration = createKeyMapConfiguration(richTextSchema); -export const richTextKeyMapPlugin = getKeyMapFromConfig(richTextKeyMapConfiguration); \ No newline at end of file diff --git a/packages/loro-demo/src/lib/prosemirror/metadata.ts b/packages/loro-demo/src/lib/prosemirror/metadata.ts deleted file mode 100644 index d72e0197..00000000 --- a/packages/loro-demo/src/lib/prosemirror/metadata.ts +++ /dev/null @@ -1,14 +0,0 @@ - -import { dev } from '$app/environment'; - - - -export const SITE_TITLE = 'JadedBlueEyes'; - -export const SITE_URL = dev ? "http://localhost:5173" : "https://jade.ellis.link" - -export const SITE_DOMAIN = 'jade.ellis.link'; -export const SITE_DEFAULT_DESCRIPTION = - "Jade's website."; - -export const RSS_DEFAULT_POSTS_PER_PAGE = 15; \ No newline at end of file diff --git a/packages/loro-demo/src/lib/prosemirror/schema.ts b/packages/loro-demo/src/lib/prosemirror/schema.ts deleted file mode 100644 index 942b7cfd..00000000 --- a/packages/loro-demo/src/lib/prosemirror/schema.ts +++ /dev/null @@ -1,24 +0,0 @@ - -import { Schema } from 'prosemirror-model'; -import { nodes, marks } from 'prosemirror-schema-basic'; - - -export const EXPAND_CONFIG: { [key in string]: { expand: "before" | "after" | "both" | "none"; } } = { - bold: { expand: "after" }, - italic: { expand: "after" }, - underline: { expand: "after" }, - link: { expand: "none" }, - heading: { expand: "none" }, -} - - - -/** - * Schema to represent rich text - * @type {Schema} - */ -export const richTextSchema = new Schema({ - nodes, - marks - }); -// richTextSchema.nodes.heading \ No newline at end of file diff --git a/packages/loro-demo/src/lib/styles.css b/packages/loro-demo/src/lib/styles.css deleted file mode 100644 index 0120f2f3..00000000 --- a/packages/loro-demo/src/lib/styles.css +++ /dev/null @@ -1,80 +0,0 @@ -:root { - color-scheme: light; - --spacing: 24px; - --theme: #242424; - --background-color: #f8f8f8; - --surface-color: #fff; - --backdrop-color: rgba(247, 247, 247, .54); - --shadow-color: rgba(0, 0, 0, .12); - --font-color: rgba(0, 0, 0, .87); - --font-color-contrast: rgba(255, 255, 255, 1); - --font-color-secondary: rgba(0, 0, 0, .6); - --font-family-base: Roboto, sans-serif; - --font-family-heading: "Sen", Roboto, sans-serif; - --border-radius: 8px; - --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1); -} - -@media (prefers-color-scheme: dark) { - :root { - color-scheme: dark; - --theme: #eee; - --background-color: #141414; - --backdrop-color: rgba(20, 20, 20, .54); - --shadow-color: rgba(255, 255, 255, .12); - --surface-color: #242424; - --font-color: rgba(255, 255, 255, .87); - --font-color-contrast: rgba(0, 0, 0, .87); - --font-color-secondary: rgba(255, 255, 255, .6) - } -} - - - - -html { - font-family: var(--font-family-base); - background-color: var(--background-color); - color: var(--font-color); - font-size: 16px; - line-height: 1.5 -} - -body { - padding: 0; - margin: 0 -} - -iframe, -img, -svg { - width: 100%; - height: 100%; - display: block; -} - -.main { - max-width: 1056px; - margin: 0 auto; - padding: 0 var(--spacing); - --edge-border-radius: var(--border-radius); -} - -@media screen and (max-width: 320px) { - .main { - padding: 0 0; - --edge-border-radius: 0; - } -} - - -.card { - border-radius: var(--border-radius); - box-shadow: var(--shadow); - background-color: var(--surface-color); -} - - -.edge { - border-radius: var(--edge-border-radius); -} \ No newline at end of file diff --git a/packages/loro-demo/src/routes/+layout.svelte b/packages/loro-demo/src/routes/+layout.svelte deleted file mode 100644 index ea10c5fc..00000000 --- a/packages/loro-demo/src/routes/+layout.svelte +++ /dev/null @@ -1,8 +0,0 @@ - - -
- - -
\ No newline at end of file diff --git a/packages/loro-demo/src/routes/+page.server.ts b/packages/loro-demo/src/routes/+page.server.ts deleted file mode 100644 index a3d15781..00000000 --- a/packages/loro-demo/src/routes/+page.server.ts +++ /dev/null @@ -1 +0,0 @@ -export const ssr = false; diff --git a/packages/loro-demo/src/routes/+page.svelte b/packages/loro-demo/src/routes/+page.svelte deleted file mode 100644 index 614876f6..00000000 --- a/packages/loro-demo/src/routes/+page.svelte +++ /dev/null @@ -1,9 +0,0 @@ - - - - diff --git a/packages/loro-demo/static/robots.txt b/packages/loro-demo/static/robots.txt deleted file mode 100644 index e9e57dc4..00000000 --- a/packages/loro-demo/static/robots.txt +++ /dev/null @@ -1,3 +0,0 @@ -# https://www.robotstxt.org/robotstxt.html -User-agent: * -Disallow: diff --git a/packages/loro-demo/svelte.config.js b/packages/loro-demo/svelte.config.js deleted file mode 100644 index e4150ef3..00000000 --- a/packages/loro-demo/svelte.config.js +++ /dev/null @@ -1,16 +0,0 @@ -import adapter from '@sveltejs/adapter-node'; -import { vitePreprocess } from '@sveltejs/vite-plugin-svelte'; - -/** @type {import('@sveltejs/kit').Config} */ -const config = { - // Consult https://kit.svelte.dev/docs/integrations#preprocessors - // for more information about preprocessors - preprocess: vitePreprocess(), - - kit: { - adapter: adapter(), - - } -}; - -export default config; diff --git a/packages/loro-demo/tsconfig.json b/packages/loro-demo/tsconfig.json deleted file mode 100644 index 82081abc..00000000 --- a/packages/loro-demo/tsconfig.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "extends": "./.svelte-kit/tsconfig.json", - "compilerOptions": { - "allowJs": true, - "checkJs": true, - "esModuleInterop": true, - "forceConsistentCasingInFileNames": true, - "resolveJsonModule": true, - "skipLibCheck": true, - "sourceMap": true, - "strict": true, - "moduleResolution": "bundler" - } - // Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias - // - // If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes - // from the referenced tsconfig.json - TypeScript does not merge them in -} diff --git a/packages/loro-demo/vite.config.ts b/packages/loro-demo/vite.config.ts deleted file mode 100644 index cebdca84..00000000 --- a/packages/loro-demo/vite.config.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { sveltekit } from '@sveltejs/kit/vite'; -import { defineConfig } from 'vite'; - -import wasm from "vite-plugin-wasm"; -import topLevelAwait from "vite-plugin-top-level-await"; - -export default defineConfig({ - plugins: [wasm(), topLevelAwait(), sveltekit()] -});