@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 CHANGED
@@ -1 +1,7 @@
1
+ ## @bgub/fig@0.1.0-alpha.0 (alpha)
2
+
3
+ ### Initial alpha release
4
+
5
+ First public alpha release of Fig.
6
+
1
7
  # Changelog
@@ -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// The JSX namespace TypeScript resolves under jsxImportSource: \"@bgub/fig\".\n// IntrinsicElements is deliberately empty here: host-prop vocabulary belongs\n// to renderers, so @bgub/fig-dom augments it with the DOM tag map (having\n// any fig-dom import in the program is enough — augmentations are global).\n// A compilation with no renderer types in scope 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"}
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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bgub/fig",
3
- "version": "0.0.1",
3
+ "version": "0.1.0-alpha.0",
4
4
  "description": "Fig — a UI library",
5
5
  "keywords": [],
6
6
  "homepage": "https://github.com/bgub/fig",