@pyreon/document-primitives 0.34.0 → 0.35.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/lib/index.js.map +1 -1
- package/package.json +13 -13
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["extractDocumentTree"],"sources":["../src/DocumentPreview.ts","../src/primitives/DocButton.ts","../src/primitives/DocCode.ts","../src/primitives/DocColumn.ts","../src/primitives/DocDivider.ts","../src/primitives/DocDocument.ts","../src/primitives/DocHeading.ts","../src/primitives/DocImage.ts","../src/primitives/DocLink.ts","../src/primitives/DocList.ts","../src/primitives/DocListItem.ts","../src/primitives/DocPage.ts","../src/primitives/DocPageBreak.ts","../src/primitives/DocQuote.ts","../src/primitives/DocRow.ts","../src/primitives/DocSection.ts","../src/primitives/DocSpacer.ts","../src/primitives/DocTable.ts","../src/primitives/DocText.ts","../src/theme.ts","../src/useDocumentExport.ts"],"sourcesContent":["import { Element } from '@pyreon/elements'\nimport rocketstyle from '@pyreon/rocketstyle'\n\nconst DocumentPreview = rocketstyle({\n dimensions: {\n sizes: 'size',\n },\n useBooleans: true,\n})({ name: 'DocumentPreview', component: Element })\n .theme({\n backgroundColor: '#f5f5f5',\n padding: 40,\n })\n .sizes({\n A4: { width: '210mm', minHeight: '297mm' },\n A3: { width: '297mm', minHeight: '420mm' },\n A5: { width: '148mm', minHeight: '210mm' },\n letter: { width: '8.5in', minHeight: '11in' },\n legal: { width: '8.5in', minHeight: '14in' },\n })\n .styles(\n (css: any) => css`\n display: flex;\n flex-direction: column;\n align-items: center;\n min-height: 100vh;\n\n & > * {\n background: white;\n padding: 25mm;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);\n margin: 20px 0;\n }\n `,\n )\n .statics({ _documentType: 'document' as const })\n .attrs<{\n size?: string\n showPageBreaks?: boolean\n }>((props) => ({\n tag: 'div',\n _documentProps: {\n ...(props.size ? { size: props.size } : { size: 'A4' }),\n ...(props.showPageBreaks ? { showPageBreaks: props.showPageBreaks } : {}),\n },\n }))\n\nexport default DocumentPreview\n","import { Text } from '@pyreon/elements'\nimport rocketstyle from '@pyreon/rocketstyle'\n\nconst DocButton = rocketstyle({\n dimensions: {\n variants: 'variant',\n },\n useBooleans: true,\n})({ name: 'DocButton', component: Text })\n .theme({\n fontSize: 14,\n fontWeight: 'bold',\n padding: '10px 24px',\n borderRadius: 4,\n textAlign: 'center',\n textDecoration: 'none',\n })\n .variants({\n primary: {\n backgroundColor: '#4f46e5',\n color: '#ffffff',\n },\n secondary: {\n backgroundColor: '#ffffff',\n color: '#4f46e5',\n borderWidth: 1,\n borderColor: '#4f46e5',\n borderStyle: 'solid',\n },\n })\n .statics({ _documentType: 'button' as const })\n .attrs<{ href?: string }>((props) => ({\n tag: 'a',\n _documentProps: { href: props.href ?? '#' },\n }))\n\nexport default DocButton\n","import { Text } from '@pyreon/elements'\nimport rocketstyle from '@pyreon/rocketstyle'\n\nconst DocCode = rocketstyle()({ name: 'DocCode', component: Text })\n .theme({\n fontFamily: 'ui-monospace, monospace',\n fontSize: 13,\n backgroundColor: '#f5f5f5',\n padding: '8px 12px',\n borderRadius: 4,\n })\n .statics({ _documentType: 'code' as const })\n .attrs<{ language?: string }>((props) => ({\n tag: 'pre',\n _documentProps: props.language ? { language: props.language } : {},\n }))\n\nexport default DocCode\n","import { Element } from '@pyreon/elements'\nimport rocketstyle from '@pyreon/rocketstyle'\n\nconst DocColumn = rocketstyle()({ name: 'DocColumn', component: Element })\n .statics({ _documentType: 'column' as const })\n .attrs<{ width?: number | string }>((props) => ({\n tag: 'div',\n _documentProps: props.width != null ? { width: props.width } : {},\n }))\n\nexport default DocColumn\n","import { Element } from '@pyreon/elements'\nimport rocketstyle from '@pyreon/rocketstyle'\n\nconst DocDivider = rocketstyle()({ name: 'DocDivider', component: Element })\n .theme({\n borderColor: '#dddddd',\n borderWidth: 1,\n })\n .statics({ _documentType: 'divider' as const })\n .attrs<{\n color?: string\n thickness?: number\n }>((props) => ({\n tag: 'hr',\n _documentProps: {\n ...(props.color ? { color: props.color } : {}),\n ...(props.thickness ? { thickness: props.thickness } : {}),\n },\n }))\n\nexport default DocDivider\n","import { Element } from '@pyreon/elements'\nimport rocketstyle from '@pyreon/rocketstyle'\n\n/**\n * Root document container with metadata for the export pipeline.\n *\n * The `title`, `author`, and `subject` props each accept either a\n * plain `string` or a `() => string` accessor. Accessors are\n * resolved by `extractDocumentTree` at export time, so consumers\n * can pass live signal accessors without capturing values at\n * component mount.\n *\n * **Why accessors are needed**: rocketstyle's `.attrs()` callback\n * runs ONCE at component mount (see\n * `packages/ui-system/rocketstyle/src/hoc/rocketstyleAttrsHoc.ts`\n * line 38: \".attrs() callbacks run once at mount\"). If `title` were\n * `string`-only and a consumer wanted to bind it to a live signal,\n * they'd have to capture the initial value at template setup time\n * — meaning the export metadata would be permanently stale relative\n * to the live UI state.\n *\n * Storing the accessor in `_documentProps` and resolving it at\n * extraction time means every `extractDocumentTree` call (one per\n * export click) reads the live value. Plain string values still\n * work as before — `extractDocumentTree` only calls the value if\n * it's a function.\n *\n * @example Plain string\n * ```tsx\n * <DocDocument title=\"My Report\" author=\"Alice\">\n * ...\n * </DocDocument>\n * ```\n *\n * @example Reactive accessor (recommended for templates that drive\n * a live preview AND export the same tree)\n * ```tsx\n * function MyTemplate({ resume }: { resume: () => Resume }) {\n * return (\n * <DocDocument\n * title={() => `${resume().name} — Resume`}\n * author={() => resume().name}\n * >\n * ...\n * </DocDocument>\n * )\n * }\n * ```\n */\nconst DocDocument = rocketstyle()({ name: 'DocDocument', component: Element })\n .statics({ _documentType: 'document' as const })\n .attrs<{\n title?: string | (() => string)\n author?: string | (() => string)\n subject?: string | (() => string)\n }>((props) => ({\n tag: 'div',\n _documentProps: {\n // Pass accessor functions through unmodified — extractDocumentTree\n // resolves them at export time. Plain strings pass through too.\n // Empty / nullish values are omitted entirely so they don't\n // appear as `title: undefined` in the export metadata.\n ...(props.title != null ? { title: props.title } : {}),\n ...(props.author != null ? { author: props.author } : {}),\n ...(props.subject != null ? { subject: props.subject } : {}),\n },\n }))\n\nexport default DocDocument\n","import { Text } from '@pyreon/elements'\nimport rocketstyle from '@pyreon/rocketstyle'\n\nconst DocHeading = rocketstyle({\n dimensions: {\n levels: 'level',\n },\n useBooleans: true,\n})({ name: 'DocHeading', component: Text })\n .theme({\n fontWeight: 'bold',\n color: '#1a1a2e',\n marginBottom: 12,\n })\n .levels({\n h1: { fontSize: 32, lineHeight: 1.2 },\n h2: { fontSize: 24, lineHeight: 1.3 },\n h3: { fontSize: 20, lineHeight: 1.4 },\n h4: { fontSize: 18, lineHeight: 1.4 },\n h5: { fontSize: 16, lineHeight: 1.5 },\n h6: { fontSize: 14, lineHeight: 1.5 },\n })\n .statics({ _documentType: 'heading' as const })\n .attrs<{ level?: string }>((props) => {\n const lvl = props.level ?? 'h1'\n const num = Number.parseInt(String(lvl).replace('h', ''), 10) || 1\n return {\n tag: lvl,\n _documentProps: { level: num },\n }\n })\n\nexport default DocHeading\n","import { Element } from '@pyreon/elements'\nimport rocketstyle from '@pyreon/rocketstyle'\n\nconst DocImage = rocketstyle()({ name: 'DocImage', component: Element })\n .statics({ _documentType: 'image' as const })\n .attrs<{\n src?: string\n alt?: string\n width?: number | string\n height?: number | string\n caption?: string\n }>((props) => ({\n tag: 'img',\n _documentProps: {\n src: props.src ?? '',\n ...(props.alt ? { alt: props.alt } : {}),\n ...(props.width ? { width: props.width } : {}),\n ...(props.height ? { height: props.height } : {}),\n ...(props.caption ? { caption: props.caption } : {}),\n },\n }))\n\nexport default DocImage\n","import { Text } from '@pyreon/elements'\nimport rocketstyle from '@pyreon/rocketstyle'\n\nconst DocLink = rocketstyle()({ name: 'DocLink', component: Text })\n .theme({\n color: '#4f46e5',\n textDecoration: 'underline',\n })\n .statics({ _documentType: 'link' as const })\n .attrs<{ href?: string }>((props) => ({\n tag: 'a',\n _documentProps: { href: props.href ?? '#' },\n }))\n\nexport default DocLink\n","import { Element } from '@pyreon/elements'\nimport rocketstyle from '@pyreon/rocketstyle'\n\nconst DocList = rocketstyle()({ name: 'DocList', component: Element })\n .theme({\n marginBottom: 8,\n paddingLeft: 20,\n })\n .statics({ _documentType: 'list' as const })\n .attrs<{ ordered?: boolean }>((props) => ({\n tag: props.ordered ? 'ol' : 'ul',\n _documentProps: props.ordered ? { ordered: props.ordered } : {},\n }))\n\nexport default DocList\n","import { Text } from '@pyreon/elements'\nimport rocketstyle from '@pyreon/rocketstyle'\n\nconst DocListItem = rocketstyle()({ name: 'DocListItem', component: Text })\n .theme({\n fontSize: 14,\n lineHeight: 1.5,\n })\n .statics({ _documentType: 'list-item' as const })\n .attrs(() => ({\n tag: 'li',\n _documentProps: {},\n }))\n\nexport default DocListItem\n","import { Element } from '@pyreon/elements'\nimport rocketstyle from '@pyreon/rocketstyle'\n\nconst DocPage = rocketstyle()({ name: 'DocPage', component: Element })\n .theme({\n backgroundColor: '#ffffff',\n padding: '25mm',\n })\n .statics({ _documentType: 'page' as const })\n .attrs<{\n size?: string\n orientation?: string\n }>((props) => ({\n tag: 'div',\n _documentProps: {\n ...(props.size ? { size: props.size } : {}),\n ...(props.orientation ? { orientation: props.orientation } : {}),\n },\n }))\n\nexport default DocPage\n","import { Element } from '@pyreon/elements'\nimport rocketstyle from '@pyreon/rocketstyle'\n\nconst DocPageBreak = rocketstyle()({ name: 'DocPageBreak', component: Element })\n .statics({ _documentType: 'page-break' as const })\n .attrs(() => ({\n tag: 'div',\n _documentProps: {},\n }))\n\nexport default DocPageBreak\n","import { Element } from '@pyreon/elements'\nimport rocketstyle from '@pyreon/rocketstyle'\n\nconst DocQuote = rocketstyle()({ name: 'DocQuote', component: Element })\n .theme({\n borderColor: '#4f46e5',\n padding: '8px 16px',\n fontStyle: 'italic',\n color: '#666666',\n })\n .statics({ _documentType: 'quote' as const })\n .attrs<{ borderColor?: string }>((props) => ({\n tag: 'blockquote',\n _documentProps: props.borderColor ? { borderColor: props.borderColor } : {},\n }))\n\nexport default DocQuote\n","import { Element } from '@pyreon/elements'\nimport rocketstyle from '@pyreon/rocketstyle'\n\n/**\n * Horizontal row of inline children. Per project conventions, layout\n * props (`direction`, `gap`) live in `.attrs()`, not `.theme()`. The\n * Element base accepts `direction: 'inline' | 'rows' | 'reverseInline'\n * | 'reverseRows'` — `'row'` is not a valid value.\n */\nconst DocRow = rocketstyle()({ name: 'DocRow', component: Element })\n .statics({ _documentType: 'row' as const })\n .attrs(() => ({\n tag: 'div',\n direction: 'inline' as const,\n gap: 8,\n _documentProps: {},\n }))\n\nexport default DocRow\n","import { Element } from '@pyreon/elements'\nimport rocketstyle from '@pyreon/rocketstyle'\n\nconst DocSection = rocketstyle({\n dimensions: {\n directions: 'direction',\n },\n useBooleans: false,\n})({ name: 'DocSection', component: Element })\n .theme({\n padding: 0,\n })\n .directions({\n column: {},\n row: { direction: 'row' },\n })\n .statics({ _documentType: 'section' as const })\n .attrs<{ direction?: string }>((props) => ({\n tag: 'div',\n _documentProps: { direction: props.direction ?? 'column' },\n }))\n\nexport default DocSection\n","import { Element } from '@pyreon/elements'\nimport rocketstyle from '@pyreon/rocketstyle'\n\nconst DocSpacer = rocketstyle()({ name: 'DocSpacer', component: Element })\n .statics({ _documentType: 'spacer' as const })\n .attrs<{ height?: number }>((props) => ({\n tag: 'div',\n _documentProps: { height: props.height ?? 16 },\n }))\n\nexport default DocSpacer\n","import { Element } from '@pyreon/elements'\nimport rocketstyle from '@pyreon/rocketstyle'\n\n/**\n * Tabular data primitive.\n *\n * The `columns`, `rows`, `headerStyle`, `striped`, `bordered`, and\n * `caption` props are document-export metadata — they belong in\n * `_documentProps` only and must NOT be forwarded to the rendered\n * `<table>` element. The `filter` option on `.attrs()` strips them\n * from the props that flow into the DOM.\n *\n * Why this matters: HTMLTableElement's `rows` property is a\n * read-only `HTMLCollection` of `<tr>` elements. If `rows` were\n * forwarded as a DOM attr, the runtime would call\n * `el.rows = [...]` and crash with\n * `TypeError: Cannot set property rows of [object Object] which has\n * only a getter`. Same family for `columns` (`HTMLTableColElement`'s\n * column collection on parent table). Filtering them at the\n * rocketstyle layer keeps the DOM render path clean.\n */\nconst DocTable = rocketstyle({\n dimensions: {\n variants: 'variant',\n },\n useBooleans: true,\n})({ name: 'DocTable', component: Element })\n .theme({\n fontSize: 14,\n borderColor: '#dddddd',\n })\n .statics({ _documentType: 'table' as const })\n .attrs<{\n columns?: unknown[]\n rows?: unknown[]\n headerStyle?: Record<string, unknown>\n striped?: boolean\n bordered?: boolean\n caption?: string\n }>(\n (props) => ({\n tag: 'table',\n _documentProps: {\n columns: props.columns ?? [],\n rows: props.rows ?? [],\n ...(props.headerStyle ? { headerStyle: props.headerStyle } : {}),\n ...(props.striped ? { striped: props.striped } : {}),\n ...(props.bordered ? { bordered: props.bordered } : {}),\n ...(props.caption ? { caption: props.caption } : {}),\n },\n }),\n {\n filter: ['columns', 'rows', 'headerStyle', 'striped', 'bordered', 'caption'],\n },\n )\n\nexport default DocTable\n","import { Text } from '@pyreon/elements'\nimport rocketstyle from '@pyreon/rocketstyle'\n\nconst DocText = rocketstyle({\n dimensions: {\n variants: 'variant',\n weights: 'weight',\n },\n useBooleans: true,\n})({ name: 'DocText', component: Text })\n .theme({\n color: '#333333',\n lineHeight: 1.5,\n marginBottom: 8,\n })\n .variants({\n body: { fontSize: 14 },\n caption: { fontSize: 12, color: '#666666' },\n label: { fontSize: 11, fontWeight: 'bold' },\n })\n .weights({\n normal: { fontWeight: 'normal' },\n bold: { fontWeight: 'bold' },\n })\n .statics({ _documentType: 'text' as const })\n .attrs(() => ({\n tag: 'p',\n _documentProps: {},\n }))\n\nexport default DocText\n","export const documentTheme = {\n colors: {\n primary: '#4f46e5',\n text: '#333333',\n textSecondary: '#666666',\n background: '#ffffff',\n border: '#dddddd',\n headerBg: '#1a1a2e',\n headerText: '#ffffff',\n stripedRow: '#f9f9f9',\n },\n fonts: {\n heading: 'system-ui, -apple-system, sans-serif',\n body: 'system-ui, -apple-system, sans-serif',\n mono: 'ui-monospace, monospace',\n },\n sizes: {\n h1: 32,\n h2: 24,\n h3: 20,\n h4: 18,\n h5: 16,\n h6: 14,\n body: 14,\n caption: 12,\n label: 11,\n },\n spacing: {\n xs: 4,\n sm: 8,\n md: 16,\n lg: 24,\n xl: 40,\n },\n}\n\nexport type DocumentTheme = typeof documentTheme\n","import type { DocNode, ExtractOptions, VarResolver } from '@pyreon/connector-document'\nimport { extractDocumentTree } from '@pyreon/connector-document'\nimport { resolveModeVar } from '@pyreon/rocketstyle'\nimport { resolveCssVarReferences, themeToCssVars } from '@pyreon/unistyle'\n\nexport interface DocumentExportOptions extends ExtractOptions {\n /**\n * Theme to resolve CSS-variable style values against during extraction.\n * Required (with the app under `init({ cssVariables: true })`) to inline\n * theme-leaf `var(--px-...)` references in the exported document;\n * `mode(a, b)` pairs resolve without it. Ignored when an explicit\n * `resolveVar` is supplied.\n */\n theme?: Record<string, unknown>\n /** Active mode for resolving `mode(a, b)` var pairs. Default `'light'`. */\n mode?: 'light' | 'dark'\n}\n\n/**\n * Auto-build a `resolveVar` from `theme` + `mode` when the caller didn't\n * supply one. Resolves `mode(a, b)` pairs (always, via rocketstyle's global\n * registry) and theme-leaf `var(--px-...)` refs (when `theme` is given, via a\n * `themeToCssVars` registry). Cheap under the classic path — it only rewrites\n * strings that contain `var(`.\n */\nfunction buildResolveVar(options: DocumentExportOptions): VarResolver | undefined {\n if (options.resolveVar) return options.resolveVar\n if (options.theme === undefined && options.mode === undefined) return undefined\n const mode = options.mode ?? 'light'\n const registry = options.theme ? themeToCssVars(options.theme).registry : undefined\n return (value: unknown) => {\n const afterMode = resolveModeVar(value, mode)\n return registry ? resolveCssVarReferences(afterMode, registry) : afterMode\n }\n}\n\nexport interface DocumentExport {\n /** Extract the DocNode tree from the template. */\n getDocNode: () => DocNode\n}\n\n/**\n * One-step helper: extract a DocNode tree from a template function.\n *\n * Equivalent to `createDocumentExport(templateFn).getDocNode()` but\n * without the wrapper-object indirection. Use this when you just\n * need the tree to feed into `@pyreon/document`'s `render()` or\n * `download()` — which is the only thing the wrapper object was\n * ever used for in practice.\n *\n * ```ts\n * import { extractDocNode } from '@pyreon/document-primitives'\n * import { download } from '@pyreon/document'\n *\n * function ResumeTemplate({ resume }: { resume: () => Resume }) {\n * return (\n * <DocDocument title={() => `${resume().name} — Resume`}>\n * <DocPage>...</DocPage>\n * </DocDocument>\n * )\n * }\n *\n * // Export click handler:\n * const tree = extractDocNode(() => <ResumeTemplate resume={store.resume} />)\n * await download(tree, 'resume.pdf')\n * ```\n *\n * The two-step `createDocumentExport` form is still exported for\n * backward compatibility and for callers that want to pass the\n * helper object around (e.g. to wrapper components that take a\n * `DocumentExport` instance). New code should prefer this one-step\n * form unless you specifically need the helper object.\n */\nexport function extractDocNode(\n templateFn: () => unknown,\n options: DocumentExportOptions = {},\n): DocNode {\n const resolveVar = buildResolveVar(options)\n return extractDocumentTree(templateFn(), resolveVar ? { ...options, resolveVar } : options)\n}\n\n/**\n * Create a document export helper from a template function.\n *\n * The template function should return a VNode tree built with\n * document primitives (DocHeading, DocText, DocTable, etc.).\n *\n * ```ts\n * const doc = createDocumentExport(() =>\n * DocDocument({ title: 'Report', children: [\n * DocHeading({ h1: true, children: 'Sales Report' }),\n * DocText({ children: 'Q4 summary.' }),\n * ]})\n * )\n *\n * const tree = doc.getDocNode()\n * // Pass to @pyreon/document's render() for any format\n * ```\n *\n * **Most consumers should use `extractDocNode(templateFn)` instead**\n * — it's the same operation in one call without the wrapper\n * object. `createDocumentExport` is kept for callers that want to\n * pass the helper object around.\n */\nexport function createDocumentExport(\n templateFn: () => unknown,\n options: DocumentExportOptions = {},\n): DocumentExport {\n const getDocNode = (): DocNode => extractDocNode(templateFn, options)\n return { getDocNode }\n}\n"],"mappings":";;;;;;AAGA,MAAM,kBAAkB,YAAY;CAClC,YAAY,EACV,OAAO,OACT;CACA,aAAa;AACf,CAAC,EAAE;CAAE,MAAM;CAAmB,WAAW;AAAQ,CAAC,EAC/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AAa,QAAQ,SAAS,QAAW,OAAO;CACtE,MAAM,OAAO,QAAQ,QAAQ;CAC7B,MAAM,WAAW,QAAQ,QAAQ,eAAe,QAAQ,KAAK,EAAE,WAAW;CAC1E,QAAQ,UAAmB;EACzB,MAAM,YAAY,eAAe,OAAO,IAAI;EAC5C,OAAO,WAAW,wBAAwB,WAAW,QAAQ,IAAI;CACnE;AACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuCA,SAAgB,eACd,YACA,UAAiC,CAAC,GACzB;CACT,MAAM,aAAa,gBAAgB,OAAO;CAC1C,OAAOA,sBAAoB,WAAW,GAAG,aAAa;EAAE,GAAG;EAAS;CAAW,IAAI,OAAO;AAC5F;;;;;;;;;;;;;;;;;;;;;;;;AAyBA,SAAgB,qBACd,YACA,UAAiC,CAAC,GAClB;CAChB,MAAM,mBAA4B,eAAe,YAAY,OAAO;CACpE,OAAO,EAAE,WAAW;AACtB"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["extractDocumentTree"],"sources":["../src/DocumentPreview.ts","../src/primitives/DocButton.ts","../src/primitives/DocCode.ts","../src/primitives/DocColumn.ts","../src/primitives/DocDivider.ts","../src/primitives/DocDocument.ts","../src/primitives/DocHeading.ts","../src/primitives/DocImage.ts","../src/primitives/DocLink.ts","../src/primitives/DocList.ts","../src/primitives/DocListItem.ts","../src/primitives/DocPage.ts","../src/primitives/DocPageBreak.ts","../src/primitives/DocQuote.ts","../src/primitives/DocRow.ts","../src/primitives/DocSection.ts","../src/primitives/DocSpacer.ts","../src/primitives/DocTable.ts","../src/primitives/DocText.ts","../src/theme.ts","../src/useDocumentExport.ts"],"sourcesContent":["import { Element } from '@pyreon/elements'\nimport rocketstyle from '@pyreon/rocketstyle'\n\nconst DocumentPreview = rocketstyle({\n dimensions: {\n sizes: 'size',\n },\n useBooleans: true,\n})({ name: 'DocumentPreview', component: Element })\n .theme({\n backgroundColor: '#f5f5f5',\n padding: 40,\n })\n .sizes({\n A4: { width: '210mm', minHeight: '297mm' },\n A3: { width: '297mm', minHeight: '420mm' },\n A5: { width: '148mm', minHeight: '210mm' },\n letter: { width: '8.5in', minHeight: '11in' },\n legal: { width: '8.5in', minHeight: '14in' },\n })\n .styles(\n (css: any) => css`\n display: flex;\n flex-direction: column;\n align-items: center;\n min-height: 100vh;\n\n & > * {\n background: white;\n padding: 25mm;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);\n margin: 20px 0;\n }\n `,\n )\n .statics({ _documentType: 'document' as const })\n .attrs<{\n size?: string\n showPageBreaks?: boolean\n }>((props) => ({\n tag: 'div',\n _documentProps: {\n ...(props.size ? { size: props.size } : { size: 'A4' }),\n ...(props.showPageBreaks ? { showPageBreaks: props.showPageBreaks } : {}),\n },\n }))\n\nexport default DocumentPreview\n","import { Text } from '@pyreon/elements'\nimport rocketstyle from '@pyreon/rocketstyle'\n\nconst DocButton = rocketstyle({\n dimensions: {\n variants: 'variant',\n },\n useBooleans: true,\n})({ name: 'DocButton', component: Text })\n .theme({\n fontSize: 14,\n fontWeight: 'bold',\n padding: '10px 24px',\n borderRadius: 4,\n textAlign: 'center',\n textDecoration: 'none',\n })\n .variants({\n primary: {\n backgroundColor: '#4f46e5',\n color: '#ffffff',\n },\n secondary: {\n backgroundColor: '#ffffff',\n color: '#4f46e5',\n borderWidth: 1,\n borderColor: '#4f46e5',\n borderStyle: 'solid',\n },\n })\n .statics({ _documentType: 'button' as const })\n .attrs<{ href?: string }>((props) => ({\n tag: 'a',\n _documentProps: { href: props.href ?? '#' },\n }))\n\nexport default DocButton\n","import { Text } from '@pyreon/elements'\nimport rocketstyle from '@pyreon/rocketstyle'\n\nconst DocCode = rocketstyle()({ name: 'DocCode', component: Text })\n .theme({\n fontFamily: 'ui-monospace, monospace',\n fontSize: 13,\n backgroundColor: '#f5f5f5',\n padding: '8px 12px',\n borderRadius: 4,\n })\n .statics({ _documentType: 'code' as const })\n .attrs<{ language?: string }>((props) => ({\n tag: 'pre',\n _documentProps: props.language ? { language: props.language } : {},\n }))\n\nexport default DocCode\n","import { Element } from '@pyreon/elements'\nimport rocketstyle from '@pyreon/rocketstyle'\n\nconst DocColumn = rocketstyle()({ name: 'DocColumn', component: Element })\n .statics({ _documentType: 'column' as const })\n .attrs<{ width?: number | string }>((props) => ({\n tag: 'div',\n _documentProps: props.width != null ? { width: props.width } : {},\n }))\n\nexport default DocColumn\n","import { Element } from '@pyreon/elements'\nimport rocketstyle from '@pyreon/rocketstyle'\n\nconst DocDivider = rocketstyle()({ name: 'DocDivider', component: Element })\n .theme({\n borderColor: '#dddddd',\n borderWidth: 1,\n })\n .statics({ _documentType: 'divider' as const })\n .attrs<{\n color?: string\n thickness?: number\n }>((props) => ({\n tag: 'hr',\n _documentProps: {\n ...(props.color ? { color: props.color } : {}),\n ...(props.thickness ? { thickness: props.thickness } : {}),\n },\n }))\n\nexport default DocDivider\n","import { Element } from '@pyreon/elements'\nimport rocketstyle from '@pyreon/rocketstyle'\n\n/**\n * Root document container with metadata for the export pipeline.\n *\n * The `title`, `author`, and `subject` props each accept either a\n * plain `string` or a `() => string` accessor. Accessors are\n * resolved by `extractDocumentTree` at export time, so consumers\n * can pass live signal accessors without capturing values at\n * component mount.\n *\n * **Why accessors are needed**: rocketstyle's `.attrs()` callback\n * runs ONCE at component mount (see\n * `packages/ui-system/rocketstyle/src/hoc/rocketstyleAttrsHoc.ts`\n * line 38: \".attrs() callbacks run once at mount\"). If `title` were\n * `string`-only and a consumer wanted to bind it to a live signal,\n * they'd have to capture the initial value at template setup time\n * — meaning the export metadata would be permanently stale relative\n * to the live UI state.\n *\n * Storing the accessor in `_documentProps` and resolving it at\n * extraction time means every `extractDocumentTree` call (one per\n * export click) reads the live value. Plain string values still\n * work as before — `extractDocumentTree` only calls the value if\n * it's a function.\n *\n * @example Plain string\n * ```tsx\n * <DocDocument title=\"My Report\" author=\"Alice\">\n * ...\n * </DocDocument>\n * ```\n *\n * @example Reactive accessor (recommended for templates that drive\n * a live preview AND export the same tree)\n * ```tsx\n * function MyTemplate({ resume }: { resume: () => Resume }) {\n * return (\n * <DocDocument\n * title={() => `${resume().name} — Resume`}\n * author={() => resume().name}\n * >\n * ...\n * </DocDocument>\n * )\n * }\n * ```\n */\nconst DocDocument = rocketstyle()({ name: 'DocDocument', component: Element })\n .statics({ _documentType: 'document' as const })\n .attrs<{\n title?: string | (() => string)\n author?: string | (() => string)\n subject?: string | (() => string)\n }>((props) => ({\n tag: 'div',\n _documentProps: {\n // Pass accessor functions through unmodified — extractDocumentTree\n // resolves them at export time. Plain strings pass through too.\n // Empty / nullish values are omitted entirely so they don't\n // appear as `title: undefined` in the export metadata.\n ...(props.title != null ? { title: props.title } : {}),\n ...(props.author != null ? { author: props.author } : {}),\n ...(props.subject != null ? { subject: props.subject } : {}),\n },\n }))\n\nexport default DocDocument\n","import { Text } from '@pyreon/elements'\nimport rocketstyle from '@pyreon/rocketstyle'\n\nconst DocHeading = rocketstyle({\n dimensions: {\n levels: 'level',\n },\n useBooleans: true,\n})({ name: 'DocHeading', component: Text })\n .theme({\n fontWeight: 'bold',\n color: '#1a1a2e',\n marginBottom: 12,\n })\n .levels({\n h1: { fontSize: 32, lineHeight: 1.2 },\n h2: { fontSize: 24, lineHeight: 1.3 },\n h3: { fontSize: 20, lineHeight: 1.4 },\n h4: { fontSize: 18, lineHeight: 1.4 },\n h5: { fontSize: 16, lineHeight: 1.5 },\n h6: { fontSize: 14, lineHeight: 1.5 },\n })\n .statics({ _documentType: 'heading' as const })\n .attrs<{ level?: string }>((props) => {\n const lvl = props.level ?? 'h1'\n const num = Number.parseInt(String(lvl).replace('h', ''), 10) || 1\n return {\n tag: lvl,\n _documentProps: { level: num },\n }\n })\n\nexport default DocHeading\n","import { Element } from '@pyreon/elements'\nimport rocketstyle from '@pyreon/rocketstyle'\n\nconst DocImage = rocketstyle()({ name: 'DocImage', component: Element })\n .statics({ _documentType: 'image' as const })\n .attrs<{\n src?: string\n alt?: string\n width?: number | string\n height?: number | string\n caption?: string\n }>((props) => ({\n tag: 'img',\n _documentProps: {\n src: props.src ?? '',\n ...(props.alt ? { alt: props.alt } : {}),\n ...(props.width ? { width: props.width } : {}),\n ...(props.height ? { height: props.height } : {}),\n ...(props.caption ? { caption: props.caption } : {}),\n },\n }))\n\nexport default DocImage\n","import { Text } from '@pyreon/elements'\nimport rocketstyle from '@pyreon/rocketstyle'\n\nconst DocLink = rocketstyle()({ name: 'DocLink', component: Text })\n .theme({\n color: '#4f46e5',\n textDecoration: 'underline',\n })\n .statics({ _documentType: 'link' as const })\n .attrs<{ href?: string }>((props) => ({\n tag: 'a',\n _documentProps: { href: props.href ?? '#' },\n }))\n\nexport default DocLink\n","import { Element } from '@pyreon/elements'\nimport rocketstyle from '@pyreon/rocketstyle'\n\nconst DocList = rocketstyle()({ name: 'DocList', component: Element })\n .theme({\n marginBottom: 8,\n paddingLeft: 20,\n })\n .statics({ _documentType: 'list' as const })\n .attrs<{ ordered?: boolean }>((props) => ({\n tag: props.ordered ? 'ol' : 'ul',\n _documentProps: props.ordered ? { ordered: props.ordered } : {},\n }))\n\nexport default DocList\n","import { Text } from '@pyreon/elements'\nimport rocketstyle from '@pyreon/rocketstyle'\n\nconst DocListItem = rocketstyle()({ name: 'DocListItem', component: Text })\n .theme({\n fontSize: 14,\n lineHeight: 1.5,\n })\n .statics({ _documentType: 'list-item' as const })\n .attrs(() => ({\n tag: 'li',\n _documentProps: {},\n }))\n\nexport default DocListItem\n","import { Element } from '@pyreon/elements'\nimport rocketstyle from '@pyreon/rocketstyle'\n\nconst DocPage = rocketstyle()({ name: 'DocPage', component: Element })\n .theme({\n backgroundColor: '#ffffff',\n padding: '25mm',\n })\n .statics({ _documentType: 'page' as const })\n .attrs<{\n size?: string\n orientation?: string\n }>((props) => ({\n tag: 'div',\n _documentProps: {\n ...(props.size ? { size: props.size } : {}),\n ...(props.orientation ? { orientation: props.orientation } : {}),\n },\n }))\n\nexport default DocPage\n","import { Element } from '@pyreon/elements'\nimport rocketstyle from '@pyreon/rocketstyle'\n\nconst DocPageBreak = rocketstyle()({ name: 'DocPageBreak', component: Element })\n .statics({ _documentType: 'page-break' as const })\n .attrs(() => ({\n tag: 'div',\n _documentProps: {},\n }))\n\nexport default DocPageBreak\n","import { Element } from '@pyreon/elements'\nimport rocketstyle from '@pyreon/rocketstyle'\n\nconst DocQuote = rocketstyle()({ name: 'DocQuote', component: Element })\n .theme({\n borderColor: '#4f46e5',\n padding: '8px 16px',\n fontStyle: 'italic',\n color: '#666666',\n })\n .statics({ _documentType: 'quote' as const })\n .attrs<{ borderColor?: string }>((props) => ({\n tag: 'blockquote',\n _documentProps: props.borderColor ? { borderColor: props.borderColor } : {},\n }))\n\nexport default DocQuote\n","import { Element } from '@pyreon/elements'\nimport rocketstyle from '@pyreon/rocketstyle'\n\n/**\n * Horizontal row of inline children. Per project conventions, layout\n * props (`direction`, `gap`) live in `.attrs()`, not `.theme()`. The\n * Element base accepts `direction: 'inline' | 'rows' | 'reverseInline'\n * | 'reverseRows'` — `'row'` is not a valid value.\n */\nconst DocRow = rocketstyle()({ name: 'DocRow', component: Element })\n .statics({ _documentType: 'row' as const })\n .attrs(() => ({\n tag: 'div',\n direction: 'inline' as const,\n gap: 8,\n _documentProps: {},\n }))\n\nexport default DocRow\n","import { Element } from '@pyreon/elements'\nimport rocketstyle from '@pyreon/rocketstyle'\n\nconst DocSection = rocketstyle({\n dimensions: {\n directions: 'direction',\n },\n useBooleans: false,\n})({ name: 'DocSection', component: Element })\n .theme({\n padding: 0,\n })\n .directions({\n column: {},\n row: { direction: 'row' },\n })\n .statics({ _documentType: 'section' as const })\n .attrs<{ direction?: string }>((props) => ({\n tag: 'div',\n _documentProps: { direction: props.direction ?? 'column' },\n }))\n\nexport default DocSection\n","import { Element } from '@pyreon/elements'\nimport rocketstyle from '@pyreon/rocketstyle'\n\nconst DocSpacer = rocketstyle()({ name: 'DocSpacer', component: Element })\n .statics({ _documentType: 'spacer' as const })\n .attrs<{ height?: number }>((props) => ({\n tag: 'div',\n _documentProps: { height: props.height ?? 16 },\n }))\n\nexport default DocSpacer\n","import { Element } from '@pyreon/elements'\nimport rocketstyle from '@pyreon/rocketstyle'\n\n/**\n * Tabular data primitive.\n *\n * The `columns`, `rows`, `headerStyle`, `striped`, `bordered`, and\n * `caption` props are document-export metadata — they belong in\n * `_documentProps` only and must NOT be forwarded to the rendered\n * `<table>` element. The `filter` option on `.attrs()` strips them\n * from the props that flow into the DOM.\n *\n * Why this matters: HTMLTableElement's `rows` property is a\n * read-only `HTMLCollection` of `<tr>` elements. If `rows` were\n * forwarded as a DOM attr, the runtime would call\n * `el.rows = [...]` and crash with\n * `TypeError: Cannot set property rows of [object Object] which has\n * only a getter`. Same family for `columns` (`HTMLTableColElement`'s\n * column collection on parent table). Filtering them at the\n * rocketstyle layer keeps the DOM render path clean.\n */\nconst DocTable = rocketstyle({\n dimensions: {\n variants: 'variant',\n },\n useBooleans: true,\n})({ name: 'DocTable', component: Element })\n .theme({\n fontSize: 14,\n borderColor: '#dddddd',\n })\n .statics({ _documentType: 'table' as const })\n .attrs<{\n columns?: unknown[]\n rows?: unknown[]\n headerStyle?: Record<string, unknown>\n striped?: boolean\n bordered?: boolean\n caption?: string\n }>(\n (props) => ({\n tag: 'table',\n _documentProps: {\n columns: props.columns ?? [],\n rows: props.rows ?? [],\n ...(props.headerStyle ? { headerStyle: props.headerStyle } : {}),\n ...(props.striped ? { striped: props.striped } : {}),\n ...(props.bordered ? { bordered: props.bordered } : {}),\n ...(props.caption ? { caption: props.caption } : {}),\n },\n }),\n {\n filter: ['columns', 'rows', 'headerStyle', 'striped', 'bordered', 'caption'],\n },\n )\n\nexport default DocTable\n","import { Text } from '@pyreon/elements'\nimport rocketstyle from '@pyreon/rocketstyle'\n\nconst DocText = rocketstyle({\n dimensions: {\n variants: 'variant',\n weights: 'weight',\n },\n useBooleans: true,\n})({ name: 'DocText', component: Text })\n .theme({\n color: '#333333',\n lineHeight: 1.5,\n marginBottom: 8,\n })\n .variants({\n body: { fontSize: 14 },\n caption: { fontSize: 12, color: '#666666' },\n label: { fontSize: 11, fontWeight: 'bold' },\n })\n .weights({\n normal: { fontWeight: 'normal' },\n bold: { fontWeight: 'bold' },\n })\n .statics({ _documentType: 'text' as const })\n .attrs(() => ({\n tag: 'p',\n _documentProps: {},\n }))\n\nexport default DocText\n","export const documentTheme = {\n colors: {\n primary: '#4f46e5',\n text: '#333333',\n textSecondary: '#666666',\n background: '#ffffff',\n border: '#dddddd',\n headerBg: '#1a1a2e',\n headerText: '#ffffff',\n stripedRow: '#f9f9f9',\n },\n fonts: {\n heading: 'system-ui, -apple-system, sans-serif',\n body: 'system-ui, -apple-system, sans-serif',\n mono: 'ui-monospace, monospace',\n },\n sizes: {\n h1: 32,\n h2: 24,\n h3: 20,\n h4: 18,\n h5: 16,\n h6: 14,\n body: 14,\n caption: 12,\n label: 11,\n },\n spacing: {\n xs: 4,\n sm: 8,\n md: 16,\n lg: 24,\n xl: 40,\n },\n}\n\nexport type DocumentTheme = typeof documentTheme\n","import type { DocNode, ExtractOptions, VarResolver } from '@pyreon/connector-document'\nimport { extractDocumentTree } from '@pyreon/connector-document'\nimport { resolveModeVar } from '@pyreon/rocketstyle'\nimport { resolveCssVarReferences, themeToCssVars } from '@pyreon/unistyle'\n\nexport interface DocumentExportOptions extends ExtractOptions {\n /**\n * Theme to resolve CSS-variable style values against during extraction.\n * Required (with the app under `init({ cssVariables: true })`) to inline\n * theme-leaf `var(--px-...)` references in the exported document;\n * `mode(a, b)` pairs resolve without it. Ignored when an explicit\n * `resolveVar` is supplied.\n */\n theme?: Record<string, unknown>\n /** Active mode for resolving `mode(a, b)` var pairs. Default `'light'`. */\n mode?: 'light' | 'dark'\n}\n\n/**\n * Auto-build a `resolveVar` from `theme` + `mode` when the caller didn't\n * supply one. Resolves `mode(a, b)` pairs (always, via rocketstyle's global\n * registry) and theme-leaf `var(--px-...)` refs (when `theme` is given, via a\n * `themeToCssVars` registry). Cheap under the classic path — it only rewrites\n * strings that contain `var(`.\n */\nfunction buildResolveVar(options: DocumentExportOptions): VarResolver | undefined {\n if (options.resolveVar) return options.resolveVar\n if (options.theme === undefined && options.mode === undefined) return undefined\n const mode = options.mode ?? 'light'\n const registry = options.theme ? themeToCssVars(options.theme).registry : undefined\n return (value: unknown) => {\n const afterMode = resolveModeVar(value, mode)\n return registry ? resolveCssVarReferences(afterMode, registry) : afterMode\n }\n}\n\nexport interface DocumentExport {\n /** Extract the DocNode tree from the template. */\n getDocNode: () => DocNode\n}\n\n/**\n * One-step helper: extract a DocNode tree from a template function.\n *\n * Equivalent to `createDocumentExport(templateFn).getDocNode()` but\n * without the wrapper-object indirection. Use this when you just\n * need the tree to feed into `@pyreon/document`'s `render()` or\n * `download()` — which is the only thing the wrapper object was\n * ever used for in practice.\n *\n * ```ts\n * import { extractDocNode } from '@pyreon/document-primitives'\n * import { download } from '@pyreon/document'\n *\n * function ResumeTemplate({ resume }: { resume: () => Resume }) {\n * return (\n * <DocDocument title={() => `${resume().name} — Resume`}>\n * <DocPage>...</DocPage>\n * </DocDocument>\n * )\n * }\n *\n * // Export click handler:\n * const tree = extractDocNode(() => <ResumeTemplate resume={store.resume} />)\n * await download(tree, 'resume.pdf')\n * ```\n *\n * The two-step `createDocumentExport` form is still exported for\n * backward compatibility and for callers that want to pass the\n * helper object around (e.g. to wrapper components that take a\n * `DocumentExport` instance). New code should prefer this one-step\n * form unless you specifically need the helper object.\n */\nexport function extractDocNode(\n templateFn: () => unknown,\n options: DocumentExportOptions = {},\n): DocNode {\n const resolveVar = buildResolveVar(options)\n return extractDocumentTree(templateFn(), resolveVar ? { ...options, resolveVar } : options)\n}\n\n/**\n * Create a document export helper from a template function.\n *\n * The template function should return a VNode tree built with\n * document primitives (DocHeading, DocText, DocTable, etc.).\n *\n * ```ts\n * const doc = createDocumentExport(() =>\n * DocDocument({ title: 'Report', children: [\n * DocHeading({ h1: true, children: 'Sales Report' }),\n * DocText({ children: 'Q4 summary.' }),\n * ]})\n * )\n *\n * const tree = doc.getDocNode()\n * // Pass to @pyreon/document's render() for any format\n * ```\n *\n * **Most consumers should use `extractDocNode(templateFn)` instead**\n * — it's the same operation in one call without the wrapper\n * object. `createDocumentExport` is kept for callers that want to\n * pass the helper object around.\n */\nexport function createDocumentExport(\n templateFn: () => unknown,\n options: DocumentExportOptions = {},\n): DocumentExport {\n const getDocNode = (): DocNode => extractDocNode(templateFn, options)\n return { getDocNode }\n}\n"],"mappings":";;;;;;AAGA,MAAM,kBAAkB,YAAY;CAClC,YAAY,EACV,OAAO,OACT;CACA,aAAa;AACf,CAAC,CAAC,CAAC;CAAE,MAAM;CAAmB,WAAW;AAAQ,CAAC,CAAC,CAChD,MAAM;CACL,iBAAiB;CACjB,SAAS;AACX,CAAC,CAAC,CACD,MAAM;CACL,IAAI;EAAE,OAAO;EAAS,WAAW;CAAQ;CACzC,IAAI;EAAE,OAAO;EAAS,WAAW;CAAQ;CACzC,IAAI;EAAE,OAAO;EAAS,WAAW;CAAQ;CACzC,QAAQ;EAAE,OAAO;EAAS,WAAW;CAAO;CAC5C,OAAO;EAAE,OAAO;EAAS,WAAW;CAAO;AAC7C,CAAC,CAAC,CACD,QACE,QAAa,GAAG;;;;;;;;;;;;KAanB,CAAC,CACA,QAAQ,EAAE,eAAe,WAAoB,CAAC,CAAC,CAC/C,OAGG,WAAW;CACb,KAAK;CACL,gBAAgB;EACd,GAAI,MAAM,OAAO,EAAE,MAAM,MAAM,KAAK,IAAI,EAAE,MAAM,KAAK;EACrD,GAAI,MAAM,iBAAiB,EAAE,gBAAgB,MAAM,eAAe,IAAI,CAAC;CACzE;AACF,EAAE;;;;AC1CJ,MAAM,YAAY,YAAY;CAC5B,YAAY,EACV,UAAU,UACZ;CACA,aAAa;AACf,CAAC,CAAC,CAAC;CAAE,MAAM;CAAa,WAAW;AAAK,CAAC,CAAC,CACvC,MAAM;CACL,UAAU;CACV,YAAY;CACZ,SAAS;CACT,cAAc;CACd,WAAW;CACX,gBAAgB;AAClB,CAAC,CAAC,CACD,SAAS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AOA,sBAAoB,WAAW,GAAG,aAAa;EAAE,GAAG;EAAS;CAAW,IAAI,OAAO;AAC5F;;;;;;;;;;;;;;;;;;;;;;;;AAyBA,SAAgB,qBACd,YACA,UAAiC,CAAC,GAClB;CAChB,MAAM,mBAA4B,eAAe,YAAY,OAAO;CACpE,OAAO,EAAE,WAAW;AACtB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pyreon/document-primitives",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.35.0",
|
|
4
4
|
"description": "Rocketstyle document components — render in browser, export to 18 formats",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://github.com/pyreon/pyreon/tree/main/packages/ui-system/document-primitives#readme",
|
|
@@ -40,23 +40,23 @@
|
|
|
40
40
|
"typecheck": "tsc --noEmit"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
|
-
"@pyreon/core": "^0.
|
|
43
|
+
"@pyreon/core": "^0.35.0"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@pyreon/connector-document": "^0.
|
|
47
|
-
"@pyreon/document": "^0.
|
|
48
|
-
"@pyreon/elements": "^0.
|
|
49
|
-
"@pyreon/rocketstyle": "^0.
|
|
50
|
-
"@pyreon/styler": "^0.
|
|
51
|
-
"@pyreon/ui-core": "^0.
|
|
52
|
-
"@pyreon/unistyle": "^0.
|
|
46
|
+
"@pyreon/connector-document": "^0.35.0",
|
|
47
|
+
"@pyreon/document": "^0.35.0",
|
|
48
|
+
"@pyreon/elements": "^0.35.0",
|
|
49
|
+
"@pyreon/rocketstyle": "^0.35.0",
|
|
50
|
+
"@pyreon/styler": "^0.35.0",
|
|
51
|
+
"@pyreon/ui-core": "^0.35.0",
|
|
52
|
+
"@pyreon/unistyle": "^0.35.0"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@pyreon/manifest": "0.13.2",
|
|
56
|
-
"@pyreon/reactivity": "^0.
|
|
57
|
-
"@pyreon/runtime-dom": "^0.
|
|
58
|
-
"@pyreon/test-utils": "^0.13.
|
|
59
|
-
"@pyreon/typescript": "^0.
|
|
56
|
+
"@pyreon/reactivity": "^0.35.0",
|
|
57
|
+
"@pyreon/runtime-dom": "^0.35.0",
|
|
58
|
+
"@pyreon/test-utils": "^0.13.23",
|
|
59
|
+
"@pyreon/typescript": "^0.35.0",
|
|
60
60
|
"@pyreon/vitest-config": "0.13.3",
|
|
61
61
|
"@vitest/browser-playwright": "^4.1.8",
|
|
62
62
|
"@vitus-labs/tools-rolldown": "^2.5.0"
|