@calmdown/pyxis-dom 1.0.0-rc.1
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/build.config.js +30 -0
- package/dist/index.d.ts +2641 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/jsx.d.ts +8 -0
- package/package.json +26 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Native as e,bind as t,fork as n,getLifecycle as r,isAtom as i,peek as a,unmounted as o,withLifecycle as s}from"@calmdown/pyxis/core";function c(e,t){return t?(t.nodeValue=e,t):document.createTextNode(e)}function l(e=``){return document.createComment(e)}function u(){return document.createDocumentFragment()}function d(e,t,n){t.insertBefore(e,n)}function f(e){e.parentNode?.removeChild(e)}function p(e,t,n){switch(typeof n){case`string`:case`number`:e.setAttribute(t,n.toString());break;case`boolean`:e.toggleAttribute(t,n);break;case`object`:if(n!==null)break;case`undefined`:e.removeAttribute(t);break}}const m={element:h,text:c,marker:l,batch:u,insert:d,remove:f,set:p,tick:queueMicrotask};function h(e){return document.createElementNS(`http://www.w3.org/1998/Math/MathML`,e??`math`)}function g(t,r,i,a,o,s){let c=n(r);c.adapter=m,e(t,r,i,a,o,s),c.mounted=!0}const _={element:v,text:c,marker:l,batch:u,insert:d,remove:f,set:p,tick:queueMicrotask};function v(e){return document.createElementNS(`http://www.w3.org/2000/svg`,e??`svg`)}function y(t,r,i,a,o,s){let c=n(r);c.adapter=_,e(t,r,i,a,o,s),c.mounted=!0}const b={set:(e,n,r,a)=>{i(r)?t(a,r,()=>{e[n]=r.get()}):e[n]=r}},x={set:(e,n,r,a)=>{i(r)?t(a,r,()=>{e.classList.toggle(n,r.get())}):r&&e.classList.add(n)}},S={set:(e,n,r,a)=>{i(r)?t(a,r,()=>{e.style[n]=r.get()}):r&&(e.style[n]=r)}},C={set:(e,n,r,a)=>{i(r)?t(a,r,()=>{w(e.style,n,r.get())}):r&&w(e.style,n,r)}};function w(e,t,n){n==null||n===``?n=null:typeof n==`number`&&(n=n.toFixed(3)),e.setProperty(`--`+t,n)}const T={set:(e,n,r,a)=>{i(r)?t(a,r,()=>{let t=r.get();t===void 0?delete e.dataset[n]:e.dataset[n]=t}):r!==void 0&&(e.dataset[n]=r)}},E={set:(e,t,n)=>{let r=n,i,o=a(n);if(typeof o==`object`&&o&&(r=o.listener,i=o),!r)return;let c=D(),l=e=>{let t=a(r);t&&s(c,t,e)};e.addEventListener(t,l,i),c.$events.push({$f:l,$n:e,$e:t,$o:i})}};function D(){let e=r();if(!e.$events){let t=[];o(()=>{let{length:e}=t,n=0,r;for(;n<e;n+=1)r=t[n],r.$n.removeEventListener(r.$e,r.$f,r.$o);t.length=0}),e.$events=t}return e}const O={class:`className`,for:`htmlFor`},k={element:A,text:c,marker:l,batch:u,insert:d,remove:f,set:j,tick:queueMicrotask};function A(e){return document.createElement(e)}function j(e,t,n){e[O[t]??t]=n}export{b as AriaExtension,x as ClassListExtension,S as CssStyleExtension,C as CssVariableExtension,T as DatasetExtension,k as DomAdapter,E as EventExtension,g as MathML,y as Svg};
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["NS","element","element"],"sources":["../src/adapter/common.ts","../src/adapter/MathMLAdapter.ts","../src/component/MathML.ts","../src/adapter/SvgAdapter.ts","../src/component/Svg.ts","../src/extension/AriaExtension.ts","../src/extension/ClassListExtension.ts","../src/extension/CssStyleExtension.ts","../src/extension/CssVariableExtension.ts","../src/extension/DatasetExtension.ts","../src/extension/EventExtension.ts","../src/jsx/mapping.ts","../src/adapter/DomAdapter.ts"],"sourcesContent":["export function text(value: string, node: Node | null) {\n\tif (!node) {\n\t\treturn document.createTextNode(value);\n\t}\n\n\tnode.nodeValue = value;\n\treturn node;\n}\n\nexport function marker(comment: string = \"\") {\n\treturn document.createComment(comment);\n}\n\nexport function batch() {\n\treturn document.createDocumentFragment();\n}\n\nexport function insert(node: Node, parent: Node, before: Node | null) {\n\tparent.insertBefore(node, before);\n}\n\nexport function remove(node: Node) {\n\tnode.parentNode?.removeChild(node);\n}\n\nexport function setAttr(node: Node, attr: string, value: any) {\n\tswitch (typeof value) {\n\t\tcase \"string\":\n\t\tcase \"number\":\n\t\t\t(node as HTMLElement).setAttribute(attr, value.toString());\n\t\t\tbreak;\n\n\t\tcase \"boolean\":\n\t\t\t(node as HTMLElement).toggleAttribute(attr, value);\n\t\t\tbreak;\n\n\t\tcase \"object\":\n\t\t\tif (value !== null) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// fall through\n\n\t\tcase \"undefined\":\n\t\t\t(node as HTMLElement).removeAttribute(attr);\n\t\t\tbreak;\n\t}\n}\n","import type { Adapter } from \"@calmdown/pyxis/core\";\n\nimport type { IntrinsicElements } from \"~/jsx/baked\";\n\nimport { batch, insert, marker, remove, text, setAttr } from \"./common\";\n\nexport const MathMLAdapter: Adapter<Node, IntrinsicElements> = {\n\telement,\n\ttext,\n\tmarker,\n\tbatch,\n\tinsert,\n\tremove,\n\tset: setAttr,\n\ttick: queueMicrotask,\n};\n\nconst NS = \"http://www.w3.org/1998/Math/MathML\";\n\nfunction element(tagName: string | undefined) {\n\t// undefined only comes from the <Math> component\n\treturn document.createElementNS(NS, tagName ?? \"math\");\n}\n","import { Native, fork, type HNode, type JsxObject, type JsxResult, type MountingGroup } from \"@calmdown/pyxis/core\";\n\nimport { MathMLAdapter } from \"~/adapter/MathMLAdapter\";\n\nimport type { Mutable } from \"./types\";\n\n// @ts-expect-error fake overload to allow use with JSX\nexport function MathML(props: JSX.IntrinsicElements[\"MathML\"]): JsxResult;\n\nexport function MathML(\n\tjsx: JsxObject,\n\thParent: HNode<Node>,\n\tnUsedParent: Node,\n\tnRealParent: Node,\n\tnBefore: Node | null,\n\tisBatch: boolean,\n) {\n\tconst group = fork(hParent);\n\t(group as Mutable<MountingGroup<Node>>).adapter = MathMLAdapter;\n\n\tNative(jsx, hParent, nUsedParent, nRealParent, nBefore, isBatch);\n\tgroup.mounted = true;\n}\n","import type { Adapter } from \"@calmdown/pyxis/core\";\n\nimport type { IntrinsicElements } from \"~/jsx/baked\";\n\nimport { batch, insert, marker, remove, text, setAttr } from \"./common\";\n\nexport const SvgAdapter: Adapter<Node, IntrinsicElements> = {\n\telement,\n\ttext,\n\tmarker,\n\tbatch,\n\tinsert,\n\tremove,\n\tset: setAttr,\n\ttick: queueMicrotask,\n};\n\nconst NS = \"http://www.w3.org/2000/svg\";\n\nfunction element(tagName: string | undefined) {\n\t// undefined only comes from the <Svg> component\n\treturn document.createElementNS(NS, tagName ?? \"svg\");\n}\n","import { Native, fork, type HNode, type JsxObject, type JsxResult, type MountingGroup } from \"@calmdown/pyxis/core\";\n\nimport { SvgAdapter } from \"~/adapter/SvgAdapter\";\n\nimport type { Mutable } from \"./types\";\n\n// @ts-expect-error fake overload to allow use with JSX\nexport function Svg(props: JSX.IntrinsicElements[\"Svg\"]): JsxResult;\n\nexport function Svg(\n\tjsx: JsxObject,\n\thParent: HNode<Node>,\n\tnUsedParent: Node,\n\tnRealParent: Node,\n\tnBefore: Node | null,\n\tisBatch: boolean,\n) {\n\tconst group = fork(hParent);\n\t(group as Mutable<MountingGroup<Node>>).adapter = SvgAdapter;\n\n\tNative(jsx, hParent, nUsedParent, nRealParent, nBefore, isBatch);\n\tgroup.mounted = true;\n}\n","import { bind, isAtom, type ElementsType, type ExtensionProps, type MaybeReadonlyAtom, type MountingGroup, type NodeType } from \"@calmdown/pyxis/core\";\n\nimport type { ARIAProps } from \"~/jsx/baked\";\n\nexport interface AriaExtensionType {\n\t<TExtensionKey extends string, TElements extends ElementsType>(extensionKey: TExtensionKey, elements: TElements): {\n\t\t[TElementName in keyof TElements]: (\n\t\t\tNodeType<TElements[TElementName]> extends Element\n\t\t\t\t? TElements[TElementName] & ExtensionProps<TExtensionKey, ARIAProps>\n\t\t\t\t: TElements[TElementName]\n\t\t);\n\t};\n\n\tset: (node: Element, key: keyof ARIAProps, value: MaybeReadonlyAtom<any>, group: MountingGroup<Node>) => void;\n}\n\n/**\n * Extension adding ARIA attributes to any Element. Recommended prefix: `\"aria\"`\n *\n * Example usage:\n * ```tsx\n * <div aria:role=\"button\" />\n * ```\n */\nexport const AriaExtension = {\n\tset: (node, key, value, group) => {\n\t\tif (isAtom(value)) {\n\t\t\tbind(group, value, () => {\n\t\t\t\tnode[key] = value.get();\n\t\t\t});\n\t\t}\n\t\telse {\n\t\t\tnode[key] = value;\n\t\t}\n\t},\n} as AriaExtensionType;\n","import { bind, isAtom, type ElementsType, type ExtensionProps, type MaybeReadonlyAtom, type MountingGroup } from \"@calmdown/pyxis/core\";\n\nexport interface ClassListExtensionType {\n\t<TExtensionKey extends string, TElements extends ElementsType>(extensionKey: TExtensionKey, elements: TElements): {\n\t\t[TElementName in keyof TElements]: (\n\t\t\tTElements[TElementName] & ExtensionProps<TExtensionKey, { readonly [TClassName in string]?: MaybeReadonlyAtom<boolean> }>\n\t\t);\n\t};\n\n\tset: (node: Element, className: string, toggle: MaybeReadonlyAtom<boolean>, group: MountingGroup<Node>) => void;\n}\n\n/**\n * Extension adding ClassList access to any Element. Recommended prefix: `\"cl\"`\n *\n * CSS classes can be added via value-less boolean attributes, e.g.:\n * ```tsx\n * <div cl:my-class />\n * ```\n * and may be dynamically toggled when an `Atom<boolean>` is given as value:\n * ```tsx\n * <div cl:my-class={toggle} />\n * ```\n *\n * This extension can be used in tandem with the `@calmdown/rollup-plugin-pyxis`\n * plugin to automatically rewrite class names when using CSS modules.\n */\nexport const ClassListExtension = {\n\tset: (node, className, toggle, group) => {\n\t\tif (isAtom(toggle)) {\n\t\t\tbind(group, toggle, () => {\n\t\t\t\tnode.classList.toggle(className, toggle.get());\n\t\t\t});\n\t\t}\n\t\telse if (toggle) {\n\t\t\tnode.classList.add(className);\n\t\t}\n\t},\n} as ClassListExtensionType;\n","import { bind, isAtom, type ElementsType, type ExtensionProps, type MaybeReadonlyAtom, type MountingGroup, type NodeType } from \"@calmdown/pyxis/core\";\n\nimport type { CSSStyleDeclarationProps } from \"~/jsx/baked\";\n\nexport interface CssStyleExtensionType {\n\t<TExtensionKey extends string, TElements extends ElementsType>(extensionKey: TExtensionKey, elements: TElements): {\n\t\t[TElementName in keyof TElements]: (\n\t\t\tNodeType<TElements[TElementName]> extends ElementCSSInlineStyle\n\t\t\t\t? TElements[TElementName] & ExtensionProps<TExtensionKey, CSSStyleDeclarationProps>\n\t\t\t\t: TElements[TElementName]\n\t\t);\n\t};\n\n\tset: (node: ElementCSSInlineStyle, ruleName: string, value: MaybeReadonlyAtom<string>, group: MountingGroup<Node>) => void;\n}\n\n/**\n * Extension adding direct CSS rule access to any Element. Recommended prefix:\n * `\"css\"`\n *\n * Any CSS rules accessible from JavaScript can be set using this extension.\n * When given an Atom for the value, it will be dynamically updated.\n * Example usage:\n * ```tsx\n * <div css:background=\"red\" />\n * ```\n */\nexport const CssStyleExtension = {\n\tset: (node, ruleName: any, value, group) => {\n\t\tif (isAtom(value)) {\n\t\t\tbind(group, value, () => {\n\t\t\t\tnode.style[ruleName] = value.get();\n\t\t\t});\n\t\t}\n\t\telse if (value) {\n\t\t\tnode.style[ruleName] = value;\n\t\t}\n\t},\n} as CssStyleExtensionType;\n","import { bind, isAtom, type ElementsType, type ExtensionProps, type MaybeReadonlyAtom, type MountingGroup, type Nil, type NodeType } from \"@calmdown/pyxis/core\";\n\nexport interface CssVariableExtensionType {\n\t<TExtensionKey extends string, TElements extends ElementsType>(extensionKey: TExtensionKey, elements: TElements): {\n\t\t[TElementName in keyof TElements]: (\n\t\t\tNodeType<TElements[TElementName]> extends ElementCSSInlineStyle\n\t\t\t\t? TElements[TElementName] & ExtensionProps<TExtensionKey, { readonly [TVarName in string]?: MaybeReadonlyAtom<Nil<string | number>> }>\n\t\t\t\t: TElements[TElementName]\n\t\t);\n\t};\n\n\tset: (node: ElementCSSInlineStyle, varName: string, value: MaybeReadonlyAtom<Nil<string | number>>, group: MountingGroup<Node>) => void;\n}\n\n/**\n * Extension adding CSS variable access to any Element. Recommended prefix:\n * `\"var\"`\n *\n * Any CSS variable can be set using this extension. The mandatory \"--\" prefix\n * is pre-applied by this extension and thus shouldn't be included in the\n * attribute name. When given an Atom for the value, it will be dynamically\n * updated. Strings are set as-is, while numbers are converted with 3 decimal\n * digit precision. Other types are not allowed.\n *\n * Example usage:\n * ```tsx\n * <div var:max-size=\"5rem\" /> // sets --max-size: 5rem;\n * ```\n */\nexport const CssVariableExtension = {\n\tset: (node, varName, value, group) => {\n\t\tif (isAtom(value)) {\n\t\t\tbind(group, value, () => {\n\t\t\t\tsetProp(node.style, varName, value.get());\n\t\t\t});\n\t\t}\n\t\telse if (value) {\n\t\t\tsetProp(node.style, varName, value);\n\t\t}\n\t},\n} as CssVariableExtensionType;\n\nfunction setProp(style: CSSStyleDeclaration, varName: string, value: Nil<string | number>) {\n\tif (value === null || value === undefined || value === \"\") {\n\t\tvalue = null;\n\t}\n\telse if (typeof value === \"number\") {\n\t\tvalue = value.toFixed(3);\n\t}\n\n\tstyle.setProperty(\"--\" + varName, value);\n}\n","import { bind, isAtom, type ElementsType, type ExtensionProps, type MaybeReadonlyAtom, type MountingGroup, type NodeType } from \"@calmdown/pyxis/core\";\n\nexport interface DatasetExtensionType {\n\t<TExtensionKey extends string, TElements extends ElementsType>(extensionKey: TExtensionKey, elements: TElements): {\n\t\t[TElementName in keyof TElements]: (\n\t\t\tNodeType<TElements[TElementName]> extends HTMLOrSVGElement\n\t\t\t\t? TElements[TElementName] & ExtensionProps<TExtensionKey, { readonly [TKey in string]?: MaybeReadonlyAtom<string | undefined> }>\n\t\t\t\t: TElements[TElementName]\n\t\t);\n\t};\n\n\tset: (node: HTMLOrSVGElement, key: string, value: MaybeReadonlyAtom<string | undefined>, group: MountingGroup<Node>) => void;\n}\n\n/**\n * Extension adding dataset access to any HTML or SVG element. Recommended\n * prefix: `\"data\"`\n *\n * Any arbitrary dataset value can be set using this extension. Values must\n * always be strings. When given an Atom for the value, it will be dynamically\n * updated.\n *\n * Example usage:\n * ```tsx\n * <div data:testId=\"test-wrapper\" />\n * ```\n */\nexport const DatasetExtension = {\n\tset: (node, key, value, group) => {\n\t\tif (isAtom(value)) {\n\t\t\tbind(group, value, () => {\n\t\t\t\tconst tmp = value.get();\n\t\t\t\tif (tmp === undefined) {\n\t\t\t\t\tdelete node.dataset[key];\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tnode.dataset[key] = tmp;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\telse if (value !== undefined) {\n\t\t\tnode.dataset[key] = value;\n\t\t}\n\t},\n} as DatasetExtensionType;\n","import { getLifecycle, peek, unmounted, withLifecycle, type ElementsType, type ExtensionProps, type Lifecycle, type MaybeReadonlyAtom, type Nil, type NodeType } from \"@calmdown/pyxis/core\";\n\nexport interface EventExtensionType {\n\t<TExtensionKey extends string, TElements extends ElementsType>(extensionKey: TExtensionKey, elements: TElements): {\n\t\t[TElementName in keyof TElements]: (\n\t\t\tTElements[TElementName] & ExtensionProps<TExtensionKey, {\n\t\t\t\treadonly [TEventName in keyof GlobalEventHandlersEventMap]?: EventListenerType<GlobalEventHandlersEventMap[TEventName], NodeType<TElements[TElementName]>, TEventName>;\n\t\t\t}>\n\t\t);\n\t};\n\n\tset: (node: HTMLElement, className: string, toggle: EventListenerType<unknown, unknown, string>) => void;\n}\n\nexport type EventListenerType<TEvent, TNode = EventTarget, TEventName = string> =\n\t| MaybeReadonlyAtom<Nil<(e: ExtendedEvent<TEvent, TNode, TEventName>) => void>>\n\t| (AddEventListenerOptions & { capture?: false } & {\n\t\treadonly listener: MaybeReadonlyAtom<Nil<(e: ExtendedEvent<TEvent, TNode, TEventName>) => void>>;\n\t})\n\t| (AddEventListenerOptions & { capture: true } & {\n\t\treadonly listener: MaybeReadonlyAtom<Nil<(e: ExtendedEvent<TEvent, EventTarget | null, TEventName>) => void>>;\n\t});\n\nexport type ExtendedEvent<TEvent, TNode = EventTarget, TEventName = string> =\n\t& Omit<TEvent, \"type\" | \"currentTarget\">\n\t& {\n\t\treadonly currentTarget: TNode;\n\t\treadonly type: TEventName;\n\t};\n\n/**\n * Extension adding EventListener access to any Element. Recommended prefix:\n * `\"on\"`\n *\n * All standard DOM events can be subscribed using this extension. You can pass\n * a function directly to add a simple listener, or pass an object to\n * additionally specify listener options. In both cases the listener can be an\n * atom, allowing to dynamically change the listener callback. Listener options\n * cannot be dynamically changed.\n *\n * Example usage:\n * ```tsx\n * <div\n * on:contextmenu={e => {\n * // ...\n * }}\n * on:scroll={{\n * passive: true,\n * listener: e => {\n * // ...\n * },\n * }}\n * />\n * ```\n */\nexport const EventExtension = {\n\tset: (\n\t\tnode: HTMLElement,\n\t\ttype: string,\n\t\tlistener: EventListenerType<unknown, unknown, string>,\n\t) => {\n\t\t// see if listener options have been given\n\t\ttype ListenerAtom = MaybeReadonlyAtom<Nil<(e: unknown) => unknown>>;\n\t\tlet listenerAtom = listener as ListenerAtom;\n\t\tlet options: AddEventListenerOptions | undefined;\n\n\t\tconst maybeOptions = peek(listener);\n\t\tif (maybeOptions !== null && typeof maybeOptions === \"object\") {\n\t\t\tlistenerAtom = maybeOptions.listener as ListenerAtom;\n\t\t\toptions = maybeOptions;\n\t\t}\n\n\t\tif (!listenerAtom) {\n\t\t\treturn;\n\t\t}\n\n\t\t// listen\n\t\tconst lifecycle = getExtendedLifecycle();\n\t\tconst listenerWithLifecycle = (e: unknown) => {\n\t\t\tconst handler = peek(listenerAtom);\n\t\t\tif (handler) {\n\t\t\t\twithLifecycle(lifecycle, handler, e);\n\t\t\t}\n\t\t};\n\n\t\tnode.addEventListener(type, listenerWithLifecycle, options);\n\t\tlifecycle.$events.push({\n\t\t\t$f: listenerWithLifecycle,\n\t\t\t$n: node,\n\t\t\t$e: type,\n\t\t\t$o: options,\n\t\t});\n\t},\n} as EventExtensionType;\n\n\nfunction getExtendedLifecycle() {\n\tconst lifecycle = getLifecycle() as ExtendedLifecycle;\n\tif (!lifecycle.$events) {\n\t\tconst entries: ListenerEntry[] = [];\n\t\tunmounted(() => {\n\t\t\tconst { length } = entries;\n\t\t\tlet index = 0;\n\t\t\tlet entry;\n\n\t\t\tfor (; index < length; index += 1) {\n\t\t\t\tentry = entries[index];\n\t\t\t\tentry.$n.removeEventListener(entry.$e, entry.$f, entry.$o);\n\t\t\t}\n\n\t\t\tentries.length = 0;\n\t\t});\n\n\t\tlifecycle.$events = entries;\n\t}\n\n\treturn lifecycle;\n}\n\ninterface ExtendedLifecycle extends Lifecycle {\n\t$events: ListenerEntry[];\n}\n\ninterface ListenerEntry {\n\t$f: (e: unknown) => void;\n\t$n: HTMLElement;\n\t$e: string;\n\t$o?: AddEventListenerOptions;\n}\n","export const PROP_MAP = {\n\tclass: \"className\" as const,\n\tfor: \"htmlFor\" as const,\n};\n","import type { Adapter } from \"@calmdown/pyxis/core\";\n\nimport type { IntrinsicElements } from \"~/jsx/baked\";\nimport { PROP_MAP } from \"~/jsx/mapping\";\n\nimport { batch, insert, marker, remove, text } from \"./common\";\n\nexport const DomAdapter: Adapter<Node, IntrinsicElements> = {\n\telement,\n\ttext,\n\tmarker,\n\tbatch,\n\tinsert,\n\tremove,\n\tset,\n\ttick: queueMicrotask,\n};\n\nfunction element(tagName: string) {\n\treturn document.createElement(tagName);\n}\n\nfunction set(node: Node, prop: string, value: any) {\n\t(node as { [_ in string]: any })[(PROP_MAP as { [_ in string]?: string })[prop] ?? prop] = value;\n}\n"],"mappings":"4IAAA,SAAgB,EAAK,EAAe,EAAmB,CAMtD,OALK,GAIL,EAAK,UAAY,EACV,GAJC,SAAS,eAAe,CAAK,CAKtC,CAEA,SAAgB,EAAO,EAAkB,GAAI,CAC5C,OAAO,SAAS,cAAc,CAAO,CACtC,CAEA,SAAgB,GAAQ,CACvB,OAAO,SAAS,uBAAuB,CACxC,CAEA,SAAgB,EAAO,EAAY,EAAc,EAAqB,CACrE,EAAO,aAAa,EAAM,CAAM,CACjC,CAEA,SAAgB,EAAO,EAAY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AErC,EAEA,EAAK,iBAAiB,EAAM,EAAuB,CAAO,EAC1D,EAAU,QAAQ,KAAK,CACtB,GAAI,EACJ,GAAI,EACJ,GAAI,EACJ,GAAI,CACL,CAAC,CACF,CACD,EAGA,SAAS,GAAuB,CAC/B,IAAM,EAAY,EAAa,EAC/B,GAAI,CAAC,EAAU,QAAS,CACvB,IAAM,EAA2B,CAAC,EAClC,MAAgB,CACf,GAAM,CAAE,UAAW,EACf,EAAQ,EACR,EAEJ,KAAO,EAAQ,EAAQ,GAAS,EAC/B,EAAQ,EAAQ,GAChB,EAAM,GAAG,oBAAoB,EAAM,GAAI,EAAM,GAAI,EAAM,EAAE,EAG1D,EAAQ,OAAS,CAClB,CAAC,EAED,EAAU,QAAU,CACrB,CAEA,OAAO,CACR,CCrHA,MAAa,EAAW,CACvB,MAAO,YACP,IAAK,SACN,ECIa,EAA+C,CAC3D,UACA,OACA,SACA,QACA,SACA,SACA,MACA,KAAM,cACP,EAEA,SAAS,EAAQ,EAAiB,CACjC,OAAO,SAAS,cAAc,CAAO,CACtC,CAEA,SAAS,EAAI,EAAY,EAAc,EAAY,CAClD,EAAkC,EAAwC,IAAS,GAAQ,CAC5F"}
|
package/dist/jsx.d.ts
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@calmdown/pyxis-dom",
|
|
3
|
+
"version": "1.0.0-rc.1",
|
|
4
|
+
"license": "ISC",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": {
|
|
8
|
+
"import": "./dist/index.js",
|
|
9
|
+
"types": "./dist/index.d.ts"
|
|
10
|
+
},
|
|
11
|
+
"./jsx": {
|
|
12
|
+
"types": "./dist/jsx.d.ts"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"peerDependencies": {
|
|
16
|
+
"@calmdown/pyxis": "1.0.0-rc.1"
|
|
17
|
+
},
|
|
18
|
+
"devDependencies": {
|
|
19
|
+
"typescript": "6.0.3",
|
|
20
|
+
"build-logic": "0.0.0",
|
|
21
|
+
"@calmdown/pyxis": "1.0.0-rc.1"
|
|
22
|
+
},
|
|
23
|
+
"scripts": {
|
|
24
|
+
"bake": "bake ./src/jsx/inferred.ts ./src/jsx/baked.ts"
|
|
25
|
+
}
|
|
26
|
+
}
|