nebula-cms 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/settings.local.json +42 -0
- package/.github/workflows/ci.yml +31 -0
- package/.mcp.json +12 -0
- package/.prettierignore +5 -0
- package/.prettierrc.cjs +22 -0
- package/AGENTS.md +183 -0
- package/LICENSE +201 -0
- package/README.md +128 -0
- package/package.json +74 -0
- package/playground/.claude/settings.local.json +5 -0
- package/playground/astro.config.mjs +7 -0
- package/playground/node_modules/.bin/astro +21 -0
- package/playground/node_modules/.bin/rollup +21 -0
- package/playground/node_modules/.bin/tsc +21 -0
- package/playground/node_modules/.bin/tsserver +21 -0
- package/playground/node_modules/.bin/vite +21 -0
- package/playground/node_modules/.vite/_svelte_metadata.json +1 -0
- package/playground/node_modules/.vite/deps/@astrojs_svelte_client__js.js +80 -0
- package/playground/node_modules/.vite/deps/@astrojs_svelte_client__js.js.map +7 -0
- package/playground/node_modules/.vite/deps/_metadata.json +184 -0
- package/playground/node_modules/.vite/deps/astro___aria-query.js +6776 -0
- package/playground/node_modules/.vite/deps/astro___aria-query.js.map +7 -0
- package/playground/node_modules/.vite/deps/astro___axobject-query.js +3754 -0
- package/playground/node_modules/.vite/deps/astro___axobject-query.js.map +7 -0
- package/playground/node_modules/.vite/deps/astro___html-escaper.js +34 -0
- package/playground/node_modules/.vite/deps/astro___html-escaper.js.map +7 -0
- package/playground/node_modules/.vite/deps/chunk-AJXJMYAF.js +0 -0
- package/playground/node_modules/.vite/deps/chunk-AJXJMYAF.js.map +7 -0
- package/playground/node_modules/.vite/deps/chunk-ALJIOON6.js +1005 -0
- package/playground/node_modules/.vite/deps/chunk-ALJIOON6.js.map +7 -0
- package/playground/node_modules/.vite/deps/chunk-BUSYA2B4.js +8 -0
- package/playground/node_modules/.vite/deps/chunk-BUSYA2B4.js.map +7 -0
- package/playground/node_modules/.vite/deps/chunk-CNYJBM5F.js +21 -0
- package/playground/node_modules/.vite/deps/chunk-CNYJBM5F.js.map +7 -0
- package/playground/node_modules/.vite/deps/chunk-DBPNBGEI.js +223 -0
- package/playground/node_modules/.vite/deps/chunk-DBPNBGEI.js.map +7 -0
- package/playground/node_modules/.vite/deps/chunk-G3C2FXJT.js +204 -0
- package/playground/node_modules/.vite/deps/chunk-G3C2FXJT.js.map +7 -0
- package/playground/node_modules/.vite/deps/chunk-GKDKFWC5.js +27 -0
- package/playground/node_modules/.vite/deps/chunk-GKDKFWC5.js.map +7 -0
- package/playground/node_modules/.vite/deps/chunk-HNCLEOC5.js +4376 -0
- package/playground/node_modules/.vite/deps/chunk-HNCLEOC5.js.map +7 -0
- package/playground/node_modules/.vite/deps/chunk-JICYXBFU.js +688 -0
- package/playground/node_modules/.vite/deps/chunk-JICYXBFU.js.map +7 -0
- package/playground/node_modules/.vite/deps/chunk-KCUTL6DD.js +5099 -0
- package/playground/node_modules/.vite/deps/chunk-KCUTL6DD.js.map +7 -0
- package/playground/node_modules/.vite/deps/chunk-ZP4UNCSN.js +23 -0
- package/playground/node_modules/.vite/deps/chunk-ZP4UNCSN.js.map +7 -0
- package/playground/node_modules/.vite/deps/chunk-ZREFNRZZ.js +148 -0
- package/playground/node_modules/.vite/deps/chunk-ZREFNRZZ.js.map +7 -0
- package/playground/node_modules/.vite/deps/package.json +3 -0
- package/playground/node_modules/.vite/deps/smol-toml.js +843 -0
- package/playground/node_modules/.vite/deps/smol-toml.js.map +7 -0
- package/playground/node_modules/.vite/deps/svelte.js +55 -0
- package/playground/node_modules/.vite/deps/svelte.js.map +7 -0
- package/playground/node_modules/.vite/deps/svelte___clsx.js +9 -0
- package/playground/node_modules/.vite/deps/svelte___clsx.js.map +7 -0
- package/playground/node_modules/.vite/deps/svelte_animate.js +57 -0
- package/playground/node_modules/.vite/deps/svelte_animate.js.map +7 -0
- package/playground/node_modules/.vite/deps/svelte_attachments.js +15 -0
- package/playground/node_modules/.vite/deps/svelte_attachments.js.map +7 -0
- package/playground/node_modules/.vite/deps/svelte_easing.js +67 -0
- package/playground/node_modules/.vite/deps/svelte_easing.js.map +7 -0
- package/playground/node_modules/.vite/deps/svelte_events.js +11 -0
- package/playground/node_modules/.vite/deps/svelte_events.js.map +7 -0
- package/playground/node_modules/.vite/deps/svelte_internal.js +5 -0
- package/playground/node_modules/.vite/deps/svelte_internal.js.map +7 -0
- package/playground/node_modules/.vite/deps/svelte_internal_client.js +402 -0
- package/playground/node_modules/.vite/deps/svelte_internal_client.js.map +7 -0
- package/playground/node_modules/.vite/deps/svelte_internal_disclose-version.js +10 -0
- package/playground/node_modules/.vite/deps/svelte_internal_disclose-version.js.map +7 -0
- package/playground/node_modules/.vite/deps/svelte_internal_flags_async.js +8 -0
- package/playground/node_modules/.vite/deps/svelte_internal_flags_async.js.map +7 -0
- package/playground/node_modules/.vite/deps/svelte_internal_flags_legacy.js +8 -0
- package/playground/node_modules/.vite/deps/svelte_internal_flags_legacy.js.map +7 -0
- package/playground/node_modules/.vite/deps/svelte_internal_flags_tracing.js +8 -0
- package/playground/node_modules/.vite/deps/svelte_internal_flags_tracing.js.map +7 -0
- package/playground/node_modules/.vite/deps/svelte_legacy.js +35 -0
- package/playground/node_modules/.vite/deps/svelte_legacy.js.map +7 -0
- package/playground/node_modules/.vite/deps/svelte_motion.js +545 -0
- package/playground/node_modules/.vite/deps/svelte_motion.js.map +7 -0
- package/playground/node_modules/.vite/deps/svelte_reactivity.js +29 -0
- package/playground/node_modules/.vite/deps/svelte_reactivity.js.map +7 -0
- package/playground/node_modules/.vite/deps/svelte_reactivity_window.js +127 -0
- package/playground/node_modules/.vite/deps/svelte_reactivity_window.js.map +7 -0
- package/playground/node_modules/.vite/deps/svelte_store.js +103 -0
- package/playground/node_modules/.vite/deps/svelte_store.js.map +7 -0
- package/playground/node_modules/.vite/deps/svelte_transition.js +208 -0
- package/playground/node_modules/.vite/deps/svelte_transition.js.map +7 -0
- package/playground/package.json +16 -0
- package/playground/pnpm-lock.yaml +3167 -0
- package/playground/src/content/authors/jane-doe.json +8 -0
- package/playground/src/content/config/build.toml +2 -0
- package/playground/src/content/courses/web-fundamentals.json +29 -0
- package/playground/src/content/docs/advanced.mdx +6 -0
- package/playground/src/content/docs/intro.md +6 -0
- package/playground/src/content/guides/getting-started.mdx +6 -0
- package/playground/src/content/posts/hello-world.md +7 -0
- package/playground/src/content/products/t-shirt.json +16 -0
- package/playground/src/content/recipes/pancakes.mdoc +8 -0
- package/playground/src/content/settings/site.yml +2 -0
- package/playground/src/content.config.ts +198 -0
- package/playground/src/env.d.ts +1 -0
- package/playground/src/pages/index.astro +11 -0
- package/playground/src/pages/nebula.astro +14 -0
- package/pnpm-workspace.yaml +2 -0
- package/scripts/subset-icons.mjs +178 -0
- package/src/astro/index.ts +295 -0
- package/src/client/Admin.svelte +283 -0
- package/src/client/components/BackendPicker.svelte +291 -0
- package/src/client/components/DraftChip.svelte +46 -0
- package/src/client/components/MetadataForm.svelte +56 -0
- package/src/client/components/ThemeToggle.svelte +18 -0
- package/src/client/components/dialogs/DeleteDraftDialog.svelte +51 -0
- package/src/client/components/dialogs/FilenameDialog.svelte +129 -0
- package/src/client/components/editor/EditorPane.svelte +227 -0
- package/src/client/components/editor/EditorTabs.svelte +81 -0
- package/src/client/components/editor/EditorToolbar.svelte +131 -0
- package/src/client/components/editor/FormatSelector.svelte +66 -0
- package/src/client/components/editor/Toolbar.svelte +17 -0
- package/src/client/components/fields/ArrayField.svelte +339 -0
- package/src/client/components/fields/ArrayItem.svelte +325 -0
- package/src/client/components/fields/BooleanField.svelte +114 -0
- package/src/client/components/fields/DateField.svelte +82 -0
- package/src/client/components/fields/EnumField.svelte +74 -0
- package/src/client/components/fields/FieldWrapper.svelte +96 -0
- package/src/client/components/fields/NumberField.svelte +99 -0
- package/src/client/components/fields/ObjectField.svelte +121 -0
- package/src/client/components/fields/SchemaField.svelte +107 -0
- package/src/client/components/fields/StringField.svelte +104 -0
- package/src/client/components/sidebar/AdminSidebar.svelte +339 -0
- package/src/client/components/sidebar/AdminSidebarSort.svelte +123 -0
- package/src/client/css/a11y.css +14 -0
- package/src/client/css/btn.css +113 -0
- package/src/client/css/dialog.css +29 -0
- package/src/client/css/field-input.css +39 -0
- package/src/client/css/reset.css +59 -0
- package/src/client/css/theme.css +77 -0
- package/src/client/index.ts +1 -0
- package/src/client/js/drafts/merge.svelte.ts +121 -0
- package/src/client/js/drafts/ops.svelte.ts +227 -0
- package/src/client/js/drafts/storage.ts +108 -0
- package/src/client/js/drafts/workers/diff.ts +40 -0
- package/src/client/js/editor/editor.svelte.ts +343 -0
- package/src/client/js/editor/languages.ts +98 -0
- package/src/client/js/editor/link-wrap.ts +45 -0
- package/src/client/js/editor/markdown-shortcuts.ts +261 -0
- package/src/client/js/handlers/admin.ts +246 -0
- package/src/client/js/state/dialogs.svelte.ts +35 -0
- package/src/client/js/state/router.svelte.ts +156 -0
- package/src/client/js/state/schema.svelte.ts +140 -0
- package/src/client/js/state/state.svelte.ts +334 -0
- package/src/client/js/state/theme.svelte.ts +173 -0
- package/src/client/js/storage/adapter.ts +102 -0
- package/src/client/js/storage/client.ts +150 -0
- package/src/client/js/storage/db.ts +36 -0
- package/src/client/js/storage/fsa.ts +110 -0
- package/src/client/js/storage/github.ts +297 -0
- package/src/client/js/storage/storage.ts +83 -0
- package/src/client/js/storage/workers/frontmatter.ts +320 -0
- package/src/client/js/storage/workers/storage.ts +177 -0
- package/src/client/js/storage/workers/toml-parser.ts +106 -0
- package/src/client/js/storage/workers/yaml-parser.ts +132 -0
- package/src/client/js/utils/file-types.ts +192 -0
- package/src/client/js/utils/format.ts +16 -0
- package/src/client/js/utils/frontmatter.ts +38 -0
- package/src/client/js/utils/schema-utils.ts +295 -0
- package/src/client/js/utils/slug.ts +18 -0
- package/src/client/js/utils/sort.ts +84 -0
- package/src/client/js/utils/stable-stringify.ts +27 -0
- package/src/client/js/utils/url-utils.ts +38 -0
- package/src/types.ts +25 -0
- package/src/virtual.d.ts +22 -0
- package/svelte.config.js +4 -0
- package/tests/astro/build.test.ts +63 -0
- package/tests/astro/index.test.ts +689 -0
- package/tests/client/components/Admin.test.ts +446 -0
- package/tests/client/components/BackendPicker.test.ts +239 -0
- package/tests/client/components/DraftChip.test.ts +53 -0
- package/tests/client/components/MetadataForm.test.ts +164 -0
- package/tests/client/components/dialogs/DeleteDraftDialog.test.ts +91 -0
- package/tests/client/components/dialogs/FilenameDialog.test.ts +209 -0
- package/tests/client/components/dialogs/dialog-stubs.ts +19 -0
- package/tests/client/components/editor/EditorPane.test.ts +100 -0
- package/tests/client/components/editor/EditorTabs.test.ts +253 -0
- package/tests/client/components/editor/EditorToolbar.test.ts +252 -0
- package/tests/client/components/editor/fixtures.ts +31 -0
- package/tests/client/components/fields/ArrayField.test.ts +197 -0
- package/tests/client/components/fields/BooleanField.test.ts +206 -0
- package/tests/client/components/fields/DateField.test.ts +210 -0
- package/tests/client/components/fields/EnumField.test.ts +246 -0
- package/tests/client/components/fields/NumberField.test.ts +240 -0
- package/tests/client/components/fields/ObjectField.test.ts +157 -0
- package/tests/client/components/fields/SchemaField.test.ts +190 -0
- package/tests/client/components/fields/StringField.test.ts +223 -0
- package/tests/client/components/sidebar/AdminSidebar.test.ts +285 -0
- package/tests/client/components/sidebar/AdminSidebarSort.test.ts +135 -0
- package/tests/client/components/sidebar/sort-mock.ts +23 -0
- package/tests/client/js/drafts/fixtures.ts +22 -0
- package/tests/client/js/drafts/merge.test.ts +282 -0
- package/tests/client/js/drafts/ops.test.ts +658 -0
- package/tests/client/js/drafts/storage.test.ts +200 -0
- package/tests/client/js/drafts/workers/diff.test.ts +165 -0
- package/tests/client/js/editor/editor.test.ts +616 -0
- package/tests/client/js/editor/link-wrap.test.ts +225 -0
- package/tests/client/js/editor/markdown-shortcuts.test.ts +370 -0
- package/tests/client/js/handlers/admin.test.ts +467 -0
- package/tests/client/js/state/router.test.ts +619 -0
- package/tests/client/js/state/schema.test.ts +266 -0
- package/tests/client/js/state/state.test.ts +328 -0
- package/tests/client/js/storage/adapter.test.ts +115 -0
- package/tests/client/js/storage/client.test.ts +250 -0
- package/tests/client/js/storage/db.test.ts +59 -0
- package/tests/client/js/storage/fsa.test.ts +284 -0
- package/tests/client/js/storage/github.test.ts +349 -0
- package/tests/client/js/storage/mock-port.ts +95 -0
- package/tests/client/js/storage/storage.test.ts +77 -0
- package/tests/client/js/storage/workers/frontmatter.test.ts +479 -0
- package/tests/client/js/storage/workers/storage.test.ts +299 -0
- package/tests/client/js/storage/workers/toml-parser.test.ts +169 -0
- package/tests/client/js/storage/workers/yaml-parser.test.ts +168 -0
- package/tests/client/js/utils/file-types.test.ts +268 -0
- package/tests/client/js/utils/frontmatter.test.ts +87 -0
- package/tests/client/js/utils/schema-utils.test.ts +318 -0
- package/tests/client/js/utils/slug.test.ts +58 -0
- package/tests/client/js/utils/sort.test.ts +276 -0
- package/tests/client/js/utils/stable-stringify.test.ts +68 -0
- package/tests/client/js/utils/url-utils.test.ts +70 -0
- package/tests/e2e/backend-connection.test.ts +301 -0
- package/tests/e2e/draft-lifecycle.test.ts +388 -0
- package/tests/e2e/editing.test.ts +355 -0
- package/tests/e2e/github-adapter.test.ts +330 -0
- package/tests/e2e/helpers/mock-adapter.ts +166 -0
- package/tests/e2e/helpers/test-app.ts +155 -0
- package/tests/e2e/navigation.test.ts +358 -0
- package/tests/e2e/publishing.test.ts +345 -0
- package/tests/e2e/unsaved-changes.test.ts +317 -0
- package/tests/setup.ts +2 -0
- package/tests/stubs/codemirror.ts +197 -0
- package/tsconfig.json +19 -0
- package/vitest.config.ts +178 -0
|
@@ -0,0 +1,688 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ReactiveValue
|
|
3
|
+
} from "./chunk-GKDKFWC5.js";
|
|
4
|
+
import {
|
|
5
|
+
on
|
|
6
|
+
} from "./chunk-G3C2FXJT.js";
|
|
7
|
+
import {
|
|
8
|
+
active_reaction,
|
|
9
|
+
get2 as get,
|
|
10
|
+
increment,
|
|
11
|
+
label,
|
|
12
|
+
set,
|
|
13
|
+
set_active_reaction,
|
|
14
|
+
source,
|
|
15
|
+
state,
|
|
16
|
+
tag,
|
|
17
|
+
update_version,
|
|
18
|
+
user_derived
|
|
19
|
+
} from "./chunk-KCUTL6DD.js";
|
|
20
|
+
import {
|
|
21
|
+
true_default
|
|
22
|
+
} from "./chunk-DBPNBGEI.js";
|
|
23
|
+
|
|
24
|
+
// ../node_modules/.pnpm/svelte@5.54.1/node_modules/svelte/src/reactivity/date.js
|
|
25
|
+
var inited = false;
|
|
26
|
+
var SvelteDate = class _SvelteDate extends Date {
|
|
27
|
+
#time = state(super.getTime());
|
|
28
|
+
/** @type {Map<keyof Date, Source<unknown>>} */
|
|
29
|
+
#deriveds = /* @__PURE__ */ new Map();
|
|
30
|
+
#reaction = active_reaction;
|
|
31
|
+
/** @param {any[]} params */
|
|
32
|
+
constructor(...params) {
|
|
33
|
+
super(...params);
|
|
34
|
+
if (true_default) {
|
|
35
|
+
tag(this.#time, "SvelteDate.#time");
|
|
36
|
+
}
|
|
37
|
+
if (!inited) this.#init();
|
|
38
|
+
}
|
|
39
|
+
#init() {
|
|
40
|
+
inited = true;
|
|
41
|
+
var proto = _SvelteDate.prototype;
|
|
42
|
+
var date_proto = Date.prototype;
|
|
43
|
+
var methods = (
|
|
44
|
+
/** @type {Array<keyof Date & string>} */
|
|
45
|
+
Object.getOwnPropertyNames(date_proto)
|
|
46
|
+
);
|
|
47
|
+
for (const method of methods) {
|
|
48
|
+
if (method.startsWith("get") || method.startsWith("to") || method === "valueOf") {
|
|
49
|
+
proto[method] = function(...args) {
|
|
50
|
+
if (args.length > 0) {
|
|
51
|
+
get(this.#time);
|
|
52
|
+
return date_proto[method].apply(this, args);
|
|
53
|
+
}
|
|
54
|
+
var d = this.#deriveds.get(method);
|
|
55
|
+
if (d === void 0) {
|
|
56
|
+
const reaction = active_reaction;
|
|
57
|
+
set_active_reaction(this.#reaction);
|
|
58
|
+
d = user_derived(() => {
|
|
59
|
+
get(this.#time);
|
|
60
|
+
return date_proto[method].apply(this, args);
|
|
61
|
+
});
|
|
62
|
+
this.#deriveds.set(method, d);
|
|
63
|
+
set_active_reaction(reaction);
|
|
64
|
+
}
|
|
65
|
+
return get(d);
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
if (method.startsWith("set")) {
|
|
69
|
+
proto[method] = function(...args) {
|
|
70
|
+
var result = date_proto[method].apply(this, args);
|
|
71
|
+
set(this.#time, date_proto.getTime.call(this));
|
|
72
|
+
return result;
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
// ../node_modules/.pnpm/svelte@5.54.1/node_modules/svelte/src/reactivity/set.js
|
|
80
|
+
var read_methods = ["forEach", "isDisjointFrom", "isSubsetOf", "isSupersetOf"];
|
|
81
|
+
var set_like_methods = ["difference", "intersection", "symmetricDifference", "union"];
|
|
82
|
+
var inited2 = false;
|
|
83
|
+
var SvelteSet = class _SvelteSet extends Set {
|
|
84
|
+
/** @type {Map<T, Source<boolean>>} */
|
|
85
|
+
#sources = /* @__PURE__ */ new Map();
|
|
86
|
+
#version = state(0);
|
|
87
|
+
#size = state(0);
|
|
88
|
+
#update_version = update_version || -1;
|
|
89
|
+
/**
|
|
90
|
+
* @param {Iterable<T> | null | undefined} [value]
|
|
91
|
+
*/
|
|
92
|
+
constructor(value) {
|
|
93
|
+
super();
|
|
94
|
+
if (true_default) {
|
|
95
|
+
value = new Set(value);
|
|
96
|
+
tag(this.#version, "SvelteSet version");
|
|
97
|
+
tag(this.#size, "SvelteSet.size");
|
|
98
|
+
}
|
|
99
|
+
if (value) {
|
|
100
|
+
for (var element of value) {
|
|
101
|
+
super.add(element);
|
|
102
|
+
}
|
|
103
|
+
this.#size.v = super.size;
|
|
104
|
+
}
|
|
105
|
+
if (!inited2) this.#init();
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* If the source is being created inside the same reaction as the SvelteSet instance,
|
|
109
|
+
* we use `state` so that it will not be a dependency of the reaction. Otherwise we
|
|
110
|
+
* use `source` so it will be.
|
|
111
|
+
*
|
|
112
|
+
* @template T
|
|
113
|
+
* @param {T} value
|
|
114
|
+
* @returns {Source<T>}
|
|
115
|
+
*/
|
|
116
|
+
#source(value) {
|
|
117
|
+
return update_version === this.#update_version ? state(value) : source(value);
|
|
118
|
+
}
|
|
119
|
+
// We init as part of the first instance so that we can treeshake this class
|
|
120
|
+
#init() {
|
|
121
|
+
inited2 = true;
|
|
122
|
+
var proto = _SvelteSet.prototype;
|
|
123
|
+
var set_proto = Set.prototype;
|
|
124
|
+
for (const method of read_methods) {
|
|
125
|
+
proto[method] = function(...v) {
|
|
126
|
+
get(this.#version);
|
|
127
|
+
return set_proto[method].apply(this, v);
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
for (const method of set_like_methods) {
|
|
131
|
+
proto[method] = function(...v) {
|
|
132
|
+
get(this.#version);
|
|
133
|
+
var set2 = (
|
|
134
|
+
/** @type {Set<T>} */
|
|
135
|
+
set_proto[method].apply(this, v)
|
|
136
|
+
);
|
|
137
|
+
return new _SvelteSet(set2);
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
/** @param {T} value */
|
|
142
|
+
has(value) {
|
|
143
|
+
var has = super.has(value);
|
|
144
|
+
var sources = this.#sources;
|
|
145
|
+
var s = sources.get(value);
|
|
146
|
+
if (s === void 0) {
|
|
147
|
+
if (!has) {
|
|
148
|
+
get(this.#version);
|
|
149
|
+
return false;
|
|
150
|
+
}
|
|
151
|
+
s = this.#source(true);
|
|
152
|
+
if (true_default) {
|
|
153
|
+
tag(s, `SvelteSet has(${label(value)})`);
|
|
154
|
+
}
|
|
155
|
+
sources.set(value, s);
|
|
156
|
+
}
|
|
157
|
+
get(s);
|
|
158
|
+
return has;
|
|
159
|
+
}
|
|
160
|
+
/** @param {T} value */
|
|
161
|
+
add(value) {
|
|
162
|
+
if (!super.has(value)) {
|
|
163
|
+
super.add(value);
|
|
164
|
+
set(this.#size, super.size);
|
|
165
|
+
increment(this.#version);
|
|
166
|
+
}
|
|
167
|
+
return this;
|
|
168
|
+
}
|
|
169
|
+
/** @param {T} value */
|
|
170
|
+
delete(value) {
|
|
171
|
+
var deleted = super.delete(value);
|
|
172
|
+
var sources = this.#sources;
|
|
173
|
+
var s = sources.get(value);
|
|
174
|
+
if (s !== void 0) {
|
|
175
|
+
sources.delete(value);
|
|
176
|
+
set(s, false);
|
|
177
|
+
}
|
|
178
|
+
if (deleted) {
|
|
179
|
+
set(this.#size, super.size);
|
|
180
|
+
increment(this.#version);
|
|
181
|
+
}
|
|
182
|
+
return deleted;
|
|
183
|
+
}
|
|
184
|
+
clear() {
|
|
185
|
+
if (super.size === 0) {
|
|
186
|
+
return;
|
|
187
|
+
}
|
|
188
|
+
super.clear();
|
|
189
|
+
var sources = this.#sources;
|
|
190
|
+
for (var s of sources.values()) {
|
|
191
|
+
set(s, false);
|
|
192
|
+
}
|
|
193
|
+
sources.clear();
|
|
194
|
+
set(this.#size, 0);
|
|
195
|
+
increment(this.#version);
|
|
196
|
+
}
|
|
197
|
+
keys() {
|
|
198
|
+
return this.values();
|
|
199
|
+
}
|
|
200
|
+
values() {
|
|
201
|
+
get(this.#version);
|
|
202
|
+
return super.values();
|
|
203
|
+
}
|
|
204
|
+
entries() {
|
|
205
|
+
get(this.#version);
|
|
206
|
+
return super.entries();
|
|
207
|
+
}
|
|
208
|
+
[Symbol.iterator]() {
|
|
209
|
+
return this.keys();
|
|
210
|
+
}
|
|
211
|
+
get size() {
|
|
212
|
+
return get(this.#size);
|
|
213
|
+
}
|
|
214
|
+
};
|
|
215
|
+
|
|
216
|
+
// ../node_modules/.pnpm/svelte@5.54.1/node_modules/svelte/src/reactivity/map.js
|
|
217
|
+
var SvelteMap = class extends Map {
|
|
218
|
+
/** @type {Map<K, Source<number>>} */
|
|
219
|
+
#sources = /* @__PURE__ */ new Map();
|
|
220
|
+
#version = state(0);
|
|
221
|
+
#size = state(0);
|
|
222
|
+
#update_version = update_version || -1;
|
|
223
|
+
/**
|
|
224
|
+
* @param {Iterable<readonly [K, V]> | null | undefined} [value]
|
|
225
|
+
*/
|
|
226
|
+
constructor(value) {
|
|
227
|
+
super();
|
|
228
|
+
if (true_default) {
|
|
229
|
+
value = new Map(value);
|
|
230
|
+
tag(this.#version, "SvelteMap version");
|
|
231
|
+
tag(this.#size, "SvelteMap.size");
|
|
232
|
+
}
|
|
233
|
+
if (value) {
|
|
234
|
+
for (var [key, v] of value) {
|
|
235
|
+
super.set(key, v);
|
|
236
|
+
}
|
|
237
|
+
this.#size.v = super.size;
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
/**
|
|
241
|
+
* If the source is being created inside the same reaction as the SvelteMap instance,
|
|
242
|
+
* we use `state` so that it will not be a dependency of the reaction. Otherwise we
|
|
243
|
+
* use `source` so it will be.
|
|
244
|
+
*
|
|
245
|
+
* @template T
|
|
246
|
+
* @param {T} value
|
|
247
|
+
* @returns {Source<T>}
|
|
248
|
+
*/
|
|
249
|
+
#source(value) {
|
|
250
|
+
return update_version === this.#update_version ? state(value) : source(value);
|
|
251
|
+
}
|
|
252
|
+
/** @param {K} key */
|
|
253
|
+
has(key) {
|
|
254
|
+
var sources = this.#sources;
|
|
255
|
+
var s = sources.get(key);
|
|
256
|
+
if (s === void 0) {
|
|
257
|
+
if (super.has(key)) {
|
|
258
|
+
s = this.#source(0);
|
|
259
|
+
if (true_default) {
|
|
260
|
+
tag(s, `SvelteMap get(${label(key)})`);
|
|
261
|
+
}
|
|
262
|
+
sources.set(key, s);
|
|
263
|
+
} else {
|
|
264
|
+
get(this.#version);
|
|
265
|
+
return false;
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
get(s);
|
|
269
|
+
return true;
|
|
270
|
+
}
|
|
271
|
+
/**
|
|
272
|
+
* @param {(value: V, key: K, map: Map<K, V>) => void} callbackfn
|
|
273
|
+
* @param {any} [this_arg]
|
|
274
|
+
*/
|
|
275
|
+
forEach(callbackfn, this_arg) {
|
|
276
|
+
this.#read_all();
|
|
277
|
+
super.forEach(callbackfn, this_arg);
|
|
278
|
+
}
|
|
279
|
+
/** @param {K} key */
|
|
280
|
+
get(key) {
|
|
281
|
+
var sources = this.#sources;
|
|
282
|
+
var s = sources.get(key);
|
|
283
|
+
if (s === void 0) {
|
|
284
|
+
if (super.has(key)) {
|
|
285
|
+
s = this.#source(0);
|
|
286
|
+
if (true_default) {
|
|
287
|
+
tag(s, `SvelteMap get(${label(key)})`);
|
|
288
|
+
}
|
|
289
|
+
sources.set(key, s);
|
|
290
|
+
} else {
|
|
291
|
+
get(this.#version);
|
|
292
|
+
return void 0;
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
get(s);
|
|
296
|
+
return super.get(key);
|
|
297
|
+
}
|
|
298
|
+
/**
|
|
299
|
+
* @param {K} key
|
|
300
|
+
* @param {V} value
|
|
301
|
+
* */
|
|
302
|
+
set(key, value) {
|
|
303
|
+
var sources = this.#sources;
|
|
304
|
+
var s = sources.get(key);
|
|
305
|
+
var prev_res = super.get(key);
|
|
306
|
+
var res = super.set(key, value);
|
|
307
|
+
var version = this.#version;
|
|
308
|
+
if (s === void 0) {
|
|
309
|
+
s = this.#source(0);
|
|
310
|
+
if (true_default) {
|
|
311
|
+
tag(s, `SvelteMap get(${label(key)})`);
|
|
312
|
+
}
|
|
313
|
+
sources.set(key, s);
|
|
314
|
+
set(this.#size, super.size);
|
|
315
|
+
increment(version);
|
|
316
|
+
} else if (prev_res !== value) {
|
|
317
|
+
increment(s);
|
|
318
|
+
var v_reactions = version.reactions === null ? null : new Set(version.reactions);
|
|
319
|
+
var needs_version_increase = v_reactions === null || !s.reactions?.every(
|
|
320
|
+
(r) => (
|
|
321
|
+
/** @type {NonNullable<typeof v_reactions>} */
|
|
322
|
+
v_reactions.has(r)
|
|
323
|
+
)
|
|
324
|
+
);
|
|
325
|
+
if (needs_version_increase) {
|
|
326
|
+
increment(version);
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
return res;
|
|
330
|
+
}
|
|
331
|
+
/** @param {K} key */
|
|
332
|
+
delete(key) {
|
|
333
|
+
var sources = this.#sources;
|
|
334
|
+
var s = sources.get(key);
|
|
335
|
+
var res = super.delete(key);
|
|
336
|
+
if (s !== void 0) {
|
|
337
|
+
sources.delete(key);
|
|
338
|
+
set(s, -1);
|
|
339
|
+
}
|
|
340
|
+
if (res) {
|
|
341
|
+
set(this.#size, super.size);
|
|
342
|
+
increment(this.#version);
|
|
343
|
+
}
|
|
344
|
+
return res;
|
|
345
|
+
}
|
|
346
|
+
clear() {
|
|
347
|
+
if (super.size === 0) {
|
|
348
|
+
return;
|
|
349
|
+
}
|
|
350
|
+
super.clear();
|
|
351
|
+
var sources = this.#sources;
|
|
352
|
+
set(this.#size, 0);
|
|
353
|
+
for (var s of sources.values()) {
|
|
354
|
+
set(s, -1);
|
|
355
|
+
}
|
|
356
|
+
increment(this.#version);
|
|
357
|
+
sources.clear();
|
|
358
|
+
}
|
|
359
|
+
#read_all() {
|
|
360
|
+
get(this.#version);
|
|
361
|
+
var sources = this.#sources;
|
|
362
|
+
if (this.#size.v !== sources.size) {
|
|
363
|
+
for (var key of super.keys()) {
|
|
364
|
+
if (!sources.has(key)) {
|
|
365
|
+
var s = this.#source(0);
|
|
366
|
+
if (true_default) {
|
|
367
|
+
tag(s, `SvelteMap get(${label(key)})`);
|
|
368
|
+
}
|
|
369
|
+
sources.set(key, s);
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
for ([, s] of this.#sources) {
|
|
374
|
+
get(s);
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
keys() {
|
|
378
|
+
get(this.#version);
|
|
379
|
+
return super.keys();
|
|
380
|
+
}
|
|
381
|
+
values() {
|
|
382
|
+
this.#read_all();
|
|
383
|
+
return super.values();
|
|
384
|
+
}
|
|
385
|
+
entries() {
|
|
386
|
+
this.#read_all();
|
|
387
|
+
return super.entries();
|
|
388
|
+
}
|
|
389
|
+
[Symbol.iterator]() {
|
|
390
|
+
return this.entries();
|
|
391
|
+
}
|
|
392
|
+
get size() {
|
|
393
|
+
get(this.#size);
|
|
394
|
+
return super.size;
|
|
395
|
+
}
|
|
396
|
+
};
|
|
397
|
+
|
|
398
|
+
// ../node_modules/.pnpm/svelte@5.54.1/node_modules/svelte/src/reactivity/url-search-params.js
|
|
399
|
+
var REPLACE = /* @__PURE__ */ Symbol();
|
|
400
|
+
var SvelteURLSearchParams = class extends URLSearchParams {
|
|
401
|
+
#version = true_default ? tag(state(0), "SvelteURLSearchParams version") : state(0);
|
|
402
|
+
#url = get_current_url();
|
|
403
|
+
#updating = false;
|
|
404
|
+
#update_url() {
|
|
405
|
+
if (!this.#url || this.#updating) return;
|
|
406
|
+
this.#updating = true;
|
|
407
|
+
const search = this.toString();
|
|
408
|
+
this.#url.search = search && `?${search}`;
|
|
409
|
+
this.#updating = false;
|
|
410
|
+
}
|
|
411
|
+
/**
|
|
412
|
+
* @param {URLSearchParams} params
|
|
413
|
+
* @internal
|
|
414
|
+
*/
|
|
415
|
+
[REPLACE](params) {
|
|
416
|
+
if (this.#updating) return;
|
|
417
|
+
this.#updating = true;
|
|
418
|
+
for (const key of [...super.keys()]) {
|
|
419
|
+
super.delete(key);
|
|
420
|
+
}
|
|
421
|
+
for (const [key, value] of params) {
|
|
422
|
+
super.append(key, value);
|
|
423
|
+
}
|
|
424
|
+
increment(this.#version);
|
|
425
|
+
this.#updating = false;
|
|
426
|
+
}
|
|
427
|
+
/**
|
|
428
|
+
* @param {string} name
|
|
429
|
+
* @param {string} value
|
|
430
|
+
* @returns {void}
|
|
431
|
+
*/
|
|
432
|
+
append(name, value) {
|
|
433
|
+
super.append(name, value);
|
|
434
|
+
this.#update_url();
|
|
435
|
+
increment(this.#version);
|
|
436
|
+
}
|
|
437
|
+
/**
|
|
438
|
+
* @param {string} name
|
|
439
|
+
* @param {string=} value
|
|
440
|
+
* @returns {void}
|
|
441
|
+
*/
|
|
442
|
+
delete(name, value) {
|
|
443
|
+
var has_value = super.has(name, value);
|
|
444
|
+
super.delete(name, value);
|
|
445
|
+
if (has_value) {
|
|
446
|
+
this.#update_url();
|
|
447
|
+
increment(this.#version);
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
/**
|
|
451
|
+
* @param {string} name
|
|
452
|
+
* @returns {string|null}
|
|
453
|
+
*/
|
|
454
|
+
get(name) {
|
|
455
|
+
get(this.#version);
|
|
456
|
+
return super.get(name);
|
|
457
|
+
}
|
|
458
|
+
/**
|
|
459
|
+
* @param {string} name
|
|
460
|
+
* @returns {string[]}
|
|
461
|
+
*/
|
|
462
|
+
getAll(name) {
|
|
463
|
+
get(this.#version);
|
|
464
|
+
return super.getAll(name);
|
|
465
|
+
}
|
|
466
|
+
/**
|
|
467
|
+
* @param {string} name
|
|
468
|
+
* @param {string=} value
|
|
469
|
+
* @returns {boolean}
|
|
470
|
+
*/
|
|
471
|
+
has(name, value) {
|
|
472
|
+
get(this.#version);
|
|
473
|
+
return super.has(name, value);
|
|
474
|
+
}
|
|
475
|
+
keys() {
|
|
476
|
+
get(this.#version);
|
|
477
|
+
return super.keys();
|
|
478
|
+
}
|
|
479
|
+
/**
|
|
480
|
+
* @param {string} name
|
|
481
|
+
* @param {string} value
|
|
482
|
+
* @returns {void}
|
|
483
|
+
*/
|
|
484
|
+
set(name, value) {
|
|
485
|
+
var previous = super.getAll(name).join("");
|
|
486
|
+
super.set(name, value);
|
|
487
|
+
if (previous !== super.getAll(name).join("")) {
|
|
488
|
+
this.#update_url();
|
|
489
|
+
increment(this.#version);
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
sort() {
|
|
493
|
+
super.sort();
|
|
494
|
+
this.#update_url();
|
|
495
|
+
increment(this.#version);
|
|
496
|
+
}
|
|
497
|
+
toString() {
|
|
498
|
+
get(this.#version);
|
|
499
|
+
return super.toString();
|
|
500
|
+
}
|
|
501
|
+
values() {
|
|
502
|
+
get(this.#version);
|
|
503
|
+
return super.values();
|
|
504
|
+
}
|
|
505
|
+
entries() {
|
|
506
|
+
get(this.#version);
|
|
507
|
+
return super.entries();
|
|
508
|
+
}
|
|
509
|
+
[Symbol.iterator]() {
|
|
510
|
+
return this.entries();
|
|
511
|
+
}
|
|
512
|
+
get size() {
|
|
513
|
+
get(this.#version);
|
|
514
|
+
return super.size;
|
|
515
|
+
}
|
|
516
|
+
};
|
|
517
|
+
|
|
518
|
+
// ../node_modules/.pnpm/svelte@5.54.1/node_modules/svelte/src/reactivity/url.js
|
|
519
|
+
var current_url = null;
|
|
520
|
+
function get_current_url() {
|
|
521
|
+
return current_url;
|
|
522
|
+
}
|
|
523
|
+
var SvelteURL = class extends URL {
|
|
524
|
+
#protocol = state(super.protocol);
|
|
525
|
+
#username = state(super.username);
|
|
526
|
+
#password = state(super.password);
|
|
527
|
+
#hostname = state(super.hostname);
|
|
528
|
+
#port = state(super.port);
|
|
529
|
+
#pathname = state(super.pathname);
|
|
530
|
+
#hash = state(super.hash);
|
|
531
|
+
#search = state(super.search);
|
|
532
|
+
#searchParams;
|
|
533
|
+
/**
|
|
534
|
+
* @param {string | URL} url
|
|
535
|
+
* @param {string | URL} [base]
|
|
536
|
+
*/
|
|
537
|
+
constructor(url, base) {
|
|
538
|
+
url = new URL(url, base);
|
|
539
|
+
super(url);
|
|
540
|
+
if (true_default) {
|
|
541
|
+
tag(this.#protocol, "SvelteURL.protocol");
|
|
542
|
+
tag(this.#username, "SvelteURL.username");
|
|
543
|
+
tag(this.#password, "SvelteURL.password");
|
|
544
|
+
tag(this.#hostname, "SvelteURL.hostname");
|
|
545
|
+
tag(this.#port, "SvelteURL.port");
|
|
546
|
+
tag(this.#pathname, "SvelteURL.pathname");
|
|
547
|
+
tag(this.#hash, "SvelteURL.hash");
|
|
548
|
+
tag(this.#search, "SvelteURL.search");
|
|
549
|
+
}
|
|
550
|
+
current_url = this;
|
|
551
|
+
this.#searchParams = new SvelteURLSearchParams(url.searchParams);
|
|
552
|
+
current_url = null;
|
|
553
|
+
}
|
|
554
|
+
get hash() {
|
|
555
|
+
return get(this.#hash);
|
|
556
|
+
}
|
|
557
|
+
set hash(value) {
|
|
558
|
+
super.hash = value;
|
|
559
|
+
set(this.#hash, super.hash);
|
|
560
|
+
}
|
|
561
|
+
get host() {
|
|
562
|
+
get(this.#hostname);
|
|
563
|
+
get(this.#port);
|
|
564
|
+
return super.host;
|
|
565
|
+
}
|
|
566
|
+
set host(value) {
|
|
567
|
+
super.host = value;
|
|
568
|
+
set(this.#hostname, super.hostname);
|
|
569
|
+
set(this.#port, super.port);
|
|
570
|
+
}
|
|
571
|
+
get hostname() {
|
|
572
|
+
return get(this.#hostname);
|
|
573
|
+
}
|
|
574
|
+
set hostname(value) {
|
|
575
|
+
super.hostname = value;
|
|
576
|
+
set(this.#hostname, super.hostname);
|
|
577
|
+
}
|
|
578
|
+
get href() {
|
|
579
|
+
get(this.#protocol);
|
|
580
|
+
get(this.#username);
|
|
581
|
+
get(this.#password);
|
|
582
|
+
get(this.#hostname);
|
|
583
|
+
get(this.#port);
|
|
584
|
+
get(this.#pathname);
|
|
585
|
+
get(this.#hash);
|
|
586
|
+
get(this.#search);
|
|
587
|
+
return super.href;
|
|
588
|
+
}
|
|
589
|
+
set href(value) {
|
|
590
|
+
super.href = value;
|
|
591
|
+
set(this.#protocol, super.protocol);
|
|
592
|
+
set(this.#username, super.username);
|
|
593
|
+
set(this.#password, super.password);
|
|
594
|
+
set(this.#hostname, super.hostname);
|
|
595
|
+
set(this.#port, super.port);
|
|
596
|
+
set(this.#pathname, super.pathname);
|
|
597
|
+
set(this.#hash, super.hash);
|
|
598
|
+
set(this.#search, super.search);
|
|
599
|
+
this.#searchParams[REPLACE](super.searchParams);
|
|
600
|
+
}
|
|
601
|
+
get password() {
|
|
602
|
+
return get(this.#password);
|
|
603
|
+
}
|
|
604
|
+
set password(value) {
|
|
605
|
+
super.password = value;
|
|
606
|
+
set(this.#password, super.password);
|
|
607
|
+
}
|
|
608
|
+
get pathname() {
|
|
609
|
+
return get(this.#pathname);
|
|
610
|
+
}
|
|
611
|
+
set pathname(value) {
|
|
612
|
+
super.pathname = value;
|
|
613
|
+
set(this.#pathname, super.pathname);
|
|
614
|
+
}
|
|
615
|
+
get port() {
|
|
616
|
+
return get(this.#port);
|
|
617
|
+
}
|
|
618
|
+
set port(value) {
|
|
619
|
+
super.port = value;
|
|
620
|
+
set(this.#port, super.port);
|
|
621
|
+
}
|
|
622
|
+
get protocol() {
|
|
623
|
+
return get(this.#protocol);
|
|
624
|
+
}
|
|
625
|
+
set protocol(value) {
|
|
626
|
+
super.protocol = value;
|
|
627
|
+
set(this.#protocol, super.protocol);
|
|
628
|
+
}
|
|
629
|
+
get search() {
|
|
630
|
+
return get(this.#search);
|
|
631
|
+
}
|
|
632
|
+
set search(value) {
|
|
633
|
+
super.search = value;
|
|
634
|
+
set(this.#search, super.search);
|
|
635
|
+
this.#searchParams[REPLACE](super.searchParams);
|
|
636
|
+
}
|
|
637
|
+
get username() {
|
|
638
|
+
return get(this.#username);
|
|
639
|
+
}
|
|
640
|
+
set username(value) {
|
|
641
|
+
super.username = value;
|
|
642
|
+
set(this.#username, super.username);
|
|
643
|
+
}
|
|
644
|
+
get origin() {
|
|
645
|
+
get(this.#protocol);
|
|
646
|
+
get(this.#hostname);
|
|
647
|
+
get(this.#port);
|
|
648
|
+
return super.origin;
|
|
649
|
+
}
|
|
650
|
+
get searchParams() {
|
|
651
|
+
return this.#searchParams;
|
|
652
|
+
}
|
|
653
|
+
toString() {
|
|
654
|
+
return this.href;
|
|
655
|
+
}
|
|
656
|
+
toJSON() {
|
|
657
|
+
return this.href;
|
|
658
|
+
}
|
|
659
|
+
};
|
|
660
|
+
|
|
661
|
+
// ../node_modules/.pnpm/svelte@5.54.1/node_modules/svelte/src/reactivity/media-query.js
|
|
662
|
+
var parenthesis_regex = /\(.+\)/;
|
|
663
|
+
var non_parenthesized_keywords = /* @__PURE__ */ new Set(["all", "print", "screen", "and", "or", "not", "only"]);
|
|
664
|
+
var MediaQuery = class extends ReactiveValue {
|
|
665
|
+
/**
|
|
666
|
+
* @param {string} query A media query string
|
|
667
|
+
* @param {boolean} [fallback] Fallback value for the server
|
|
668
|
+
*/
|
|
669
|
+
constructor(query, fallback) {
|
|
670
|
+
let final_query = parenthesis_regex.test(query) || // we need to use `some` here because technically this `window.matchMedia('random,screen')` still returns true
|
|
671
|
+
query.split(/[\s,]+/).some((keyword) => non_parenthesized_keywords.has(keyword.trim())) ? query : `(${query})`;
|
|
672
|
+
const q = window.matchMedia(final_query);
|
|
673
|
+
super(
|
|
674
|
+
() => q.matches,
|
|
675
|
+
(update) => on(q, "change", update)
|
|
676
|
+
);
|
|
677
|
+
}
|
|
678
|
+
};
|
|
679
|
+
|
|
680
|
+
export {
|
|
681
|
+
SvelteDate,
|
|
682
|
+
SvelteSet,
|
|
683
|
+
SvelteMap,
|
|
684
|
+
SvelteURLSearchParams,
|
|
685
|
+
SvelteURL,
|
|
686
|
+
MediaQuery
|
|
687
|
+
};
|
|
688
|
+
//# sourceMappingURL=chunk-JICYXBFU.js.map
|