From 5a0340c22627f9c413de215e97e6e81212140c67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magnus=20=C3=85hall?= Date: Fri, 15 May 2026 08:22:43 +0200 Subject: [PATCH] Added markdown rendering --- static/css/markdown.css | 30 + static/css/notes2.css | 63 +- static/images/icon_markdown.svg | 57 + static/images/icon_markdown_hollow.svg | 50 + static/images/icon_save.svg | 49 + static/images/icon_save_disabled.svg | 49 + static/js/app.mjs | 4 +- static/js/lib/node_modules/.package-lock.json | 18 +- .../marked-token-position/LICENSE | 21 + .../marked-token-position/README.md | 160 + .../marked-token-position/lib/index.d.ts | 59 + .../marked-token-position/lib/index.esm.js | 6 + .../lib/index.esm.js.map | 7 + .../marked-token-position/lib/index.umd.js | 9 + .../lib/index.umd.js.map | 7 + .../marked-token-position/package.json | 66 + .../marked-token-position/src/index.ts | 192 ++ .../marked/{LICENSE.md => LICENSE} | 0 static/js/lib/node_modules/marked/README.md | 10 +- static/js/lib/node_modules/marked/bin/main.js | 45 +- .../js/lib/node_modules/marked/bin/marked.js | 3 +- .../js/lib/node_modules/marked/lib/marked.cjs | 2442 --------------- .../node_modules/marked/lib/marked.cjs.map | 1 - .../lib/node_modules/marked/lib/marked.d.cts | 638 ---- .../lib/node_modules/marked/lib/marked.d.ts | 644 ++-- .../lib/node_modules/marked/lib/marked.esm.js | 2481 +--------------- .../node_modules/marked/lib/marked.esm.js.map | 8 +- .../lib/node_modules/marked/lib/marked.umd.js | 2507 +--------------- .../node_modules/marked/lib/marked.umd.js.map | 8 +- .../js/lib/node_modules/marked/man/marked.1 | 6 +- .../lib/node_modules/marked/man/marked.1.md | 3 +- .../js/lib/node_modules/marked/marked.min.js | 6 - .../js/lib/node_modules/marked/package.json | 113 +- static/js/lib/node_modules/preact/LICENSE | 21 + static/js/lib/node_modules/preact/README.md | 185 ++ .../js/lib/node_modules/preact/compat/LICENSE | 21 + .../node_modules/preact/compat/client.d.ts | 13 + .../lib/node_modules/preact/compat/client.js | 21 + .../lib/node_modules/preact/compat/client.mjs | 24 + .../node_modules/preact/compat/dist/compat.js | 2 + .../preact/compat/dist/compat.js.map | 1 + .../preact/compat/dist/compat.mjs | 2 + .../preact/compat/dist/compat.module.js | 2 + .../preact/compat/dist/compat.module.js.map | 1 + .../preact/compat/dist/compat.umd.js | 2 + .../preact/compat/dist/compat.umd.js.map | 1 + .../preact/compat/jsx-dev-runtime.js | 3 + .../preact/compat/jsx-dev-runtime.mjs | 3 + .../node_modules/preact/compat/jsx-runtime.js | 3 + .../preact/compat/jsx-runtime.mjs | 3 + .../node_modules/preact/compat/package.json | 51 + .../node_modules/preact/compat/scheduler.js | 15 + .../node_modules/preact/compat/scheduler.mjs | 23 + .../preact/compat/server.browser.js | 11 + .../lib/node_modules/preact/compat/server.js | 26 + .../lib/node_modules/preact/compat/server.mjs | 15 + .../preact/compat/src/Children.js | 21 + .../preact/compat/src/PureComponent.js | 16 + .../preact/compat/src/forwardRef.js | 47 + .../node_modules/preact/compat/src/hooks.js | 70 + .../node_modules/preact/compat/src/index.d.ts | 346 +++ .../node_modules/preact/compat/src/index.js | 238 ++ .../preact/compat/src/internal.d.ts | 48 + .../node_modules/preact/compat/src/memo.js | 34 + .../node_modules/preact/compat/src/portals.js | 75 + .../node_modules/preact/compat/src/render.js | 313 ++ .../preact/compat/src/suspense-list.d.ts | 16 + .../preact/compat/src/suspense-list.js | 127 + .../preact/compat/src/suspense.d.ts | 19 + .../preact/compat/src/suspense.js | 273 ++ .../node_modules/preact/compat/src/util.js | 33 + .../node_modules/preact/compat/test-utils.js | 1 + .../js/lib/node_modules/preact/debug/LICENSE | 21 + .../node_modules/preact/debug/dist/debug.js | 2 + .../preact/debug/dist/debug.js.map | 1 + .../node_modules/preact/debug/dist/debug.mjs | 2 + .../preact/debug/dist/debug.module.js | 2 + .../preact/debug/dist/debug.module.js.map | 1 + .../preact/debug/dist/debug.umd.js | 2 + .../preact/debug/dist/debug.umd.js.map | 1 + .../node_modules/preact/debug/package.json | 27 + .../preact/debug/src/check-props.js | 54 + .../preact/debug/src/component-stack.js | 146 + .../preact/debug/src/constants.js | 3 + .../node_modules/preact/debug/src/debug.js | 594 ++++ .../node_modules/preact/debug/src/index.d.ts | 4 + .../node_modules/preact/debug/src/index.js | 6 + .../preact/debug/src/internal.d.ts | 82 + .../lib/node_modules/preact/debug/src/util.js | 15 + .../lib/node_modules/preact/devtools/LICENSE | 21 + .../preact/devtools/dist/devtools.js | 2 + .../preact/devtools/dist/devtools.js.map | 1 + .../preact/devtools/dist/devtools.mjs | 2 + .../preact/devtools/dist/devtools.module.js | 2 + .../devtools/dist/devtools.module.js.map | 1 + .../preact/devtools/dist/devtools.umd.js | 2 + .../preact/devtools/dist/devtools.umd.js.map | 1 + .../node_modules/preact/devtools/package.json | 25 + .../preact/devtools/src/devtools.js | 21 + .../preact/devtools/src/index.d.ts | 8 + .../node_modules/preact/devtools/src/index.js | 15 + .../js/lib/node_modules/preact/dist/preact.js | 2 + .../node_modules/preact/dist/preact.js.map | 1 + .../node_modules/preact/dist/preact.min.js | 2 + .../preact/dist/preact.min.js.map | 1 + .../preact/dist/preact.min.module.js | 2 + .../preact/dist/preact.min.module.js.map | 1 + .../preact/dist/preact.min.umd.js | 2 + .../preact/dist/preact.min.umd.js.map | 1 + .../lib/node_modules/preact/dist/preact.mjs | 2 + .../node_modules/preact/dist/preact.module.js | 2 + .../preact/dist/preact.module.js.map | 1 + .../node_modules/preact/dist/preact.umd.js | 2 + .../preact/dist/preact.umd.js.map | 1 + .../js/lib/node_modules/preact/hooks/LICENSE | 21 + .../node_modules/preact/hooks/dist/hooks.js | 2 + .../preact/hooks/dist/hooks.js.map | 1 + .../node_modules/preact/hooks/dist/hooks.mjs | 2 + .../preact/hooks/dist/hooks.module.js | 2 + .../preact/hooks/dist/hooks.module.js.map | 1 + .../preact/hooks/dist/hooks.umd.js | 2 + .../preact/hooks/dist/hooks.umd.js.map | 1 + .../node_modules/preact/hooks/package.json | 35 + .../node_modules/preact/hooks/src/index.d.ts | 145 + .../node_modules/preact/hooks/src/index.js | 549 ++++ .../preact/hooks/src/internal.d.ts | 101 + .../node_modules/preact/jsx-runtime/LICENSE | 21 + .../preact/jsx-runtime/dist/jsxRuntime.js | 2 + .../preact/jsx-runtime/dist/jsxRuntime.js.map | 1 + .../preact/jsx-runtime/dist/jsxRuntime.mjs | 2 + .../jsx-runtime/dist/jsxRuntime.module.js | 2 + .../jsx-runtime/dist/jsxRuntime.module.js.map | 1 + .../preact/jsx-runtime/dist/jsxRuntime.umd.js | 2 + .../jsx-runtime/dist/jsxRuntime.umd.js.map | 1 + .../preact/jsx-runtime/package.json | 28 + .../preact/jsx-runtime/src/index.d.ts | 62 + .../preact/jsx-runtime/src/index.js | 185 ++ .../preact/jsx-runtime/src/utils.js | 36 + .../js/lib/node_modules/preact/package.json | 263 ++ static/js/lib/node_modules/preact/src/cjs.js | 3 + .../node_modules/preact/src/clone-element.js | 48 + .../lib/node_modules/preact/src/component.js | 241 ++ .../lib/node_modules/preact/src/constants.js | 21 + .../node_modules/preact/src/create-context.js | 65 + .../node_modules/preact/src/create-element.js | 97 + .../preact/src/diff/catch-error.js | 44 + .../node_modules/preact/src/diff/children.js | 448 +++ .../lib/node_modules/preact/src/diff/index.js | 660 +++++ .../lib/node_modules/preact/src/diff/props.js | 176 ++ .../lib/node_modules/preact/src/index-5.d.ts | 398 +++ .../js/lib/node_modules/preact/src/index.d.ts | 398 +++ .../js/lib/node_modules/preact/src/index.js | 13 + .../lib/node_modules/preact/src/internal.d.ts | 190 ++ .../js/lib/node_modules/preact/src/jsx.d.ts | 2615 +++++++++++++++++ .../js/lib/node_modules/preact/src/options.js | 16 + .../js/lib/node_modules/preact/src/render.js | 78 + static/js/lib/node_modules/preact/src/util.js | 28 + .../preact/test-utils/dist/testUtils.js | 2 + .../preact/test-utils/dist/testUtils.js.map | 1 + .../preact/test-utils/dist/testUtils.mjs | 2 + .../test-utils/dist/testUtils.module.js | 2 + .../test-utils/dist/testUtils.module.js.map | 1 + .../preact/test-utils/dist/testUtils.umd.js | 2 + .../test-utils/dist/testUtils.umd.js.map | 1 + .../preact/test-utils/package.json | 28 + .../preact/test-utils/src/index.d.ts | 3 + .../preact/test-utils/src/index.js | 129 + static/js/lib/package-lock.json | 21 +- static/js/lib/package.json | 3 +- static/js/marked_position.mjs | 298 ++ static/js/node.mjs | 62 +- views/layouts/main.gotmpl | 2 +- 172 files changed, 12198 insertions(+), 8338 deletions(-) create mode 100644 static/css/markdown.css create mode 100644 static/images/icon_markdown.svg create mode 100644 static/images/icon_markdown_hollow.svg create mode 100644 static/images/icon_save.svg create mode 100644 static/images/icon_save_disabled.svg create mode 100644 static/js/lib/node_modules/marked-token-position/LICENSE create mode 100644 static/js/lib/node_modules/marked-token-position/README.md create mode 100644 static/js/lib/node_modules/marked-token-position/lib/index.d.ts create mode 100644 static/js/lib/node_modules/marked-token-position/lib/index.esm.js create mode 100644 static/js/lib/node_modules/marked-token-position/lib/index.esm.js.map create mode 100644 static/js/lib/node_modules/marked-token-position/lib/index.umd.js create mode 100644 static/js/lib/node_modules/marked-token-position/lib/index.umd.js.map create mode 100644 static/js/lib/node_modules/marked-token-position/package.json create mode 100644 static/js/lib/node_modules/marked-token-position/src/index.ts rename static/js/lib/node_modules/marked/{LICENSE.md => LICENSE} (100%) delete mode 100644 static/js/lib/node_modules/marked/lib/marked.cjs delete mode 100644 static/js/lib/node_modules/marked/lib/marked.cjs.map delete mode 100644 static/js/lib/node_modules/marked/lib/marked.d.cts delete mode 100644 static/js/lib/node_modules/marked/marked.min.js create mode 100644 static/js/lib/node_modules/preact/LICENSE create mode 100644 static/js/lib/node_modules/preact/README.md create mode 100644 static/js/lib/node_modules/preact/compat/LICENSE create mode 100644 static/js/lib/node_modules/preact/compat/client.d.ts create mode 100644 static/js/lib/node_modules/preact/compat/client.js create mode 100644 static/js/lib/node_modules/preact/compat/client.mjs create mode 100644 static/js/lib/node_modules/preact/compat/dist/compat.js create mode 100644 static/js/lib/node_modules/preact/compat/dist/compat.js.map create mode 100644 static/js/lib/node_modules/preact/compat/dist/compat.mjs create mode 100644 static/js/lib/node_modules/preact/compat/dist/compat.module.js create mode 100644 static/js/lib/node_modules/preact/compat/dist/compat.module.js.map create mode 100644 static/js/lib/node_modules/preact/compat/dist/compat.umd.js create mode 100644 static/js/lib/node_modules/preact/compat/dist/compat.umd.js.map create mode 100644 static/js/lib/node_modules/preact/compat/jsx-dev-runtime.js create mode 100644 static/js/lib/node_modules/preact/compat/jsx-dev-runtime.mjs create mode 100644 static/js/lib/node_modules/preact/compat/jsx-runtime.js create mode 100644 static/js/lib/node_modules/preact/compat/jsx-runtime.mjs create mode 100644 static/js/lib/node_modules/preact/compat/package.json create mode 100644 static/js/lib/node_modules/preact/compat/scheduler.js create mode 100644 static/js/lib/node_modules/preact/compat/scheduler.mjs create mode 100644 static/js/lib/node_modules/preact/compat/server.browser.js create mode 100644 static/js/lib/node_modules/preact/compat/server.js create mode 100644 static/js/lib/node_modules/preact/compat/server.mjs create mode 100644 static/js/lib/node_modules/preact/compat/src/Children.js create mode 100644 static/js/lib/node_modules/preact/compat/src/PureComponent.js create mode 100644 static/js/lib/node_modules/preact/compat/src/forwardRef.js create mode 100644 static/js/lib/node_modules/preact/compat/src/hooks.js create mode 100644 static/js/lib/node_modules/preact/compat/src/index.d.ts create mode 100644 static/js/lib/node_modules/preact/compat/src/index.js create mode 100644 static/js/lib/node_modules/preact/compat/src/internal.d.ts create mode 100644 static/js/lib/node_modules/preact/compat/src/memo.js create mode 100644 static/js/lib/node_modules/preact/compat/src/portals.js create mode 100644 static/js/lib/node_modules/preact/compat/src/render.js create mode 100644 static/js/lib/node_modules/preact/compat/src/suspense-list.d.ts create mode 100644 static/js/lib/node_modules/preact/compat/src/suspense-list.js create mode 100644 static/js/lib/node_modules/preact/compat/src/suspense.d.ts create mode 100644 static/js/lib/node_modules/preact/compat/src/suspense.js create mode 100644 static/js/lib/node_modules/preact/compat/src/util.js create mode 100644 static/js/lib/node_modules/preact/compat/test-utils.js create mode 100644 static/js/lib/node_modules/preact/debug/LICENSE create mode 100644 static/js/lib/node_modules/preact/debug/dist/debug.js create mode 100644 static/js/lib/node_modules/preact/debug/dist/debug.js.map create mode 100644 static/js/lib/node_modules/preact/debug/dist/debug.mjs create mode 100644 static/js/lib/node_modules/preact/debug/dist/debug.module.js create mode 100644 static/js/lib/node_modules/preact/debug/dist/debug.module.js.map create mode 100644 static/js/lib/node_modules/preact/debug/dist/debug.umd.js create mode 100644 static/js/lib/node_modules/preact/debug/dist/debug.umd.js.map create mode 100644 static/js/lib/node_modules/preact/debug/package.json create mode 100644 static/js/lib/node_modules/preact/debug/src/check-props.js create mode 100644 static/js/lib/node_modules/preact/debug/src/component-stack.js create mode 100644 static/js/lib/node_modules/preact/debug/src/constants.js create mode 100644 static/js/lib/node_modules/preact/debug/src/debug.js create mode 100644 static/js/lib/node_modules/preact/debug/src/index.d.ts create mode 100644 static/js/lib/node_modules/preact/debug/src/index.js create mode 100644 static/js/lib/node_modules/preact/debug/src/internal.d.ts create mode 100644 static/js/lib/node_modules/preact/debug/src/util.js create mode 100644 static/js/lib/node_modules/preact/devtools/LICENSE create mode 100644 static/js/lib/node_modules/preact/devtools/dist/devtools.js create mode 100644 static/js/lib/node_modules/preact/devtools/dist/devtools.js.map create mode 100644 static/js/lib/node_modules/preact/devtools/dist/devtools.mjs create mode 100644 static/js/lib/node_modules/preact/devtools/dist/devtools.module.js create mode 100644 static/js/lib/node_modules/preact/devtools/dist/devtools.module.js.map create mode 100644 static/js/lib/node_modules/preact/devtools/dist/devtools.umd.js create mode 100644 static/js/lib/node_modules/preact/devtools/dist/devtools.umd.js.map create mode 100644 static/js/lib/node_modules/preact/devtools/package.json create mode 100644 static/js/lib/node_modules/preact/devtools/src/devtools.js create mode 100644 static/js/lib/node_modules/preact/devtools/src/index.d.ts create mode 100644 static/js/lib/node_modules/preact/devtools/src/index.js create mode 100644 static/js/lib/node_modules/preact/dist/preact.js create mode 100644 static/js/lib/node_modules/preact/dist/preact.js.map create mode 100644 static/js/lib/node_modules/preact/dist/preact.min.js create mode 100644 static/js/lib/node_modules/preact/dist/preact.min.js.map create mode 100644 static/js/lib/node_modules/preact/dist/preact.min.module.js create mode 100644 static/js/lib/node_modules/preact/dist/preact.min.module.js.map create mode 100644 static/js/lib/node_modules/preact/dist/preact.min.umd.js create mode 100644 static/js/lib/node_modules/preact/dist/preact.min.umd.js.map create mode 100644 static/js/lib/node_modules/preact/dist/preact.mjs create mode 100644 static/js/lib/node_modules/preact/dist/preact.module.js create mode 100644 static/js/lib/node_modules/preact/dist/preact.module.js.map create mode 100644 static/js/lib/node_modules/preact/dist/preact.umd.js create mode 100644 static/js/lib/node_modules/preact/dist/preact.umd.js.map create mode 100644 static/js/lib/node_modules/preact/hooks/LICENSE create mode 100644 static/js/lib/node_modules/preact/hooks/dist/hooks.js create mode 100644 static/js/lib/node_modules/preact/hooks/dist/hooks.js.map create mode 100644 static/js/lib/node_modules/preact/hooks/dist/hooks.mjs create mode 100644 static/js/lib/node_modules/preact/hooks/dist/hooks.module.js create mode 100644 static/js/lib/node_modules/preact/hooks/dist/hooks.module.js.map create mode 100644 static/js/lib/node_modules/preact/hooks/dist/hooks.umd.js create mode 100644 static/js/lib/node_modules/preact/hooks/dist/hooks.umd.js.map create mode 100644 static/js/lib/node_modules/preact/hooks/package.json create mode 100644 static/js/lib/node_modules/preact/hooks/src/index.d.ts create mode 100644 static/js/lib/node_modules/preact/hooks/src/index.js create mode 100644 static/js/lib/node_modules/preact/hooks/src/internal.d.ts create mode 100644 static/js/lib/node_modules/preact/jsx-runtime/LICENSE create mode 100644 static/js/lib/node_modules/preact/jsx-runtime/dist/jsxRuntime.js create mode 100644 static/js/lib/node_modules/preact/jsx-runtime/dist/jsxRuntime.js.map create mode 100644 static/js/lib/node_modules/preact/jsx-runtime/dist/jsxRuntime.mjs create mode 100644 static/js/lib/node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js create mode 100644 static/js/lib/node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js.map create mode 100644 static/js/lib/node_modules/preact/jsx-runtime/dist/jsxRuntime.umd.js create mode 100644 static/js/lib/node_modules/preact/jsx-runtime/dist/jsxRuntime.umd.js.map create mode 100644 static/js/lib/node_modules/preact/jsx-runtime/package.json create mode 100644 static/js/lib/node_modules/preact/jsx-runtime/src/index.d.ts create mode 100644 static/js/lib/node_modules/preact/jsx-runtime/src/index.js create mode 100644 static/js/lib/node_modules/preact/jsx-runtime/src/utils.js create mode 100644 static/js/lib/node_modules/preact/package.json create mode 100644 static/js/lib/node_modules/preact/src/cjs.js create mode 100644 static/js/lib/node_modules/preact/src/clone-element.js create mode 100644 static/js/lib/node_modules/preact/src/component.js create mode 100644 static/js/lib/node_modules/preact/src/constants.js create mode 100644 static/js/lib/node_modules/preact/src/create-context.js create mode 100644 static/js/lib/node_modules/preact/src/create-element.js create mode 100644 static/js/lib/node_modules/preact/src/diff/catch-error.js create mode 100644 static/js/lib/node_modules/preact/src/diff/children.js create mode 100644 static/js/lib/node_modules/preact/src/diff/index.js create mode 100644 static/js/lib/node_modules/preact/src/diff/props.js create mode 100644 static/js/lib/node_modules/preact/src/index-5.d.ts create mode 100644 static/js/lib/node_modules/preact/src/index.d.ts create mode 100644 static/js/lib/node_modules/preact/src/index.js create mode 100644 static/js/lib/node_modules/preact/src/internal.d.ts create mode 100644 static/js/lib/node_modules/preact/src/jsx.d.ts create mode 100644 static/js/lib/node_modules/preact/src/options.js create mode 100644 static/js/lib/node_modules/preact/src/render.js create mode 100644 static/js/lib/node_modules/preact/src/util.js create mode 100644 static/js/lib/node_modules/preact/test-utils/dist/testUtils.js create mode 100644 static/js/lib/node_modules/preact/test-utils/dist/testUtils.js.map create mode 100644 static/js/lib/node_modules/preact/test-utils/dist/testUtils.mjs create mode 100644 static/js/lib/node_modules/preact/test-utils/dist/testUtils.module.js create mode 100644 static/js/lib/node_modules/preact/test-utils/dist/testUtils.module.js.map create mode 100644 static/js/lib/node_modules/preact/test-utils/dist/testUtils.umd.js create mode 100644 static/js/lib/node_modules/preact/test-utils/dist/testUtils.umd.js.map create mode 100644 static/js/lib/node_modules/preact/test-utils/package.json create mode 100644 static/js/lib/node_modules/preact/test-utils/src/index.d.ts create mode 100644 static/js/lib/node_modules/preact/test-utils/src/index.js create mode 100644 static/js/marked_position.mjs diff --git a/static/css/markdown.css b/static/css/markdown.css new file mode 100644 index 0000000..19df20a --- /dev/null +++ b/static/css/markdown.css @@ -0,0 +1,30 @@ +.el-node-markdown { + h1 { + border-bottom: 1px solid #ccc; + margin-top: 48px; + margin-bottom: 8px; + + display: inline-block; + font-size: 1.25em; + border-radius: 8px; + color: #fff; + background-color: var(--color1); + padding: 4px 12px; + + &:first-child { + margin-top: 32px; + } + } + + h2 { + font-size: 1.25em; + margin-bottom: 0px; + color: var(--color1); + } + + h3:before { + font-size: 1.0em; + content: "> "; + color: var(--color1); + } +} diff --git a/static/css/notes2.css b/static/css/notes2.css index e6d0ef6..4945518 100644 --- a/static/css/notes2.css +++ b/static/css/notes2.css @@ -13,17 +13,13 @@ html { display: grid; grid-template-areas: - "tree crumbs" - "tree name" - "tree sync" - "tree content" - /* - "tree checklist" - "tree files" - */ - "tree blank" + "tree hum crumbs crumbs ding" + "tree hum name name ding" + "tree hum sync functions ding" + "tree hum content content ding" + "tree hum blank blank ding" ; - grid-template-columns: min-content 1fr; + grid-template-columns: min-content minmax(16px, 1fr) minmax(min-content, 820px) 80px minmax(16px, 1fr); grid-template-rows: min-content min-content 48px 1fr; @@ -34,10 +30,6 @@ html { "sync" "name" "content" - /* - "checklist" - "files" - */ "blank" ; grid-template-columns: 1fr; @@ -61,11 +53,10 @@ html { padding: 16px 0px 16px 16px; color: #ddd; z-index: 100; - /* Over crumbs shadow */ border-left: 2px solid #333; &:focus { - border-left: 2px solid #FE5F55; + border-left: 2px solid #fe5f55; } #logo { @@ -151,7 +142,7 @@ html { align-items: start; justify-items: center; height: min-content; - margin: 16px 16px; + margin: 0 16px 16px 16px; n2-crumbs { background: #e4e4e4; @@ -223,8 +214,7 @@ n2-syncprogress { } progress { - width: calc(100% - 32px); - max-width: var(--content-width); + width: 100%; height: 24px; border-radius: 8px; } @@ -272,6 +262,7 @@ n2-nodeui { margin-bottom: 32px; .el-name { + grid-area: name; color: #333; font-weight: bold; text-align: center; @@ -280,27 +271,27 @@ n2-nodeui { margin-bottom: 0px; } + .el-functions { + grid-area: functions; + } + .el-node-content { + grid-area: content; justify-self: center; word-wrap: break-word; font-family: monospace; color: #333; - /* width: 100%; max-width: var(--content-width); field-sizing: content; - */ - - width: calc(100% - 32px); - max-width: var(--content-width); - field-sizing: content; resize: none; - border: none; outline: none; - padding: 16px 0; + padding: 32px 0; + border-left: none; + border-right: none; border-top: 1px solid #e0e0e0; border-bottom: 1px solid #e0e0e0; margin-bottom: 32px; @@ -310,6 +301,24 @@ n2-nodeui { padding-top: 16px; } } + + .el-node-markdown { + grid-area: content; + display: none; + + border-top: 1px solid #e0e0e0; + border-bottom: 1px solid #e0e0e0; + margin-bottom: 32px; + } + + &.show-markdown { + .el-node-content { + display: none; + } + .el-node-markdown { + display: block; + } + } } #blank { diff --git a/static/images/icon_markdown.svg b/static/images/icon_markdown.svg new file mode 100644 index 0000000..f8d0aae --- /dev/null +++ b/static/images/icon_markdown.svg @@ -0,0 +1,57 @@ + + + + + + + Markdown icon + + + + + Markdown icon + + + + diff --git a/static/images/icon_markdown_hollow.svg b/static/images/icon_markdown_hollow.svg new file mode 100644 index 0000000..d938c6f --- /dev/null +++ b/static/images/icon_markdown_hollow.svg @@ -0,0 +1,50 @@ + + + + + + + diff --git a/static/images/icon_save.svg b/static/images/icon_save.svg new file mode 100644 index 0000000..0846a73 --- /dev/null +++ b/static/images/icon_save.svg @@ -0,0 +1,49 @@ + + + + + + + + content-save + + + diff --git a/static/images/icon_save_disabled.svg b/static/images/icon_save_disabled.svg new file mode 100644 index 0000000..907cee6 --- /dev/null +++ b/static/images/icon_save_disabled.svg @@ -0,0 +1,49 @@ + + + + + + + + content-save + + + diff --git a/static/js/app.mjs b/static/js/app.mjs index 45cd85b..03a3916 100644 --- a/static/js/app.mjs +++ b/static/js/app.mjs @@ -72,12 +72,12 @@ export class App { case 'E': this.showPage('keys') break + */ case 'M': - this.toggleMarkdown() + globalThis._mbus.dispatch('MARKDOWN_TOGGLE') break - */ case 'N': this.createNode() break diff --git a/static/js/lib/node_modules/.package-lock.json b/static/js/lib/node_modules/.package-lock.json index 441fdf4..3d3d164 100644 --- a/static/js/lib/node_modules/.package-lock.json +++ b/static/js/lib/node_modules/.package-lock.json @@ -4,14 +4,24 @@ "requires": true, "packages": { "node_modules/marked": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/marked/-/marked-11.1.1.tgz", - "integrity": "sha512-EgxRjgK9axsQuUa/oKMx5DEY8oXpKJfk61rT5iY3aRlgU6QJtUcxU5OAymdhCvWvhYcd9FKmO5eQoX8m9VGJXg==", + "version": "18.0.3", + "resolved": "https://registry.npmjs.org/marked/-/marked-18.0.3.tgz", + "integrity": "sha512-7VT90JOkDeaRWpfjOReRGPEKn0ecdARBkDGL+tT1wZY0efPPqkUxLUSmzy/C7TIylQYJC9STISEsCHrqb/7VIA==", + "license": "MIT", "bin": { "marked": "bin/marked.js" }, "engines": { - "node": ">= 18" + "node": ">= 20" + } + }, + "node_modules/marked-token-position": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/marked-token-position/-/marked-token-position-2.0.2.tgz", + "integrity": "sha512-IMyr4mR3A5uFReXn7cxLDgDLjefG110ANy0oMGs5+gB7NsdIbv9YoVoJuGxuMSFHWOeIFkAzjdSoFNVKcMPfZw==", + "license": "MIT", + "peerDependencies": { + "marked": ">=16.2.0 <19" } }, "node_modules/preact": { diff --git a/static/js/lib/node_modules/marked-token-position/LICENSE b/static/js/lib/node_modules/marked-token-position/LICENSE new file mode 100644 index 0000000..5d36390 --- /dev/null +++ b/static/js/lib/node_modules/marked-token-position/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2025 @UziTech + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/static/js/lib/node_modules/marked-token-position/README.md b/static/js/lib/node_modules/marked-token-position/README.md new file mode 100644 index 0000000..a10f43c --- /dev/null +++ b/static/js/lib/node_modules/marked-token-position/README.md @@ -0,0 +1,160 @@ +# marked-token-position + +Add `position` field for each token. + +```ts +interface Position { + /** + * Positions for each line of the token. LinePositions will not include the newline character for the line. + */ + lines: LinePosition[] + /** + * Position at the beginning of token + */ + start: PositionFields; + /** + * Position at the end of token + */ + end: PositionFields; +} + +interface LinePosition { + /** + * Position at the beginning of line + */ + start: PositionFields; + /** + * Position at the end of line. Will not include the newline character. + */ + end: PositionFields; +} + +interface PositionFields { + /** + * Number of characters from the beginning of the markdown string + */ + offset: number; + /** + * Line number of the token. Starts at line 0. + */ + line: number; + /** + * Column number of the token. Starts at column 0. + */ + column: number; +} +``` + +# Usage + +## Extension + +```js +import {Marked} from "marked"; +import markedTokenPosition from "marked-token-position"; + +// or UMD script +// +// +// const Marked = marked.Marked; + +const marked = new Marked(); + +function anotherExtension { + return { + walkTokens(token) { + // token has `position` field + } + hooks: { + processAllTokens(tokens) { + // tokens have `position` field + } + } + }; +} + +marked.use(anotherExtension(), markedTokenPosition()); + +marked.parse("# example markdown"); +``` + +The `position` field will be added to the tokens so any other extension can +use the `position` field in a `walkTokens` function or `processAllTokens` hook. + +> [!CAUTION] +> The `processAllTokens` hook is used by this extension so any other extension +> using `processAllTokens` that requires the `position` field must be added +> before this extension because marked calls the `processAllTokens` hooks in +> reverse order. + +The tokens will look like: + +```json +[ + { + "type": "heading", + "raw": "# example markdown", + "depth": 1, + "text": "example markdown", + "tokens": [ + { + "type": "text", + "raw": "example markdown", + "text": "example markdown", + "escaped": false, + "position": { + "start": { + "offset": 2, + "line": 0, + "column": 2 + }, + "end": { + "offset": 18, + "line": 0, + "column": 18 + } + } + } + ], + "position": { + "start": { + "offset": 0, + "line": 0, + "column": 0 + }, + "end": { + "offset": 18, + "line": 0, + "column": 18 + } + } + } +] +``` + +## addTokenPositions + +Calling `marked.lexer()` will not add the `position` field with the extension +since the extension is only called on `marked.parse()` and `marked.parseInline()`. + +An `addTokenPositions` function is exported to add the `position` field to the +tokens returned by `marked.lexer()`. + +```js +import {Marked} from "marked"; +import {addTokenPositions} from "marked-token-position"; + +// or UMD script +// +// +// const Marked = marked.Marked; +// const addTokenPositions = markedTokenPosition.addTokenPositions; + + +const marked = new Marked(); +const tokens = marked.lexer("# example markdown"); + +addTokenPositions(tokens); + +// tokens now have a `position` field +``` diff --git a/static/js/lib/node_modules/marked-token-position/lib/index.d.ts b/static/js/lib/node_modules/marked-token-position/lib/index.d.ts new file mode 100644 index 0000000..f61cd65 --- /dev/null +++ b/static/js/lib/node_modules/marked-token-position/lib/index.d.ts @@ -0,0 +1,59 @@ +// Generated by dts-bundle-generator v9.5.1 + +import { MarkedExtension, Token, Tokens } from 'marked'; + +export interface TokenWithPosition extends Tokens.Generic { + position: Position; +} +export interface Position { + /** + * Positions for each line of the token. LinePositions will not include the newline character for the line. + */ + lines: LinePosition[]; + /** + * Position at the beginning of token + */ + start: PositionFields; + /** + * Position at the end of token + */ + end: PositionFields; +} +export interface LinePosition { + /** + * Position at the beginning of line + */ + start: PositionFields; + /** + * Position at the end of line. Will not include the newline character. + */ + end: PositionFields; +} +export interface PositionFields { + /** + * Number of characters from the beginning of the markdown string + */ + offset: number; + /** + * Line number of the token. Starts at line 0. + */ + line: number; + /** + * Column number of the token. Starts at column 0. + */ + column: number; +} +/** + * Add position field to tokens + */ +export declare function addTokenPositions(tokens: Token[]): TokenWithPosition[]; +/** + * Marked extension to add position field to tokens + */ +declare function _default(options?: {}): MarkedExtension; + +export { + _default as default, +}; + +export {}; diff --git a/static/js/lib/node_modules/marked-token-position/lib/index.esm.js b/static/js/lib/node_modules/marked-token-position/lib/index.esm.js new file mode 100644 index 0000000..41a85f7 --- /dev/null +++ b/static/js/lib/node_modules/marked-token-position/lib/index.esm.js @@ -0,0 +1,6 @@ +function g(u){let i=u.map(r=>r.raw).join("");return h(u,0,0,0,i).tokens}function b(u={}){return{hooks:{processAllTokens(i){return g(i)}}}}function h(u,i,r,f,l){for(let s of u){let n=s,a=T(i,r,f,l,n.raw);if(n.position=a,n.tokens&&h(n.tokens,i,r,f,l),n.childTokens){let c=i,t=r,e=f,d=l;for(let k of n.childTokens){let o=h(n[k],c,t,e,d);c=o.offset,t=o.line,e=o.column,d=o.markdown}}if(n.type==="list"&&h(n.items,i,r,f,l),n.type==="table"){let c=i,t=r,e=f,d=l;for(let k of n.header){let o=h(k.tokens,c,t,e,d);c=o.offset,t=o.line,e=o.column,d=o.markdown}for(let k of n.rows)for(let o of k){let P=h(o.tokens,c,t,e,d);c=P.offset,t=P.line,e=P.column,d=P.markdown}}let m=a.end.offset-i;i=a.end.offset,r=a.end.line,f=a.end.column,l=l.slice(m)}return{tokens:u,offset:i,line:r,column:f,markdown:l}}function T(u,i,r,f,l){let s=[],n=l.split(` +`),a=f.split(` +`);n:for(let t=0;t<=a.length-n.length;t++){s=[];for(let e=0;e0?` +`:""),x={offset:u+P.length+o,line:i+t+e,column:(t+e===0?r:0)+o},p={offset:x.offset+k.length,line:x.line,column:x.column+k.length};s.push({start:x,end:p})}break}if(s.length===0)throw new Error(`Cannot find ${JSON.stringify(l)} in ${JSON.stringify(f)}`);let m=s[0].start,c=s.at(-1).end;return s.length>1&&s.at(-1).start.offset===c.offset&&(s=s.slice(0,-1)),{lines:s,start:m,end:c}}export{g as addTokenPositions,b as default}; +//# sourceMappingURL=index.esm.js.map diff --git a/static/js/lib/node_modules/marked-token-position/lib/index.esm.js.map b/static/js/lib/node_modules/marked-token-position/lib/index.esm.js.map new file mode 100644 index 0000000..4eb0539 --- /dev/null +++ b/static/js/lib/node_modules/marked-token-position/lib/index.esm.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/index.ts"], + "sourcesContent": ["/* node:coverage ignore next */\nimport type { MarkedExtension, Token, Tokens } from 'marked';\n\nexport interface TokenWithPosition extends Tokens.Generic {\n position: Position;\n}\ninterface Position {\n /**\n * Positions for each line of the token. LinePositions will not include the newline character for the line.\n */\n lines: LinePosition[]\n /**\n * Position at the beginning of token\n */\n start: PositionFields;\n /**\n * Position at the end of token\n */\n end: PositionFields;\n}\n\ninterface LinePosition {\n /**\n * Position at the beginning of line\n */\n start: PositionFields;\n /**\n * Position at the end of line. Will not include the newline character.\n */\n end: PositionFields;\n}\n\ninterface PositionFields {\n /**\n * Number of characters from the beginning of the markdown string\n */\n offset: number;\n /**\n * Line number of the token. Starts at line 0.\n */\n line: number;\n /**\n * Column number of the token. Starts at column 0.\n */\n column: number;\n}\n\n/**\n * Add position field to tokens\n */\nexport function addTokenPositions(tokens: Token[]) {\n const markdown = tokens.map(token => token.raw).join('');\n return addPosition(tokens, 0, 0, 0, markdown).tokens;\n}\n\n/**\n * Marked extension to add position field to tokens\n */\nexport default function(options = {}): MarkedExtension {\n return {\n hooks: {\n processAllTokens(tokens) {\n return addTokenPositions(tokens);\n },\n },\n };\n}\n\nfunction addPosition(tokens: Token[], offset: number, line: number, column: number, markdown: string) {\n for (const token of tokens) {\n const genericToken = token as Tokens.Generic;\n const position = getPosition(offset, line, column, markdown, genericToken.raw);\n genericToken.position = position;\n\n if (genericToken.tokens) {\n addPosition(genericToken.tokens, offset, line, column, markdown);\n }\n\n if (genericToken.childTokens) {\n let nextOffset = offset;\n let nextLine = line;\n let nextColumn = column;\n let nextMarkdown = markdown;\n for (const childToken of genericToken.childTokens) {\n const nextPosition = addPosition(genericToken[childToken], nextOffset, nextLine, nextColumn, nextMarkdown);\n nextOffset = nextPosition.offset;\n nextLine = nextPosition.line;\n nextColumn = nextPosition.column;\n nextMarkdown = nextPosition.markdown;\n }\n }\n\n if (genericToken.type === 'list') {\n addPosition(genericToken.items, offset, line, column, markdown);\n }\n\n if (genericToken.type === 'table') {\n let nextOffset = offset;\n let nextLine = line;\n let nextColumn = column;\n let nextMarkdown = markdown;\n for (const headerCell of genericToken.header) {\n const nextPosition = addPosition(headerCell.tokens, nextOffset, nextLine, nextColumn, nextMarkdown);\n nextOffset = nextPosition.offset;\n nextLine = nextPosition.line;\n nextColumn = nextPosition.column;\n nextMarkdown = nextPosition.markdown;\n }\n for (const row of genericToken.rows) {\n for (const rowCell of row) {\n const nextPosition = addPosition(rowCell.tokens, nextOffset, nextLine, nextColumn, nextMarkdown);\n nextOffset = nextPosition.offset;\n nextLine = nextPosition.line;\n nextColumn = nextPosition.column;\n nextMarkdown = nextPosition.markdown;\n }\n }\n }\n\n const deltaOffset = position.end.offset - offset;\n offset = position.end.offset;\n line = position.end.line;\n column = position.end.column;\n markdown = markdown.slice(deltaOffset);\n }\n\n return {\n tokens: tokens as TokenWithPosition[],\n offset,\n line,\n column,\n markdown,\n };\n}\n\nfunction getPosition(offset: number, line: number, column: number, markdown: string, raw: string): Position {\n let lines: LinePosition[] = [];\n const rawLines = raw.split('\\n');\n const markdownLines = markdown.split('\\n');\n\n // eslint-disable-next-line no-labels\n md: for (let i = 0; i <= markdownLines.length - rawLines.length; i++) {\n lines = [];\n for (let j = 0; j < rawLines.length; j++) {\n const markdownLine = markdownLines[i + j];\n const rawLine = rawLines[j];\n const lineStartOffset = markdownLine.indexOf(rawLine);\n\n if (lineStartOffset === -1) {\n // eslint-disable-next-line no-labels\n continue md;\n }\n\n const beforeMarkdownLines = markdownLines.slice(0, i + j).join('\\n') + (i + j > 0 ? '\\n' : '');\n const start = {\n offset: offset + beforeMarkdownLines.length + lineStartOffset,\n line: line + i + j,\n column: (i + j === 0 ? column : 0) + lineStartOffset,\n };\n const end = {\n offset: start.offset + rawLine.length,\n line: start.line,\n column: start.column + rawLine.length,\n };\n\n lines.push({\n start,\n end,\n });\n }\n break;\n }\n\n /* node:coverage ignore next 4 */\n if (lines.length === 0) {\n // This shouldn't ever happen but if it does it would be nice to have a good error message\n throw new Error(`Cannot find ${JSON.stringify(raw)} in ${JSON.stringify(markdown)}`);\n }\n\n const start = lines[0].start;\n const end = lines.at(-1)!.end;\n\n if (lines.length > 1 && lines.at(-1)!.start.offset === end.offset) {\n lines = lines.slice(0, -1);\n }\n\n return {\n lines,\n start,\n end,\n };\n}\n"], + "mappings": "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", + "names": ["addTokenPositions", "tokens", "markdown", "token", "addPosition", "index_default", "options", "offset", "line", "column", "genericToken", "position", "getPosition", "nextOffset", "nextLine", "nextColumn", "nextMarkdown", "childToken", "nextPosition", "headerCell", "row", "rowCell", "deltaOffset", "raw", "lines", "rawLines", "markdownLines", "md", "i", "j", "markdownLine", "rawLine", "lineStartOffset", "beforeMarkdownLines", "start", "end"] +} diff --git a/static/js/lib/node_modules/marked-token-position/lib/index.umd.js b/static/js/lib/node_modules/marked-token-position/lib/index.umd.js new file mode 100644 index 0000000..253cb7d --- /dev/null +++ b/static/js/lib/node_modules/marked-token-position/lib/index.umd.js @@ -0,0 +1,9 @@ +(function(g,f){if(typeof exports=="object"&&typeof module<"u"){module.exports=f()}else if("function"==typeof define && define.amd){define("markedTokenPosition",f)}else {g["markedTokenPosition"]=f()}}(typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : this,function(){var exports={};var __exports=exports;var module={exports}; +var m=Object.defineProperty;var O=Object.getOwnPropertyDescriptor;var y=Object.getOwnPropertyNames;var C=Object.prototype.hasOwnProperty;var F=(e,n)=>()=>(e&&(n=e(e=0)),n);var M=(e,n)=>{for(var o in n)m(e,o,{get:n[o],enumerable:!0})},j=(e,n,o,f)=>{if(n&&typeof n=="object"||typeof n=="function")for(let t of y(n))!C.call(e,t)&&t!==o&&m(e,t,{get:()=>n[t],enumerable:!(f=O(n,t))||f.enumerable});return e};var b=e=>j(m({},"__esModule",{value:!0}),e);var T={};M(T,{addTokenPositions:()=>L,default:()=>E});function L(e){let n=e.map(o=>o.raw).join("");return x(e,0,0,0,n).tokens}function E(e={}){return{hooks:{processAllTokens(n){return L(n)}}}}function x(e,n,o,f,t){for(let c of e){let i=c,a=S(n,o,f,t,i.raw);if(i.position=a,i.tokens&&x(i.tokens,n,o,f,t),i.childTokens){let d=n,r=o,s=f,u=t;for(let k of i.childTokens){let l=x(i[k],d,r,s,u);d=l.offset,r=l.line,s=l.column,u=l.markdown}}if(i.type==="list"&&x(i.items,n,o,f,t),i.type==="table"){let d=n,r=o,s=f,u=t;for(let k of i.header){let l=x(k.tokens,d,r,s,u);d=l.offset,r=l.line,s=l.column,u=l.markdown}for(let k of i.rows)for(let l of k){let P=x(l.tokens,d,r,s,u);d=P.offset,r=P.line,s=P.column,u=P.markdown}}let p=a.end.offset-n;n=a.end.offset,o=a.end.line,f=a.end.column,t=t.slice(p)}return{tokens:e,offset:n,line:o,column:f,markdown:t}}function S(e,n,o,f,t){let c=[],i=t.split(` +`),a=f.split(` +`);n:for(let r=0;r<=a.length-i.length;r++){c=[];for(let s=0;s0?` +`:""),h={offset:e+P.length+l,line:n+r+s,column:(r+s===0?o:0)+l},w={offset:h.offset+k.length,line:h.line,column:h.column+k.length};c.push({start:h,end:w})}break}if(c.length===0)throw new Error(`Cannot find ${JSON.stringify(t)} in ${JSON.stringify(f)}`);let p=c[0].start,d=c.at(-1).end;return c.length>1&&c.at(-1).start.offset===d.offset&&(c=c.slice(0,-1)),{lines:c,start:p,end:d}}var g=F(()=>{"use strict"});module.exports=(g(),b(T)).default;module.exports.addTokenPositions=(g(),b(T)).addTokenPositions; + +if(__exports != exports)module.exports = exports;return module.exports})); +//# sourceMappingURL=index.umd.js.map diff --git a/static/js/lib/node_modules/marked-token-position/lib/index.umd.js.map b/static/js/lib/node_modules/marked-token-position/lib/index.umd.js.map new file mode 100644 index 0000000..7894776 --- /dev/null +++ b/static/js/lib/node_modules/marked-token-position/lib/index.umd.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/index.ts", ""], + "sourcesContent": ["/* node:coverage ignore next */\nimport type { MarkedExtension, Token, Tokens } from 'marked';\n\nexport interface TokenWithPosition extends Tokens.Generic {\n position: Position;\n}\ninterface Position {\n /**\n * Positions for each line of the token. LinePositions will not include the newline character for the line.\n */\n lines: LinePosition[]\n /**\n * Position at the beginning of token\n */\n start: PositionFields;\n /**\n * Position at the end of token\n */\n end: PositionFields;\n}\n\ninterface LinePosition {\n /**\n * Position at the beginning of line\n */\n start: PositionFields;\n /**\n * Position at the end of line. Will not include the newline character.\n */\n end: PositionFields;\n}\n\ninterface PositionFields {\n /**\n * Number of characters from the beginning of the markdown string\n */\n offset: number;\n /**\n * Line number of the token. Starts at line 0.\n */\n line: number;\n /**\n * Column number of the token. Starts at column 0.\n */\n column: number;\n}\n\n/**\n * Add position field to tokens\n */\nexport function addTokenPositions(tokens: Token[]) {\n const markdown = tokens.map(token => token.raw).join('');\n return addPosition(tokens, 0, 0, 0, markdown).tokens;\n}\n\n/**\n * Marked extension to add position field to tokens\n */\nexport default function(options = {}): MarkedExtension {\n return {\n hooks: {\n processAllTokens(tokens) {\n return addTokenPositions(tokens);\n },\n },\n };\n}\n\nfunction addPosition(tokens: Token[], offset: number, line: number, column: number, markdown: string) {\n for (const token of tokens) {\n const genericToken = token as Tokens.Generic;\n const position = getPosition(offset, line, column, markdown, genericToken.raw);\n genericToken.position = position;\n\n if (genericToken.tokens) {\n addPosition(genericToken.tokens, offset, line, column, markdown);\n }\n\n if (genericToken.childTokens) {\n let nextOffset = offset;\n let nextLine = line;\n let nextColumn = column;\n let nextMarkdown = markdown;\n for (const childToken of genericToken.childTokens) {\n const nextPosition = addPosition(genericToken[childToken], nextOffset, nextLine, nextColumn, nextMarkdown);\n nextOffset = nextPosition.offset;\n nextLine = nextPosition.line;\n nextColumn = nextPosition.column;\n nextMarkdown = nextPosition.markdown;\n }\n }\n\n if (genericToken.type === 'list') {\n addPosition(genericToken.items, offset, line, column, markdown);\n }\n\n if (genericToken.type === 'table') {\n let nextOffset = offset;\n let nextLine = line;\n let nextColumn = column;\n let nextMarkdown = markdown;\n for (const headerCell of genericToken.header) {\n const nextPosition = addPosition(headerCell.tokens, nextOffset, nextLine, nextColumn, nextMarkdown);\n nextOffset = nextPosition.offset;\n nextLine = nextPosition.line;\n nextColumn = nextPosition.column;\n nextMarkdown = nextPosition.markdown;\n }\n for (const row of genericToken.rows) {\n for (const rowCell of row) {\n const nextPosition = addPosition(rowCell.tokens, nextOffset, nextLine, nextColumn, nextMarkdown);\n nextOffset = nextPosition.offset;\n nextLine = nextPosition.line;\n nextColumn = nextPosition.column;\n nextMarkdown = nextPosition.markdown;\n }\n }\n }\n\n const deltaOffset = position.end.offset - offset;\n offset = position.end.offset;\n line = position.end.line;\n column = position.end.column;\n markdown = markdown.slice(deltaOffset);\n }\n\n return {\n tokens: tokens as TokenWithPosition[],\n offset,\n line,\n column,\n markdown,\n };\n}\n\nfunction getPosition(offset: number, line: number, column: number, markdown: string, raw: string): Position {\n let lines: LinePosition[] = [];\n const rawLines = raw.split('\\n');\n const markdownLines = markdown.split('\\n');\n\n // eslint-disable-next-line no-labels\n md: for (let i = 0; i <= markdownLines.length - rawLines.length; i++) {\n lines = [];\n for (let j = 0; j < rawLines.length; j++) {\n const markdownLine = markdownLines[i + j];\n const rawLine = rawLines[j];\n const lineStartOffset = markdownLine.indexOf(rawLine);\n\n if (lineStartOffset === -1) {\n // eslint-disable-next-line no-labels\n continue md;\n }\n\n const beforeMarkdownLines = markdownLines.slice(0, i + j).join('\\n') + (i + j > 0 ? '\\n' : '');\n const start = {\n offset: offset + beforeMarkdownLines.length + lineStartOffset,\n line: line + i + j,\n column: (i + j === 0 ? column : 0) + lineStartOffset,\n };\n const end = {\n offset: start.offset + rawLine.length,\n line: start.line,\n column: start.column + rawLine.length,\n };\n\n lines.push({\n start,\n end,\n });\n }\n break;\n }\n\n /* node:coverage ignore next 4 */\n if (lines.length === 0) {\n // This shouldn't ever happen but if it does it would be nice to have a good error message\n throw new Error(`Cannot find ${JSON.stringify(raw)} in ${JSON.stringify(markdown)}`);\n }\n\n const start = lines[0].start;\n const end = lines.at(-1)!.end;\n\n if (lines.length > 1 && lines.at(-1)!.start.offset === end.offset) {\n lines = lines.slice(0, -1);\n }\n\n return {\n lines,\n start,\n end,\n };\n}\n", "\nmodule.exports = require(\"./src/index.ts\").default;\nmodule.exports.addTokenPositions = require(\"./src/index.ts\").addTokenPositions;\n"], + "mappings": "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", + "names": ["src_exports", "__export", "addTokenPositions", "src_default", "tokens", "markdown", "token", "addPosition", "options", "offset", "line", "column", "genericToken", "position", "getPosition", "nextOffset", "nextLine", "nextColumn", "nextMarkdown", "childToken", "nextPosition", "headerCell", "row", "rowCell", "deltaOffset", "raw", "lines", "rawLines", "markdownLines", "md", "i", "j", "markdownLine", "rawLine", "lineStartOffset", "beforeMarkdownLines", "start", "end", "init_src", "__esmMin"] +} diff --git a/static/js/lib/node_modules/marked-token-position/package.json b/static/js/lib/node_modules/marked-token-position/package.json new file mode 100644 index 0000000..4f359e9 --- /dev/null +++ b/static/js/lib/node_modules/marked-token-position/package.json @@ -0,0 +1,66 @@ +{ + "name": "marked-token-position", + "version": "2.0.2", + "description": "marked extension template", + "main": "./lib/index.esm.js", + "module": "./lib/index.esm.js", + "browser": "./lib/index.umd.js", + "type": "module", + "keywords": [ + "marked", + "extension" + ], + "files": [ + "lib/", + "src/" + ], + "exports": { + ".": { + "typescript": "./src/index.ts", + "types": "./lib/index.d.ts", + "default": "./lib/index.esm.js" + } + }, + "scripts": { + "build": "npm run build:esbuild && npm run build:types", + "build:esbuild": "node esbuild.config.js", + "build:types": "tsc && dts-bundle-generator --export-referenced-types --project tsconfig.json -o lib/index.d.ts src/index.ts", + "format": "eslint --fix", + "lint": "eslint", + "test": "npm run build:esbuild && node --experimental-transform-types ./spec/test.config.js", + "test:cover": "npm run build:esbuild && node --experimental-transform-types --experimental-test-coverage ./spec/test.config.js -- --cover", + "test:only": "npm run build:esbuild && node --experimental-transform-types ./spec/test.config.js -- --only", + "test:types": "npm run build:types && tsc --project tsconfig-test-types.json && attw -P --entrypoints . --profile esm-only", + "test:update": "npm run build:esbuild && node --experimental-transform-types --test-update-snapshots ./spec/test.config.js" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/UziTech/marked-token-position.git" + }, + "author": "Tony Brix (https://Tony.Brix.ninja)", + "license": "MIT", + "bugs": { + "url": "https://github.com/UziTech/marked-token-position/issues" + }, + "homepage": "https://github.com/UziTech/marked-token-position#readme", + "peerDependencies": { + "marked": ">=16.2.0 <19" + }, + "devDependencies": { + "@arethetypeswrong/cli": "^0.18.2", + "@markedjs/eslint-config": "^1.0.14", + "@semantic-release/changelog": "^6.0.3", + "@semantic-release/commit-analyzer": "^13.0.1", + "@semantic-release/git": "^10.0.1", + "@semantic-release/github": "^12.0.6", + "@semantic-release/npm": "^13.1.5", + "@semantic-release/release-notes-generator": "^14.1.0", + "dts-bundle-generator": "^9.5.1", + "esbuild": "^0.28.0", + "esbuild-plugin-umd-wrapper": "^3.0.0", + "eslint": "^10.2.0", + "marked": "^18.0.0", + "semantic-release": "^25.0.3", + "typescript": "^6.0.2" + } +} diff --git a/static/js/lib/node_modules/marked-token-position/src/index.ts b/static/js/lib/node_modules/marked-token-position/src/index.ts new file mode 100644 index 0000000..d624389 --- /dev/null +++ b/static/js/lib/node_modules/marked-token-position/src/index.ts @@ -0,0 +1,192 @@ +/* node:coverage ignore next */ +import type { MarkedExtension, Token, Tokens } from 'marked'; + +export interface TokenWithPosition extends Tokens.Generic { + position: Position; +} +interface Position { + /** + * Positions for each line of the token. LinePositions will not include the newline character for the line. + */ + lines: LinePosition[] + /** + * Position at the beginning of token + */ + start: PositionFields; + /** + * Position at the end of token + */ + end: PositionFields; +} + +interface LinePosition { + /** + * Position at the beginning of line + */ + start: PositionFields; + /** + * Position at the end of line. Will not include the newline character. + */ + end: PositionFields; +} + +interface PositionFields { + /** + * Number of characters from the beginning of the markdown string + */ + offset: number; + /** + * Line number of the token. Starts at line 0. + */ + line: number; + /** + * Column number of the token. Starts at column 0. + */ + column: number; +} + +/** + * Add position field to tokens + */ +export function addTokenPositions(tokens: Token[]) { + const markdown = tokens.map(token => token.raw).join(''); + return addPosition(tokens, 0, 0, 0, markdown).tokens; +} + +/** + * Marked extension to add position field to tokens + */ +export default function(options = {}): MarkedExtension { + return { + hooks: { + processAllTokens(tokens) { + return addTokenPositions(tokens); + }, + }, + }; +} + +function addPosition(tokens: Token[], offset: number, line: number, column: number, markdown: string) { + for (const token of tokens) { + const genericToken = token as Tokens.Generic; + const position = getPosition(offset, line, column, markdown, genericToken.raw); + genericToken.position = position; + + if (genericToken.tokens) { + addPosition(genericToken.tokens, offset, line, column, markdown); + } + + if (genericToken.childTokens) { + let nextOffset = offset; + let nextLine = line; + let nextColumn = column; + let nextMarkdown = markdown; + for (const childToken of genericToken.childTokens) { + const nextPosition = addPosition(genericToken[childToken], nextOffset, nextLine, nextColumn, nextMarkdown); + nextOffset = nextPosition.offset; + nextLine = nextPosition.line; + nextColumn = nextPosition.column; + nextMarkdown = nextPosition.markdown; + } + } + + if (genericToken.type === 'list') { + addPosition(genericToken.items, offset, line, column, markdown); + } + + if (genericToken.type === 'table') { + let nextOffset = offset; + let nextLine = line; + let nextColumn = column; + let nextMarkdown = markdown; + for (const headerCell of genericToken.header) { + const nextPosition = addPosition(headerCell.tokens, nextOffset, nextLine, nextColumn, nextMarkdown); + nextOffset = nextPosition.offset; + nextLine = nextPosition.line; + nextColumn = nextPosition.column; + nextMarkdown = nextPosition.markdown; + } + for (const row of genericToken.rows) { + for (const rowCell of row) { + const nextPosition = addPosition(rowCell.tokens, nextOffset, nextLine, nextColumn, nextMarkdown); + nextOffset = nextPosition.offset; + nextLine = nextPosition.line; + nextColumn = nextPosition.column; + nextMarkdown = nextPosition.markdown; + } + } + } + + const deltaOffset = position.end.offset - offset; + offset = position.end.offset; + line = position.end.line; + column = position.end.column; + markdown = markdown.slice(deltaOffset); + } + + return { + tokens: tokens as TokenWithPosition[], + offset, + line, + column, + markdown, + }; +} + +function getPosition(offset: number, line: number, column: number, markdown: string, raw: string): Position { + let lines: LinePosition[] = []; + const rawLines = raw.split('\n'); + const markdownLines = markdown.split('\n'); + + // eslint-disable-next-line no-labels + md: for (let i = 0; i <= markdownLines.length - rawLines.length; i++) { + lines = []; + for (let j = 0; j < rawLines.length; j++) { + const markdownLine = markdownLines[i + j]; + const rawLine = rawLines[j]; + const lineStartOffset = markdownLine.indexOf(rawLine); + + if (lineStartOffset === -1) { + // eslint-disable-next-line no-labels + continue md; + } + + const beforeMarkdownLines = markdownLines.slice(0, i + j).join('\n') + (i + j > 0 ? '\n' : ''); + const start = { + offset: offset + beforeMarkdownLines.length + lineStartOffset, + line: line + i + j, + column: (i + j === 0 ? column : 0) + lineStartOffset, + }; + const end = { + offset: start.offset + rawLine.length, + line: start.line, + column: start.column + rawLine.length, + }; + + lines.push({ + start, + end, + }); + } + break; + } + + /* node:coverage ignore next 4 */ + if (lines.length === 0) { + // This shouldn't ever happen but if it does it would be nice to have a good error message + throw new Error(`Cannot find ${JSON.stringify(raw)} in ${JSON.stringify(markdown)}`); + } + + const start = lines[0].start; + const end = lines.at(-1)!.end; + + if (lines.length > 1 && lines.at(-1)!.start.offset === end.offset) { + lines = lines.slice(0, -1); + } + + return { + lines, + start, + end, + }; +} diff --git a/static/js/lib/node_modules/marked/LICENSE.md b/static/js/lib/node_modules/marked/LICENSE similarity index 100% rename from static/js/lib/node_modules/marked/LICENSE.md rename to static/js/lib/node_modules/marked/LICENSE diff --git a/static/js/lib/node_modules/marked/README.md b/static/js/lib/node_modules/marked/README.md index d4ab251..60f0b28 100644 --- a/static/js/lib/node_modules/marked/README.md +++ b/static/js/lib/node_modules/marked/README.md @@ -5,7 +5,6 @@ # Marked [![npm](https://badgen.net/npm/v/marked)](https://www.npmjs.com/package/marked) -[![gzip size](https://badgen.net/badgesize/gzip/https://cdn.jsdelivr.net/npm/marked/marked.min.js)](https://cdn.jsdelivr.net/npm/marked/marked.min.js) [![install size](https://badgen.net/packagephobia/install/marked)](https://packagephobia.now.sh/result?p=marked) [![downloads](https://badgen.net/npm/dt/marked)](https://www.npmjs.com/package/marked) [![github actions](https://github.com/markedjs/marked/workflows/Tests/badge.svg)](https://github.com/markedjs/marked/actions) @@ -18,7 +17,7 @@ ## Demo -Checkout the [demo page](https://marked.js.org/demo/) to see marked in action ⛹️ +Check out the [demo page](https://marked.js.org/demo/) to see Marked in action ⛹️ ## Docs @@ -33,7 +32,7 @@ Also read about: **Node.js:** Only [current and LTS](https://nodejs.org/en/about/releases/) Node.js versions are supported. End of life Node.js versions may become incompatible with Marked at any point in time. -**Browser:** Not IE11 :) +**Browser:** [Baseline Widely Available](https://developer.mozilla.org/en-US/docs/Glossary/Baseline/Compatibility) ## Installation @@ -84,7 +83,7 @@ $ marked --help
- + -