@manyducks.co/dolla 2.0.0-alpha.55 → 2.0.0-alpha.57

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.
Files changed (49) hide show
  1. package/README.md +5 -2
  2. package/dist/core/context.d.ts +38 -25
  3. package/dist/core/env.d.ts +2 -8
  4. package/dist/core/index.d.ts +3 -5
  5. package/dist/core/logger.d.ts +2 -2
  6. package/dist/core/markup.d.ts +43 -42
  7. package/dist/core/mount.d.ts +1 -1
  8. package/dist/core/nodes/dom.d.ts +6 -6
  9. package/dist/core/nodes/dynamic.d.ts +13 -15
  10. package/dist/core/nodes/html.d.ts +9 -21
  11. package/dist/core/nodes/portal.d.ts +8 -12
  12. package/dist/core/nodes/repeat.d.ts +13 -18
  13. package/dist/core/nodes/view.d.ts +10 -23
  14. package/dist/core/ref.d.ts +2 -6
  15. package/dist/core/symbols.d.ts +1 -1
  16. package/dist/core/views/default-crash-view.d.ts +1 -1
  17. package/dist/core/views/fragment.d.ts +1 -2
  18. package/dist/fragment-BahD_BJA.js +7 -0
  19. package/dist/fragment-BahD_BJA.js.map +1 -0
  20. package/dist/http.js +1 -1
  21. package/dist/i18n.js +2 -2
  22. package/dist/index.js +41 -41
  23. package/dist/index.js.map +1 -1
  24. package/dist/jsx-dev-runtime.d.ts +1 -1
  25. package/dist/jsx-dev-runtime.js +2 -2
  26. package/dist/jsx-runtime.d.ts +2 -2
  27. package/dist/jsx-runtime.js +2 -2
  28. package/dist/{logger-CXdzxt1e.js → logger-sSxIw5od.js} +100 -100
  29. package/dist/logger-sSxIw5od.js.map +1 -0
  30. package/dist/markup-CAJd0zdA.js +937 -0
  31. package/dist/markup-CAJd0zdA.js.map +1 -0
  32. package/dist/router/index.d.ts +1 -1
  33. package/dist/router/router.d.ts +6 -6
  34. package/dist/{router-B-rtBG7i.js → router-ClSFnmRK.js} +184 -183
  35. package/dist/router-ClSFnmRK.js.map +1 -0
  36. package/dist/router.js +1 -1
  37. package/dist/router.js.map +1 -1
  38. package/dist/{typeChecking-lgllKIVq.js → typeChecking-BJ-ymQ2F.js} +5 -10
  39. package/dist/{typeChecking-lgllKIVq.js.map → typeChecking-BJ-ymQ2F.js.map} +1 -1
  40. package/dist/types.d.ts +40 -22
  41. package/package.json +1 -1
  42. package/dist/core/nodes/fragment.d.ts +0 -19
  43. package/dist/core/nodes/outlet.d.ts +0 -19
  44. package/dist/fragment-VXM-P2tT.js +0 -7
  45. package/dist/fragment-VXM-P2tT.js.map +0 -1
  46. package/dist/logger-CXdzxt1e.js.map +0 -1
  47. package/dist/markup-yTuFdC0t.js +0 -923
  48. package/dist/markup-yTuFdC0t.js.map +0 -1
  49. package/dist/router-B-rtBG7i.js.map +0 -1
package/dist/index.js CHANGED
@@ -1,14 +1,14 @@
1
- import { o as g } from "./logger-CXdzxt1e.js";
2
- import { $ as L, f as T, d as _, e as q, g as B, b as V, p as $, c as v, h as O, i as P, s as S, a as z } from "./logger-CXdzxt1e.js";
3
- import { m as t, w as d, C as y, r as m } from "./markup-yTuFdC0t.js";
4
- import { c as D, p as Y, a as G, u as I } from "./markup-yTuFdC0t.js";
5
- import { R as h, M as w, U as p } from "./router-B-rtBG7i.js";
6
- import { a as b } from "./typeChecking-lgllKIVq.js";
7
- const f = Symbol("Ref.EMPTY");
8
- function k(e = f) {
1
+ import { o as h } from "./logger-sSxIw5od.js";
2
+ import { $ as k, f as D, d as F, e as I, g as _, b as q, p as v, c as B, h as V, i as $, s as P, a as S } from "./logger-sSxIw5od.js";
3
+ import { m as t, w as y, C as s, L as i, r as u } from "./markup-CAJd0zdA.js";
4
+ import { c as z, p as A, a as Y, u as G } from "./markup-CAJd0zdA.js";
5
+ import { R as p, M as w, U as b } from "./router-ClSFnmRK.js";
6
+ import { a as x } from "./typeChecking-BJ-ymQ2F.js";
7
+ const c = Symbol("Ref.EMPTY");
8
+ function C(e = c) {
9
9
  return function() {
10
10
  if (arguments.length === 0) {
11
- if (e === f)
11
+ if (e === c)
12
12
  throw new Error("Ref getter was called, but ref has no value! Be sure to set your refs before accessing them.");
13
13
  } else if (arguments.length === 1)
14
14
  e = arguments[0];
@@ -17,7 +17,7 @@ function k(e = f) {
17
17
  return e;
18
18
  };
19
19
  }
20
- function x(e) {
20
+ function E(e) {
21
21
  return t(
22
22
  "div",
23
23
  {
@@ -35,7 +35,7 @@ function x(e) {
35
35
  "p",
36
36
  { style: { marginBottom: "0.25rem" } },
37
37
  t("span", { style: { fontFamily: "monospace" } }, e.loggerName),
38
- d(
38
+ y(
39
39
  e.tag,
40
40
  t(
41
41
  "span",
@@ -77,40 +77,40 @@ function x(e) {
77
77
  );
78
78
  }
79
79
  let o = !1;
80
- async function N(e, n, r) {
81
- if (b(Element, n, "Expected an element or a selector string. Got type: %t, value: %v"), o)
80
+ async function R(e, n, r) {
81
+ if (x(Element, n, "Expected an element or a selector string. Got type: %t, value: %v"), o)
82
82
  throw new Error("A Dolla app is already mounted.");
83
- let s, l, c = (r == null ? void 0 : r.crashView) ?? x;
84
- const a = (r == null ? void 0 : r.context) ?? new y("App");
85
- g((u) => {
86
- o && i(), m(t(c, u), a).mount(n);
87
- }), a._lifecycle.willMount(), e instanceof h ? (l = e, s = await l[w](n, a)) : s = m(t(e), a), s.mount(n), o = !0, a._lifecycle.didMount();
88
- async function i() {
89
- o && (a._lifecycle.willUnmount(), s.unmount(!1), l && await l[p](), o = !1, a._lifecycle.didUnmount());
83
+ let m, l, g = (r == null ? void 0 : r.crashView) ?? E;
84
+ const a = (r == null ? void 0 : r.context) ?? new s("App");
85
+ h((d) => {
86
+ o && f(), u(t(g, d), a).mount(n);
87
+ }), s.emit(i.WILL_MOUNT, a), e instanceof p ? (l = e, m = await l[w](n, a)) : m = u(t(e), a), m.mount(n), o = !0, s.emit(i.DID_MOUNT, a);
88
+ async function f() {
89
+ o && (s.emit(i.WILL_UNMOUNT, a), m.unmount(!1), l && await l[b](), o = !1, s.emit(i.DID_UNMOUNT, a));
90
90
  }
91
- return i;
91
+ return f;
92
92
  }
93
93
  export {
94
- L as $,
95
- D as createContext,
96
- T as createLogger,
97
- _ as deepEqual,
98
- q as effect,
99
- B as get,
100
- V as getEnv,
94
+ k as $,
95
+ z as createContext,
96
+ D as createLogger,
97
+ F as deepEqual,
98
+ I as effect,
99
+ _ as get,
100
+ q as getEnv,
101
101
  t as m,
102
- N as mount,
103
- $ as peek,
104
- Y as portal,
105
- k as ref,
106
- m as render,
107
- G as repeat,
108
- v as setEnv,
109
- O as setLogFilter,
110
- P as setLogLevels,
111
- S as shallowEqual,
112
- z as strictEqual,
113
- I as unless,
114
- d as when
102
+ R as mount,
103
+ v as peek,
104
+ A as portal,
105
+ C as ref,
106
+ u as render,
107
+ Y as repeat,
108
+ B as setEnv,
109
+ V as setLogFilter,
110
+ $ as setLogLevels,
111
+ P as shallowEqual,
112
+ S as strictEqual,
113
+ G as unless,
114
+ y as when
115
115
  };
116
116
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../src/core/ref.ts","../src/core/views/default-crash-view.ts","../src/core/mount.ts"],"sourcesContent":["const EMPTY_REF = Symbol(\"Ref.EMPTY\");\n\n/**\n * A hybrid getter/setter function that stores the last value it was called with.\n * Guarantees a value is held at runtime by throwing an error if no value is set.\n */\nexport interface Ref<T> {\n /**\n * Returns the currently stored value of the ref, or throws an error if no value has been set.\n */\n (): T;\n\n /**\n * Stores a new value to the ref and returns that value.\n */\n (value: T): T;\n}\n\n/**\n * Creates a ref with no initial value.\n */\nexport function ref<T>(): Ref<T>;\n\n/**\n * Creates a ref with an initial value.\n */\nexport function ref<T>(value: T): Ref<T>;\n\nexport function ref(value = EMPTY_REF) {\n return function () {\n if (arguments.length === 0) {\n if (value === EMPTY_REF) {\n throw new Error(`Ref getter was called, but ref has no value! Be sure to set your refs before accessing them.`);\n }\n } else if (arguments.length === 1) {\n value = arguments[0];\n } else {\n throw new Error(`Ref called with too many arguments. Expected 0 or 1 arguments.`);\n }\n\n return value;\n };\n}\n","import { when, m } from \"../markup.js\";\n\n/**\n * Props passed to the crash view when a crash occurs.\n */\nexport type CrashViewProps = {\n /**\n * JavaScript Error object.\n */\n error: Error;\n\n /**\n * A string to identify the logger that reported this error.\n */\n loggerName: string;\n\n /**\n * Unique identifier to pinpoint the specific view that reported the crash.\n */\n tag?: string;\n\n /**\n * Label for the tag.\n */\n tagName?: string;\n};\n\nexport function DefaultCrashView(props: CrashViewProps) {\n return m(\n \"div\",\n {\n style: {\n backgroundColor: \"#880000\",\n color: \"#fff\",\n padding: \"2rem\",\n position: \"fixed\",\n inset: 0,\n fontSize: \"20px\",\n },\n },\n m(\"h1\", { style: { marginBottom: \"0.5rem\" } }, \"The app has crashed\"),\n m(\n \"p\",\n { style: { marginBottom: \"0.25rem\" } },\n m(\"span\", { style: { fontFamily: \"monospace\" } }, props.loggerName),\n when(\n props.tag,\n m(\n \"span\",\n { style: { fontFamily: \"monospace\", opacity: 0.5 } },\n ` [${props.tagName ? `${props.tagName}: ` : \"\"}${props.tag}]`,\n ),\n ),\n \" says:\",\n ),\n m(\n \"blockquote\",\n {\n style: {\n backgroundColor: \"#991111\",\n padding: \"0.25em\",\n borderRadius: \"6px\",\n fontFamily: \"monospace\",\n marginBottom: \"1rem\",\n },\n },\n m(\n \"span\",\n {\n style: {\n display: \"inline-block\",\n backgroundColor: \"red\",\n padding: \"0.1em 0.4em\",\n marginRight: \"0.5em\",\n borderRadius: \"4px\",\n fontSize: \"0.9em\",\n fontWeight: \"bold\",\n },\n },\n props.error.name,\n ),\n props.error.message,\n ),\n m(\"p\", {}, \"Please see the browser console for details.\"),\n );\n}\n","import { MOUNT, ROOT_VIEW, Router, UNMOUNT } from \"../router/router\";\nimport { assertInstanceOf } from \"../typeChecking\";\nimport { Context } from \"./context\";\nimport { type LoggerErrorContext, onLoggerCrash } from \"./logger\";\nimport { m, type MarkupElement, render } from \"./markup\";\nimport { type View } from \"./nodes/view\";\nimport { DefaultCrashView } from \"./views/default-crash-view\";\n\nlet isMounted = false;\n\nexport type UnmountFn = () => Promise<void>;\nexport interface MountOptions {\n crashView?: View<LoggerErrorContext>;\n\n /**\n * An existing Context to use as the root, otherwise a new one will be created.\n * Use this to provide top-level stores and state to the whole app.\n */\n context?: Context;\n}\n\nexport async function mount(view: View<{}>, domNode: Element, options?: MountOptions): Promise<UnmountFn>;\nexport async function mount(router: Router, domNode: Element, options?: MountOptions): Promise<UnmountFn>;\n\nexport async function mount(view: any, rootElement: Element, options?: MountOptions): Promise<UnmountFn> {\n assertInstanceOf(Element, rootElement, \"Expected an element or a selector string. Got type: %t, value: %v\");\n\n if (isMounted) {\n throw new Error(`A Dolla app is already mounted.`);\n }\n\n let rootView: MarkupElement;\n let router: Router | undefined;\n let crashView = options?.crashView ?? DefaultCrashView;\n\n const rootContext = options?.context ?? new Context(\"App\");\n\n onLoggerCrash((ctx) => {\n if (isMounted) {\n unmount();\n }\n\n // Mount the crash page\n render(m(crashView, ctx), rootContext).mount(rootElement);\n });\n\n rootContext._lifecycle.willMount();\n\n if (view instanceof Router) {\n router = view;\n rootView = await router[MOUNT](rootElement, rootContext);\n } else {\n // First, initialize the root view. The router store needs this to connect the initial route.\n rootView = render(m(view), rootContext);\n }\n\n rootView.mount(rootElement);\n isMounted = true;\n\n rootContext._lifecycle.didMount();\n\n async function unmount() {\n if (!isMounted) return;\n\n rootContext._lifecycle.willUnmount();\n\n rootView.unmount(false);\n\n if (router) {\n await router[UNMOUNT]();\n }\n\n isMounted = false;\n\n rootContext._lifecycle.didUnmount();\n }\n\n return unmount;\n}\n"],"names":["EMPTY_REF","ref","value","DefaultCrashView","props","m","when","isMounted","mount","view","rootElement","options","assertInstanceOf","rootView","router","crashView","rootContext","Context","onLoggerCrash","ctx","unmount","render","Router","MOUNT","UNMOUNT"],"mappings":";;;;;;AAAA,MAAMA,IAAY,OAAO,WAAW;AA4BpB,SAAAC,EAAIC,IAAQF,GAAW;AACrC,SAAO,WAAY;AACb,QAAA,UAAU,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AAM;AAAA,MACd;AAAA,MACAA,EAAM,MAAM;AAAA,IACd;AAAA,IACAC,EAAE,KAAK,CAAA,GAAI,6CAA6C;AAAA,EAC1D;AACF;AC7EA,IAAIE,IAAY;AAgBM,eAAAC,EAAMC,GAAWC,GAAsBC,GAA4C;AAGvG,MAFiBC,EAAA,SAASF,GAAa,mEAAmE,GAEtGH;AACI,UAAA,IAAI,MAAM,iCAAiC;AAG/C,MAAAM,GACAC,GACAC,KAAYJ,KAAA,gBAAAA,EAAS,cAAaR;AAEtC,QAAMa,KAAcL,KAAA,gBAAAA,EAAS,YAAW,IAAIM,EAAQ,KAAK;AAEzD,EAAAC,EAAc,CAACC,MAAQ;AACrB,IAAIZ,KACMa,EAAA,GAIVC,EAAOhB,EAAEU,GAAWI,CAAG,GAAGH,CAAW,EAAE,MAAMN,CAAW;AAAA,EAAA,CACzD,GAEDM,EAAY,WAAW,UAAU,GAE7BP,aAAgBa,KACTR,IAAAL,GACTI,IAAW,MAAMC,EAAOS,CAAK,EAAEb,GAAaM,CAAW,KAGvDH,IAAWQ,EAAOhB,EAAEI,CAAI,GAAGO,CAAW,GAGxCH,EAAS,MAAMH,CAAW,GACdH,IAAA,IAEZS,EAAY,WAAW,SAAS;AAEhC,iBAAeI,IAAU;AACvB,IAAKb,MAELS,EAAY,WAAW,YAAY,GAEnCH,EAAS,QAAQ,EAAK,GAElBC,KACI,MAAAA,EAAOU,CAAO,EAAE,GAGZjB,IAAA,IAEZS,EAAY,WAAW,WAAW;AAAA,EAAA;AAG7B,SAAAI;AACT;"}
1
+ {"version":3,"file":"index.js","sources":["../src/core/ref.ts","../src/core/views/default-crash-view.ts","../src/core/mount.ts"],"sourcesContent":["const EMPTY_REF = Symbol(\"Ref.EMPTY\");\n\n/**\n * A hybrid getter/setter function that stores the last value it was called with.\n * Guarantees a value is held at runtime by throwing an error if no value is set.\n */\nexport interface Ref<T> {\n /**\n * Returns the currently stored value of the ref, or throws an error if no value has been set.\n */\n (): T;\n\n /**\n * Stores a new value to the ref and returns that value.\n */\n (value: T): T;\n}\n\n/**\n * Creates a Ref.\n */\nexport function ref<T>(value?: T): Ref<T>;\n\nexport function ref(value = EMPTY_REF) {\n return function () {\n if (arguments.length === 0) {\n if (value === EMPTY_REF) {\n throw new Error(`Ref getter was called, but ref has no value! Be sure to set your refs before accessing them.`);\n }\n } else if (arguments.length === 1) {\n value = arguments[0];\n } else {\n throw new Error(`Ref called with too many arguments. Expected 0 or 1 arguments.`);\n }\n\n return value;\n };\n}\n","import { when, m } from \"../markup.js\";\n\n/**\n * Props passed to the crash view when a crash occurs.\n */\nexport type CrashViewProps = {\n /**\n * JavaScript Error object.\n */\n error: Error;\n\n /**\n * A string to identify the logger that reported this error.\n */\n loggerName: string;\n\n /**\n * Unique identifier to pinpoint the specific view that reported the crash.\n */\n tag?: string;\n\n /**\n * Label for the tag.\n */\n tagName?: string;\n};\n\nexport function DefaultCrashView(props: CrashViewProps) {\n return m(\n \"div\",\n {\n style: {\n backgroundColor: \"#880000\",\n color: \"#fff\",\n padding: \"2rem\",\n position: \"fixed\",\n inset: 0,\n fontSize: \"20px\",\n },\n },\n m(\"h1\", { style: { marginBottom: \"0.5rem\" } }, \"The app has crashed\"),\n m(\n \"p\",\n { style: { marginBottom: \"0.25rem\" } },\n m(\"span\", { style: { fontFamily: \"monospace\" } }, props.loggerName),\n when(\n props.tag,\n m(\n \"span\",\n { style: { fontFamily: \"monospace\", opacity: 0.5 } },\n ` [${props.tagName ? `${props.tagName}: ` : \"\"}${props.tag}]`,\n ),\n ),\n \" says:\",\n ),\n m(\n \"blockquote\",\n {\n style: {\n backgroundColor: \"#991111\",\n padding: \"0.25em\",\n borderRadius: \"6px\",\n fontFamily: \"monospace\",\n marginBottom: \"1rem\",\n },\n },\n m(\n \"span\",\n {\n style: {\n display: \"inline-block\",\n backgroundColor: \"red\",\n padding: \"0.1em 0.4em\",\n marginRight: \"0.5em\",\n borderRadius: \"4px\",\n fontSize: \"0.9em\",\n fontWeight: \"bold\",\n },\n },\n props.error.name,\n ),\n props.error.message,\n ),\n m(\"p\", {}, \"Please see the browser console for details.\"),\n );\n}\n","import { MOUNT, Router, UNMOUNT } from \"../router/router\";\nimport { assertInstanceOf } from \"../typeChecking\";\nimport type { View } from \"../types\";\nimport { Context, LifecycleEvent } from \"./context\";\nimport { type LoggerErrorContext, onLoggerCrash } from \"./logger\";\nimport { m, type MarkupNode, render } from \"./markup\";\nimport { DefaultCrashView } from \"./views/default-crash-view\";\n\nlet isMounted = false;\n\nexport type UnmountFn = () => Promise<void>;\nexport interface MountOptions {\n crashView?: View<LoggerErrorContext>;\n\n /**\n * An existing Context to use as the root, otherwise a new one will be created.\n * Use this to provide top-level stores and state to the whole app.\n */\n context?: Context;\n}\n\nexport async function mount(view: View<{}>, domNode: Element, options?: MountOptions): Promise<UnmountFn>;\nexport async function mount(router: Router, domNode: Element, options?: MountOptions): Promise<UnmountFn>;\n\nexport async function mount(view: any, rootElement: Element, options?: MountOptions): Promise<UnmountFn> {\n assertInstanceOf(Element, rootElement, \"Expected an element or a selector string. Got type: %t, value: %v\");\n\n if (isMounted) {\n throw new Error(`A Dolla app is already mounted.`);\n }\n\n let rootView: MarkupNode;\n let router: Router | undefined;\n let crashView = options?.crashView ?? DefaultCrashView;\n\n const rootContext = options?.context ?? new Context(\"App\");\n\n onLoggerCrash((ctx) => {\n if (isMounted) {\n unmount();\n }\n\n // Mount the crash page\n render(m(crashView, ctx), rootContext).mount(rootElement);\n });\n\n Context.emit(LifecycleEvent.WILL_MOUNT, rootContext);\n\n if (view instanceof Router) {\n router = view;\n rootView = await router[MOUNT](rootElement, rootContext);\n } else {\n // First, initialize the root view. The router store needs this to connect the initial route.\n rootView = render(m(view), rootContext);\n }\n\n rootView.mount(rootElement);\n isMounted = true;\n\n Context.emit(LifecycleEvent.DID_MOUNT, rootContext);\n\n async function unmount() {\n if (!isMounted) return;\n\n Context.emit(LifecycleEvent.WILL_UNMOUNT, rootContext);\n\n rootView.unmount(false);\n\n if (router) {\n await router[UNMOUNT]();\n }\n\n isMounted = false;\n\n Context.emit(LifecycleEvent.DID_UNMOUNT, rootContext);\n }\n\n return unmount;\n}\n"],"names":["EMPTY_REF","ref","value","DefaultCrashView","props","m","when","isMounted","mount","view","rootElement","options","assertInstanceOf","rootView","router","crashView","rootContext","Context","onLoggerCrash","ctx","unmount","render","LifecycleEvent","Router","MOUNT","UNMOUNT"],"mappings":";;;;;;AAAA,MAAMA,IAAY,OAAO,WAAW;AAuBpB,SAAAC,EAAIC,IAAQF,GAAW;AACrC,SAAO,WAAY;AACb,QAAA,UAAU,WAAW;AACvB,UAAIE,MAAUF;AACN,cAAA,IAAI,MAAM,8FAA8F;AAAA,eAEvG,UAAU,WAAW;AAC9B,MAAAE,IAAQ,UAAU,CAAC;AAAA;AAEb,YAAA,IAAI,MAAM,gEAAgE;AAG3E,WAAAA;AAAA,EACT;AACF;ACVO,SAASC,EAAiBC,GAAuB;AAC/C,SAAAC;AAAA,IACL;AAAA,IACA;AAAA,MACE,OAAO;AAAA,QACL,iBAAiB;AAAA,QACjB,OAAO;AAAA,QACP,SAAS;AAAA,QACT,UAAU;AAAA,QACV,OAAO;AAAA,QACP,UAAU;AAAA,MAAA;AAAA,IAEd;AAAA,IACAA,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,SAAA,EAAW,GAAG,qBAAqB;AAAA,IACpEA;AAAA,MACE;AAAA,MACA,EAAE,OAAO,EAAE,cAAc,YAAY;AAAA,MACrCA,EAAE,QAAQ,EAAE,OAAO,EAAE,YAAY,YAAY,EAAA,GAAKD,EAAM,UAAU;AAAA,MAClEE;AAAA,QACEF,EAAM;AAAA,QACNC;AAAA,UACE;AAAA,UACA,EAAE,OAAO,EAAE,YAAY,aAAa,SAAS,MAAM;AAAA,UACnD,KAAKD,EAAM,UAAU,GAAGA,EAAM,OAAO,OAAO,EAAE,GAAGA,EAAM,GAAG;AAAA,QAAA;AAAA,MAE9D;AAAA,MACA;AAAA,IACF;AAAA,IACAC;A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GAErDH,EAAS,QAAQ,EAAK,GAElBC,KACI,MAAAA,EAAOW,CAAO,EAAE,GAGZlB,IAAA,IAEJU,EAAA,KAAKK,EAAe,aAAaN,CAAW;AAAA,EAAA;AAG/C,SAAAI;AACT;"}
@@ -1,2 +1,2 @@
1
- export function jsxDEV(element: any, props: any, key: any, isStaticChildren: any, source: any, self: any): import("./core/markup").Markup;
1
+ export function jsxDEV(element: any, props: any, key: any, isStaticChildren: any, source: any, self: any): import("./core/markup").Markup<Record<any, any>>;
2
2
  export { Fragment } from "./core/views/fragment";
@@ -1,5 +1,5 @@
1
- import { m as o } from "./markup-yTuFdC0t.js";
2
- import { F as m } from "./fragment-VXM-P2tT.js";
1
+ import { m as o } from "./markup-CAJd0zdA.js";
2
+ import { F as m } from "./fragment-BahD_BJA.js";
3
3
  function f(e, r, t, n, l, u) {
4
4
  const i = { ...s(["children", "key"], r) }, c = Array.isArray(r.children) ? r.children : [r.children];
5
5
  return o(e, i, ...c);
@@ -1,9 +1,9 @@
1
1
  /**
2
2
  * JSX function for elements with dynamic children.
3
3
  */
4
- export function jsx(element: any, props: any, key: any): import("./core/markup").Markup;
4
+ export function jsx(element: any, props: any, key: any): import("./core/markup").Markup<Record<any, any>>;
5
5
  /**
6
6
  * JSX function for elements with static children.
7
7
  */
8
- export function jsxs(element: any, props: any, key: any): import("./core/markup").Markup;
8
+ export function jsxs(element: any, props: any, key: any): import("./core/markup").Markup<Record<any, any>>;
9
9
  export { Fragment } from "./core/views/fragment";
@@ -1,5 +1,5 @@
1
- import { m as t } from "./markup-yTuFdC0t.js";
2
- import { F as m } from "./fragment-VXM-P2tT.js";
1
+ import { m as t } from "./markup-CAJd0zdA.js";
2
+ import { F as m } from "./fragment-BahD_BJA.js";
3
3
  function d(e, n, i) {
4
4
  return t(e, n ? { ...u(["children", "key"], n) } : void 0, n.children);
5
5
  }
@@ -1,4 +1,4 @@
1
- import { c as D, t as q, b as B } from "./typeChecking-lgllKIVq.js";
1
+ import { c as E, t as q, b as B } from "./typeChecking-BJ-ymQ2F.js";
2
2
  var v = /* @__PURE__ */ ((e) => (e[e.Computed = 1] = "Computed", e[e.Effect = 2] = "Effect", e[e.Tracking = 4] = "Tracking", e[e.Notified = 8] = "Notified", e[e.Recursed = 16] = "Recursed", e[e.Dirty = 32] = "Dirty", e[e.PendingComputed = 64] = "PendingComputed", e[e.PendingEffect = 128] = "PendingEffect", e[e.Propagated = 224] = "Propagated", e))(v || {});
3
3
  function _({
4
4
  updateComputed: e,
@@ -23,7 +23,7 @@ function _({
23
23
  return;
24
24
  }
25
25
  const u = n.subsTail;
26
- if (!(u !== void 0 && u.sub === s && E(u, s)))
26
+ if (!(u !== void 0 && u.sub === s && T(u, s)))
27
27
  return o(n, s, c, i);
28
28
  },
29
29
  /**
@@ -39,14 +39,14 @@ function _({
39
39
  let s = 32, i = n, c = 0;
40
40
  e: do {
41
41
  const u = n.sub, a = u.flags;
42
- if (!(a & 244) && (u.flags = a | s | 8, !0) || a & 16 && !(a & 4) && (u.flags = a & -17 | s | 8, !0) || !(a & 224) && E(n, u) && (u.flags = a | 16 | s | 8, u.subs !== void 0)) {
42
+ if (!(a & 244) && (u.flags = a | s | 8, !0) || a & 16 && !(a & 4) && (u.flags = a & -17 | s | 8, !0) || !(a & 224) && T(n, u) && (u.flags = a | 16 | s | 8, u.subs !== void 0)) {
43
43
  const g = u.subs;
44
44
  if (g !== void 0) {
45
45
  g.nextSub !== void 0 ? (g.prevSub = i, n = i = g, s = 64, ++c) : (n = g, s = a & 2 ? 128 : 64);
46
46
  continue;
47
47
  }
48
48
  a & 2 && (r !== void 0 ? r.depsTail.nextDep = u.deps : f = u, r = u);
49
- } else a & (4 | s) ? !(a & s) && a & 224 && E(n, u) && (u.flags = a | s) : (u.flags = a | s | 8, (a & 10) === 2 && (r !== void 0 ? r.depsTail.nextDep = u.deps : f = u, r = u));
49
+ } else a & (4 | s) ? !(a & s) && a & 224 && T(n, u) && (u.flags = a | s) : (u.flags = a | s | 8, (a & 10) === 2 && (r !== void 0 ? r.depsTail.nextDep = u.deps : f = u, r = u));
50
50
  if ((n = i.nextSub) !== void 0) {
51
51
  i = n, s = c ? 64 : 32;
52
52
  continue;
@@ -226,7 +226,7 @@ function _({
226
226
  (i & 96) === 64 && (s.flags = i | 32 | 8, (i & 10) === 2 && (r !== void 0 ? r.depsTail.nextDep = s.deps : f = s, r = s)), n = n.nextSub;
227
227
  } while (n !== void 0);
228
228
  }
229
- function E(n, s) {
229
+ function T(n, s) {
230
230
  const i = s.depsTail;
231
231
  if (i !== void 0) {
232
232
  let c = s.deps;
@@ -257,13 +257,13 @@ function _({
257
257
  }
258
258
  }
259
259
  var {
260
- link: ce,
261
- propagate: ae,
260
+ link: ae,
261
+ propagate: le,
262
262
  updateDirtyFlag: X,
263
263
  startTracking: L,
264
264
  endTracking: A,
265
- processEffectNotifications: le,
266
- processComputedUpdate: de,
265
+ processEffectNotifications: de,
266
+ processComputedUpdate: pe,
267
267
  processPendingInnerEffects: I
268
268
  } = _({
269
269
  updateComputed(e) {
@@ -295,23 +295,23 @@ function K(e) {
295
295
  return e.flags & 128 ? (I(e, e.flags), !0) : !1;
296
296
  }
297
297
  const {
298
- link: O,
298
+ link: m,
299
299
  propagate: Q,
300
300
  updateDirtyFlag: Y,
301
- startTracking: b,
302
- endTracking: N,
301
+ startTracking: O,
302
+ endTracking: b,
303
303
  processEffectNotifications: Z,
304
304
  processComputedUpdate: F,
305
305
  processPendingInnerEffects: ee
306
306
  } = _({
307
307
  updateComputed(e) {
308
308
  const t = p;
309
- p = e, b(e);
309
+ p = e, O(e);
310
310
  try {
311
311
  const f = e.current, r = e.getter(f);
312
312
  return e.equals(f, r) ? !1 : (e.current = r, !0);
313
313
  } finally {
314
- p = t, N(e);
314
+ p = t, b(e);
315
315
  }
316
316
  },
317
317
  notifyEffect(e) {
@@ -319,29 +319,71 @@ const {
319
319
  return t & v.Dirty || t & v.PendingComputed && Y(e, t) ? V(e) : ee(e, e.flags), !0;
320
320
  }
321
321
  });
322
+ function $(e, t) {
323
+ const f = {
324
+ current: e,
325
+ subs: void 0,
326
+ subsTail: void 0
327
+ }, r = (t == null ? void 0 : t.equals) ?? Object.is, o = function() {
328
+ if (arguments.length > 0) {
329
+ let l = arguments[0];
330
+ if (typeof l == "function" && (l = l(f.current)), !r(f.current, l)) {
331
+ f.current = l;
332
+ const d = f.subs;
333
+ d !== void 0 && (Q(d), Z());
334
+ }
335
+ } else
336
+ return p !== void 0 && m(f, p), f.current;
337
+ };
338
+ return o._type = U, o;
339
+ }
340
+ function te(e, t) {
341
+ if (E(e) && e._type === j)
342
+ return e._type === U ? () => e() : e;
343
+ const f = {
344
+ current: void 0,
345
+ equals: (t == null ? void 0 : t.equals) ?? Object.is,
346
+ subs: void 0,
347
+ subsTail: void 0,
348
+ deps: void 0,
349
+ depsTail: void 0,
350
+ flags: v.Computed | v.Dirty,
351
+ getter: (o) => {
352
+ const l = e(o);
353
+ return N(l);
354
+ }
355
+ }, r = function() {
356
+ if (arguments.length > 0)
357
+ throw new Error("Signals cannot be set as their values are derived from the sources they depend on.");
358
+ p !== void 0 && m(f, p);
359
+ const o = f.flags;
360
+ return o & (v.Dirty | v.PendingComputed) && F(f, o), f.current;
361
+ };
362
+ return r._type = j, r;
363
+ }
322
364
  let p;
323
365
  const h = [];
324
- let S = !1;
325
- function te() {
326
- S || (S = !0, queueMicrotask(() => {
327
- S = !1;
366
+ let D = !1;
367
+ function ne() {
368
+ D || (D = !0, queueMicrotask(() => {
369
+ D = !1;
328
370
  for (let e = 0; e < h.length; e++) {
329
371
  const t = h[e], f = p;
330
- p = t, b(t);
372
+ p = t, O(t);
331
373
  try {
332
374
  t.cleanup && (z(), t.cleanup(), R()), t.cleanup = t.fn() ?? void 0;
333
375
  } finally {
334
- p = f, N(t);
376
+ p = f, b(t);
335
377
  }
336
378
  }
337
379
  h.length = 0;
338
380
  }));
339
381
  }
340
382
  function V(e) {
341
- h.push(e), te();
383
+ h.push(e), ne();
342
384
  }
343
- function ne() {
344
- b(this), N(this), queueMicrotask(() => {
385
+ function re() {
386
+ O(this), b(this), queueMicrotask(() => {
345
387
  h.splice(h.indexOf(this), 1), this.cleanup && this.cleanup();
346
388
  });
347
389
  }
@@ -352,13 +394,13 @@ function z() {
352
394
  function R() {
353
395
  p = k.pop();
354
396
  }
355
- const $ = Symbol("SIGNAL"), U = Symbol("SOURCE");
356
- function pe(e) {
397
+ const j = Symbol("SIGNAL"), U = Symbol("SOURCE");
398
+ function se(e) {
357
399
  let t;
358
- return z(), t = T(e), R(), t;
400
+ return z(), t = N(e), R(), t;
359
401
  }
360
- function T(e) {
361
- return D(e) ? e() : e;
402
+ function N(e) {
403
+ return E(e) ? e() : e;
362
404
  }
363
405
  function ge(e) {
364
406
  const t = {
@@ -369,58 +411,16 @@ function ge(e) {
369
411
  depsTail: void 0,
370
412
  flags: v.Effect
371
413
  };
372
- return p !== void 0 && O(t, p), V(t), ne.bind(t);
414
+ return p !== void 0 && m(t, p), V(t), re.bind(t);
373
415
  }
374
416
  function ve(e, t) {
375
- return D(e) ? re(e, t) : j(e === void 0 ? void 0 : e, t);
376
- }
377
- function j(e, t) {
378
- const f = {
379
- current: e,
380
- subs: void 0,
381
- subsTail: void 0
382
- }, r = (t == null ? void 0 : t.equals) ?? Object.is, o = function() {
383
- if (arguments.length > 0) {
384
- let l = arguments[0];
385
- if (typeof l == "function" && (l = l(f.current)), !r(f.current, l)) {
386
- f.current = l;
387
- const d = f.subs;
388
- d !== void 0 && (Q(d), Z());
389
- }
390
- } else
391
- return p !== void 0 && O(f, p), f.current;
392
- };
393
- return o._type = U, o;
394
- }
395
- function re(e, t) {
396
- if (D(e) && e._type === $)
397
- return e._type === U ? () => e() : e;
398
- const f = {
399
- current: void 0,
400
- equals: (t == null ? void 0 : t.equals) ?? Object.is,
401
- subs: void 0,
402
- subsTail: void 0,
403
- deps: void 0,
404
- depsTail: void 0,
405
- flags: v.Computed | v.Dirty,
406
- getter: (o) => {
407
- const l = e(o);
408
- return T(l);
409
- }
410
- }, r = function() {
411
- if (arguments.length > 0)
412
- throw new Error("Signals cannot be set as their values are derived from the sources they depend on.");
413
- p !== void 0 && O(f, p);
414
- const o = f.flags;
415
- return o & (v.Dirty | v.PendingComputed) && F(f, o), f.current;
416
- };
417
- return r._type = $, r;
417
+ return E(e) ? te(e, t) : $(e === void 0 ? void 0 : e, t);
418
418
  }
419
- const se = () => {
419
+ const fe = () => {
420
420
  };
421
- let w = 1;
421
+ let S = 1;
422
422
  function he() {
423
- return w = w % Number.MAX_SAFE_INTEGER + 1, w.toString(36) + Date.now().toString(36);
423
+ return S = S % Number.MAX_SAFE_INTEGER + 1, S.toString(36) + Date.now().toString(36);
424
424
  }
425
425
  function ye(e, t) {
426
426
  return Object.is(e, t);
@@ -449,7 +449,7 @@ function xe(e, t) {
449
449
  if (e[o] !== t[o]) return !1;
450
450
  return !0;
451
451
  case "set":
452
- if (D(e.symmetricDifference))
452
+ if (E(e.symmetricDifference))
453
453
  return e.symmetricDifference(t).size === 0;
454
454
  for (const o of e.keys())
455
455
  if (e[o] !== t.get(o)) return !1;
@@ -457,20 +457,20 @@ function xe(e, t) {
457
457
  }
458
458
  return !1;
459
459
  }
460
- function m(e, t) {
460
+ function w(e, t) {
461
461
  if (e === t) return !0;
462
462
  if (e && t && typeof e == "object" && typeof t == "object") {
463
463
  if (e.constructor !== t.constructor) return !1;
464
464
  var f, r, o;
465
465
  if (Array.isArray(e)) {
466
466
  if (f = e.length, f != t.length) return !1;
467
- for (r = f; r-- !== 0; ) if (!m(e[r], t[r])) return !1;
467
+ for (r = f; r-- !== 0; ) if (!w(e[r], t[r])) return !1;
468
468
  return !0;
469
469
  }
470
470
  if (e instanceof Map && t instanceof Map) {
471
471
  if (e.size !== t.size) return !1;
472
472
  for (r of e.entries()) if (!t.has(r[0])) return !1;
473
- for (r of e.entries()) if (!m(r[1], t.get(r[0]))) return !1;
473
+ for (r of e.entries()) if (!w(r[1], t.get(r[0]))) return !1;
474
474
  return !0;
475
475
  }
476
476
  if (e instanceof Set && t instanceof Set) {
@@ -490,19 +490,19 @@ function m(e, t) {
490
490
  for (r = f; r-- !== 0; ) if (!Object.prototype.hasOwnProperty.call(t, o[r])) return !1;
491
491
  for (r = f; r-- !== 0; ) {
492
492
  var l = o[r];
493
- if (!m(e[l], t[l])) return !1;
493
+ if (!w(e[l], t[l])) return !1;
494
494
  }
495
495
  return !0;
496
496
  }
497
497
  return e !== e && t !== t;
498
498
  }
499
- function Te(e, t) {
499
+ function Ee(e, t) {
500
500
  const f = {};
501
501
  for (const r in t)
502
502
  e.includes(r) || (f[r] = t[r]);
503
503
  return f;
504
504
  }
505
- function fe(e) {
505
+ function ie(e) {
506
506
  let t = 0;
507
507
  for (let f = 0; f < e.length; f++)
508
508
  t = (t + e.charCodeAt(f) * 10) % 360;
@@ -531,10 +531,10 @@ function M(e) {
531
531
  };
532
532
  }
533
533
  let G = "production";
534
- function ie() {
534
+ function ue() {
535
535
  return G;
536
536
  }
537
- function De(e) {
537
+ function Te(e) {
538
538
  G = e;
539
539
  }
540
540
  let y = {
@@ -543,22 +543,22 @@ let y = {
543
543
  warn: "development",
544
544
  error: !0
545
545
  }, W = M("*,-dolla.*"), x = [];
546
- function Ee(e) {
546
+ function De(e) {
547
547
  return x.push(e), function() {
548
548
  x.splice(x.indexOf(e), 1);
549
549
  };
550
550
  }
551
551
  function Se(e, t) {
552
- const f = (t == null ? void 0 : t.console) ?? ue(), r = (o) => {
553
- let l = T(e);
554
- if (y[o] === !1 || B(y[o]) && y[o] !== ie() || !W(l))
555
- return se;
552
+ const f = (t == null ? void 0 : t.console) ?? oe(), r = (o) => {
553
+ let l = se(e);
554
+ if (y[o] === !1 || B(y[o]) && y[o] !== ue() || !W(l))
555
+ return fe;
556
556
  {
557
557
  let d = `%c${l}`;
558
558
  return t != null && t.tag ? t.tagName ? d += ` %c[${t.tagName}: %c${t.tag}%c]` : d += ` %c[%c${t.tag}%c]` : d += "%c%c%c", f[o].bind(
559
559
  f,
560
560
  d,
561
- `color:${fe(d)};font-weight:bold`,
561
+ `color:${ie(d)};font-weight:bold`,
562
562
  "color:#777",
563
563
  "color:#aaa",
564
564
  "color:#777"
@@ -581,7 +581,7 @@ function Se(e, t) {
581
581
  crash(o) {
582
582
  const l = {
583
583
  error: o,
584
- loggerName: T(e),
584
+ loggerName: N(e),
585
585
  tag: t == null ? void 0 : t.tag,
586
586
  tagName: t == null ? void 0 : t.tagName
587
587
  };
@@ -600,7 +600,7 @@ function me(e) {
600
600
  f && (y[t] = f);
601
601
  }
602
602
  }
603
- function ue() {
603
+ function oe() {
604
604
  if (typeof window < "u" && window.console)
605
605
  return window.console;
606
606
  if (typeof global < "u" && global.console)
@@ -609,18 +609,18 @@ function ue() {
609
609
  export {
610
610
  ve as $,
611
611
  ye as a,
612
- ie as b,
613
- De as c,
614
- m as d,
612
+ ue as b,
613
+ Te as c,
614
+ w as d,
615
615
  ge as e,
616
616
  Se as f,
617
- T as g,
617
+ N as g,
618
618
  we as h,
619
619
  me as i,
620
620
  he as j,
621
- Te as k,
622
- Ee as o,
623
- pe as p,
621
+ Ee as k,
622
+ De as o,
623
+ se as p,
624
624
  xe as s
625
625
  };
626
- //# sourceMappingURL=logger-CXdzxt1e.js.map
626
+ //# sourceMappingURL=logger-sSxIw5od.js.map