@bgub/fig 0.0.1 → 0.1.0-alpha.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/CHANGELOG.md +6 -0
- package/dist/jsx-runtime.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/jsx-runtime.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jsx-runtime.js","names":[],"sources":["../src/jsx-runtime.ts"],"sourcesContent":["import {\n type ElementType,\n type FigElement,\n FigElementSymbol,\n type FigNode,\n Fragment,\n type Key,\n} from \"./element.ts\";\n\ntype JSXProps = Record<string, unknown>;\n\nexport function jsx(\n type: ElementType,\n props: JSXProps | null,\n key?: string | number,\n): FigElement {\n if (props !== null && \"key\" in props) {\n const { key: propsKey, ...rest } = props;\n return {\n $$typeof: FigElementSymbol,\n type,\n key: key ?? (propsKey as Key | null | undefined) ?? null,\n props: rest,\n };\n }\n\n return {\n $$typeof: FigElementSymbol,\n type,\n key: key ?? null,\n props: props ?? {},\n };\n}\n\n// The automatic-runtime contract is exactly jsx/jsxs/jsxDEV/Fragment. jsxDEV\n// aliases jsx: the dev transform's extra arguments (isStaticChildren, source,\n// self) are ignored — Fig builds component stacks from fibers instead.\nexport { Fragment, jsx as jsxs, jsx as jsxDEV };\n\n//
|
|
1
|
+
{"version":3,"file":"jsx-runtime.js","names":[],"sources":["../src/jsx-runtime.ts"],"sourcesContent":["import {\n type ElementType,\n type FigElement,\n FigElementSymbol,\n type FigNode,\n Fragment,\n type Key,\n} from \"./element.ts\";\n\ntype JSXProps = Record<string, unknown>;\n\nexport function jsx(\n type: ElementType,\n props: JSXProps | null,\n key?: string | number,\n): FigElement {\n if (props !== null && \"key\" in props) {\n const { key: propsKey, ...rest } = props;\n return {\n $$typeof: FigElementSymbol,\n type,\n key: key ?? (propsKey as Key | null | undefined) ?? null,\n props: rest,\n };\n }\n\n return {\n $$typeof: FigElementSymbol,\n type,\n key: key ?? null,\n props: props ?? {},\n };\n}\n\n// The automatic-runtime contract is exactly jsx/jsxs/jsxDEV/Fragment. jsxDEV\n// aliases jsx: the dev transform's extra arguments (isStaticChildren, source,\n// self) are ignored — Fig builds component stacks from fibers instead.\nexport { Fragment, jsx as jsxs, jsx as jsxDEV };\n\n// Core's JSX namespace is renderer-neutral. Host-prop vocabulary belongs to\n// renderer runtimes such as @bgub/fig-dom/jsx-runtime, so using core directly\n// as jsxImportSource rejects intrinsic tags.\nexport namespace JSX {\n // The type of a JSX expression, and what function components may return:\n // any renderable node (elements, strings, numbers, booleans, null, arrays).\n export type Element = FigNode;\n\n export interface ElementChildrenAttribute {\n children: unknown;\n }\n\n // Props every JSX element accepts beyond its own declared props.\n export interface IntrinsicAttributes {\n key?: Key | null;\n }\n\n export interface IntrinsicElements {}\n}\n"],"mappings":";;AAWA,SAAgB,IACd,MACA,OACA,KACY;CACZ,IAAI,UAAU,QAAQ,SAAS,OAAO;EACpC,MAAM,EAAE,KAAK,UAAU,GAAG,SAAS;EACnC,OAAO;GACL,UAAU;GACV;GACA,KAAK,OAAQ,YAAuC;GACpD,OAAO;EACT;CACF;CAEA,OAAO;EACL,UAAU;EACV;EACA,KAAK,OAAO;EACZ,OAAO,SAAS,CAAC;CACnB;AACF"}
|