@manyducks.co/dolla 2.0.0-alpha.54 → 2.0.0-alpha.56

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 (59) hide show
  1. package/README.md +1 -12
  2. package/dist/core/context.d.ts +81 -42
  3. package/dist/core/env.d.ts +2 -8
  4. package/dist/core/index.d.ts +7 -9
  5. package/dist/core/logger.d.ts +3 -3
  6. package/dist/core/markup.d.ts +44 -43
  7. package/dist/core/mount.d.ts +11 -6
  8. package/dist/core/nodes/dom.d.ts +6 -6
  9. package/dist/core/nodes/dynamic.d.ts +15 -17
  10. package/dist/core/nodes/html.d.ts +11 -23
  11. package/dist/core/nodes/portal.d.ts +9 -13
  12. package/dist/core/nodes/repeat.d.ts +13 -18
  13. package/dist/core/nodes/view.d.ts +14 -95
  14. package/dist/core/ref.d.ts +2 -6
  15. package/dist/core/symbols.d.ts +1 -3
  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 +14 -14
  22. package/dist/i18n.js.map +1 -1
  23. package/dist/index.js +50 -64
  24. package/dist/index.js.map +1 -1
  25. package/dist/jsx-dev-runtime.d.ts +1 -1
  26. package/dist/jsx-dev-runtime.js +8 -8
  27. package/dist/jsx-dev-runtime.js.map +1 -1
  28. package/dist/jsx-runtime.d.ts +2 -2
  29. package/dist/jsx-runtime.js +9 -9
  30. package/dist/jsx-runtime.js.map +1 -1
  31. package/dist/{logger-CBfhf3fA.js → logger-sSxIw5od.js} +143 -142
  32. package/dist/logger-sSxIw5od.js.map +1 -0
  33. package/dist/markup-DS7yYBga.js +844 -0
  34. package/dist/markup-DS7yYBga.js.map +1 -0
  35. package/dist/router/index.d.ts +1 -1
  36. package/dist/router/router.d.ts +10 -7
  37. package/dist/router-D43DV_bv.js +489 -0
  38. package/dist/router-D43DV_bv.js.map +1 -0
  39. package/dist/router.js +1 -1
  40. package/dist/router.js.map +1 -1
  41. package/dist/{typeChecking-EAVNeFyB.js → typeChecking-BJ-ymQ2F.js} +7 -12
  42. package/dist/{typeChecking-EAVNeFyB.js.map → typeChecking-BJ-ymQ2F.js.map} +1 -1
  43. package/dist/types.d.ts +13 -14
  44. package/docs/mixins.md +1 -1
  45. package/docs/ref.md +93 -0
  46. package/notes/scratch.md +24 -0
  47. package/package.json +2 -2
  48. package/dist/core/mixin.d.ts +0 -62
  49. package/dist/core/nodes/fragment.d.ts +0 -19
  50. package/dist/core/nodes/outlet.d.ts +0 -20
  51. package/dist/core/store.d.ts +0 -57
  52. package/dist/core/views/passthrough.d.ts +0 -5
  53. package/dist/fragment-CmWsN-4Y.js +0 -8
  54. package/dist/fragment-CmWsN-4Y.js.map +0 -1
  55. package/dist/logger-CBfhf3fA.js.map +0 -1
  56. package/dist/router-BoJac1lD.js +0 -482
  57. package/dist/router-BoJac1lD.js.map +0 -1
  58. package/dist/view-BKpHFpWG.js +0 -1044
  59. package/dist/view-BKpHFpWG.js.map +0 -1
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, markup as 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, UNMOUNT, Router } from \"../router/router\";\nimport { assertInstanceOf, isString } from \"../typeChecking\";\nimport { rootElementContext } from \"./context\";\nimport { type LoggerErrorContext, onLoggerCrash } from \"./logger\";\nimport { markup } from \"./markup\";\nimport { constructView, type ViewElement, type ViewFunction } 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?: ViewFunction<LoggerErrorContext>;\n}\n\nexport async function mount(parent: Element, view: any, options?: MountOptions): Promise<UnmountFn>;\nexport async function mount(parent: Element, router: any, options?: MountOptions): Promise<UnmountFn>;\n\nexport async function mount(parent: string, view: any, options?: MountOptions): Promise<UnmountFn>;\nexport async function mount(parent: string, router: any, options?: MountOptions): Promise<UnmountFn>;\n\nexport async function mount(target: any, view: any, options?: MountOptions): Promise<UnmountFn> {\n if (isMounted) {\n throw new Error(`A Dolla app is already mounted.`);\n }\n\n let rootElement: Element;\n let rootView: ViewElement;\n let router: any | undefined;\n let crashView = options?.crashView ?? DefaultCrashView;\n\n if (isString(target)) {\n const match = document.querySelector<Element>(target);\n assertInstanceOf(Element, match, `Selector '${target}' did not match any element.`);\n rootElement = match!;\n } else {\n assertInstanceOf(Element, target, \"Expected an element or a selector string. Got type: %t, value: %v\");\n rootElement = target;\n }\n\n if (view instanceof Router) {\n router = view;\n rootView = view[ROOT_VIEW];\n } else {\n // First, initialize the root view. The router store needs this to connect the initial route.\n const rootViewMarkup = markup(view);\n rootView = constructView(rootViewMarkup.type as ViewFunction<any>, rootViewMarkup.props);\n }\n\n onLoggerCrash((ctx) => {\n if (isMounted) {\n // Unmount the app.\n unmount();\n\n // Mount the crash page\n const crashPage = constructView(crashView, ctx);\n crashPage.mount(rootElement!);\n }\n });\n\n // Run onMount for stores.\n for (const store of rootElementContext.stores.values()) {\n store.handleMount();\n }\n\n if (router) {\n await router[MOUNT](rootElement);\n }\n\n rootView.mount(rootElement);\n isMounted = true;\n\n async function unmount() {\n if (!isMounted) return;\n\n rootView.unmount(false);\n\n if (router) {\n await router[UNMOUNT]();\n }\n\n isMounted = false;\n }\n\n return unmount;\n}\n"],"names":["EMPTY_REF","ref","value","DefaultCrashView","props","m","when","isMounted","mount","target","view","options","rootElement","rootView","router","crashView","isString","match","assertInstanceOf","Router","ROOT_VIEW","rootViewMarkup","markup","constructView","onLoggerCrash","ctx","unmount","store","rootElementContext","MOUNT","UNMOUNT"],"mappings":";;;;;;AAAA,MAAMA,IAAY,OAAO,WAAW;AA4BpB,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;ACfO,SAASC,EAAiBC,GAAuB;AAC/C,SAAAC;AAAAA,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;AAAAA,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;AAAAA,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;AAAAA,MACE;AAAA,MACA;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AAIb,KACI,MAAAA,EAAOe,CAAK,EAAEjB,CAAW,GAGjCC,EAAS,MAAMD,CAAW,GACdL,IAAA;AAEZ,iBAAemB,IAAU;AACvB,IAAKnB,MAELM,EAAS,QAAQ,EAAK,GAElBC,KACI,MAAAA,EAAOgB,CAAO,EAAE,GAGZvB,IAAA;AAAA,EAAA;AAGP,SAAAmB;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,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AAS,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,GAEOO,EAAA,KAAKK,EAAe,YAAYN,CAAW,GAE/CP,aAAgBc,KACTT,IAAAL,GACTI,IAAW,MAAMC,EAAOU,CAAK,EAAEd,GAAaM,CAAW,KAGvDH,IAAWQ,EAAOhB,EAAEI,CAAI,GAAGO,CAAW,GAGxCH,EAAS,MAAMH,CAAW,GACdH,IAAA,IAEJU,EAAA,KAAKK,EAAe,WAAWN,CAAW;AAElD,iBAAeI,IAAU;AACvB,IAAKb,MAEGU,EAAA,KAAKK,EAAe,cAAcN,CAAW,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,17 +1,17 @@
1
- import { m as s } from "./view-BKpHFpWG.js";
2
- import { F as h } from "./fragment-CmWsN-4Y.js";
3
- function d(e, r, t, n, l, u) {
4
- const i = { ...o(["children", "key"], r) }, c = Array.isArray(r.children) ? r.children : [r.children];
5
- return s(e, i, ...c);
1
+ import { m as o } from "./markup-DS7yYBga.js";
2
+ import { F as m } from "./fragment-BahD_BJA.js";
3
+ function f(e, r, t, n, l, u) {
4
+ const i = { ...s(["children", "key"], r) }, c = Array.isArray(r.children) ? r.children : [r.children];
5
+ return o(e, i, ...c);
6
6
  }
7
- function o(e, r) {
7
+ function s(e, r) {
8
8
  const t = {};
9
9
  for (const n in r)
10
10
  e.includes(n) || (t[n] = r[n]);
11
11
  return t;
12
12
  }
13
13
  export {
14
- h as Fragment,
15
- d as jsxDEV
14
+ m as Fragment,
15
+ f as jsxDEV
16
16
  };
17
17
  //# sourceMappingURL=jsx-dev-runtime.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"jsx-dev-runtime.js","sources":["../src/jsx-dev-runtime.js"],"sourcesContent":["import { markup } from \"./core/markup\";\nexport { Fragment } from \"./core/views/fragment\";\n\nexport function jsxDEV(element, props, key, isStaticChildren, source, self) {\n const attributes = { ...omit([\"children\", \"key\"], props) };\n const children = Array.isArray(props.children) ? props.children : [props.children];\n\n // return new _Markup(element, attributes, children);\n return markup(element, attributes, ...children);\n}\n\nfunction omit(keys, object) {\n const result = {};\n for (const key in object) {\n if (!keys.includes(key)) {\n result[key] = object[key];\n }\n }\n return result;\n}\n"],"names":["jsxDEV","element","props","key","isStaticChildren","source","self","attributes","omit","children","markup","keys","object","result"],"mappings":";;AAGO,SAASA,EAAOC,GAASC,GAAOC,GAAKC,GAAkBC,GAAQC,GAAM;AAC1E,QAAMC,IAAa,EAAE,GAAGC,EAAK,CAAC,YAAY,KAAK,GAAGN,CAAK,EAAG,GACpDO,IAAW,MAAM,QAAQP,EAAM,QAAQ,IAAIA,EAAM,WAAW,CAACA,EAAM,QAAQ;AAGjF,SAAOQ,EAAOT,GAASM,GAAY,GAAGE,CAAQ;AAChD;AAEA,SAASD,EAAKG,GAAMC,GAAQ;AAC1B,QAAMC,IAAS,CAAE;AACjB,aAAWV,KAAOS;AAChB,IAAKD,EAAK,SAASR,CAAG,MACpBU,EAAOV,CAAG,IAAIS,EAAOT,CAAG;AAG5B,SAAOU;AACT;"}
1
+ {"version":3,"file":"jsx-dev-runtime.js","sources":["../src/jsx-dev-runtime.js"],"sourcesContent":["import { m } from \"./core/markup\";\nexport { Fragment } from \"./core/views/fragment\";\n\nexport function jsxDEV(element, props, key, isStaticChildren, source, self) {\n const attributes = { ...omit([\"children\", \"key\"], props) };\n const children = Array.isArray(props.children) ? props.children : [props.children];\n\n // return new _Markup(element, attributes, children);\n return m(element, attributes, ...children);\n}\n\nfunction omit(keys, object) {\n const result = {};\n for (const key in object) {\n if (!keys.includes(key)) {\n result[key] = object[key];\n }\n }\n return result;\n}\n"],"names":["jsxDEV","element","props","key","isStaticChildren","source","self","attributes","omit","children","m","keys","object","result"],"mappings":";;AAGO,SAASA,EAAOC,GAASC,GAAOC,GAAKC,GAAkBC,GAAQC,GAAM;AAC1E,QAAMC,IAAa,EAAE,GAAGC,EAAK,CAAC,YAAY,KAAK,GAAGN,CAAK,EAAG,GACpDO,IAAW,MAAM,QAAQP,EAAM,QAAQ,IAAIA,EAAM,WAAW,CAACA,EAAM,QAAQ;AAGjF,SAAOQ,EAAET,GAASM,GAAY,GAAGE,CAAQ;AAC3C;AAEA,SAASD,EAAKG,GAAMC,GAAQ;AAC1B,QAAMC,IAAS,CAAE;AACjB,aAAWV,KAAOS;AAChB,IAAKD,EAAK,SAASR,CAAG,MACpBU,EAAOV,CAAG,IAAIS,EAAOT,CAAG;AAG5B,SAAOU;AACT;"}
@@ -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,19 +1,19 @@
1
- import { m as t } from "./view-BKpHFpWG.js";
2
- import { F as k } from "./fragment-CmWsN-4Y.js";
3
- function d(e, n, r) {
1
+ import { m as t } from "./markup-DS7yYBga.js";
2
+ import { F as m } from "./fragment-BahD_BJA.js";
3
+ function d(e, n, i) {
4
4
  return t(e, n ? { ...u(["children", "key"], n) } : void 0, n.children);
5
5
  }
6
- function f(e, n, r) {
6
+ function f(e, n, i) {
7
7
  return t(e, n ? { ...u(["children", "key"], n) } : void 0, n.children);
8
8
  }
9
9
  function u(e, n) {
10
- const r = {};
11
- for (const i in n)
12
- e.includes(i) || (r[i] = n[i]);
13
- return r;
10
+ const i = {};
11
+ for (const r in n)
12
+ e.includes(r) || (i[r] = n[r]);
13
+ return i;
14
14
  }
15
15
  export {
16
- k as Fragment,
16
+ m as Fragment,
17
17
  d as jsx,
18
18
  f as jsxs
19
19
  };
@@ -1 +1 @@
1
- {"version":3,"file":"jsx-runtime.js","sources":["../src/jsx-runtime.js"],"sourcesContent":["import { markup } from \"./core/markup\";\nexport { Fragment } from \"./core/views/fragment\";\n\n/**\n * JSX function for elements with dynamic children.\n */\nexport function jsx(element, props, key) {\n return markup(element, props ? { ...omit([\"children\", \"key\"], props) } : undefined, ...[props.children]);\n}\n\n/**\n * JSX function for elements with static children.\n */\nexport function jsxs(element, props, key) {\n return markup(element, props ? { ...omit([\"children\", \"key\"], props) } : undefined, props.children);\n}\n\nfunction omit(keys, object) {\n const result = {};\n for (const key in object) {\n if (!keys.includes(key)) {\n result[key] = object[key];\n }\n }\n return result;\n}\n"],"names":["jsx","element","props","key","markup","omit","jsxs","keys","object","result"],"mappings":";;AAMO,SAASA,EAAIC,GAASC,GAAOC,GAAK;AACvC,SAAOC,EAAOH,GAASC,IAAQ,EAAE,GAAGG,EAAK,CAAC,YAAY,KAAK,GAAGH,CAAK,EAAC,IAAK,QAAeA,EAAM,QAAS;AACzG;AAKO,SAASI,EAAKL,GAASC,GAAOC,GAAK;AACxC,SAAOC,EAAOH,GAASC,IAAQ,EAAE,GAAGG,EAAK,CAAC,YAAY,KAAK,GAAGH,CAAK,EAAC,IAAK,QAAWA,EAAM,QAAQ;AACpG;AAEA,SAASG,EAAKE,GAAMC,GAAQ;AAC1B,QAAMC,IAAS,CAAE;AACjB,aAAWN,KAAOK;AAChB,IAAKD,EAAK,SAASJ,CAAG,MACpBM,EAAON,CAAG,IAAIK,EAAOL,CAAG;AAG5B,SAAOM;AACT;"}
1
+ {"version":3,"file":"jsx-runtime.js","sources":["../src/jsx-runtime.js"],"sourcesContent":["import { m } from \"./core/markup\";\nexport { Fragment } from \"./core/views/fragment\";\n\n/**\n * JSX function for elements with dynamic children.\n */\nexport function jsx(element, props, key) {\n return m(element, props ? { ...omit([\"children\", \"key\"], props) } : undefined, ...[props.children]);\n}\n\n/**\n * JSX function for elements with static children.\n */\nexport function jsxs(element, props, key) {\n return m(element, props ? { ...omit([\"children\", \"key\"], props) } : undefined, props.children);\n}\n\nfunction omit(keys, object) {\n const result = {};\n for (const key in object) {\n if (!keys.includes(key)) {\n result[key] = object[key];\n }\n }\n return result;\n}\n"],"names":["jsx","element","props","key","m","omit","jsxs","keys","object","result"],"mappings":";;AAMO,SAASA,EAAIC,GAASC,GAAOC,GAAK;AACvC,SAAOC,EAAEH,GAASC,IAAQ,EAAE,GAAGG,EAAK,CAAC,YAAY,KAAK,GAAGH,CAAK,EAAC,IAAK,QAAeA,EAAM,QAAS;AACpG;AAKO,SAASI,EAAKL,GAASC,GAAOC,GAAK;AACxC,SAAOC,EAAEH,GAASC,IAAQ,EAAE,GAAGG,EAAK,CAAC,YAAY,KAAK,GAAGH,CAAK,EAAC,IAAK,QAAWA,EAAM,QAAQ;AAC/F;AAEA,SAASG,EAAKE,GAAMC,GAAQ;AAC1B,QAAMC,IAAS,CAAE;AACjB,aAAWN,KAAOK;AAChB,IAAKD,EAAK,SAASJ,CAAG,MACpBM,EAAON,CAAG,IAAIK,EAAOL,CAAG;AAG5B,SAAOM;AACT;"}