@pyreon/elements 0.26.2 → 0.26.3

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.
@@ -1 +1 @@
1
- {"version":3,"file":"index2.d.ts","names":[],"sources":["../../src/types.ts","../../src/Element/types.ts","../../src/Element/component.tsx","../../src/helpers/Iterator/types.ts","../../src/helpers/Iterator/component.tsx","../../src/List/component.tsx","../../src/Overlay/context.tsx","../../src/Overlay/positioning.ts","../../src/Overlay/useOverlay.tsx","../../src/Overlay/component.tsx","../../src/Portal/component.tsx","../../src/Text/component.tsx","../../src/Util/component.tsx"],"mappings":";;;;;KAoBK,mBAAA,oBACS,CAAA,IAAK,CAAA,CAAE,CAAA,qCAAsC,CAAA,GAAI,CAAA,CAAE,CAAA;AAAA,KAG5D,EAAA,MAAQ,CAAA,iCAAkC,CAAA,GAAI,CAAA,CAAE,CAAA;AAAA,KAEhD,SAAA,SAAkB,EAAA,CAAG,IAAA,CAAK,CAAA,EAAG,OAAA,OAAc,CAAA,QAAS,CAAA,KAAM,CAAA;AAAA,KAE1D,MAAA,gCAAsC,CAAA,iCACvC,SAAA,CAAU,CAAA,EAAG,MAAA,CAAO,CAAA;AAAA,KAGZ,UAAA,gCAA0C,mBAAA,CAAoB,MAAA,CAAO,CAAA;AAAA,KAErE,QAAA,GAAW,WAAA,KAAgB,EAAA,EAAI,WAAW;AAAA,KAE1C,WAAA,IAAe,GAAA,SAAY,MAAA,CAAO,GAAA,KAAQ,UAAA,QAAkB,GAAA;AAAA,KAE5D,GAAA,GAAM,WAAA,GAAc,UAAA,QAAkB,MAAA,CAAO,GAAA;AAAA,KAE7C,OAAA,GAAU,UAAU,QAAQ,MAAA;AAAA,KAE5B,aAAA;AAAA,KAEA,aAAA;AAAA,KAEA,gBAAA;AAAA,KAEA,cAAA;AAAA,KACA,kBAAA;AAAA,KAIA,MAAA,GACR,aAAA,GACA,aAAA,KACA,OAAA,CAAQ,MAAA,CAAO,cAAA,EAAg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AAA,GAAkB,OAAA;EAC3B,WAAA,GAAc,WAAA;EACd,cAAA;EACA,cAAA;AAAA,IACE,eAAA;AAAA,cAEE,WAAA,EAAW,eAAe,CAAC,OAAA;;;UC/BhB,OAAA;EVIiD;;;EUAhE,WAAA,GAAc,WAAA;EVAF;;;EUIZ,QAAA,EAAU,UAAU;EVJyC;;;EUQ7D,GAAA;AAAA;AAAA,cAGI,WAAA,EAAW,eAAe,CAAC,OAAA;;;KClBrB,OAAA,GAAQ,OAAA;EXOC;;;EWHnB,KAAA,EAAO,UAAA;EXGyD;;;EWChE,QAAA,EAAU,UAAA;EXDE;;;EWKZ,SAAA;EXL6D;;;EWS7D,GAAA,EAAK,YAAA;EXNF;;;EWUH,GAAA,EAAK,SAAA;AAAA,KAEL,oBAAA;AAAA,cAEI,WAAA,EAAW,eAAe,CAAC,OAAA;EAC/B,MAAA;AAAA;;;UC5Be,OAAA;EZUH;;;EYNZ,QAAA,EAAU,UAAA;EZMmD;;;EYF7D,SAAA;EZCuB;;;EYGvB,KAAA,GAAQ,MAAM;AAAA;AAAA,cAGV,WAAA,EAAW,eAAe,CAAC,OAAA"}
1
+ {"version":3,"file":"index2.d.ts","names":[],"sources":["../../src/types.ts","../../src/Element/types.ts","../../src/Element/component.tsx","../../src/helpers/Iterator/types.ts","../../src/helpers/Iterator/component.tsx","../../src/List/component.tsx","../../src/Overlay/context.tsx","../../src/Overlay/positioning.ts","../../src/Overlay/useOverlay.tsx","../../src/Overlay/component.tsx","../../src/Portal/component.tsx","../../src/Text/component.tsx","../../src/Util/component.tsx"],"mappings":";;;;;KAoBK,mBAAA,oBACS,CAAA,IAAK,CAAA,CAAE,CAAA,qCAAsC,CAAA,GAAI,CAAA,CAAE,CAAA;AAAA,KAG5D,EAAA,MAAQ,CAAA,iCAAkC,CAAA,GAAI,CAAA,CAAE,CAAA;AAAA,KAEhD,SAAA,SAAkB,EAAA,CAAG,IAAA,CAAK,CAAA,EAAG,OAAA,OAAc,CAAA,QAAS,CA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,MAAM;AAAA;AAAA,cAGV,WAAA,EAAW,eAAe,CAAC,OAAA"}
package/lib/index.js CHANGED
@@ -11,6 +11,47 @@ const PKG_NAME = "@pyreon/elements";
11
11
  //#region src/utils.ts
12
12
  const IS_DEVELOPMENT = process.env.NODE_ENV !== "production";
13
13
 
14
+ //#endregion
15
+ //#region src/helpers/buildSpreadProps.ts
16
+ /**
17
+ * Build a props object by copying descriptors from `rest` and layering
18
+ * static `overrides`. Used by Element / Text / Content (and Wrapper) to
19
+ * bypass JSX object-spread for `<Styled {...rest} foo={x}>`, which the
20
+ * automatic JSX runtime lowers to `jsx(Styled, { ...rest, foo: x })` —
21
+ * a JS-level object literal that fires every getter on `rest` and stores
22
+ * resolved values BEFORE the receiving component sees the object.
23
+ *
24
+ * Compiler-emitted reactive props (`_rp(() => signal())` converted to
25
+ * getters by `makeReactiveProps`) carry their reactivity in a property
26
+ * GETTER. The JSX spread collapses that getter to a static value at the
27
+ * source-component layer, so any downstream consumer reads a frozen
28
+ * snapshot, not a live subscription.
29
+ *
30
+ * `buildSpreadProps` uses `Object.defineProperty` to copy own
31
+ * descriptors verbatim — getters stay getters. Then `h(Comp, result)`
32
+ * stores the descriptor-preserving object on the vnode as-is (no copy),
33
+ * and downstream `splitProps` / `makeReactiveProps` see the live
34
+ * getters. End-to-end reactivity is preserved.
35
+ *
36
+ * Mirrors `helpers/Wrapper/component.tsx:buildStyledProps`. Extracted
37
+ * into its own module so Element / Text / Content can share the same
38
+ * descriptor-safe shape without duplicating the loop.
39
+ *
40
+ * @param rest Source props object. Own descriptors are copied
41
+ * onto the result via `Object.defineProperty`.
42
+ * @param overrides Static fields layered on top of `rest`. Plain
43
+ * assignment is correct here because overrides are
44
+ * framework-controlled values, never user-supplied
45
+ * reactive props.
46
+ */
47
+ const buildSpreadProps = (rest, overrides) => {
48
+ const result = {};
49
+ const descriptors = Object.getOwnPropertyDescriptors(rest);
50
+ for (const key in descriptors) Object.defineProperty(result, key, descriptors[key]);
51
+ for (const key in overrides) result[key] = overrides[key];
52
+ return result;
53
+ };
54
+
14
55
  //#endregion
15
56
  //#region src/helpers/internElementBundle.ts
16
57
  /**
@@ -245,14 +286,13 @@ const Component$9 = (props) => {
245
286
  gap: own.gap,
246
287
  extraStyles: own.extendCss
247
288
  });
248
- return /* @__PURE__ */ jsx(StyledComponent, {
289
+ return h(StyledComponent, buildSpreadProps(rest, {
249
290
  as: own.tag,
250
291
  $contentType: own.contentType,
251
292
  $element: stylingProps,
252
293
  ...debugProps,
253
- ...rest,
254
294
  children: () => resolveSlot(own.children)
255
- });
295
+ }));
256
296
  };
257
297
 
258
298
  //#endregion
@@ -641,13 +681,9 @@ const Component = (props) => {
641
681
  alignY: wrapperAlignY,
642
682
  as: void 0
643
683
  };
644
- if (shouldBeEmpty) return /* @__PURE__ */ jsx(Wrapper_default, {
645
- ...rest,
646
- ...WRAPPER_PROPS
647
- });
684
+ if (shouldBeEmpty) return h(Wrapper_default, buildSpreadProps(rest, WRAPPER_PROPS));
648
685
  const needsFix = !rest.dangerouslySetInnerHTML && isWebFixNeeded(own.tag);
649
- if (isSimpleElement && !needsFix) return /* @__PURE__ */ jsx(styled_default$1, {
650
- ...rest,
686
+ if (isSimpleElement && !needsFix) return h(styled_default$1, buildSpreadProps(rest, {
651
687
  ...WRAPPER_DEV_PROPS,
652
688
  ref: mergedRef,
653
689
  as: own.tag,
@@ -660,55 +696,53 @@ const Component = (props) => {
660
696
  extraStyles: own.css
661
697
  }),
662
698
  children: () => resolveSlot(getChildren())
663
- });
664
- if (isSimpleElement) return /* @__PURE__ */ jsx(Wrapper_default, {
665
- ...rest,
699
+ }));
700
+ if (isSimpleElement) return h(Wrapper_default, buildSpreadProps(rest, {
666
701
  ...WRAPPER_PROPS,
667
702
  isInline,
668
703
  children: () => resolveSlot(getChildren())
669
- });
670
- return /* @__PURE__ */ jsxs(Wrapper_default, {
671
- ...rest,
704
+ }));
705
+ const compoundChildren = [];
706
+ if (own.beforeContent) compoundChildren.push(/* @__PURE__ */ jsx(Content_default, {
707
+ tag: SUB_TAG,
708
+ contentType: "before",
709
+ parentDirection: wrapperDirection,
710
+ extendCss: own.beforeContentCss,
711
+ direction: beforeContentDirection,
712
+ alignX: beforeContentAlignX,
713
+ alignY: beforeContentAlignY,
714
+ equalCols: own.equalCols,
715
+ gap: own.gap,
716
+ children: () => resolveSlot(own.beforeContent)
717
+ }));
718
+ compoundChildren.push(/* @__PURE__ */ jsx(Content_default, {
719
+ tag: SUB_TAG,
720
+ contentType: "content",
721
+ parentDirection: wrapperDirection,
722
+ extendCss: own.contentCss,
723
+ direction: contentDirection,
724
+ alignX: contentAlignX,
725
+ alignY: contentAlignY,
726
+ equalCols: own.equalCols,
727
+ children: () => resolveSlot(getChildren())
728
+ }));
729
+ if (own.afterContent) compoundChildren.push(/* @__PURE__ */ jsx(Content_default, {
730
+ tag: SUB_TAG,
731
+ contentType: "after",
732
+ parentDirection: wrapperDirection,
733
+ extendCss: own.afterContentCss,
734
+ direction: afterContentDirection,
735
+ alignX: afterContentAlignX,
736
+ alignY: afterContentAlignY,
737
+ equalCols: own.equalCols,
738
+ gap: own.gap,
739
+ children: () => resolveSlot(own.afterContent)
740
+ }));
741
+ return h(Wrapper_default, buildSpreadProps(rest, {
672
742
  ...WRAPPER_PROPS,
673
743
  isInline,
674
- children: [
675
- own.beforeContent && /* @__PURE__ */ jsx(Content_default, {
676
- tag: SUB_TAG,
677
- contentType: "before",
678
- parentDirection: wrapperDirection,
679
- extendCss: own.beforeContentCss,
680
- direction: beforeContentDirection,
681
- alignX: beforeContentAlignX,
682
- alignY: beforeContentAlignY,
683
- equalCols: own.equalCols,
684
- gap: own.gap,
685
- children: () => resolveSlot(own.beforeContent)
686
- }),
687
- /* @__PURE__ */ jsx(Content_default, {
688
- tag: SUB_TAG,
689
- contentType: "content",
690
- parentDirection: wrapperDirection,
691
- extendCss: own.contentCss,
692
- direction: contentDirection,
693
- alignX: contentAlignX,
694
- alignY: contentAlignY,
695
- equalCols: own.equalCols,
696
- children: () => resolveSlot(getChildren())
697
- }),
698
- own.afterContent && /* @__PURE__ */ jsx(Content_default, {
699
- tag: SUB_TAG,
700
- contentType: "after",
701
- parentDirection: wrapperDirection,
702
- extendCss: own.afterContentCss,
703
- direction: afterContentDirection,
704
- alignX: afterContentAlignX,
705
- alignY: afterContentAlignY,
706
- equalCols: own.equalCols,
707
- gap: own.gap,
708
- children: () => resolveSlot(own.afterContent)
709
- })
710
- ]
711
- });
744
+ children: compoundChildren
745
+ }));
712
746
  };
713
747
  const name$5 = `${PKG_NAME}/Element`;
714
748
  Component.displayName = name$5;
@@ -1430,13 +1464,12 @@ const Component$5 = (props) => {
1430
1464
  "ref"
1431
1465
  ]);
1432
1466
  const finalTag = own.paragraph ? "p" : own.tag;
1433
- return /* @__PURE__ */ jsx(styled_default, {
1467
+ return h(styled_default, buildSpreadProps(rest, {
1434
1468
  ref: own.ref,
1435
1469
  as: finalTag,
1436
1470
  $text: { extraStyles: own.css },
1437
- ...rest,
1438
1471
  children: own.children ?? own.label
1439
- });
1472
+ }));
1440
1473
  };
1441
1474
  const name$1 = `${PKG_NAME}/Text`;
1442
1475
  Component$5.displayName = name$1;
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["styles","component","Component","Styled","component","styles","Component","Styled","component","Wrapper","WrapperStyled","Content","name","Component","component","Iterator","Component","Element","name","Component","Component","name","Component","CorePortal","name","Component","Styled","name","Component"],"sources":["../src/constants.ts","../src/utils.ts","../src/helpers/internElementBundle.ts","../src/helpers/isPyreonComponent.ts","../src/helpers/Content/styled.ts","../src/helpers/Content/component.tsx","../src/helpers/Content/index.ts","../src/Element/constants.ts","../src/Element/utils.ts","../src/helpers/Wrapper/styled.ts","../src/helpers/Wrapper/constants.ts","../src/helpers/Wrapper/utils.ts","../src/helpers/Wrapper/component.tsx","../src/helpers/Wrapper/index.ts","../src/Element/component.tsx","../src/helpers/Iterator/component.tsx","../src/helpers/Iterator/index.ts","../src/List/component.tsx","../src/Overlay/context.tsx","../src/Overlay/positioning.ts","../src/Overlay/useOverlay.tsx","../src/Overlay/component.tsx","../src/Portal/component.tsx","../src/Text/styled.ts","../src/Text/component.tsx","../src/Util/component.tsx","../src/index.ts"],"sourcesContent":["export const PKG_NAME = '@pyreon/elements' as const\n","// `import.meta.env.DEV` is provided by Vite/Rolldown at build time and\n// literal-replaced so prod bundles tree-shake the dev branch to zero bytes.\n// Typed through a narrowing interface so downstream packages don't need\n// `vite/client` in their tsconfigs to type-check this file transitively.\nexport const IS_DEVELOPMENT: boolean = process.env.NODE_ENV !== 'production'\n","/**\n * Module-scope intern cache for `$element` bundles passed to Wrapper's styled\n * component. Same primitive prop tuple → same object identity, so the styler's\n * `elClassCache` (added 2026-Q2 alongside this) hits and skips the resolve\n * pipeline. Analogous to `@pyreon/rocketstyle`'s dimension-prop memo\n * but at the layer below — covers non-rocketstyle Element / Wrapper / Text usage\n * AND the residual styled wrappers under any rocketstyle component.\n *\n * Cache key is a JSON-stringified shallow snapshot of the bundle. LRU-bound at\n * 256 entries; oldest-first eviction. Bail (return the input as-is, no cache)\n * when any value is a function (signal accessor) or a non-string object (CSS\n * callback / CSSResult / nested object) — those cannot be safely round-tripped\n * through JSON without losing identity guarantees.\n */\nconst _bundleCache = new Map<string, Record<string, unknown>>()\nconst BUNDLE_CAP = 256\n\nexport const internElementBundle = <T extends Record<string, unknown>>(bundle: T): T => {\n for (const k in bundle) {\n const v = bundle[k]\n if (typeof v === 'function') return bundle\n if (v != null && typeof v === 'object') return bundle\n }\n const key = JSON.stringify(bundle)\n const existing = _bundleCache.get(key)\n if (existing) {\n _bundleCache.delete(key)\n _bundleCache.set(key, existing)\n return existing as T\n }\n if (_bundleCache.size >= BUNDLE_CAP) {\n const oldest = _bundleCache.keys().next().value\n if (oldest !== undefined) _bundleCache.delete(oldest)\n }\n _bundleCache.set(key, bundle)\n return bundle\n}\n","/**\n * Detect whether a function value is a component (framework-marked OR\n * user-authored bare function), as opposed to a plain reactive-accessor\n * function.\n *\n * Used by `Element` / `Content` `resolveSlot` to discriminate between\n * `beforeContent={Header}` — component-reference shorthand, MUST mount\n * as `h(Component, null)` so the framework's runWithHooks setup\n * window is established (and any framework HOC's\n * `removeUndefinedProps(props)` / `splitProps(props)` get the\n * default-filled props object, not bare `undefined`).\n * `beforeContent={() => <Header />}` — anonymous reactive accessor,\n * called bare so its body's signal reads land inside the enclosing\n * `mountReactive` effect.\n *\n * Both shapes are `typeof === 'function'`. The discriminator combines two\n * checks (most-specific-first):\n *\n * **Tier 1 — framework markers** (load-bearing for HOC pipelines):\n * - `IS_ROCKETSTYLE` — set by `@pyreon/rocketstyle`\n * (`rocketstyle.ts:527`, `542`) on every `rocketstyle(...).config(...)`\n * chain end-point.\n * - `PYREON__COMPONENT` — set by every `@pyreon/elements` component\n * factory (Element, Text, List, Portal, Overlay, Util, Content,\n * Wrapper, …).\n * - `pkgName` — same components also carry this; checked as a fallback\n * in case a third-party package mirrors the elements convention.\n *\n * **Tier 2 — naming convention** (catches user-authored bare components\n * without markers):\n * - `displayName` is set → component. Authors set displayName\n * deliberately for devtools / debug output; it's an explicit\n * declaration of component intent.\n * - `.name` starts with an uppercase letter → component. JSX already\n * requires PascalCase for components (`<MyComp/>` is treated as a\n * component; `<mycomp/>` is treated as a host tag); the discriminator\n * mirrors that convention for slot-shorthand usage. Anonymous\n * arrows (`name: \"\"`), default-export functions (`name: \"default\"`),\n * and camelCase helpers fall through to the accessor path.\n *\n * Why Tier 2 matters — the bug class it closes: a bare-function component\n * that internally uses lifecycle hooks (`useWindowResize`, `onMount`,\n * `provide`, etc.) needs a `runWithHooks` setup window so the hook calls\n * find `_current` non-null. Without Tier 2, `resolveSlot` would call the\n * function bare → `_current === null` → `[Pyreon] onMount() called outside\n * component setup` warning fires in dev-mode SSR. Routing the same\n * function through `h(value, null)` mounts it as a proper component via\n * the standard `runWithHooks`-based path; the hooks register correctly\n * AND the warning never fires.\n *\n * Why the convention split is safe: a PascalCase function paired with\n * the `beforeContent={Fn}` shorthand is canonically a component reference\n * (matches every framework example in the docs). An anonymous arrow\n * `() => signal() ? <A/> : <B/>` is canonically a reactive accessor\n * (intent: re-evaluate on signal change). The naming convention is the\n * same one JSX itself uses to differentiate component vs host element.\n *\n * Before this check, `resolveSlot` called any function-valued slot\n * bare, crashing real consumers that used the\n * `beforeContent={Component}` shorthand documented since the original\n * Element API. The marker check (Tier 1) rescues framework-factory\n * components; this Tier-2 convention check closes the residual gap\n * for user-authored hook-using bare components.\n */\nexport function isPyreonComponent(value: unknown): boolean {\n if (typeof value !== 'function') return false\n // ── Tier 1 — framework markers ──────────────────────────────────────\n // `Object.hasOwn` (not `in`) so a marker on a parent prototype doesn't\n // count — the marker is always an own-property in the factories.\n if (\n Object.hasOwn(value, 'IS_ROCKETSTYLE') ||\n Object.hasOwn(value, 'PYREON__COMPONENT') ||\n Object.hasOwn(value, 'pkgName')\n ) {\n return true\n }\n // ── Tier 2 — naming convention ──────────────────────────────────────\n const fn = value as { displayName?: unknown; name?: unknown }\n // displayName: explicit author intent. Any non-empty string counts.\n if (typeof fn.displayName === 'string' && fn.displayName.length > 0) {\n return true\n }\n // .name: inferred function name (`const Header = () => …` → \"Header\";\n // `function Header()` → \"Header\"; anonymous arrow → \"\"). PascalCase\n // first letter matches JSX's own component-vs-host discriminator.\n const name = fn.name\n if (typeof name === 'string' && name.length > 0) {\n const first = name.charCodeAt(0)\n // Uppercase A-Z range (65-90). Avoids unicode-letter false-positives\n // and skips `name === \"default\"` from `export default () => …`.\n if (first >= 65 && first <= 90) return true\n }\n return false\n}\n","/**\n * Styled component for content areas (before/content/after). Applies\n * responsive flex alignment, gap spacing between slots based on parent\n * direction (margin-right for inline, margin-bottom for rows), and\n * equalCols flex distribution. The \"content\" slot gets `flex: 1` to\n * fill remaining space between before and after.\n */\nimport { config } from '@pyreon/ui-core'\nimport { alignContent, extendCss, makeItResponsive, value } from '@pyreon/unistyle'\nimport type { ResponsiveStylesCallback } from '../../types'\nimport type { StyledProps, ThemeProps } from './types'\n\nconst { styled, css, component } = config\n\nconst equalColsCSS = `\n flex: 1;\n`\n\nconst typeContentCSS = `\n flex: 1;\n`\n\n// --------------------------------------------------------\n// calculate spacing between before / content / after\n// --------------------------------------------------------\nconst gapDimensions = {\n inline: {\n before: 'margin-right',\n after: 'margin-left',\n },\n reverseInline: {\n before: 'margin-right',\n after: 'margin-left',\n },\n rows: {\n before: 'margin-bottom',\n after: 'margin-top',\n },\n reverseRows: {\n before: 'margin-bottom',\n after: 'margin-top',\n },\n} as const\n\nconst calculateGap = ({\n direction,\n type,\n value: gapValue,\n}: {\n // Optional to match the responsive engine's per-breakpoint resolution —\n // the body's first line falsy-guards both. ThemeProps fields are\n // optional after the typed-themes change, so undefined flows in.\n direction?: keyof typeof gapDimensions | undefined\n type?: ThemeProps['contentType']\n value: string | number | null | undefined\n}) => {\n if (!direction || !type || type === 'content') return undefined\n\n const finalStyles = `${gapDimensions[direction][type]}: ${gapValue};`\n\n return finalStyles\n}\n\n// --------------------------------------------------------\n// calculations of styles to be rendered\n// --------------------------------------------------------\nconst styles: ResponsiveStylesCallback<ThemeProps> = ({ css: cssFn, theme: t, rootSize }) => cssFn`\n ${alignContent({\n direction: t.direction,\n alignX: t.alignX,\n alignY: t.alignY,\n })};\n\n ${t.equalCols && equalColsCSS};\n\n ${\n t.gap &&\n t.contentType &&\n calculateGap({\n direction: t.parentDirection,\n type: t.contentType,\n value: value(t.gap, rootSize),\n })\n };\n\n ${t.extraStyles && extendCss(t.extraStyles as Parameters<typeof extendCss>[0])};\n`\n\nconst platformCSS = `box-sizing: border-box;`\n\nconst StyledComponent = styled(component, { layer: 'elements' })`\n ${platformCSS};\n\n display: flex;\n align-self: stretch;\n flex-wrap: wrap;\n\n ${(({ $contentType }: StyledProps) => $contentType === 'content' && typeContentCSS) as any};\n\n ${makeItResponsive({\n key: '$element',\n styles,\n css,\n normalize: true,\n })};\n`\n\nexport default StyledComponent\n","/**\n * Content area used inside Element to render one of the three\n * layout slots (before, content, after). Passes alignment, direction,\n * gap, and equalCols styling props to the underlying styled component.\n * Adds a `data-pyr-element` attribute in development for debugging.\n *\n * Children are rendered via core `render()`, with function-valued\n * children unwrapped inside a reactive accessor so the compound-layout\n * paths in `Element` keep `content={() => <X />}` reactivity intact\n * (mirrors the `resolveSlot` helper in `Element/component.tsx`).\n */\nimport { h, splitProps } from '@pyreon/core'\nimport type { ComponentFn, VNodeChildAtom } from '@pyreon/core'\nimport { render } from '@pyreon/ui-core'\nimport { IS_DEVELOPMENT } from '../../utils'\nimport { internElementBundle } from '../internElementBundle'\nimport { isPyreonComponent } from '../isPyreonComponent'\nimport Styled from './styled'\nimport type { Props } from './types'\n\n// Return type is the RESOLVED atom — see the matching helper in\n// Element/component.tsx for the rationale (keeps `() => resolveSlot(...)`\n// a valid VNodeChildAccessor at the JSX child position).\n//\n// Component vs accessor discriminator — see `isPyreonComponent` JSDoc.\n// Without this, `beforeContent={Component}` shorthand crashes downstream\n// in rocketstyle's `removeUndefinedProps(undefined)`.\nconst resolveSlot = (value: unknown): VNodeChildAtom | VNodeChildAtom[] => {\n if (typeof value === 'function') {\n if (isPyreonComponent(value)) {\n return h(value as ComponentFn, null) as VNodeChildAtom\n }\n return (value as () => VNodeChildAtom | VNodeChildAtom[])()\n }\n return render(value as Parameters<typeof render>[0]) as VNodeChildAtom | VNodeChildAtom[]\n}\n\nconst Component = (props: Partial<Props>) => {\n const [own, rest] = splitProps(props, [\n 'contentType',\n 'tag',\n 'parentDirection',\n 'direction',\n 'alignX',\n 'alignY',\n 'equalCols',\n 'gap',\n 'extendCss',\n 'children',\n ])\n\n const debugProps = IS_DEVELOPMENT\n ? {\n 'data-pyr-element': own.contentType,\n }\n : {}\n\n // Route the bundle through `internElementBundle` so identical primitive\n // tuples share one object identity and the styler's `elClassCache` HITS —\n // exactly what the Element fast path + Wrapper's 4 paths already do. Without\n // it, every Content slot (the compound before/after-content path) allocated\n // a fresh `$element` per mount → guaranteed `elClassCache` miss → full\n // `styler.resolve` per slot per mount. `internElementBundle` bails (returns\n // the input unchanged) when any value is a function/object — so the\n // `extraStyles` (CSSResult/callback) case keeps today's behavior exactly.\n const stylingProps = internElementBundle({\n contentType: own.contentType,\n parentDirection: own.parentDirection,\n direction: own.direction,\n alignX: own.alignX,\n alignY: own.alignY,\n equalCols: own.equalCols,\n gap: own.gap,\n extraStyles: own.extendCss,\n })\n\n return (\n <Styled as={own.tag} $contentType={own.contentType} $element={stylingProps} {...debugProps} {...rest}>\n {() => resolveSlot(own.children)}\n </Styled>\n )\n}\n\nexport default Component\n","import component from './component'\n\nexport default component\n","/** Props consumed by Element that should not be forwarded to the underlying DOM node. */\nexport const RESERVED_PROPS = [\n 'innerRef',\n 'tag',\n 'block',\n 'label',\n 'children',\n 'beforeContent',\n 'afterContent',\n\n 'equalCols',\n 'vertical',\n 'direction',\n 'alignX',\n 'alignY',\n\n 'css',\n 'contentCss',\n 'beforeContentCss',\n 'afterContentCss',\n\n 'contentDirection',\n 'contentAlignX',\n 'contentAlignY',\n\n 'beforeContentDirection',\n 'beforeContentAlignX',\n 'beforeContentAlignY',\n\n 'afterContentDirection',\n 'afterContentAlignX',\n 'afterContentAlignY',\n] as const\n\n/**\n * HTML tags that are inline-level by default. When Element renders one of\n * these tags, child Content wrappers use `span` instead of `div` to\n * preserve valid HTML nesting.\n */\nexport const INLINE_ELEMENTS = {\n span: true,\n a: true,\n button: true,\n input: true,\n label: true,\n select: true,\n textarea: true,\n br: true,\n img: true,\n strong: true,\n small: true,\n code: true,\n b: true,\n big: true,\n i: true,\n tt: true,\n abbr: true,\n acronym: true,\n cite: true,\n dfn: true,\n em: true,\n kbd: true,\n samp: true,\n var: true,\n bdo: true,\n map: true,\n object: true,\n q: true,\n script: true,\n sub: true,\n sup: true,\n}\n\n/**\n * HTML void/self-closing elements that cannot have children. When Element\n * detects one of these tags, it skips rendering beforeContent/content/afterContent\n * and returns the Wrapper alone.\n */\nexport const EMPTY_ELEMENTS = {\n area: true,\n base: true,\n br: true,\n col: true,\n embed: true,\n hr: true,\n img: true,\n input: true,\n keygen: true,\n link: true,\n textarea: true,\n // 'meta': true,\n // 'param': true,\n source: true,\n track: true,\n wbr: true,\n}\n","import { EMPTY_ELEMENTS, INLINE_ELEMENTS } from './constants'\n\ntype GetValue = (tag?: string) => boolean\n\n/** Checks whether the given HTML tag is an inline-level element, used to determine sub-tag nesting. */\nexport const isInlineElement: GetValue = (tag) => {\n if (tag && tag in INLINE_ELEMENTS) return true\n return false\n}\n\n/** Checks whether the given HTML tag is a void element that cannot have children. */\nexport const getShouldBeEmpty: GetValue = (tag) => {\n if (tag && tag in EMPTY_ELEMENTS) return true\n return false\n}\n","/**\n * Styled component for the Element wrapper layer. Handles responsive\n * block/inline-flex display, direction, alignment, and custom CSS injection.\n * Includes special handling for the `parentFix` / `childFix` flags that\n * split flex behavior across two DOM nodes for button/fieldset/legend\n * elements where a single flex container is insufficient.\n */\nimport { config } from '@pyreon/ui-core'\nimport { alignContent, extendCss, makeItResponsive } from '@pyreon/unistyle'\nimport type { ResponsiveStylesCallback } from '../../types'\nimport type { StyledProps, ThemeProps } from './types'\n\nconst { styled, css, component } = config\n\nconst childFixCSS = `\n display: flex;\n flex: 1;\n width: 100%;\n height: 100%;\n`\n\nconst parentFixCSS = `\n flex-direction: column;\n`\n\nexport const styles: ResponsiveStylesCallback<ThemeProps> = ({ theme: t, css: cssFn }) => cssFn`\n ${alignContent({\n direction: t.direction,\n alignX: t.alignX,\n alignY: t.alignY,\n })};\n\n /*\n * Always emit a value for the block-related properties so a responsive\n * theme that flips from \\`block: true\\` at one breakpoint to \\`block: false\\`\n * at another resets cleanly. Previously \\`align-self\\` / \\`width\\` / \\`height\\`\n * were only set when the truthy branch matched, which left the prior\n * breakpoint's values cascading through.\n */\n ${`align-self: ${t.block ? 'stretch' : 'auto'};\n width: ${t.block ? '100%' : 'auto'};\n height: ${t.alignY === 'block' ? '100%' : 'auto'};`};\n\n ${!t.childFix && `display: ${t.block ? 'flex' : 'inline-flex'};`};\n ${t.parentFix && parentFixCSS};\n\n ${t.extraStyles && extendCss(t.extraStyles as Parameters<typeof extendCss>[0])};\n`\n\nconst platformCSS = `box-sizing: border-box;`\n\nexport default styled(component, { layer: 'elements' })`\n position: relative;\n ${platformCSS};\n\n ${(({ $childFix }: StyledProps) => $childFix && childFixCSS) as any};\n\n ${makeItResponsive({\n key: '$element',\n styles,\n css,\n normalize: true,\n })};\n`\n","/**\n * HTML elements that need a two-layer DOM workaround because browsers do not\n * fully support flexbox layout on button, fieldset, and legend elements.\n * @see https://stackoverflow.com/questions/35464067/flexbox-not-working-on-button-or-fieldset-elements\n */\nexport const INLINE_ELEMENTS_FLEX_FIX = {\n button: true,\n fieldset: true,\n legend: true,\n}\n","import { INLINE_ELEMENTS_FLEX_FIX } from './constants'\n\ntype IsWebFixNeeded = (tag?: string) => boolean\nexport const isWebFixNeeded: IsWebFixNeeded = (tag) => {\n if (tag && tag in INLINE_ELEMENTS_FLEX_FIX) return true\n return false\n}\n","/**\n * Wrapper component that serves as the outermost styled container for Element.\n * On web, it detects button/fieldset/legend tags and applies a two-layer flex\n * fix (parent + child Styled) because these HTML elements do not natively\n * support `display: flex` consistently across browsers.\n */\nimport { h, splitProps } from '@pyreon/core'\nimport { getShouldBeEmpty } from '../../Element/utils'\nimport { IS_DEVELOPMENT } from '../../utils'\nimport { internElementBundle } from '../internElementBundle'\nimport Styled from './styled'\nimport type { Props } from './types'\nimport { isWebFixNeeded } from './utils'\n\nconst DEV_PROPS: Record<string, string> = IS_DEVELOPMENT ? { 'data-pyr-element': 'Element' } : {}\n\n/**\n * Build a props object for `h(Styled, ...)` by copying own property\n * DESCRIPTORS from `rest`, then layering the additional fields. Compiler-\n * emitted reactive props (`_rp(() => signal())` converted to getters by\n * `makeReactiveProps`) survive end-to-end with their getter intact.\n *\n * Why we bypass JSX spread here: the standard JSX automatic-runtime\n * compilation lowers `<Styled {...rest} foo={x}>` to roughly\n * `jsx(Styled, { ...rest, foo: x })`. That `{...rest, foo: x}` object\n * literal is evaluated at JS level — it fires every getter on `rest` and\n * stores the resolved value before `jsx()` ever sees the object. No\n * amount of in-runtime descriptor preservation can recover the getters\n * once they've been collapsed by the surface-level spread. The fix is\n * structural: don't use JSX spread for reactive-prop forwarding. Build\n * the props object with descriptor preservation and pass it to `h()`\n * directly — `h()` stores props as-is on the vnode, no copy, getters\n * survive into mount.\n */\nconst buildStyledProps = (\n rest: Record<string, unknown>,\n refValue: unknown,\n asTag: unknown,\n extras: Record<string, unknown>,\n): Record<string, unknown> => {\n const result: Record<string, unknown> = {}\n const descriptors = Object.getOwnPropertyDescriptors(rest)\n for (const key in descriptors) {\n Object.defineProperty(result, key, descriptors[key]!)\n }\n for (const key in DEV_PROPS) {\n result[key] = DEV_PROPS[key]\n }\n result.ref = refValue\n result.as = asTag\n for (const key in extras) {\n result[key] = extras[key]\n }\n return result\n}\n\n// Layout / ref keys consumed by Wrapper itself. Everything else is forwarded\n// onto the underlying DOM node. Listed as a tuple so `splitProps` narrows\n// `own` correctly while preserving reactive prop tracking on both halves.\nconst OWN_KEYS: Array<keyof Props | 'ref'> = [\n 'children',\n 'tag',\n 'block',\n 'extendCss',\n 'direction',\n 'alignX',\n 'alignY',\n 'equalCols',\n 'isInline',\n 'ref',\n 'dangerouslySetInnerHTML',\n]\n\nconst Component = (props: Partial<Props> & { ref?: unknown }) => {\n const [own, rest] = splitProps(props, OWN_KEYS)\n\n const needsFix = !own.dangerouslySetInnerHTML && isWebFixNeeded(own.tag)\n\n // Void HTML elements (hr, input, img, br, …) cannot have children. Even\n // a falsy `{own.children}` slot becomes `[undefined]` in the vnode and\n // trips runtime-dom's void-element warning. Element already skips passing\n // children to Wrapper for void tags; this guard makes sure the empty\n // slot is dropped here too instead of leaking into the JSX.\n const isVoidTag = !own.dangerouslySetInnerHTML && getShouldBeEmpty(own.tag)\n\n // dangerouslySetInnerHTML and children are mutually exclusive — both\n // become inner content (per `runtime-server/src/index.ts:228` and\n // `runtime-dom/src/props.ts:289`). Pre-fix the prop was in OWN_KEYS,\n // moved into `own` by splitProps, and never re-attached to the rendered\n // vnode — so `<Logo dangerouslySetInnerHTML={...} />` rendered an empty\n // <div></div>. Forward the prop to the styled vnode and drop the\n // children slot when innerHTML is set.\n const innerHTML = own.dangerouslySetInnerHTML\n\n if (!needsFix) {\n const bundle = internElementBundle({\n block: own.block,\n direction: own.direction,\n alignX: own.alignX,\n alignY: own.alignY,\n equalCols: own.equalCols,\n extraStyles: own.extendCss,\n })\n if (isVoidTag) {\n return h(\n Styled,\n buildStyledProps(rest as unknown as Record<string, unknown>, own.ref, own.tag, {\n $element: bundle,\n }),\n )\n }\n if (innerHTML) {\n return h(\n Styled,\n buildStyledProps(rest as unknown as Record<string, unknown>, own.ref, own.tag, {\n $element: bundle,\n dangerouslySetInnerHTML: innerHTML,\n }),\n )\n }\n return h(\n Styled,\n buildStyledProps(rest as unknown as Record<string, unknown>, own.ref, own.tag, {\n $element: bundle,\n children: own.children,\n }),\n )\n }\n\n const asTag = own.isInline ? 'span' : 'div'\n const parentBundle = internElementBundle({\n parentFix: true as const,\n block: own.block,\n extraStyles: own.extendCss,\n })\n const childBundle = internElementBundle({\n childFix: true as const,\n direction: own.direction,\n alignX: own.alignX,\n alignY: own.alignY,\n equalCols: own.equalCols,\n })\n\n // needsFix path: innerHTML belongs on the INNER styled node (where the\n // actual content lives), NOT on the outer flex-fix wrapper. The\n // `needsFix` computation already excludes the innerHTML case\n // (`!own.dangerouslySetInnerHTML && isWebFixNeeded(own.tag)`), so this\n // branch normally won't execute when innerHTML is set — but we keep\n // the defensive forwarding so the contract is robust against future\n // refactors of the needsFix gate.\n if (innerHTML) {\n return h(\n Styled,\n buildStyledProps(rest as unknown as Record<string, unknown>, own.ref, own.tag, {\n $element: parentBundle,\n children: h(Styled, {\n as: asTag,\n $childFix: true,\n $element: childBundle,\n dangerouslySetInnerHTML: innerHTML,\n }),\n }),\n )\n }\n\n return h(\n Styled,\n buildStyledProps(rest as unknown as Record<string, unknown>, own.ref, own.tag, {\n $element: parentBundle,\n children: h(Styled, {\n as: asTag,\n $childFix: true,\n $element: childBundle,\n children: own.children,\n }),\n }),\n )\n}\n\nexport default Component\n","import component from './component'\n\nexport default component\n","/**\n * Core building block of the elements package. Renders a three-section layout\n * (beforeContent / content / afterContent) inside a flex Wrapper. When only\n * content is present, the Wrapper inherits content-level alignment directly\n * to avoid an unnecessary nesting layer. Handles HTML-specific edge cases\n * like void elements (input, img) and inline elements (span, a) by\n * skipping children or switching sub-tags accordingly.\n */\n\nimport { h, onMount, splitProps } from '@pyreon/core'\nimport type { ComponentFn, VNodeChildAtom } from '@pyreon/core'\nimport { render } from '@pyreon/ui-core'\nimport { PKG_NAME } from '../constants'\nimport { Content, Wrapper } from '../helpers'\nimport { internElementBundle } from '../helpers/internElementBundle'\nimport { isPyreonComponent } from '../helpers/isPyreonComponent'\nimport WrapperStyled from '../helpers/Wrapper/styled'\nimport { isWebFixNeeded } from '../helpers/Wrapper/utils'\nimport { IS_DEVELOPMENT } from '../utils'\nimport type { PyreonElement } from './types'\nimport { getShouldBeEmpty, isInlineElement } from './utils'\n\nconst WRAPPER_DEV_PROPS: Record<string, string> = IS_DEVELOPMENT\n ? { 'data-pyr-element': 'Element' }\n : {}\n\nconst equalize = (el: HTMLElement, direction: unknown) => {\n const beforeEl = el.firstElementChild as HTMLElement | null\n const afterEl = el.lastElementChild as HTMLElement | null\n\n if (beforeEl && afterEl && beforeEl !== afterEl) {\n const type: 'height' | 'width' = direction === 'rows' ? 'height' : 'width'\n const prop = type === 'height' ? 'offsetHeight' : 'offsetWidth'\n const beforeSize = beforeEl[prop]\n const afterSize = afterEl[prop]\n\n if (Number.isInteger(beforeSize) && Number.isInteger(afterSize)) {\n const maxSize = `${Math.max(beforeSize, afterSize)}px`\n beforeEl.style[type] = maxSize\n afterEl.style[type] = maxSize\n }\n }\n}\n\nconst defaultDirection = 'inline'\nconst defaultContentDirection = 'rows'\nconst defaultAlignX = 'left'\nconst defaultAlignY = 'center'\n\nconst Component: PyreonElement = (props) => {\n const [own, rest] = splitProps(props, [\n 'innerRef',\n 'tag',\n 'label',\n 'content',\n 'children',\n 'beforeContent',\n 'afterContent',\n 'equalBeforeAfter',\n 'block',\n 'equalCols',\n 'gap',\n 'direction',\n 'alignX',\n 'alignY',\n 'css',\n 'contentCss',\n 'beforeContentCss',\n 'afterContentCss',\n 'contentDirection',\n 'contentAlignX',\n 'contentAlignY',\n 'beforeContentDirection',\n 'beforeContentAlignX',\n 'beforeContentAlignY',\n 'afterContentDirection',\n 'afterContentAlignX',\n 'afterContentAlignY',\n 'ref',\n ])\n\n const alignX = own.alignX ?? defaultAlignX\n const alignY = own.alignY ?? defaultAlignY\n const contentDirection = own.contentDirection ?? defaultContentDirection\n const contentAlignX = own.contentAlignX ?? defaultAlignX\n const contentAlignY = own.contentAlignY ?? defaultAlignY\n const beforeContentDirection = own.beforeContentDirection ?? defaultDirection\n const beforeContentAlignX = own.beforeContentAlignX ?? defaultAlignX\n const beforeContentAlignY = own.beforeContentAlignY ?? defaultAlignY\n const afterContentDirection = own.afterContentDirection ?? defaultDirection\n const afterContentAlignX = own.afterContentAlignX ?? defaultAlignX\n const afterContentAlignY = own.afterContentAlignY ?? defaultAlignY\n\n // --------------------------------------------------------\n // check if should render only single element\n // --------------------------------------------------------\n const shouldBeEmpty = !!rest.dangerouslySetInnerHTML || getShouldBeEmpty(own.tag)\n\n // --------------------------------------------------------\n // if not single element, calculate values\n // --------------------------------------------------------\n const isSimpleElement = !own.beforeContent && !own.afterContent\n // Getter — preserves reactivity of own.content (which may be _rp() wrapped).\n // Reading own.content via ?? at setup would capture the value once.\n const getChildren = () => own.children ?? own.content ?? own.label\n\n // Resolve a slot value INSIDE a reactive accessor. If the consumer passed a\n // function-returning-VNode (e.g. `content={() => <Icon name={signal()} />}`),\n // unwrap it by calling — its body's signal reads are then tracked by the\n // enclosing mountReactive effect, and the slot re-renders on signal change.\n // Static VNodes / strings / null pass through unchanged to `render()`.\n //\n // **Component vs accessor discriminator** —\n // `beforeContent={Header}` (component-reference shorthand) and\n // `content={() => <X />}` (reactive accessor) are BOTH `typeof === 'function'`.\n // Calling both bare crashes component shorthands the moment a\n // rocketstyle / attrs HOC runs `removeUndefinedProps(undefined)` on the\n // un-supplied props (`TypeError: Cannot convert undefined or null to object`).\n //\n // Discriminator: framework components carry one of two markers attached by\n // their factory:\n // - `IS_ROCKETSTYLE` — anything `rocketstyle()` produces\n // - `PYREON__COMPONENT` / `pkgName` — `@pyreon/elements` components\n // (Element, Text, List, Portal, Overlay, Util)\n // Marked function → mount as `h(Component, null)` (no props, defaults\n // fill in via the HOC pipeline). Unmarked function → reactive accessor,\n // called bare so its return value (a VNode) renders. Bare-function\n // components without HOC wrapping (e.g. `const MyComp = () => <div />`)\n // also work via the accessor path — they're called with no args and\n // their VNode return goes through `render()` correctly. The marker\n // check ONLY rescues components that REQUIRE props to be defined.\n //\n // Return type is the RESOLVED atom (VNodeChildAtom | VNodeChildAtom[]) —\n // never a nested accessor — so the enclosing `() => resolveSlot(...)` IS\n // a valid VNodeChildAccessor in the JSX child position.\n const resolveSlot = (value: unknown): VNodeChildAtom | VNodeChildAtom[] => {\n if (typeof value === 'function') {\n if (isPyreonComponent(value)) {\n return h(value as ComponentFn, null) as VNodeChildAtom\n }\n return (value as () => VNodeChildAtom | VNodeChildAtom[])()\n }\n return render(value as Parameters<typeof render>[0]) as VNodeChildAtom | VNodeChildAtom[]\n }\n\n const isInline = isInlineElement(own.tag)\n const SUB_TAG = isInline ? 'span' : undefined\n\n // --------------------------------------------------------\n // direction & alignX & alignY calculations\n // --------------------------------------------------------\n let wrapperDirection: typeof own.direction = own.direction\n let wrapperAlignX: typeof alignX = alignX\n let wrapperAlignY: typeof alignY = alignY\n\n if (isSimpleElement) {\n if (contentDirection) wrapperDirection = contentDirection\n if (contentAlignX) wrapperAlignX = contentAlignX\n if (contentAlignY) wrapperAlignY = contentAlignY\n } else if (own.direction) {\n wrapperDirection = own.direction\n } else {\n wrapperDirection = defaultDirection\n }\n\n // --------------------------------------------------------\n // equalBeforeAfter: measure & equalize slot dimensions\n // --------------------------------------------------------\n let equalizeRef: HTMLElement | null = null\n const externalRef = own.ref ?? own.innerRef\n\n const mergedRef = (node: HTMLElement | null) => {\n equalizeRef = node\n if (typeof externalRef === 'function') (externalRef as (el: HTMLElement | null) => void)(node)\n else if (externalRef != null) {\n ;(externalRef as unknown as { current: HTMLElement | null }).current = node\n }\n }\n\n if (own.equalBeforeAfter && own.beforeContent && own.afterContent) {\n // Run once on mount AND continue equalizing as the element resizes —\n // catches async slot content (font swaps, lazy text, viewport resize)\n // that a one-shot measurement would miss. Mirrors vitus-labs's Element\n // useLayoutEffect + ResizeObserver pattern.\n onMount(() => {\n const node = equalizeRef\n if (!node) return undefined\n\n equalize(node, own.direction)\n\n if (typeof ResizeObserver === 'undefined') return undefined\n const observer = new ResizeObserver(() => equalize(node, own.direction))\n observer.observe(node)\n return () => observer.disconnect()\n })\n }\n\n // --------------------------------------------------------\n // common wrapper props\n // --------------------------------------------------------\n const WRAPPER_PROPS = {\n ref: mergedRef,\n extendCss: own.css,\n tag: own.tag,\n block: own.block,\n direction: wrapperDirection,\n alignX: wrapperAlignX,\n alignY: wrapperAlignY,\n as: undefined, // reset styled-components `as` prop\n }\n\n // --------------------------------------------------------\n // return simple/empty element like input or image etc.\n // --------------------------------------------------------\n if (shouldBeEmpty) {\n return <Wrapper {...rest} {...WRAPPER_PROPS} />\n }\n\n // Simple-Element fast path: no beforeContent / afterContent slots, and no\n // button/fieldset/legend two-layer flex fix needed. Inline the Wrapper\n // helper directly into a single Styled invocation — saves one component\n // hop, one splitProps call, and one mountChild per Element. The Wrapper\n // helper still exists for the rare needsFix case below; tests that asserted\n // Wrapper appears in the VNode tree are updated to the new shape.\n const dangerouslySetInnerHTML = (rest as { dangerouslySetInnerHTML?: unknown })\n .dangerouslySetInnerHTML\n const needsFix = !dangerouslySetInnerHTML && isWebFixNeeded(own.tag)\n\n if (isSimpleElement && !needsFix) {\n return (\n <WrapperStyled\n {...rest}\n {...WRAPPER_DEV_PROPS}\n ref={mergedRef}\n as={own.tag}\n $element={internElementBundle({\n block: own.block,\n direction: wrapperDirection,\n alignX: wrapperAlignX,\n alignY: wrapperAlignY,\n equalCols: own.equalCols,\n extraStyles: own.css,\n })}\n >\n {() => resolveSlot(getChildren())}\n </WrapperStyled>\n )\n }\n\n if (isSimpleElement) {\n return (\n <Wrapper {...rest} {...WRAPPER_PROPS} isInline={isInline}>\n {() => resolveSlot(getChildren())}\n </Wrapper>\n )\n }\n\n return (\n <Wrapper {...rest} {...WRAPPER_PROPS} isInline={isInline}>\n {own.beforeContent && (\n <Content\n tag={SUB_TAG}\n contentType=\"before\"\n parentDirection={wrapperDirection}\n extendCss={own.beforeContentCss}\n direction={beforeContentDirection}\n alignX={beforeContentAlignX}\n alignY={beforeContentAlignY}\n equalCols={own.equalCols}\n gap={own.gap}\n >\n {() => resolveSlot(own.beforeContent)}\n </Content>\n )}\n\n <Content\n tag={SUB_TAG}\n contentType=\"content\"\n parentDirection={wrapperDirection}\n extendCss={own.contentCss}\n direction={contentDirection}\n alignX={contentAlignX}\n alignY={contentAlignY}\n equalCols={own.equalCols}\n >\n {() => resolveSlot(getChildren())}\n </Content>\n\n {own.afterContent && (\n <Content\n tag={SUB_TAG}\n contentType=\"after\"\n parentDirection={wrapperDirection}\n extendCss={own.afterContentCss}\n direction={afterContentDirection}\n alignX={afterContentAlignX}\n alignY={afterContentAlignY}\n equalCols={own.equalCols}\n gap={own.gap}\n >\n {() => resolveSlot(own.afterContent)}\n </Content>\n )}\n </Wrapper>\n )\n}\n\nconst name = `${PKG_NAME}/Element` as const\n\nComponent.displayName = name\nComponent.pkgName = PKG_NAME\nComponent.PYREON__COMPONENT = name\n\nexport default Component\n","/**\n * Data-driven list renderer that supports three input modes: children,\n * an array of primitives, or an array of objects.\n * Each item receives positional metadata (first, last, odd, even, position)\n * and optional injected props via `itemProps`. Items can be individually\n * wrapped with `wrapComponent`. Children always take priority over the\n * component+data prop pattern.\n */\n\nimport type { VNode, VNodeChild } from '@pyreon/core'\nimport { Fragment } from '@pyreon/core'\nimport { isEmpty, render } from '@pyreon/ui-core'\nimport type {\n ChildrenProps,\n ExtendedProps,\n LooseProps,\n ObjectProps,\n ObjectValue,\n SimpleProps,\n SimpleValue,\n} from './types'\n\ntype ClassifiedData =\n | { type: 'simple'; data: SimpleValue[] }\n | { type: 'complex'; data: ObjectValue[] }\n | null\n\nconst classifyData = (data: unknown[]): ClassifiedData => {\n const items = data.filter(\n (item) =>\n item != null && !(typeof item === 'object' && isEmpty(item as Record<string, unknown>)),\n )\n\n if (items.length === 0) return null\n\n let isSimple = true\n let isComplex = true\n\n for (const item of items) {\n if (typeof item === 'string' || typeof item === 'number') {\n isComplex = false\n } else if (typeof item === 'object') {\n isSimple = false\n } else {\n isSimple = false\n isComplex = false\n }\n }\n\n if (isSimple) return { type: 'simple', data: items as SimpleValue[] }\n if (isComplex) return { type: 'complex', data: items as ObjectValue[] }\n return null\n}\n\nconst RESERVED_PROPS = [\n 'children',\n 'component',\n 'wrapComponent',\n 'data',\n 'itemKey',\n 'valueName',\n 'itemProps',\n 'wrapProps',\n] as const\n\ntype AttachItemProps = ({ i, length }: { i: number; length: number }) => ExtendedProps\n\nconst attachItemProps: AttachItemProps = ({ i, length }: { i: number; length: number }) => {\n const position = i + 1\n\n return {\n index: i,\n first: position === 1,\n last: position === length,\n odd: position % 2 === 1,\n even: position % 2 === 0,\n position,\n }\n}\n\nconst Component = (props: LooseProps) => {\n const {\n itemKey,\n valueName,\n children: rawChildren,\n component,\n data,\n wrapComponent: Wrapper,\n wrapProps,\n itemProps,\n } = props\n\n // Unwrap the Pyreon compiler's `() => x` accessor wrap. When the parent\n // emits `<Iterator>{items}</Iterator>` and the compiler-emitted form is\n // `Iterator({ children: () => items })`, the downstream `Array.isArray`\n // check returns false, the Fragment check returns false (function is not\n // an object), and the fallthrough `renderChild(function)` calls\n // `render(function, props)` which interprets the function as a component\n // function — wrong shape, lost per-item metadata. Resolving eagerly here\n // keeps every downstream branch correct. Mirrors the kinetic\n // Stagger / TransitionItem fix.\n const children = typeof rawChildren === 'function'\n ? (rawChildren as () => VNodeChild)()\n : rawChildren\n\n const injectItemProps = typeof itemProps === 'function' ? itemProps : () => itemProps\n\n const injectWrapItemProps = typeof wrapProps === 'function' ? wrapProps : () => wrapProps\n\n const getKey = (item: string | number, index: number) => {\n if (typeof itemKey === 'function') return itemKey(item, index)\n return index\n }\n\n const renderChild = (child: VNodeChild, total = 1, i = 0) => {\n if (!itemProps && !Wrapper) return child\n\n const extendedProps = attachItemProps({\n i,\n length: total,\n })\n\n const finalItemProps = itemProps ? injectItemProps({}, extendedProps) : {}\n\n if (Wrapper) {\n const finalWrapProps = wrapProps ? injectWrapItemProps({}, extendedProps) : {}\n\n return (\n <Wrapper key={i} {...finalWrapProps}>\n {render(child, finalItemProps)}\n </Wrapper>\n )\n }\n\n return render(child, {\n key: i,\n ...finalItemProps,\n })\n }\n\n // --------------------------------------------------------\n // render children\n // --------------------------------------------------------\n const renderChildren = () => {\n if (!children) return null\n\n // if children is Array\n if (Array.isArray(children)) {\n return children.map((item, i) => renderChild(item, children.length, i))\n }\n\n // if children is Fragment — check VNode type\n if (\n typeof children === 'object' &&\n 'type' in (children as VNode) &&\n (children as VNode).type === Fragment\n ) {\n const fragmentChildren = (children as VNode).children as VNodeChild[]\n const childrenLength = fragmentChildren.length\n\n return fragmentChildren.map((item, i) => renderChild(item, childrenLength, i))\n }\n\n // if single child\n return renderChild(children)\n }\n\n // --------------------------------------------------------\n // render array of strings or numbers\n // --------------------------------------------------------\n const renderSimpleArray = (simpleData: SimpleValue[]) => {\n const { length } = simpleData\n\n if (length === 0) return null\n\n return simpleData.map((item, i) => {\n const key = getKey(item, i)\n const keyName = valueName ?? 'children'\n const extendedProps = attachItemProps({\n i,\n length,\n })\n\n const finalItemProps = {\n ...(itemProps ? injectItemProps({ [keyName]: item }, extendedProps) : {}),\n [keyName]: item,\n }\n\n if (Wrapper) {\n const finalWrapProps = wrapProps\n ? injectWrapItemProps({ [keyName]: item }, extendedProps)\n : {}\n\n return (\n <Wrapper key={key} {...finalWrapProps}>\n {render(component, finalItemProps)}\n </Wrapper>\n )\n }\n\n return render(component, { key, ...finalItemProps })\n })\n }\n\n // --------------------------------------------------------\n // render array of objects\n // --------------------------------------------------------\n const getObjectKey = (item: ObjectValue, index: number) => {\n if (!itemKey) return item.key ?? item.id ?? item.itemId ?? index\n if (typeof itemKey === 'function') return itemKey(item, index)\n if (typeof itemKey === 'string') return item[itemKey]\n\n return index\n }\n\n const renderComplexArray = (complexData: ObjectValue[]) => {\n const { length } = complexData\n\n if (length === 0) return null\n\n return complexData.map((item, i) => {\n const { component: itemComponent, ...restItem } = item\n const renderItem = itemComponent ?? component\n const key = getObjectKey(restItem, i)\n const extendedProps = attachItemProps({\n i,\n length,\n })\n\n const finalItemProps = {\n ...(itemProps ? injectItemProps(item, extendedProps) : {}),\n ...restItem,\n }\n\n if (Wrapper && !itemComponent) {\n const finalWrapProps = wrapProps ? injectWrapItemProps(item, extendedProps) : {}\n\n return (\n <Wrapper key={key} {...finalWrapProps}>\n {render(renderItem, finalItemProps)}\n </Wrapper>\n )\n }\n\n return render(renderItem, { key, ...finalItemProps })\n })\n }\n\n // --------------------------------------------------------\n // render list items\n // --------------------------------------------------------\n const renderItems = (): VNodeChild => {\n // children have priority over props component + data\n if (children) return renderChildren() as VNodeChild\n\n // render props component + data\n if (component && Array.isArray(data)) {\n const classified = classifyData(data)\n if (!classified) return null\n if (classified.type === 'simple') return renderSimpleArray(classified.data) as VNodeChild\n return renderComplexArray(classified.data) as VNodeChild\n }\n\n return null\n }\n\n return renderItems()\n}\n\n// ---------------------------------------------------------------------------\n// Public callable type — overloads expose the generic `<T>` API at the JSX\n// boundary while the impl stays loose-typed. TS picks the matching overload\n// based on the props object passed:\n//\n// <Iterator data={['a','b']} valueName=\"text\" component={Item} />\n// ^ T inferred as string → SimpleProps<string> overload selected\n//\n// <Iterator data={users} component={UserCard} />\n// ^ T inferred as User → ObjectProps<User> overload selected\n//\n// <Iterator>{...}</Iterator> → ChildrenProps overload selected\n// ---------------------------------------------------------------------------\nexport interface IteratorComponent {\n // T is inferred from the `data` prop at the JSX site — no explicit\n // generic argument needed. Order matters: SimpleProps first (matches\n // `data: SimpleValue[]`), then ObjectProps (object[]), then ChildrenProps,\n // then a LooseProps fallback.\n //\n // The narrow overloads (Simple / Object / Children) drive per-mode T\n // inference and stricter compile-time errors for direct callers (e.g.\n // `valueName` required for primitive arrays, forbidden for object arrays).\n // The LooseProps fallback exists for forwarding patterns where the props\n // type is a wide union that doesn't bind to any single narrow overload —\n // notably `Partial<(typeof Wrapper)['$$types']>` spread back into the JSX\n // site after `@pyreon/rocketstyle`'s 4-overload-aware `ExtractProps`\n // distributes the union across all of Iterator's call signatures. Without\n // the loose binding home, the wide union has nowhere to land and TS\n // reports \"no overload matches this call\" at every forwarding site.\n //\n // Direct callers still see the strict per-mode errors — the loose fallback\n // only fires when none of the three narrow overloads match.\n <T extends SimpleValue>(props: SimpleProps<T>): VNodeChild\n <T extends ObjectValue>(props: ObjectProps<T>): VNodeChild\n (props: ChildrenProps): VNodeChild\n (props: LooseProps): VNodeChild\n isIterator: true\n RESERVED_PROPS: typeof RESERVED_PROPS\n displayName?: string\n}\n\nconst Iterator = Object.assign(Component, {\n isIterator: true as const,\n RESERVED_PROPS,\n}) as unknown as IteratorComponent\n\nexport default Iterator\n","import component from './component'\nimport type {\n ChildrenProps,\n ElementType,\n ExtendedProps,\n LooseProps,\n MaybeNull,\n ObjectProps,\n ObjectValue,\n Props,\n PropsCallback,\n SimpleProps,\n SimpleValue,\n} from './types'\n\nexport type {\n ChildrenProps,\n ElementType,\n ExtendedProps,\n LooseProps,\n MaybeNull,\n ObjectProps,\n ObjectValue,\n Props,\n PropsCallback,\n SimpleProps,\n SimpleValue,\n}\n\nexport default component\n","/**\n * List component that combines Iterator (data-driven rendering) with an\n * optional Element root wrapper. When `rootElement` is false (default),\n * it renders a bare Iterator as a fragment. When true, the Iterator output\n * is wrapped in an Element that receives all non-iterator props (e.g.,\n * layout, alignment, css), allowing the list to be styled as a single block.\n */\nimport type { VNodeChild } from '@pyreon/core'\nimport { splitProps } from '@pyreon/core'\nimport { omit, pick } from '@pyreon/ui-core'\nimport { PKG_NAME } from '../constants'\nimport type { ElementProps } from '../Element'\nimport { Element } from '../Element'\nimport type {\n ChildrenProps as IteratorChildrenProps,\n LooseProps as IteratorLooseProps,\n ObjectProps as IteratorObjectProps,\n Props as IteratorProps,\n SimpleProps as IteratorSimpleProps,\n ObjectValue,\n SimpleValue,\n} from '../helpers/Iterator'\nimport Iterator from '../helpers/Iterator'\nimport type { MergeTypes } from '../types'\n\ntype ListOnly = {\n /**\n * A boolean value. When set to `false`, component returns fragment.\n * When set to `true`, component returns as the **root** element `Element`\n * component.\n */\n rootElement?: boolean\n /**\n * Label prop from `Element` component is being ignored.\n */\n label?: never\n /**\n * Content prop from `Element` component is being ignored.\n */\n content?: never\n}\n\n/**\n * Props that List accepts on top of the Iterator branch — the Element prop\n * surface (so `tag`, `direction`, `alignX`, etc. forward when\n * `rootElement` is true) plus the List-only toggle.\n */\ntype ListExtras = Partial<Omit<ElementProps, 'children' | 'content' | 'label'>> & ListOnly\n\n/**\n * Public Props — generic over the data element type so callers get the same\n * inference Iterator does, plus the List-specific `rootElement` toggle and\n * Element prop forwarding.\n *\n * Props<string> → SimpleProps & ListExtras (valueName REQUIRED)\n * Props<{ id; name }> → ObjectProps & ListExtras (valueName FORBIDDEN)\n * Props<unknown> / Props → LooseProps & ListExtras (today's behavior)\n */\nexport type Props<T = unknown> = MergeTypes<[IteratorProps<T>, ListExtras]>\n\n// Internal spread — runtime is correct, but the picked subset can't satisfy\n// any specific Iterator overload statically (which is good — the public\n// overloads enforce constraints). Cast Iterator to a loose callable for\n// the internal forwarding only; public consumers still see the strict\n// overloaded interface.\nconst LooseIterator = Iterator as unknown as (props: IteratorLooseProps) => VNodeChild\n\nconst Component = (allProps: IteratorLooseProps & ListExtras) => {\n const [own, props] = splitProps(allProps as Record<string, unknown>, ['rootElement', 'ref'])\n const renderedList = <LooseIterator {...pick(props, Iterator.RESERVED_PROPS)} />\n\n if (!own.rootElement) return renderedList\n\n return (\n <Element ref={own.ref as ElementProps['ref']} {...omit(props, Iterator.RESERVED_PROPS)}>\n {renderedList}\n </Element>\n )\n}\n\nconst name = `${PKG_NAME}/List` as const\n\n;(Component as { displayName?: string }).displayName = name\n;(Component as { pkgName?: string }).pkgName = PKG_NAME\n;(Component as { PYREON__COMPONENT?: string }).PYREON__COMPONENT = name\n\n// ---------------------------------------------------------------------------\n// Public callable type — same overload pattern as Iterator so JSX-site\n// inference flows through without callers having to spell out `<T>`.\n// ---------------------------------------------------------------------------\nexport interface ListComponent {\n // T inferred from `data`. Order: SimpleProps, ObjectProps, ChildrenProps,\n // then a LooseProps fallback for forwarding patterns where derived\n // `$$types['data']` is a wide union that doesn't bind to any narrow\n // overload. See Iterator's IteratorComponent for the full rationale.\n <T extends SimpleValue>(props: IteratorSimpleProps<T> & ListExtras): VNodeChild\n <T extends ObjectValue>(props: IteratorObjectProps<T> & ListExtras): VNodeChild\n (props: IteratorChildrenProps & ListExtras): VNodeChild\n (props: IteratorLooseProps & ListExtras): VNodeChild\n displayName?: string\n pkgName?: string\n PYREON__COMPONENT?: string\n}\n\nexport default Component as unknown as ListComponent\n","/**\n * Context for nested overlay coordination. When a child overlay opens, it\n * sets the parent's blocked state to true, preventing the parent from\n * closing in response to click/hover events that belong to the child.\n */\n\nimport type { VNodeChild } from '@pyreon/core'\nimport { createContext, nativeCompat, provide, useContext } from '@pyreon/core'\n\nexport interface OverlayContext {\n blocked: boolean | (() => boolean)\n setBlocked: () => void\n setUnblocked: () => void\n}\n\nconst context = createContext<OverlayContext>({} as OverlayContext)\n\nexport const useOverlayContext = () => useContext(context)\n\nconst Component = (props: OverlayContext & { children: VNodeChild }) => {\n const ctx = {\n blocked: props.blocked,\n setBlocked: props.setBlocked,\n setUnblocked: props.setUnblocked,\n }\n\n provide(context, ctx)\n\n return <>{props.children}</>\n}\n\n// Mark as native — invoked by Overlay internally; needs Pyreon's setup\n// frame for provide(context, ...) to reach descendant overlays.\nnativeCompat(Component)\n\nexport default Component\n","/**\n * Pure positioning helpers for the Overlay component. Split out from\n * `useOverlay.tsx` so the SSR-fallback branches (`typeof window === 'undefined'`)\n * can be exercised directly by tests that stub `globalThis.window` — the\n * `useOverlay` hook itself runs these via event handlers registered inside\n * `onMount`, which are unreachable during module-level test imports in\n * happy-dom (where `window` is always defined).\n */\n\nexport type OverlayPosition = Partial<{\n top: number | string\n bottom: number | string\n left: number | string\n right: number | string\n}>\n\nexport type Align = 'bottom' | 'top' | 'left' | 'right'\nexport type AlignX = 'left' | 'center' | 'right'\nexport type AlignY = 'bottom' | 'top' | 'center'\n\nexport type PositionResult = {\n pos: OverlayPosition\n resolvedAlignX: AlignX\n resolvedAlignY: AlignY\n}\n\nconst sel = <T,>(cond: boolean, a: T, b: T): T => (cond ? a : b)\n\nexport const calcDropdownVertical = (\n c: DOMRect,\n t: DOMRect,\n align: 'top' | 'bottom',\n alignX: AlignX,\n offsetX: number,\n offsetY: number,\n): PositionResult => {\n // SSR-fallback: positioning only runs in the mounted browser context, but\n // the explicit guard documents the SSR-safety contract at the callsite\n // and lets `no-window-in-ssr` prove it locally. Return shape mirrors the\n // \"no element\" path below (empty `pos`, alignment preserved).\n if (typeof window === 'undefined') return { pos: {}, resolvedAlignX: alignX, resolvedAlignY: align }\n const pos: OverlayPosition = {}\n\n const topPos = t.top - offsetY - c.height\n const bottomPos = t.bottom + offsetY\n const leftPos = t.left + offsetX\n const rightPos = t.right - offsetX - c.width\n\n const fitsTop = topPos >= 0\n const fitsBottom = bottomPos + c.height <= window.innerHeight\n const fitsLeft = leftPos + c.width <= window.innerWidth\n const fitsRight = rightPos >= 0\n\n const useTop = sel(align === 'top', fitsTop, !fitsBottom)\n pos.top = sel(useTop, topPos, bottomPos)\n const resolvedAlignY: AlignY = sel(useTop, 'top', 'bottom')\n\n let resolvedAlignX: AlignX = alignX\n if (alignX === 'left') {\n pos.left = sel(fitsLeft, leftPos, rightPos)\n resolvedAlignX = sel(fitsLeft, 'left', 'right')\n } else if (alignX === 'right') {\n pos.left = sel(fitsRight, rightPos, leftPos)\n resolvedAlignX = sel(fitsRight, 'right', 'left')\n } else {\n const center = t.left + (t.right - t.left) / 2 - c.width / 2\n const fitsCL = center >= 0\n const fitsCR = center + c.width <= window.innerWidth\n\n if (fitsCL && fitsCR) {\n resolvedAlignX = 'center'\n pos.left = center\n } else if (fitsCL) {\n resolvedAlignX = 'left'\n pos.left = leftPos\n } else if (fitsCR) {\n resolvedAlignX = 'right'\n pos.left = rightPos\n }\n }\n\n return { pos, resolvedAlignX, resolvedAlignY }\n}\n\nexport const calcDropdownHorizontal = (\n c: DOMRect,\n t: DOMRect,\n align: 'left' | 'right',\n alignY: AlignY,\n offsetX: number,\n offsetY: number,\n): PositionResult => {\n if (typeof window === 'undefined') return { pos: {}, resolvedAlignX: align, resolvedAlignY: alignY }\n const pos: OverlayPosition = {}\n\n const leftPos = t.left - offsetX - c.width\n const rightPos = t.right + offsetX\n const topPos = t.top + offsetY\n const bottomPos = t.bottom - offsetY - c.height\n\n const fitsLeft = leftPos >= 0\n const fitsRight = rightPos + c.width <= window.innerWidth\n const fitsTop = topPos + c.height <= window.innerHeight\n const fitsBottom = bottomPos >= 0\n\n const useLeft = sel(align === 'left', fitsLeft, !fitsRight)\n pos.left = sel(useLeft, leftPos, rightPos)\n const resolvedAlignX: AlignX = sel(useLeft, 'left', 'right')\n\n let resolvedAlignY: AlignY = alignY\n if (alignY === 'top') {\n pos.top = sel(fitsTop, topPos, bottomPos)\n resolvedAlignY = sel(fitsTop, 'top', 'bottom')\n } else if (alignY === 'bottom') {\n pos.top = sel(fitsBottom, bottomPos, topPos)\n resolvedAlignY = sel(fitsBottom, 'bottom', 'top')\n } else {\n const center = t.top + (t.bottom - t.top) / 2 - c.height / 2\n const fitsCT = center >= 0\n const fitsCB = center + c.height <= window.innerHeight\n\n if (fitsCT && fitsCB) {\n resolvedAlignY = 'center'\n pos.top = center\n } else if (fitsCT) {\n resolvedAlignY = 'top'\n pos.top = topPos\n } else if (fitsCB) {\n resolvedAlignY = 'bottom'\n pos.top = bottomPos\n }\n }\n\n return { pos, resolvedAlignX, resolvedAlignY }\n}\n\nexport const calcModalPos = (\n c: DOMRect,\n alignX: AlignX,\n alignY: AlignY,\n offsetX: number,\n offsetY: number,\n): OverlayPosition => {\n if (typeof window === 'undefined') return {}\n const pos: OverlayPosition = {}\n\n switch (alignX) {\n case 'right':\n pos.right = offsetX\n break\n case 'left':\n pos.left = offsetX\n break\n case 'center':\n pos.left = window.innerWidth / 2 - c.width / 2\n break\n default:\n pos.right = offsetX\n }\n\n switch (alignY) {\n case 'top':\n pos.top = offsetY\n break\n case 'center':\n pos.top = window.innerHeight / 2 - c.height / 2\n break\n case 'bottom':\n pos.bottom = offsetY\n break\n default:\n pos.top = offsetY\n }\n\n return pos\n}\n\nexport const adjustForAncestor = (\n pos: OverlayPosition,\n ancestor: { top: number; left: number },\n): OverlayPosition => {\n if (ancestor.top === 0 && ancestor.left === 0) return pos\n\n const result = { ...pos }\n if (typeof result.top === 'number') result.top -= ancestor.top\n if (typeof result.bottom === 'number') result.bottom += ancestor.top\n if (typeof result.left === 'number') result.left -= ancestor.left\n if (typeof result.right === 'number') result.right += ancestor.left\n\n return result\n}\n","/**\n * Core hook powering the Overlay component. Manages open/close state, DOM\n * event listeners (click, hover, scroll, resize, ESC key), and dynamic\n * positioning of overlay content relative to its trigger. Supports dropdown,\n * tooltip, popover, and modal types with automatic edge-of-viewport flipping.\n * Event handlers are throttled for performance, and nested overlay blocking\n * is coordinated through the overlay context.\n */\n\nimport { batch, signal } from '@pyreon/reactivity'\nimport { throttle } from '@pyreon/ui-core'\nimport { value } from '@pyreon/unistyle'\nimport { IS_DEVELOPMENT } from '../utils'\nimport Provider, { useOverlayContext } from './context'\nimport {\n adjustForAncestor,\n calcDropdownHorizontal,\n calcDropdownVertical,\n calcModalPos,\n type Align,\n type AlignX,\n type AlignY,\n type OverlayPosition,\n} from './positioning'\n\nexport type UseOverlayProps = Partial<{\n isOpen: boolean\n openOn: 'click' | 'hover' | 'manual'\n closeOn: 'click' | 'clickOnTrigger' | 'clickOutsideContent' | 'hover' | 'manual'\n type: 'dropdown' | 'tooltip' | 'popover' | 'modal' | 'custom'\n position: 'absolute' | 'fixed' | 'relative' | 'static'\n align: Align\n alignX: AlignX\n alignY: AlignY\n offsetX: number\n offsetY: number\n throttleDelay: number\n parentContainer: HTMLElement | null\n closeOnEsc: boolean\n hoverDelay: number\n disabled: boolean\n onOpen: () => void\n onClose: () => void\n}>\n\n// Reference counter for nested modals sharing document.body overflow lock.\nlet modalOverflowCount = 0\n\n// Hoisted: closeOn values that count as \"click-driven close\". Inlined\n// previously, allocating a fresh 3-element array on each click-listener\n// setupListeners re-run. Ported from vitus-labs `804dd0e2`.\nconst CLICK_CLOSE_KINDS: ReadonlySet<string> = new Set([\n 'click',\n 'clickOnTrigger',\n 'clickOutsideContent',\n])\n\nconst devWarn = (msg: string) => {\n if (!IS_DEVELOPMENT) return\n // oxlint-disable-next-line no-console\n console.warn(msg)\n}\n\n\ntype ComputeResult = {\n pos: OverlayPosition\n resolvedAlignX?: AlignX\n resolvedAlignY?: AlignY\n}\n\nconst computePosition = (\n type: string,\n align: Align,\n alignX: AlignX,\n alignY: AlignY,\n offsetX: number,\n offsetY: number,\n triggerEl: HTMLElement | null,\n contentEl: HTMLElement | null,\n ancestorOffset: { top: number; left: number },\n): ComputeResult => {\n const isDropdown = ['dropdown', 'tooltip', 'popover'].includes(type)\n\n if (isDropdown && (!triggerEl || !contentEl)) {\n devWarn(\n `[@pyreon/elements] Overlay (${type}): ` +\n `${triggerEl ? 'contentRef' : 'triggerRef'} is not attached. ` +\n 'Position cannot be calculated without both refs.',\n )\n return { pos: {} }\n }\n\n if (isDropdown && triggerEl && contentEl) {\n const c = contentEl.getBoundingClientRect()\n const t = triggerEl.getBoundingClientRect()\n const result =\n align === 'top' || align === 'bottom'\n ? calcDropdownVertical(c, t, align, alignX, offsetX, offsetY)\n : calcDropdownHorizontal(c, t, align as 'left' | 'right', alignY, offsetX, offsetY)\n\n return {\n pos: adjustForAncestor(result.pos, ancestorOffset),\n resolvedAlignX: result.resolvedAlignX,\n resolvedAlignY: result.resolvedAlignY,\n }\n }\n\n if (type === 'modal') {\n if (!contentEl) {\n devWarn(\n '[@pyreon/elements] Overlay (modal): contentRef is not attached. ' +\n 'Modal position cannot be calculated without a content element.',\n )\n return { pos: {} }\n }\n const c = contentEl.getBoundingClientRect()\n return {\n pos: adjustForAncestor(calcModalPos(c, alignX, alignY, offsetX, offsetY), ancestorOffset),\n }\n }\n\n return { pos: {} }\n}\n\nconst processVisibilityEvent = (\n e: Event,\n active: boolean,\n openOn: string,\n closeOn: string,\n isTrigger: (evt: Event) => boolean,\n isContent: (evt: Event) => boolean,\n showContent: () => void,\n hideContent: () => void,\n) => {\n if (!active && openOn === 'click' && e.type === 'click' && isTrigger(e)) {\n showContent()\n return\n }\n\n if (!active) return\n\n if (closeOn === 'hover' && e.type === 'scroll') {\n hideContent()\n return\n }\n\n if (e.type !== 'click') return\n\n if (closeOn === 'click') {\n hideContent()\n } else if (closeOn === 'clickOnTrigger' && isTrigger(e)) {\n hideContent()\n } else if (closeOn === 'clickOutsideContent' && !isContent(e)) {\n hideContent()\n }\n}\n\nconst useOverlay = ({\n isOpen = false,\n openOn = 'click',\n closeOn = 'click',\n type = 'dropdown',\n position = 'fixed',\n align = 'bottom',\n alignX: propAlignX = 'left',\n alignY: propAlignY = 'bottom',\n offsetX = 0,\n offsetY = 0,\n throttleDelay = 200,\n parentContainer,\n closeOnEsc = true,\n hoverDelay = 100,\n disabled,\n onOpen,\n onClose,\n}: Partial<UseOverlayProps> = {}) => {\n const ctx = useOverlayContext()\n\n // Signal-based state\n const active = signal(isOpen)\n const isContentLoaded = signal(false)\n const innerAlignX = signal(propAlignX)\n const innerAlignY = signal(propAlignY)\n const blockedCount = signal(0)\n\n const blocked = () => blockedCount() > 0\n\n // DOM refs (plain variables, component runs once)\n let triggerEl: HTMLElement | null = null\n let contentEl: HTMLElement | null = null\n const _prevFocusEl: HTMLElement | null = null\n let hoverTimeout: ReturnType<typeof setTimeout> | null = null\n\n const triggerRef = (node: HTMLElement | null) => {\n triggerEl = node\n }\n\n const contentRefCallback = (node: HTMLElement | null) => {\n contentEl = node\n isContentLoaded.set(!!node)\n }\n\n const setBlocked = () => blockedCount.update((c) => c + 1)\n const setUnblocked = () => blockedCount.update((c) => Math.max(0, c - 1))\n\n const showContent = () => {\n active.set(true)\n onOpen?.()\n ctx.setBlocked?.()\n }\n\n const hideContent = () => {\n // batch() so subscribers reading both active + isContentLoaded\n // (e.g. the overlay shell + the content portal) get notified once\n // per close, not twice. Fires on every overlay dismiss path.\n batch(() => {\n active.set(false)\n isContentLoaded.set(false)\n })\n onClose?.()\n ctx.setUnblocked?.()\n }\n\n // Position calculation helpers\n const getAncestorOffset = () => {\n if (typeof document === 'undefined') return { top: 0, left: 0 }\n if (position !== 'absolute' || !contentEl) {\n return { top: 0, left: 0 }\n }\n\n const offsetParent = contentEl.offsetParent as HTMLElement | null\n if (!offsetParent || offsetParent === document.body) {\n return { top: 0, left: 0 }\n }\n\n const rect = offsetParent.getBoundingClientRect()\n return { top: rect.top, left: rect.left }\n }\n\n const calculateContentPosition = () => {\n if (!active() || !isContentLoaded()) return {}\n\n const result = computePosition(\n type,\n align,\n propAlignX,\n propAlignY,\n offsetX,\n offsetY,\n triggerEl,\n contentEl,\n getAncestorOffset(),\n )\n\n // batch() so the resolved-align writes notify subscribers once\n // per recompute, not twice. Position recomputes on scroll/resize\n // (throttled but still frequent) and on every viewport change.\n if (result.resolvedAlignX || result.resolvedAlignY) {\n batch(() => {\n if (result.resolvedAlignX) innerAlignX.set(result.resolvedAlignX)\n if (result.resolvedAlignY) innerAlignY.set(result.resolvedAlignY)\n })\n }\n\n return result.pos\n }\n\n const assignContentPosition = (values: OverlayPosition = {}) => {\n if (!contentEl) return\n\n const el = contentEl\n const setValue = (param?: string | number) => value(param, 16) as string\n\n el.style.position = position\n\n el.style.top = values.top != null ? setValue(values.top) : ''\n el.style.bottom = values.bottom != null ? setValue(values.bottom) : ''\n el.style.left = values.left != null ? setValue(values.left) : ''\n el.style.right = values.right != null ? setValue(values.right) : ''\n }\n\n const setContentPosition = () => {\n const currentPosition = calculateContentPosition()\n assignContentPosition(currentPosition)\n }\n\n const isNodeOrChild = (getRef: () => HTMLElement | null) => (e: Event) => {\n const ref = getRef()\n if (e?.target && ref) {\n return ref.contains(e.target as Element) || e.target === ref\n }\n return false\n }\n\n const handleVisibilityByEventType = (e: Event) => {\n if (blocked() || disabled) return\n\n processVisibilityEvent(\n e,\n active(),\n openOn,\n closeOn,\n isNodeOrChild(() => triggerEl),\n isNodeOrChild(() => contentEl),\n showContent,\n hideContent,\n )\n }\n\n const handleContentPosition = throttle(() => setContentPosition(), throttleDelay)\n\n const handleClick = (e: Event) => handleVisibilityByEventType(e)\n\n const handleVisibility = throttle((e: Event) => handleVisibilityByEventType(e), throttleDelay)\n\n // --------------------------------------------------------------------------\n // Set up all event listeners on mount, clean up on unmount\n // --------------------------------------------------------------------------\n const setupListeners = () => {\n if (typeof window === 'undefined') return () => {}\n const cleanups: (() => void)[] = []\n\n // Click-based open/close\n const enabledClick = openOn === 'click' || CLICK_CLOSE_KINDS.has(closeOn)\n\n if (enabledClick) {\n window.addEventListener('click', handleClick)\n cleanups.push(() => window.removeEventListener('click', handleClick))\n }\n\n // ESC key\n if (closeOnEsc) {\n const handleEscKey = (e: KeyboardEvent) => {\n if (e.key === 'Escape' && active() && !blocked()) {\n hideContent()\n }\n }\n window.addEventListener('keydown', handleEscKey)\n cleanups.push(() => window.removeEventListener('keydown', handleEscKey))\n }\n\n // Hover-based open/close\n const enabledHover = openOn === 'hover' || closeOn === 'hover'\n if (enabledHover) {\n const clearHoverTimeout = () => {\n if (hoverTimeout != null) {\n clearTimeout(hoverTimeout)\n hoverTimeout = null\n }\n }\n\n const scheduleHide = () => {\n clearHoverTimeout()\n hoverTimeout = setTimeout(hideContent, hoverDelay)\n }\n\n const onTriggerEnter = () => {\n clearHoverTimeout()\n if (openOn === 'hover' && !active()) showContent()\n }\n\n const onTriggerLeave = () => {\n if (closeOn === 'hover' && active()) scheduleHide()\n }\n\n const onContentEnter = () => {\n clearHoverTimeout()\n }\n\n const onContentLeave = () => {\n if (closeOn === 'hover' && active()) scheduleHide()\n }\n\n // We need to defer listener attachment until refs are available\n const attachHoverListeners = () => {\n if (triggerEl) {\n triggerEl.addEventListener('mouseenter', onTriggerEnter)\n triggerEl.addEventListener('mouseleave', onTriggerLeave)\n }\n if (contentEl) {\n contentEl.addEventListener('mouseenter', onContentEnter)\n contentEl.addEventListener('mouseleave', onContentLeave)\n }\n }\n\n attachHoverListeners()\n\n cleanups.push(() => {\n clearHoverTimeout()\n if (triggerEl) {\n triggerEl.removeEventListener('mouseenter', onTriggerEnter)\n triggerEl.removeEventListener('mouseleave', onTriggerLeave)\n }\n if (contentEl) {\n contentEl.removeEventListener('mouseenter', onContentEnter)\n contentEl.removeEventListener('mouseleave', onContentLeave)\n }\n })\n }\n\n // Resize/scroll repositioning\n const shouldSetOverflow = type === 'modal'\n\n const onScroll = (e: Event) => {\n handleContentPosition()\n handleVisibility(e)\n }\n\n if (shouldSetOverflow) {\n modalOverflowCount++\n if (modalOverflowCount === 1) document.body.style.overflow = 'hidden'\n }\n\n window.addEventListener('resize', handleContentPosition)\n window.addEventListener('scroll', onScroll, { passive: true })\n cleanups.push(() => {\n handleContentPosition.cancel()\n handleVisibility.cancel()\n if (shouldSetOverflow) {\n modalOverflowCount--\n if (modalOverflowCount === 0) document.body.style.overflow = ''\n }\n window.removeEventListener('resize', handleContentPosition)\n window.removeEventListener('scroll', onScroll)\n })\n\n // Parent container scroll\n if (parentContainer) {\n if (closeOn !== 'hover') parentContainer.style.overflow = 'hidden'\n\n const onParentScroll = (e: Event) => {\n handleContentPosition()\n handleVisibility(e)\n }\n\n parentContainer.addEventListener('scroll', onParentScroll, {\n passive: true,\n })\n cleanups.push(() => {\n parentContainer.style.overflow = ''\n parentContainer.removeEventListener('scroll', onParentScroll)\n })\n }\n\n // Cleanup function\n return () => {\n for (const cleanup of cleanups) cleanup()\n }\n }\n\n // Handle disabled state\n if (disabled) {\n active.set(false)\n }\n\n return {\n triggerRef,\n contentRef: contentRefCallback,\n active,\n align,\n alignX: innerAlignX,\n alignY: innerAlignY,\n showContent,\n hideContent,\n blocked,\n setBlocked,\n setUnblocked,\n setupListeners,\n Provider,\n }\n}\n\nexport default useOverlay\n","/**\n * Overlay component that renders a trigger element and conditionally shows\n * content via a Portal. The trigger receives a ref and optional show/hide\n * callbacks; the content is positioned and managed by the useOverlay hook.\n * A context Provider wraps the content to support nested overlays (e.g.,\n * a dropdown inside another dropdown) via blocked-state propagation.\n */\n\nimport type { VNodeChild } from '@pyreon/core'\nimport { nativeCompat, onMount, Portal, splitProps } from '@pyreon/core'\nimport { render } from '@pyreon/ui-core'\nimport { PKG_NAME } from '../constants'\nimport type { Content, PyreonComponent } from '../types'\nimport useOverlay, { type UseOverlayProps } from './useOverlay'\n\nconst IS_BROWSER = typeof window !== 'undefined'\n\ntype Align = 'bottom' | 'top' | 'left' | 'right'\ntype AlignX = 'left' | 'center' | 'right'\ntype AlignY = 'bottom' | 'top' | 'center'\n\ntype TriggerRenderer = (\n props: Partial<{\n active: boolean\n showContent: () => void\n hideContent: () => void\n }>,\n) => VNodeChild\n\ntype ContentRenderer = (\n props: Partial<{\n active: boolean\n showContent: () => void\n hideContent: () => void\n align: Align\n alignX: AlignX\n alignY: AlignY\n }>,\n) => VNodeChild\n\nexport type Props = {\n children: ContentRenderer | Content\n trigger: TriggerRenderer | Content\n DOMLocation?: HTMLElement\n triggerRefName?: string\n contentRefName?: string\n} & UseOverlayProps\n\nconst Component: PyreonComponent<Props> = (props) => {\n const [own, overlayProps] = splitProps(props, [\n 'children',\n 'trigger',\n 'DOMLocation',\n 'triggerRefName',\n 'contentRefName',\n ])\n\n const triggerRefName = own.triggerRefName ?? 'ref'\n const contentRefName = own.contentRefName ?? 'ref'\n\n const {\n active,\n triggerRef,\n contentRef,\n showContent,\n hideContent,\n align,\n alignX,\n alignY,\n setupListeners,\n Provider,\n ...ctx\n } = useOverlay(overlayProps)\n\n const { openOn, closeOn, type } = overlayProps\n\n const passHandlers =\n openOn === 'manual' || closeOn === 'manual' || closeOn === 'clickOutsideContent'\n\n const ariaHasPopup = (() => {\n switch (type) {\n case 'modal':\n return 'dialog' as const\n case 'tooltip':\n return 'true' as const\n default:\n return 'menu' as const\n }\n })()\n\n // Set up event listeners on mount\n onMount(() => {\n const cleanup = setupListeners()\n return cleanup\n })\n\n return (\n <>\n {render(own.trigger, {\n [triggerRefName]: triggerRef,\n active: active(),\n 'aria-expanded': active(),\n 'aria-haspopup': ariaHasPopup,\n ...(passHandlers ? { showContent, hideContent } : {}),\n })}\n\n {() =>\n IS_BROWSER && active() ? (\n <Portal target={own.DOMLocation ?? document.body}>\n <Provider {...ctx}>\n {render(own.children, {\n [contentRefName]: contentRef,\n role: type === 'modal' ? 'dialog' : undefined,\n 'aria-modal': type === 'modal' ? true : undefined,\n active: active(),\n align,\n alignX: alignX(),\n alignY: alignY(),\n ...(passHandlers ? { showContent, hideContent } : {}),\n })}\n </Provider>\n </Portal>\n ) : null\n }\n </>\n )\n}\n\nconst name = `${PKG_NAME}/Overlay` as const\n\nComponent.displayName = name\nComponent.pkgName = PKG_NAME\nComponent.PYREON__COMPONENT = name\n\n// Mark as native — compat-mode jsx() runtimes skip wrapCompatComponent so\n// Overlay's onMount + Portal + useOverlay hook setup run inside Pyreon's\n// setup frame.\nnativeCompat(Component)\n\nexport default Component\n","/**\n * Portal — renders children into a per-instance wrapper element appended to\n * `DOMLocation` (defaults to `document.body`). Mirrors vitus-labs's Portal:\n * a fresh wrapper is created per Portal mount, children render INSIDE it\n * (not directly into DOMLocation), and the wrapper is removed on unmount.\n *\n * Per-instance wrapper isolation matters when multiple Portals share a\n * DOMLocation (e.g. several modals on `document.body`) — without the wrapper\n * their children would intermingle, defeating CSS scoping and making\n * cleanup brittle.\n */\n\nimport type { VNodeChild } from '@pyreon/core'\nimport { Portal as CorePortal, onUnmount } from '@pyreon/core'\nimport { PKG_NAME } from '../constants'\nimport type { PyreonComponent } from '../types'\n\nexport interface Props {\n /**\n * DOM element to mount the wrapper into. Defaults to `document.body`.\n */\n DOMLocation?: HTMLElement\n /**\n * Children rendered inside the wrapper.\n */\n children: VNodeChild\n /**\n * HTML tag for the per-instance wrapper element. Defaults to `'div'`.\n */\n tag?: string\n}\n\nconst Component: PyreonComponent<Props> = (props) => {\n if (typeof document === 'undefined') return null\n\n const tag = props.tag ?? 'div'\n const target = props.DOMLocation ?? document.body\n const wrapper = document.createElement(tag)\n target.appendChild(wrapper)\n\n onUnmount(() => {\n wrapper.remove()\n })\n\n return <CorePortal target={wrapper}>{props.children}</CorePortal>\n}\n\nconst name = `${PKG_NAME}/Portal` as const\n\nComponent.displayName = name\nComponent.pkgName = PKG_NAME\nComponent.PYREON__COMPONENT = name\n\nexport default Component\n","/**\n * Styled text primitive that inherits color, font-weight, and line-height\n * from its parent so it blends seamlessly into any context. Additional\n * styles can be injected via the responsive `extraStyles` prop processed\n * through makeItResponsive.\n */\nimport { config } from '@pyreon/ui-core'\nimport { extendCss, makeItResponsive } from '@pyreon/unistyle'\nimport type { Css, ResponsiveStylesCallback } from '../types'\n\nconst { styled, css, textComponent } = config\n\n// Per-breakpoint resolved theme for Text — `Css` (callback / CSSResult /\n// string) is what `extendCss` accepts. Text doesn't carry layout props,\n// so the theme is just the optional `extraStyles` injection.\ntype ThemeProps = { extraStyles?: Css }\n\nconst styles: ResponsiveStylesCallback<ThemeProps> = ({ css: cssFn, theme: t }) => cssFn`\n ${t.extraStyles && extendCss(t.extraStyles as Parameters<typeof extendCss>[0])};\n`\n\nexport default styled(textComponent, { layer: 'elements' })`\n ${css`\n color: inherit;\n font-weight: inherit;\n line-height: 1;\n `};\n\n ${makeItResponsive({\n key: '$text',\n styles,\n css,\n normalize: false,\n })};\n`\n","/**\n * Text component for rendering inline or block-level text. Supports a\n * `paragraph` shorthand that automatically renders as a `<p>` tag, or\n * a custom `tag` for semantic HTML (h1-h6, span, etc.). Marked with\n * a static `isText` flag so other components can detect text children.\n */\n\nimport { splitProps } from '@pyreon/core'\nimport type { PyreonHTMLAttributes, VNodeChild } from '@pyreon/core'\nimport type { HTMLTextTags } from '@pyreon/ui-core'\nimport { PKG_NAME } from '../constants'\nimport type { ExtendCss, PyreonComponent } from '../types'\nimport Styled from './styled'\n\nexport type Props = Partial<{\n /**\n * Label can be used instead of children for inline syntax. But **children** prop takes a precedence\n */\n label: VNodeChild\n /**\n * Children to be rendered within **Text** component.\n */\n children: VNodeChild\n /**\n * Defines whether should behave as a block text element. Automatically adds **p** HTML tag\n */\n paragraph: boolean\n /**\n * Defines what kind of HTML tag should be rendered\n */\n tag: HTMLTextTags\n /**\n * If an additional styling needs to be added, it can be do so via injecting styles using this property.\n */\n css: ExtendCss\n}> &\n PyreonHTMLAttributes\n\nconst Component: PyreonComponent<Props> & {\n isText?: true\n} = (props) => {\n const [own, rest] = splitProps(props, ['paragraph', 'label', 'children', 'tag', 'css', 'ref'])\n\n // `paragraph` shorthand maps to <p>; otherwise pass through `tag`. Ternary\n // form replaces the prior `let finalTag` + if/else block — V8 prefers the\n // single-assignment shape for inline-cache stability. Ported from\n // vitus-labs `804dd0e2`.\n const finalTag = own.paragraph ? 'p' : own.tag\n\n return (\n <Styled ref={own.ref} as={finalTag} $text={{ extraStyles: own.css }} {...rest}>\n {own.children ?? own.label}\n </Styled>\n )\n}\n\n// ----------------------------------------------\n// DEFINE STATICS\n// ----------------------------------------------\nconst name = `${PKG_NAME}/Text` as const\n\nComponent.displayName = name\nComponent.pkgName = PKG_NAME\nComponent.PYREON__COMPONENT = name\nComponent.isText = true\n\nexport default Component\n","/**\n * Utility wrapper that injects className and/or style props into its\n * children without adding any DOM nodes of its own. Uses the core `render`\n * helper to clone children with the merged props.\n */\n\nimport type { VNode, VNodeChild } from '@pyreon/core'\nimport { render } from '@pyreon/ui-core'\nimport { PKG_NAME } from '../constants'\nimport type { PyreonComponent } from '../types'\n\nexport interface Props {\n /**\n * Children to be rendered within **Util** component.\n */\n children: VNodeChild\n /**\n * Class name(s) to be added to children component.\n */\n className?: string | string[] | undefined\n /**\n * Style property to extend children component inline styles\n */\n style?: Record<string, unknown> | undefined\n}\n\nconst Component: PyreonComponent<Props> = (({ children, className, style }: Props) => {\n const mergedClasses = Array.isArray(className) ? className.join(' ') : className\n\n const finalProps: Record<string, any> = {}\n if (style) finalProps.style = style\n if (mergedClasses) finalProps.className = mergedClasses\n\n return render(children, finalProps) as VNode | null\n}) as PyreonComponent<Props>\n\nconst name = `${PKG_NAME}/Util` as const\n\nComponent.displayName = name\nComponent.pkgName = PKG_NAME\nComponent.PYREON__COMPONENT = name\n\nexport default Component\n","import { registerSingleton } from '@pyreon/reactivity'\n\n// Singleton sentinel — fail-loud detection of duplicate @pyreon/elements\n// instances in the same heap. See @pyreon/reactivity/singleton-sentinel for\n// full rationale. Hardcoded version is acceptable here — it's a diagnostic\n// aid, not a load-bearing identity check.\nregisterSingleton('@pyreon/elements', '0.24.6', import.meta.url)\n\nimport { Provider } from '@pyreon/unistyle'\n\nexport type { ElementProps, PyreonElement } from './Element'\nexport { Element } from './Element'\nexport type {\n ChildrenProps as IteratorChildrenProps,\n ElementType,\n ExtendedProps,\n LooseProps as IteratorLooseProps,\n MaybeNull,\n ObjectProps as IteratorObjectProps,\n ObjectValue,\n Props as IteratorProps,\n PropsCallback,\n SimpleProps as IteratorSimpleProps,\n SimpleValue,\n} from './helpers/Iterator'\nexport { default as Iterator } from './helpers/Iterator'\nexport type { ListProps } from './List'\nexport { List } from './List'\nexport type { OverlayProps, UseOverlayProps } from './Overlay'\nexport { Overlay, OverlayProvider, useOverlay } from './Overlay'\nexport type { PortalProps } from './Portal'\nexport { Portal } from './Portal'\nexport type { TextProps } from './Text'\nexport { Text } from './Text'\nexport type {\n AlignX,\n AlignY,\n Content,\n ContentBoolean,\n Direction,\n ExtendCss,\n InnerRef,\n PyreonStatic,\n Responsive,\n ResponsiveBoolType,\n} from './types'\nexport type { UtilProps } from './Util'\nexport { Util } from './Util'\n\nexport { Provider }\n"],"mappings":";;;;;;;AAAA,MAAa,WAAW;;;;ACIxB,MAAa,iBAA0B,QAAQ,IAAI,aAAa;;;;;;;;;;;;;;;;;;ACUhE,MAAM,+BAAe,IAAI,IAAqC;AAC9D,MAAM,aAAa;AAEnB,MAAa,uBAA0D,WAAiB;CACtF,KAAK,MAAM,KAAK,QAAQ;EACtB,MAAM,IAAI,OAAO;EACjB,IAAI,OAAO,MAAM,YAAY,OAAO;EACpC,IAAI,KAAK,QAAQ,OAAO,MAAM,UAAU,OAAO;CACjD;CACA,MAAM,MAAM,KAAK,UAAU,MAAM;CACjC,MAAM,WAAW,aAAa,IAAI,GAAG;CACrC,IAAI,UAAU;EACZ,aAAa,OAAO,GAAG;EACvB,aAAa,IAAI,KAAK,QAAQ;EAC9B,OAAO;CACT;CACA,IAAI,aAAa,QAAQ,YAAY;EACnC,MAAM,SAAS,aAAa,KAAK,EAAE,KAAK,EAAE;EAC1C,IAAI,WAAW,QAAW,aAAa,OAAO,MAAM;CACtD;CACA,aAAa,IAAI,KAAK,MAAM;CAC5B,OAAO;AACT;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC4BA,SAAgB,kBAAkB,OAAyB;CACzD,IAAI,OAAO,UAAU,YAAY,OAAO;CAIxC,IACE,OAAO,OAAO,OAAO,gBAAgB,KACrC,OAAO,OAAO,OAAO,mBAAmB,KACxC,OAAO,OAAO,OAAO,SAAS,GA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","component","styles","Component","Styled","component","Wrapper","WrapperStyled","Content","name","Component","component","Iterator","Component","Element","name","Component","Component","name","Component","CorePortal","name","Component","Styled","name","Component"],"sources":["../src/constants.ts","../src/utils.ts","../src/helpers/buildSpreadProps.ts","../src/helpers/internElementBundle.ts","../src/helpers/isPyreonComponent.ts","../src/helpers/Content/styled.ts","../src/helpers/Content/component.tsx","../src/helpers/Content/index.ts","../src/Element/constants.ts","../src/Element/utils.ts","../src/helpers/Wrapper/styled.ts","../src/helpers/Wrapper/constants.ts","../src/helpers/Wrapper/utils.ts","../src/helpers/Wrapper/component.tsx","../src/helpers/Wrapper/index.ts","../src/Element/component.tsx","../src/helpers/Iterator/component.tsx","../src/helpers/Iterator/index.ts","../src/List/component.tsx","../src/Overlay/context.tsx","../src/Overlay/positioning.ts","../src/Overlay/useOverlay.tsx","../src/Overlay/component.tsx","../src/Portal/component.tsx","../src/Text/styled.ts","../src/Text/component.tsx","../src/Util/component.tsx","../src/index.ts"],"sourcesContent":["export const PKG_NAME = '@pyreon/elements' as const\n","// `import.meta.env.DEV` is provided by Vite/Rolldown at build time and\n// literal-replaced so prod bundles tree-shake the dev branch to zero bytes.\n// Typed through a narrowing interface so downstream packages don't need\n// `vite/client` in their tsconfigs to type-check this file transitively.\nexport const IS_DEVELOPMENT: boolean = process.env.NODE_ENV !== 'production'\n","/**\n * Build a props object by copying descriptors from `rest` and layering\n * static `overrides`. Used by Element / Text / Content (and Wrapper) to\n * bypass JSX object-spread for `<Styled {...rest} foo={x}>`, which the\n * automatic JSX runtime lowers to `jsx(Styled, { ...rest, foo: x })` —\n * a JS-level object literal that fires every getter on `rest` and stores\n * resolved values BEFORE the receiving component sees the object.\n *\n * Compiler-emitted reactive props (`_rp(() => signal())` converted to\n * getters by `makeReactiveProps`) carry their reactivity in a property\n * GETTER. The JSX spread collapses that getter to a static value at the\n * source-component layer, so any downstream consumer reads a frozen\n * snapshot, not a live subscription.\n *\n * `buildSpreadProps` uses `Object.defineProperty` to copy own\n * descriptors verbatim — getters stay getters. Then `h(Comp, result)`\n * stores the descriptor-preserving object on the vnode as-is (no copy),\n * and downstream `splitProps` / `makeReactiveProps` see the live\n * getters. End-to-end reactivity is preserved.\n *\n * Mirrors `helpers/Wrapper/component.tsx:buildStyledProps`. Extracted\n * into its own module so Element / Text / Content can share the same\n * descriptor-safe shape without duplicating the loop.\n *\n * @param rest Source props object. Own descriptors are copied\n * onto the result via `Object.defineProperty`.\n * @param overrides Static fields layered on top of `rest`. Plain\n * assignment is correct here because overrides are\n * framework-controlled values, never user-supplied\n * reactive props.\n */\nexport const buildSpreadProps = (\n rest: Record<string, unknown>,\n overrides: Record<string, unknown>,\n): Record<string, unknown> => {\n const result: Record<string, unknown> = {}\n const descriptors = Object.getOwnPropertyDescriptors(rest)\n for (const key in descriptors) {\n Object.defineProperty(result, key, descriptors[key]!)\n }\n for (const key in overrides) {\n result[key] = overrides[key]\n }\n return result\n}\n","/**\n * Module-scope intern cache for `$element` bundles passed to Wrapper's styled\n * component. Same primitive prop tuple → same object identity, so the styler's\n * `elClassCache` (added 2026-Q2 alongside this) hits and skips the resolve\n * pipeline. Analogous to `@pyreon/rocketstyle`'s dimension-prop memo\n * but at the layer below — covers non-rocketstyle Element / Wrapper / Text usage\n * AND the residual styled wrappers under any rocketstyle component.\n *\n * Cache key is a JSON-stringified shallow snapshot of the bundle. LRU-bound at\n * 256 entries; oldest-first eviction. Bail (return the input as-is, no cache)\n * when any value is a function (signal accessor) or a non-string object (CSS\n * callback / CSSResult / nested object) — those cannot be safely round-tripped\n * through JSON without losing identity guarantees.\n */\nconst _bundleCache = new Map<string, Record<string, unknown>>()\nconst BUNDLE_CAP = 256\n\nexport const internElementBundle = <T extends Record<string, unknown>>(bundle: T): T => {\n for (const k in bundle) {\n const v = bundle[k]\n if (typeof v === 'function') return bundle\n if (v != null && typeof v === 'object') return bundle\n }\n const key = JSON.stringify(bundle)\n const existing = _bundleCache.get(key)\n if (existing) {\n _bundleCache.delete(key)\n _bundleCache.set(key, existing)\n return existing as T\n }\n if (_bundleCache.size >= BUNDLE_CAP) {\n const oldest = _bundleCache.keys().next().value\n if (oldest !== undefined) _bundleCache.delete(oldest)\n }\n _bundleCache.set(key, bundle)\n return bundle\n}\n","/**\n * Detect whether a function value is a component (framework-marked OR\n * user-authored bare function), as opposed to a plain reactive-accessor\n * function.\n *\n * Used by `Element` / `Content` `resolveSlot` to discriminate between\n * `beforeContent={Header}` — component-reference shorthand, MUST mount\n * as `h(Component, null)` so the framework's runWithHooks setup\n * window is established (and any framework HOC's\n * `removeUndefinedProps(props)` / `splitProps(props)` get the\n * default-filled props object, not bare `undefined`).\n * `beforeContent={() => <Header />}` — anonymous reactive accessor,\n * called bare so its body's signal reads land inside the enclosing\n * `mountReactive` effect.\n *\n * Both shapes are `typeof === 'function'`. The discriminator combines two\n * checks (most-specific-first):\n *\n * **Tier 1 — framework markers** (load-bearing for HOC pipelines):\n * - `IS_ROCKETSTYLE` — set by `@pyreon/rocketstyle`\n * (`rocketstyle.ts:527`, `542`) on every `rocketstyle(...).config(...)`\n * chain end-point.\n * - `PYREON__COMPONENT` — set by every `@pyreon/elements` component\n * factory (Element, Text, List, Portal, Overlay, Util, Content,\n * Wrapper, …).\n * - `pkgName` — same components also carry this; checked as a fallback\n * in case a third-party package mirrors the elements convention.\n *\n * **Tier 2 — naming convention** (catches user-authored bare components\n * without markers):\n * - `displayName` is set → component. Authors set displayName\n * deliberately for devtools / debug output; it's an explicit\n * declaration of component intent.\n * - `.name` starts with an uppercase letter → component. JSX already\n * requires PascalCase for components (`<MyComp/>` is treated as a\n * component; `<mycomp/>` is treated as a host tag); the discriminator\n * mirrors that convention for slot-shorthand usage. Anonymous\n * arrows (`name: \"\"`), default-export functions (`name: \"default\"`),\n * and camelCase helpers fall through to the accessor path.\n *\n * Why Tier 2 matters — the bug class it closes: a bare-function component\n * that internally uses lifecycle hooks (`useWindowResize`, `onMount`,\n * `provide`, etc.) needs a `runWithHooks` setup window so the hook calls\n * find `_current` non-null. Without Tier 2, `resolveSlot` would call the\n * function bare → `_current === null` → `[Pyreon] onMount() called outside\n * component setup` warning fires in dev-mode SSR. Routing the same\n * function through `h(value, null)` mounts it as a proper component via\n * the standard `runWithHooks`-based path; the hooks register correctly\n * AND the warning never fires.\n *\n * Why the convention split is safe: a PascalCase function paired with\n * the `beforeContent={Fn}` shorthand is canonically a component reference\n * (matches every framework example in the docs). An anonymous arrow\n * `() => signal() ? <A/> : <B/>` is canonically a reactive accessor\n * (intent: re-evaluate on signal change). The naming convention is the\n * same one JSX itself uses to differentiate component vs host element.\n *\n * Before this check, `resolveSlot` called any function-valued slot\n * bare, crashing real consumers that used the\n * `beforeContent={Component}` shorthand documented since the original\n * Element API. The marker check (Tier 1) rescues framework-factory\n * components; this Tier-2 convention check closes the residual gap\n * for user-authored hook-using bare components.\n */\nexport function isPyreonComponent(value: unknown): boolean {\n if (typeof value !== 'function') return false\n // ── Tier 1 — framework markers ──────────────────────────────────────\n // `Object.hasOwn` (not `in`) so a marker on a parent prototype doesn't\n // count — the marker is always an own-property in the factories.\n if (\n Object.hasOwn(value, 'IS_ROCKETSTYLE') ||\n Object.hasOwn(value, 'PYREON__COMPONENT') ||\n Object.hasOwn(value, 'pkgName')\n ) {\n return true\n }\n // ── Tier 2 — naming convention ──────────────────────────────────────\n const fn = value as { displayName?: unknown; name?: unknown }\n // displayName: explicit author intent. Any non-empty string counts.\n if (typeof fn.displayName === 'string' && fn.displayName.length > 0) {\n return true\n }\n // .name: inferred function name (`const Header = () => …` → \"Header\";\n // `function Header()` → \"Header\"; anonymous arrow → \"\"). PascalCase\n // first letter matches JSX's own component-vs-host discriminator.\n const name = fn.name\n if (typeof name === 'string' && name.length > 0) {\n const first = name.charCodeAt(0)\n // Uppercase A-Z range (65-90). Avoids unicode-letter false-positives\n // and skips `name === \"default\"` from `export default () => …`.\n if (first >= 65 && first <= 90) return true\n }\n return false\n}\n","/**\n * Styled component for content areas (before/content/after). Applies\n * responsive flex alignment, gap spacing between slots based on parent\n * direction (margin-right for inline, margin-bottom for rows), and\n * equalCols flex distribution. The \"content\" slot gets `flex: 1` to\n * fill remaining space between before and after.\n */\nimport { config } from '@pyreon/ui-core'\nimport { alignContent, extendCss, makeItResponsive, value } from '@pyreon/unistyle'\nimport type { ResponsiveStylesCallback } from '../../types'\nimport type { StyledProps, ThemeProps } from './types'\n\nconst { styled, css, component } = config\n\nconst equalColsCSS = `\n flex: 1;\n`\n\nconst typeContentCSS = `\n flex: 1;\n`\n\n// --------------------------------------------------------\n// calculate spacing between before / content / after\n// --------------------------------------------------------\nconst gapDimensions = {\n inline: {\n before: 'margin-right',\n after: 'margin-left',\n },\n reverseInline: {\n before: 'margin-right',\n after: 'margin-left',\n },\n rows: {\n before: 'margin-bottom',\n after: 'margin-top',\n },\n reverseRows: {\n before: 'margin-bottom',\n after: 'margin-top',\n },\n} as const\n\nconst calculateGap = ({\n direction,\n type,\n value: gapValue,\n}: {\n // Optional to match the responsive engine's per-breakpoint resolution —\n // the body's first line falsy-guards both. ThemeProps fields are\n // optional after the typed-themes change, so undefined flows in.\n direction?: keyof typeof gapDimensions | undefined\n type?: ThemeProps['contentType']\n value: string | number | null | undefined\n}) => {\n if (!direction || !type || type === 'content') return undefined\n\n const finalStyles = `${gapDimensions[direction][type]}: ${gapValue};`\n\n return finalStyles\n}\n\n// --------------------------------------------------------\n// calculations of styles to be rendered\n// --------------------------------------------------------\nconst styles: ResponsiveStylesCallback<ThemeProps> = ({ css: cssFn, theme: t, rootSize }) => cssFn`\n ${alignContent({\n direction: t.direction,\n alignX: t.alignX,\n alignY: t.alignY,\n })};\n\n ${t.equalCols && equalColsCSS};\n\n ${\n t.gap &&\n t.contentType &&\n calculateGap({\n direction: t.parentDirection,\n type: t.contentType,\n value: value(t.gap, rootSize),\n })\n };\n\n ${t.extraStyles && extendCss(t.extraStyles as Parameters<typeof extendCss>[0])};\n`\n\nconst platformCSS = `box-sizing: border-box;`\n\nconst StyledComponent = styled(component, { layer: 'elements' })`\n ${platformCSS};\n\n display: flex;\n align-self: stretch;\n flex-wrap: wrap;\n\n ${(({ $contentType }: StyledProps) => $contentType === 'content' && typeContentCSS) as any};\n\n ${makeItResponsive({\n key: '$element',\n styles,\n css,\n normalize: true,\n })};\n`\n\nexport default StyledComponent\n","/**\n * Content area used inside Element to render one of the three\n * layout slots (before, content, after). Passes alignment, direction,\n * gap, and equalCols styling props to the underlying styled component.\n * Adds a `data-pyr-element` attribute in development for debugging.\n *\n * Children are rendered via core `render()`, with function-valued\n * children unwrapped inside a reactive accessor so the compound-layout\n * paths in `Element` keep `content={() => <X />}` reactivity intact\n * (mirrors the `resolveSlot` helper in `Element/component.tsx`).\n */\nimport { h, splitProps } from '@pyreon/core'\nimport type { ComponentFn, VNodeChildAtom } from '@pyreon/core'\nimport { render } from '@pyreon/ui-core'\nimport { IS_DEVELOPMENT } from '../../utils'\nimport { buildSpreadProps } from '../buildSpreadProps'\nimport { internElementBundle } from '../internElementBundle'\nimport { isPyreonComponent } from '../isPyreonComponent'\nimport Styled from './styled'\nimport type { Props } from './types'\n\n// Return type is the RESOLVED atom — see the matching helper in\n// Element/component.tsx for the rationale (keeps `() => resolveSlot(...)`\n// a valid VNodeChildAccessor at the JSX child position).\n//\n// Component vs accessor discriminator — see `isPyreonComponent` JSDoc.\n// Without this, `beforeContent={Component}` shorthand crashes downstream\n// in rocketstyle's `removeUndefinedProps(undefined)`.\nconst resolveSlot = (value: unknown): VNodeChildAtom | VNodeChildAtom[] => {\n if (typeof value === 'function') {\n if (isPyreonComponent(value)) {\n return h(value as ComponentFn, null) as VNodeChildAtom\n }\n return (value as () => VNodeChildAtom | VNodeChildAtom[])()\n }\n return render(value as Parameters<typeof render>[0]) as VNodeChildAtom | VNodeChildAtom[]\n}\n\nconst Component = (props: Partial<Props>) => {\n const [own, rest] = splitProps(props, [\n 'contentType',\n 'tag',\n 'parentDirection',\n 'direction',\n 'alignX',\n 'alignY',\n 'equalCols',\n 'gap',\n 'extendCss',\n 'children',\n ])\n\n const debugProps = IS_DEVELOPMENT\n ? {\n 'data-pyr-element': own.contentType,\n }\n : {}\n\n // Route the bundle through `internElementBundle` so identical primitive\n // tuples share one object identity and the styler's `elClassCache` HITS —\n // exactly what the Element fast path + Wrapper's 4 paths already do. Without\n // it, every Content slot (the compound before/after-content path) allocated\n // a fresh `$element` per mount → guaranteed `elClassCache` miss → full\n // `styler.resolve` per slot per mount. `internElementBundle` bails (returns\n // the input unchanged) when any value is a function/object — so the\n // `extraStyles` (CSSResult/callback) case keeps today's behavior exactly.\n const stylingProps = internElementBundle({\n contentType: own.contentType,\n parentDirection: own.parentDirection,\n direction: own.direction,\n alignX: own.alignX,\n alignY: own.alignY,\n equalCols: own.equalCols,\n gap: own.gap,\n extraStyles: own.extendCss,\n })\n\n // Use `h(Styled, buildSpreadProps(rest, {..., children}))` instead of\n // JSX spread `<Styled ... {...rest}>` so compiler-emitted reactive\n // props survive end-to-end.\n //\n // Children go into the override (not h's third arg) so `mount.ts`\n // doesn't run `{...vnode.props, children: ...}` to merge them — that\n // JS spread fires every getter on vnode.props and would defeat the\n // descriptor preservation. See `helpers/buildSpreadProps.ts` JSDoc.\n return h(\n Styled,\n buildSpreadProps(rest as Record<string, unknown>, {\n as: own.tag,\n $contentType: own.contentType,\n $element: stylingProps,\n ...debugProps,\n children: () => resolveSlot(own.children),\n }),\n )\n}\n\nexport default Component\n","import component from './component'\n\nexport default component\n","/** Props consumed by Element that should not be forwarded to the underlying DOM node. */\nexport const RESERVED_PROPS = [\n 'innerRef',\n 'tag',\n 'block',\n 'label',\n 'children',\n 'beforeContent',\n 'afterContent',\n\n 'equalCols',\n 'vertical',\n 'direction',\n 'alignX',\n 'alignY',\n\n 'css',\n 'contentCss',\n 'beforeContentCss',\n 'afterContentCss',\n\n 'contentDirection',\n 'contentAlignX',\n 'contentAlignY',\n\n 'beforeContentDirection',\n 'beforeContentAlignX',\n 'beforeContentAlignY',\n\n 'afterContentDirection',\n 'afterContentAlignX',\n 'afterContentAlignY',\n] as const\n\n/**\n * HTML tags that are inline-level by default. When Element renders one of\n * these tags, child Content wrappers use `span` instead of `div` to\n * preserve valid HTML nesting.\n */\nexport const INLINE_ELEMENTS = {\n span: true,\n a: true,\n button: true,\n input: true,\n label: true,\n select: true,\n textarea: true,\n br: true,\n img: true,\n strong: true,\n small: true,\n code: true,\n b: true,\n big: true,\n i: true,\n tt: true,\n abbr: true,\n acronym: true,\n cite: true,\n dfn: true,\n em: true,\n kbd: true,\n samp: true,\n var: true,\n bdo: true,\n map: true,\n object: true,\n q: true,\n script: true,\n sub: true,\n sup: true,\n}\n\n/**\n * HTML void/self-closing elements that cannot have children. When Element\n * detects one of these tags, it skips rendering beforeContent/content/afterContent\n * and returns the Wrapper alone.\n */\nexport const EMPTY_ELEMENTS = {\n area: true,\n base: true,\n br: true,\n col: true,\n embed: true,\n hr: true,\n img: true,\n input: true,\n keygen: true,\n link: true,\n textarea: true,\n // 'meta': true,\n // 'param': true,\n source: true,\n track: true,\n wbr: true,\n}\n","import { EMPTY_ELEMENTS, INLINE_ELEMENTS } from './constants'\n\ntype GetValue = (tag?: string) => boolean\n\n/** Checks whether the given HTML tag is an inline-level element, used to determine sub-tag nesting. */\nexport const isInlineElement: GetValue = (tag) => {\n if (tag && tag in INLINE_ELEMENTS) return true\n return false\n}\n\n/** Checks whether the given HTML tag is a void element that cannot have children. */\nexport const getShouldBeEmpty: GetValue = (tag) => {\n if (tag && tag in EMPTY_ELEMENTS) return true\n return false\n}\n","/**\n * Styled component for the Element wrapper layer. Handles responsive\n * block/inline-flex display, direction, alignment, and custom CSS injection.\n * Includes special handling for the `parentFix` / `childFix` flags that\n * split flex behavior across two DOM nodes for button/fieldset/legend\n * elements where a single flex container is insufficient.\n */\nimport { config } from '@pyreon/ui-core'\nimport { alignContent, extendCss, makeItResponsive } from '@pyreon/unistyle'\nimport type { ResponsiveStylesCallback } from '../../types'\nimport type { StyledProps, ThemeProps } from './types'\n\nconst { styled, css, component } = config\n\nconst childFixCSS = `\n display: flex;\n flex: 1;\n width: 100%;\n height: 100%;\n`\n\nconst parentFixCSS = `\n flex-direction: column;\n`\n\nexport const styles: ResponsiveStylesCallback<ThemeProps> = ({ theme: t, css: cssFn }) => cssFn`\n ${alignContent({\n direction: t.direction,\n alignX: t.alignX,\n alignY: t.alignY,\n })};\n\n /*\n * Always emit a value for the block-related properties so a responsive\n * theme that flips from \\`block: true\\` at one breakpoint to \\`block: false\\`\n * at another resets cleanly. Previously \\`align-self\\` / \\`width\\` / \\`height\\`\n * were only set when the truthy branch matched, which left the prior\n * breakpoint's values cascading through.\n */\n ${`align-self: ${t.block ? 'stretch' : 'auto'};\n width: ${t.block ? '100%' : 'auto'};\n height: ${t.alignY === 'block' ? '100%' : 'auto'};`};\n\n ${!t.childFix && `display: ${t.block ? 'flex' : 'inline-flex'};`};\n ${t.parentFix && parentFixCSS};\n\n ${t.extraStyles && extendCss(t.extraStyles as Parameters<typeof extendCss>[0])};\n`\n\nconst platformCSS = `box-sizing: border-box;`\n\nexport default styled(component, { layer: 'elements' })`\n position: relative;\n ${platformCSS};\n\n ${(({ $childFix }: StyledProps) => $childFix && childFixCSS) as any};\n\n ${makeItResponsive({\n key: '$element',\n styles,\n css,\n normalize: true,\n })};\n`\n","/**\n * HTML elements that need a two-layer DOM workaround because browsers do not\n * fully support flexbox layout on button, fieldset, and legend elements.\n * @see https://stackoverflow.com/questions/35464067/flexbox-not-working-on-button-or-fieldset-elements\n */\nexport const INLINE_ELEMENTS_FLEX_FIX = {\n button: true,\n fieldset: true,\n legend: true,\n}\n","import { INLINE_ELEMENTS_FLEX_FIX } from './constants'\n\ntype IsWebFixNeeded = (tag?: string) => boolean\nexport const isWebFixNeeded: IsWebFixNeeded = (tag) => {\n if (tag && tag in INLINE_ELEMENTS_FLEX_FIX) return true\n return false\n}\n","/**\n * Wrapper component that serves as the outermost styled container for Element.\n * On web, it detects button/fieldset/legend tags and applies a two-layer flex\n * fix (parent + child Styled) because these HTML elements do not natively\n * support `display: flex` consistently across browsers.\n */\nimport { h, splitProps } from '@pyreon/core'\nimport { getShouldBeEmpty } from '../../Element/utils'\nimport { IS_DEVELOPMENT } from '../../utils'\nimport { internElementBundle } from '../internElementBundle'\nimport Styled from './styled'\nimport type { Props } from './types'\nimport { isWebFixNeeded } from './utils'\n\nconst DEV_PROPS: Record<string, string> = IS_DEVELOPMENT ? { 'data-pyr-element': 'Element' } : {}\n\n/**\n * Build a props object for `h(Styled, ...)` by copying own property\n * DESCRIPTORS from `rest`, then layering the additional fields. Compiler-\n * emitted reactive props (`_rp(() => signal())` converted to getters by\n * `makeReactiveProps`) survive end-to-end with their getter intact.\n *\n * Why we bypass JSX spread here: the standard JSX automatic-runtime\n * compilation lowers `<Styled {...rest} foo={x}>` to roughly\n * `jsx(Styled, { ...rest, foo: x })`. That `{...rest, foo: x}` object\n * literal is evaluated at JS level — it fires every getter on `rest` and\n * stores the resolved value before `jsx()` ever sees the object. No\n * amount of in-runtime descriptor preservation can recover the getters\n * once they've been collapsed by the surface-level spread. The fix is\n * structural: don't use JSX spread for reactive-prop forwarding. Build\n * the props object with descriptor preservation and pass it to `h()`\n * directly — `h()` stores props as-is on the vnode, no copy, getters\n * survive into mount.\n */\nconst buildStyledProps = (\n rest: Record<string, unknown>,\n refValue: unknown,\n asTag: unknown,\n extras: Record<string, unknown>,\n): Record<string, unknown> => {\n const result: Record<string, unknown> = {}\n const descriptors = Object.getOwnPropertyDescriptors(rest)\n for (const key in descriptors) {\n Object.defineProperty(result, key, descriptors[key]!)\n }\n for (const key in DEV_PROPS) {\n result[key] = DEV_PROPS[key]\n }\n result.ref = refValue\n result.as = asTag\n for (const key in extras) {\n result[key] = extras[key]\n }\n return result\n}\n\n// Layout / ref keys consumed by Wrapper itself. Everything else is forwarded\n// onto the underlying DOM node. Listed as a tuple so `splitProps` narrows\n// `own` correctly while preserving reactive prop tracking on both halves.\nconst OWN_KEYS: Array<keyof Props | 'ref'> = [\n 'children',\n 'tag',\n 'block',\n 'extendCss',\n 'direction',\n 'alignX',\n 'alignY',\n 'equalCols',\n 'isInline',\n 'ref',\n 'dangerouslySetInnerHTML',\n]\n\nconst Component = (props: Partial<Props> & { ref?: unknown }) => {\n const [own, rest] = splitProps(props, OWN_KEYS)\n\n const needsFix = !own.dangerouslySetInnerHTML && isWebFixNeeded(own.tag)\n\n // Void HTML elements (hr, input, img, br, …) cannot have children. Even\n // a falsy `{own.children}` slot becomes `[undefined]` in the vnode and\n // trips runtime-dom's void-element warning. Element already skips passing\n // children to Wrapper for void tags; this guard makes sure the empty\n // slot is dropped here too instead of leaking into the JSX.\n const isVoidTag = !own.dangerouslySetInnerHTML && getShouldBeEmpty(own.tag)\n\n // dangerouslySetInnerHTML and children are mutually exclusive — both\n // become inner content (per `runtime-server/src/index.ts:228` and\n // `runtime-dom/src/props.ts:289`). Pre-fix the prop was in OWN_KEYS,\n // moved into `own` by splitProps, and never re-attached to the rendered\n // vnode — so `<Logo dangerouslySetInnerHTML={...} />` rendered an empty\n // <div></div>. Forward the prop to the styled vnode and drop the\n // children slot when innerHTML is set.\n const innerHTML = own.dangerouslySetInnerHTML\n\n if (!needsFix) {\n const bundle = internElementBundle({\n block: own.block,\n direction: own.direction,\n alignX: own.alignX,\n alignY: own.alignY,\n equalCols: own.equalCols,\n extraStyles: own.extendCss,\n })\n if (isVoidTag) {\n return h(\n Styled,\n buildStyledProps(rest as unknown as Record<string, unknown>, own.ref, own.tag, {\n $element: bundle,\n }),\n )\n }\n if (innerHTML) {\n return h(\n Styled,\n buildStyledProps(rest as unknown as Record<string, unknown>, own.ref, own.tag, {\n $element: bundle,\n dangerouslySetInnerHTML: innerHTML,\n }),\n )\n }\n return h(\n Styled,\n buildStyledProps(rest as unknown as Record<string, unknown>, own.ref, own.tag, {\n $element: bundle,\n children: own.children,\n }),\n )\n }\n\n const asTag = own.isInline ? 'span' : 'div'\n const parentBundle = internElementBundle({\n parentFix: true as const,\n block: own.block,\n extraStyles: own.extendCss,\n })\n const childBundle = internElementBundle({\n childFix: true as const,\n direction: own.direction,\n alignX: own.alignX,\n alignY: own.alignY,\n equalCols: own.equalCols,\n })\n\n // needsFix path: innerHTML belongs on the INNER styled node (where the\n // actual content lives), NOT on the outer flex-fix wrapper. The\n // `needsFix` computation already excludes the innerHTML case\n // (`!own.dangerouslySetInnerHTML && isWebFixNeeded(own.tag)`), so this\n // branch normally won't execute when innerHTML is set — but we keep\n // the defensive forwarding so the contract is robust against future\n // refactors of the needsFix gate.\n if (innerHTML) {\n return h(\n Styled,\n buildStyledProps(rest as unknown as Record<string, unknown>, own.ref, own.tag, {\n $element: parentBundle,\n children: h(Styled, {\n as: asTag,\n $childFix: true,\n $element: childBundle,\n dangerouslySetInnerHTML: innerHTML,\n }),\n }),\n )\n }\n\n return h(\n Styled,\n buildStyledProps(rest as unknown as Record<string, unknown>, own.ref, own.tag, {\n $element: parentBundle,\n children: h(Styled, {\n as: asTag,\n $childFix: true,\n $element: childBundle,\n children: own.children,\n }),\n }),\n )\n}\n\nexport default Component\n","import component from './component'\n\nexport default component\n","/**\n * Core building block of the elements package. Renders a three-section layout\n * (beforeContent / content / afterContent) inside a flex Wrapper. When only\n * content is present, the Wrapper inherits content-level alignment directly\n * to avoid an unnecessary nesting layer. Handles HTML-specific edge cases\n * like void elements (input, img) and inline elements (span, a) by\n * skipping children or switching sub-tags accordingly.\n */\n\nimport { h, onMount, splitProps } from '@pyreon/core'\nimport type { ComponentFn, VNodeChildAtom } from '@pyreon/core'\nimport { render } from '@pyreon/ui-core'\nimport { PKG_NAME } from '../constants'\nimport { Content, Wrapper } from '../helpers'\nimport { buildSpreadProps } from '../helpers/buildSpreadProps'\nimport { internElementBundle } from '../helpers/internElementBundle'\nimport { isPyreonComponent } from '../helpers/isPyreonComponent'\nimport WrapperStyled from '../helpers/Wrapper/styled'\nimport { isWebFixNeeded } from '../helpers/Wrapper/utils'\nimport { IS_DEVELOPMENT } from '../utils'\nimport type { PyreonElement } from './types'\nimport { getShouldBeEmpty, isInlineElement } from './utils'\n\nconst WRAPPER_DEV_PROPS: Record<string, string> = IS_DEVELOPMENT\n ? { 'data-pyr-element': 'Element' }\n : {}\n\nconst equalize = (el: HTMLElement, direction: unknown) => {\n const beforeEl = el.firstElementChild as HTMLElement | null\n const afterEl = el.lastElementChild as HTMLElement | null\n\n if (beforeEl && afterEl && beforeEl !== afterEl) {\n const type: 'height' | 'width' = direction === 'rows' ? 'height' : 'width'\n const prop = type === 'height' ? 'offsetHeight' : 'offsetWidth'\n const beforeSize = beforeEl[prop]\n const afterSize = afterEl[prop]\n\n if (Number.isInteger(beforeSize) && Number.isInteger(afterSize)) {\n const maxSize = `${Math.max(beforeSize, afterSize)}px`\n beforeEl.style[type] = maxSize\n afterEl.style[type] = maxSize\n }\n }\n}\n\nconst defaultDirection = 'inline'\nconst defaultContentDirection = 'rows'\nconst defaultAlignX = 'left'\nconst defaultAlignY = 'center'\n\nconst Component: PyreonElement = (props) => {\n const [own, rest] = splitProps(props, [\n 'innerRef',\n 'tag',\n 'label',\n 'content',\n 'children',\n 'beforeContent',\n 'afterContent',\n 'equalBeforeAfter',\n 'block',\n 'equalCols',\n 'gap',\n 'direction',\n 'alignX',\n 'alignY',\n 'css',\n 'contentCss',\n 'beforeContentCss',\n 'afterContentCss',\n 'contentDirection',\n 'contentAlignX',\n 'contentAlignY',\n 'beforeContentDirection',\n 'beforeContentAlignX',\n 'beforeContentAlignY',\n 'afterContentDirection',\n 'afterContentAlignX',\n 'afterContentAlignY',\n 'ref',\n ])\n\n const alignX = own.alignX ?? defaultAlignX\n const alignY = own.alignY ?? defaultAlignY\n const contentDirection = own.contentDirection ?? defaultContentDirection\n const contentAlignX = own.contentAlignX ?? defaultAlignX\n const contentAlignY = own.contentAlignY ?? defaultAlignY\n const beforeContentDirection = own.beforeContentDirection ?? defaultDirection\n const beforeContentAlignX = own.beforeContentAlignX ?? defaultAlignX\n const beforeContentAlignY = own.beforeContentAlignY ?? defaultAlignY\n const afterContentDirection = own.afterContentDirection ?? defaultDirection\n const afterContentAlignX = own.afterContentAlignX ?? defaultAlignX\n const afterContentAlignY = own.afterContentAlignY ?? defaultAlignY\n\n // --------------------------------------------------------\n // check if should render only single element\n // --------------------------------------------------------\n const shouldBeEmpty = !!rest.dangerouslySetInnerHTML || getShouldBeEmpty(own.tag)\n\n // --------------------------------------------------------\n // if not single element, calculate values\n // --------------------------------------------------------\n const isSimpleElement = !own.beforeContent && !own.afterContent\n // Getter — preserves reactivity of own.content (which may be _rp() wrapped).\n // Reading own.content via ?? at setup would capture the value once.\n const getChildren = () => own.children ?? own.content ?? own.label\n\n // Resolve a slot value INSIDE a reactive accessor. If the consumer passed a\n // function-returning-VNode (e.g. `content={() => <Icon name={signal()} />}`),\n // unwrap it by calling — its body's signal reads are then tracked by the\n // enclosing mountReactive effect, and the slot re-renders on signal change.\n // Static VNodes / strings / null pass through unchanged to `render()`.\n //\n // **Component vs accessor discriminator** —\n // `beforeContent={Header}` (component-reference shorthand) and\n // `content={() => <X />}` (reactive accessor) are BOTH `typeof === 'function'`.\n // Calling both bare crashes component shorthands the moment a\n // rocketstyle / attrs HOC runs `removeUndefinedProps(undefined)` on the\n // un-supplied props (`TypeError: Cannot convert undefined or null to object`).\n //\n // Discriminator: framework components carry one of two markers attached by\n // their factory:\n // - `IS_ROCKETSTYLE` — anything `rocketstyle()` produces\n // - `PYREON__COMPONENT` / `pkgName` — `@pyreon/elements` components\n // (Element, Text, List, Portal, Overlay, Util)\n // Marked function → mount as `h(Component, null)` (no props, defaults\n // fill in via the HOC pipeline). Unmarked function → reactive accessor,\n // called bare so its return value (a VNode) renders. Bare-function\n // components without HOC wrapping (e.g. `const MyComp = () => <div />`)\n // also work via the accessor path — they're called with no args and\n // their VNode return goes through `render()` correctly. The marker\n // check ONLY rescues components that REQUIRE props to be defined.\n //\n // Return type is the RESOLVED atom (VNodeChildAtom | VNodeChildAtom[]) —\n // never a nested accessor — so the enclosing `() => resolveSlot(...)` IS\n // a valid VNodeChildAccessor in the JSX child position.\n const resolveSlot = (value: unknown): VNodeChildAtom | VNodeChildAtom[] => {\n if (typeof value === 'function') {\n if (isPyreonComponent(value)) {\n return h(value as ComponentFn, null) as VNodeChildAtom\n }\n return (value as () => VNodeChildAtom | VNodeChildAtom[])()\n }\n return render(value as Parameters<typeof render>[0]) as VNodeChildAtom | VNodeChildAtom[]\n }\n\n const isInline = isInlineElement(own.tag)\n const SUB_TAG = isInline ? 'span' : undefined\n\n // --------------------------------------------------------\n // direction & alignX & alignY calculations\n // --------------------------------------------------------\n let wrapperDirection: typeof own.direction = own.direction\n let wrapperAlignX: typeof alignX = alignX\n let wrapperAlignY: typeof alignY = alignY\n\n if (isSimpleElement) {\n if (contentDirection) wrapperDirection = contentDirection\n if (contentAlignX) wrapperAlignX = contentAlignX\n if (contentAlignY) wrapperAlignY = contentAlignY\n } else if (own.direction) {\n wrapperDirection = own.direction\n } else {\n wrapperDirection = defaultDirection\n }\n\n // --------------------------------------------------------\n // equalBeforeAfter: measure & equalize slot dimensions\n // --------------------------------------------------------\n let equalizeRef: HTMLElement | null = null\n const externalRef = own.ref ?? own.innerRef\n\n const mergedRef = (node: HTMLElement | null) => {\n equalizeRef = node\n if (typeof externalRef === 'function') (externalRef as (el: HTMLElement | null) => void)(node)\n else if (externalRef != null) {\n ;(externalRef as unknown as { current: HTMLElement | null }).current = node\n }\n }\n\n if (own.equalBeforeAfter && own.beforeContent && own.afterContent) {\n // Run once on mount AND continue equalizing as the element resizes —\n // catches async slot content (font swaps, lazy text, viewport resize)\n // that a one-shot measurement would miss. Mirrors vitus-labs's Element\n // useLayoutEffect + ResizeObserver pattern.\n onMount(() => {\n const node = equalizeRef\n if (!node) return undefined\n\n equalize(node, own.direction)\n\n if (typeof ResizeObserver === 'undefined') return undefined\n const observer = new ResizeObserver(() => equalize(node, own.direction))\n observer.observe(node)\n return () => observer.disconnect()\n })\n }\n\n // --------------------------------------------------------\n // common wrapper props\n // --------------------------------------------------------\n const WRAPPER_PROPS = {\n ref: mergedRef,\n extendCss: own.css,\n tag: own.tag,\n block: own.block,\n direction: wrapperDirection,\n alignX: wrapperAlignX,\n alignY: wrapperAlignY,\n as: undefined, // reset styled-components `as` prop\n }\n\n // --------------------------------------------------------\n // return simple/empty element like input or image etc.\n // --------------------------------------------------------\n //\n // All four return paths below use `h(Comp, buildSpreadProps(rest, {...}))`\n // INSTEAD of JSX spread `<Comp {...rest} ...>`. The JSX automatic-runtime\n // lowers spread to `jsx(Comp, { ...rest, ... })` — that object literal is\n // evaluated at JS level and fires EVERY getter on `rest` before `jsx()`\n // ever sees it. Compiler-emitted reactive props (`_rp(() => signal())`\n // converted to getters by `makeReactiveProps`) survive the splitProps\n // call but die at the JSX spread. `buildSpreadProps` copies own\n // descriptors via `Object.defineProperty`, then `h()` stores the result\n // as-is on the vnode (no copy) — getters survive end-to-end into mount.\n //\n // See `helpers/buildSpreadProps.ts` JSDoc + the parallel pattern in\n // `helpers/Wrapper/component.tsx:buildStyledProps`.\n if (shouldBeEmpty) {\n return h(Wrapper, buildSpreadProps(rest as Record<string, unknown>, WRAPPER_PROPS))\n }\n\n // Simple-Element fast path: no beforeContent / afterContent slots, and no\n // button/fieldset/legend two-layer flex fix needed. Inline the Wrapper\n // helper directly into a single Styled invocation — saves one component\n // hop, one splitProps call, and one mountChild per Element. The Wrapper\n // helper still exists for the rare needsFix case below; tests that asserted\n // Wrapper appears in the VNode tree are updated to the new shape.\n const dangerouslySetInnerHTML = (rest as { dangerouslySetInnerHTML?: unknown })\n .dangerouslySetInnerHTML\n const needsFix = !dangerouslySetInnerHTML && isWebFixNeeded(own.tag)\n\n // Children are passed via the buildSpreadProps OVERRIDE (not as h's\n // third arg) for a critical reason: `mount.ts:404-410` merges\n // `vnode.children` into `vnode.props.children` via a JS object spread\n // `{...vnode.props, children: ...}` when (a) vnode.children is non-\n // empty AND (b) vnode.props.children is undefined. That spread fires\n // every getter on vnode.props, collapsing compiler-emitted reactive\n // props (`href`/`src`/etc. as getter descriptors) to static values\n // before the styled component ever sees them — defeating the whole\n // descriptor-preservation chain. Putting children into the override\n // makes `vnode.props.children !== undefined` so mount skips the spread\n // and keeps the descriptors intact.\n if (isSimpleElement && !needsFix) {\n return h(\n WrapperStyled,\n buildSpreadProps(rest as Record<string, unknown>, {\n ...WRAPPER_DEV_PROPS,\n ref: mergedRef,\n as: own.tag,\n $element: internElementBundle({\n block: own.block,\n direction: wrapperDirection,\n alignX: wrapperAlignX,\n alignY: wrapperAlignY,\n equalCols: own.equalCols,\n extraStyles: own.css,\n }),\n children: () => resolveSlot(getChildren()),\n }),\n )\n }\n\n if (isSimpleElement) {\n return h(\n Wrapper,\n buildSpreadProps(rest as Record<string, unknown>, {\n ...WRAPPER_PROPS,\n isInline,\n children: () => resolveSlot(getChildren()),\n }),\n )\n }\n\n const compoundChildren: VNodeChildAtom[] = []\n if (own.beforeContent) {\n compoundChildren.push(\n <Content\n tag={SUB_TAG}\n contentType=\"before\"\n parentDirection={wrapperDirection}\n extendCss={own.beforeContentCss}\n direction={beforeContentDirection}\n alignX={beforeContentAlignX}\n alignY={beforeContentAlignY}\n equalCols={own.equalCols}\n gap={own.gap}\n >\n {() => resolveSlot(own.beforeContent)}\n </Content>,\n )\n }\n compoundChildren.push(\n <Content\n tag={SUB_TAG}\n contentType=\"content\"\n parentDirection={wrapperDirection}\n extendCss={own.contentCss}\n direction={contentDirection}\n alignX={contentAlignX}\n alignY={contentAlignY}\n equalCols={own.equalCols}\n >\n {() => resolveSlot(getChildren())}\n </Content>,\n )\n if (own.afterContent) {\n compoundChildren.push(\n <Content\n tag={SUB_TAG}\n contentType=\"after\"\n parentDirection={wrapperDirection}\n extendCss={own.afterContentCss}\n direction={afterContentDirection}\n alignX={afterContentAlignX}\n alignY={afterContentAlignY}\n equalCols={own.equalCols}\n gap={own.gap}\n >\n {() => resolveSlot(own.afterContent)}\n </Content>,\n )\n }\n\n return h(\n Wrapper,\n buildSpreadProps(rest as Record<string, unknown>, {\n ...WRAPPER_PROPS,\n isInline,\n children: compoundChildren,\n }),\n )\n}\n\nconst name = `${PKG_NAME}/Element` as const\n\nComponent.displayName = name\nComponent.pkgName = PKG_NAME\nComponent.PYREON__COMPONENT = name\n\nexport default Component\n","/**\n * Data-driven list renderer that supports three input modes: children,\n * an array of primitives, or an array of objects.\n * Each item receives positional metadata (first, last, odd, even, position)\n * and optional injected props via `itemProps`. Items can be individually\n * wrapped with `wrapComponent`. Children always take priority over the\n * component+data prop pattern.\n */\n\nimport type { VNode, VNodeChild } from '@pyreon/core'\nimport { Fragment } from '@pyreon/core'\nimport { isEmpty, render } from '@pyreon/ui-core'\nimport type {\n ChildrenProps,\n ExtendedProps,\n LooseProps,\n ObjectProps,\n ObjectValue,\n SimpleProps,\n SimpleValue,\n} from './types'\n\ntype ClassifiedData =\n | { type: 'simple'; data: SimpleValue[] }\n | { type: 'complex'; data: ObjectValue[] }\n | null\n\nconst classifyData = (data: unknown[]): ClassifiedData => {\n const items = data.filter(\n (item) =>\n item != null && !(typeof item === 'object' && isEmpty(item as Record<string, unknown>)),\n )\n\n if (items.length === 0) return null\n\n let isSimple = true\n let isComplex = true\n\n for (const item of items) {\n if (typeof item === 'string' || typeof item === 'number') {\n isComplex = false\n } else if (typeof item === 'object') {\n isSimple = false\n } else {\n isSimple = false\n isComplex = false\n }\n }\n\n if (isSimple) return { type: 'simple', data: items as SimpleValue[] }\n if (isComplex) return { type: 'complex', data: items as ObjectValue[] }\n return null\n}\n\nconst RESERVED_PROPS = [\n 'children',\n 'component',\n 'wrapComponent',\n 'data',\n 'itemKey',\n 'valueName',\n 'itemProps',\n 'wrapProps',\n] as const\n\ntype AttachItemProps = ({ i, length }: { i: number; length: number }) => ExtendedProps\n\nconst attachItemProps: AttachItemProps = ({ i, length }: { i: number; length: number }) => {\n const position = i + 1\n\n return {\n index: i,\n first: position === 1,\n last: position === length,\n odd: position % 2 === 1,\n even: position % 2 === 0,\n position,\n }\n}\n\nconst Component = (props: LooseProps) => {\n const {\n itemKey,\n valueName,\n children: rawChildren,\n component,\n data,\n wrapComponent: Wrapper,\n wrapProps,\n itemProps,\n } = props\n\n // Unwrap the Pyreon compiler's `() => x` accessor wrap. When the parent\n // emits `<Iterator>{items}</Iterator>` and the compiler-emitted form is\n // `Iterator({ children: () => items })`, the downstream `Array.isArray`\n // check returns false, the Fragment check returns false (function is not\n // an object), and the fallthrough `renderChild(function)` calls\n // `render(function, props)` which interprets the function as a component\n // function — wrong shape, lost per-item metadata. Resolving eagerly here\n // keeps every downstream branch correct. Mirrors the kinetic\n // Stagger / TransitionItem fix.\n const children = typeof rawChildren === 'function'\n ? (rawChildren as () => VNodeChild)()\n : rawChildren\n\n const injectItemProps = typeof itemProps === 'function' ? itemProps : () => itemProps\n\n const injectWrapItemProps = typeof wrapProps === 'function' ? wrapProps : () => wrapProps\n\n const getKey = (item: string | number, index: number) => {\n if (typeof itemKey === 'function') return itemKey(item, index)\n return index\n }\n\n const renderChild = (child: VNodeChild, total = 1, i = 0) => {\n if (!itemProps && !Wrapper) return child\n\n const extendedProps = attachItemProps({\n i,\n length: total,\n })\n\n const finalItemProps = itemProps ? injectItemProps({}, extendedProps) : {}\n\n if (Wrapper) {\n const finalWrapProps = wrapProps ? injectWrapItemProps({}, extendedProps) : {}\n\n return (\n <Wrapper key={i} {...finalWrapProps}>\n {render(child, finalItemProps)}\n </Wrapper>\n )\n }\n\n return render(child, {\n key: i,\n ...finalItemProps,\n })\n }\n\n // --------------------------------------------------------\n // render children\n // --------------------------------------------------------\n const renderChildren = () => {\n if (!children) return null\n\n // if children is Array\n if (Array.isArray(children)) {\n return children.map((item, i) => renderChild(item, children.length, i))\n }\n\n // if children is Fragment — check VNode type\n if (\n typeof children === 'object' &&\n 'type' in (children as VNode) &&\n (children as VNode).type === Fragment\n ) {\n const fragmentChildren = (children as VNode).children as VNodeChild[]\n const childrenLength = fragmentChildren.length\n\n return fragmentChildren.map((item, i) => renderChild(item, childrenLength, i))\n }\n\n // if single child\n return renderChild(children)\n }\n\n // --------------------------------------------------------\n // render array of strings or numbers\n // --------------------------------------------------------\n const renderSimpleArray = (simpleData: SimpleValue[]) => {\n const { length } = simpleData\n\n if (length === 0) return null\n\n return simpleData.map((item, i) => {\n const key = getKey(item, i)\n const keyName = valueName ?? 'children'\n const extendedProps = attachItemProps({\n i,\n length,\n })\n\n const finalItemProps = {\n ...(itemProps ? injectItemProps({ [keyName]: item }, extendedProps) : {}),\n [keyName]: item,\n }\n\n if (Wrapper) {\n const finalWrapProps = wrapProps\n ? injectWrapItemProps({ [keyName]: item }, extendedProps)\n : {}\n\n return (\n <Wrapper key={key} {...finalWrapProps}>\n {render(component, finalItemProps)}\n </Wrapper>\n )\n }\n\n return render(component, { key, ...finalItemProps })\n })\n }\n\n // --------------------------------------------------------\n // render array of objects\n // --------------------------------------------------------\n const getObjectKey = (item: ObjectValue, index: number) => {\n if (!itemKey) return item.key ?? item.id ?? item.itemId ?? index\n if (typeof itemKey === 'function') return itemKey(item, index)\n if (typeof itemKey === 'string') return item[itemKey]\n\n return index\n }\n\n const renderComplexArray = (complexData: ObjectValue[]) => {\n const { length } = complexData\n\n if (length === 0) return null\n\n return complexData.map((item, i) => {\n const { component: itemComponent, ...restItem } = item\n const renderItem = itemComponent ?? component\n const key = getObjectKey(restItem, i)\n const extendedProps = attachItemProps({\n i,\n length,\n })\n\n const finalItemProps = {\n ...(itemProps ? injectItemProps(item, extendedProps) : {}),\n ...restItem,\n }\n\n if (Wrapper && !itemComponent) {\n const finalWrapProps = wrapProps ? injectWrapItemProps(item, extendedProps) : {}\n\n return (\n <Wrapper key={key} {...finalWrapProps}>\n {render(renderItem, finalItemProps)}\n </Wrapper>\n )\n }\n\n return render(renderItem, { key, ...finalItemProps })\n })\n }\n\n // --------------------------------------------------------\n // render list items\n // --------------------------------------------------------\n const renderItems = (): VNodeChild => {\n // children have priority over props component + data\n if (children) return renderChildren() as VNodeChild\n\n // render props component + data\n if (component && Array.isArray(data)) {\n const classified = classifyData(data)\n if (!classified) return null\n if (classified.type === 'simple') return renderSimpleArray(classified.data) as VNodeChild\n return renderComplexArray(classified.data) as VNodeChild\n }\n\n return null\n }\n\n return renderItems()\n}\n\n// ---------------------------------------------------------------------------\n// Public callable type — overloads expose the generic `<T>` API at the JSX\n// boundary while the impl stays loose-typed. TS picks the matching overload\n// based on the props object passed:\n//\n// <Iterator data={['a','b']} valueName=\"text\" component={Item} />\n// ^ T inferred as string → SimpleProps<string> overload selected\n//\n// <Iterator data={users} component={UserCard} />\n// ^ T inferred as User → ObjectProps<User> overload selected\n//\n// <Iterator>{...}</Iterator> → ChildrenProps overload selected\n// ---------------------------------------------------------------------------\nexport interface IteratorComponent {\n // T is inferred from the `data` prop at the JSX site — no explicit\n // generic argument needed. Order matters: SimpleProps first (matches\n // `data: SimpleValue[]`), then ObjectProps (object[]), then ChildrenProps,\n // then a LooseProps fallback.\n //\n // The narrow overloads (Simple / Object / Children) drive per-mode T\n // inference and stricter compile-time errors for direct callers (e.g.\n // `valueName` required for primitive arrays, forbidden for object arrays).\n // The LooseProps fallback exists for forwarding patterns where the props\n // type is a wide union that doesn't bind to any single narrow overload —\n // notably `Partial<(typeof Wrapper)['$$types']>` spread back into the JSX\n // site after `@pyreon/rocketstyle`'s 4-overload-aware `ExtractProps`\n // distributes the union across all of Iterator's call signatures. Without\n // the loose binding home, the wide union has nowhere to land and TS\n // reports \"no overload matches this call\" at every forwarding site.\n //\n // Direct callers still see the strict per-mode errors — the loose fallback\n // only fires when none of the three narrow overloads match.\n <T extends SimpleValue>(props: SimpleProps<T>): VNodeChild\n <T extends ObjectValue>(props: ObjectProps<T>): VNodeChild\n (props: ChildrenProps): VNodeChild\n (props: LooseProps): VNodeChild\n isIterator: true\n RESERVED_PROPS: typeof RESERVED_PROPS\n displayName?: string\n}\n\nconst Iterator = Object.assign(Component, {\n isIterator: true as const,\n RESERVED_PROPS,\n}) as unknown as IteratorComponent\n\nexport default Iterator\n","import component from './component'\nimport type {\n ChildrenProps,\n ElementType,\n ExtendedProps,\n LooseProps,\n MaybeNull,\n ObjectProps,\n ObjectValue,\n Props,\n PropsCallback,\n SimpleProps,\n SimpleValue,\n} from './types'\n\nexport type {\n ChildrenProps,\n ElementType,\n ExtendedProps,\n LooseProps,\n MaybeNull,\n ObjectProps,\n ObjectValue,\n Props,\n PropsCallback,\n SimpleProps,\n SimpleValue,\n}\n\nexport default component\n","/**\n * List component that combines Iterator (data-driven rendering) with an\n * optional Element root wrapper. When `rootElement` is false (default),\n * it renders a bare Iterator as a fragment. When true, the Iterator output\n * is wrapped in an Element that receives all non-iterator props (e.g.,\n * layout, alignment, css), allowing the list to be styled as a single block.\n */\nimport type { VNodeChild } from '@pyreon/core'\nimport { splitProps } from '@pyreon/core'\nimport { omit, pick } from '@pyreon/ui-core'\nimport { PKG_NAME } from '../constants'\nimport type { ElementProps } from '../Element'\nimport { Element } from '../Element'\nimport type {\n ChildrenProps as IteratorChildrenProps,\n LooseProps as IteratorLooseProps,\n ObjectProps as IteratorObjectProps,\n Props as IteratorProps,\n SimpleProps as IteratorSimpleProps,\n ObjectValue,\n SimpleValue,\n} from '../helpers/Iterator'\nimport Iterator from '../helpers/Iterator'\nimport type { MergeTypes } from '../types'\n\ntype ListOnly = {\n /**\n * A boolean value. When set to `false`, component returns fragment.\n * When set to `true`, component returns as the **root** element `Element`\n * component.\n */\n rootElement?: boolean\n /**\n * Label prop from `Element` component is being ignored.\n */\n label?: never\n /**\n * Content prop from `Element` component is being ignored.\n */\n content?: never\n}\n\n/**\n * Props that List accepts on top of the Iterator branch — the Element prop\n * surface (so `tag`, `direction`, `alignX`, etc. forward when\n * `rootElement` is true) plus the List-only toggle.\n */\ntype ListExtras = Partial<Omit<ElementProps, 'children' | 'content' | 'label'>> & ListOnly\n\n/**\n * Public Props — generic over the data element type so callers get the same\n * inference Iterator does, plus the List-specific `rootElement` toggle and\n * Element prop forwarding.\n *\n * Props<string> → SimpleProps & ListExtras (valueName REQUIRED)\n * Props<{ id; name }> → ObjectProps & ListExtras (valueName FORBIDDEN)\n * Props<unknown> / Props → LooseProps & ListExtras (today's behavior)\n */\nexport type Props<T = unknown> = MergeTypes<[IteratorProps<T>, ListExtras]>\n\n// Internal spread — runtime is correct, but the picked subset can't satisfy\n// any specific Iterator overload statically (which is good — the public\n// overloads enforce constraints). Cast Iterator to a loose callable for\n// the internal forwarding only; public consumers still see the strict\n// overloaded interface.\nconst LooseIterator = Iterator as unknown as (props: IteratorLooseProps) => VNodeChild\n\nconst Component = (allProps: IteratorLooseProps & ListExtras) => {\n const [own, props] = splitProps(allProps as Record<string, unknown>, ['rootElement', 'ref'])\n const renderedList = <LooseIterator {...pick(props, Iterator.RESERVED_PROPS)} />\n\n if (!own.rootElement) return renderedList\n\n return (\n <Element ref={own.ref as ElementProps['ref']} {...omit(props, Iterator.RESERVED_PROPS)}>\n {renderedList}\n </Element>\n )\n}\n\nconst name = `${PKG_NAME}/List` as const\n\n;(Component as { displayName?: string }).displayName = name\n;(Component as { pkgName?: string }).pkgName = PKG_NAME\n;(Component as { PYREON__COMPONENT?: string }).PYREON__COMPONENT = name\n\n// ---------------------------------------------------------------------------\n// Public callable type — same overload pattern as Iterator so JSX-site\n// inference flows through without callers having to spell out `<T>`.\n// ---------------------------------------------------------------------------\nexport interface ListComponent {\n // T inferred from `data`. Order: SimpleProps, ObjectProps, ChildrenProps,\n // then a LooseProps fallback for forwarding patterns where derived\n // `$$types['data']` is a wide union that doesn't bind to any narrow\n // overload. See Iterator's IteratorComponent for the full rationale.\n <T extends SimpleValue>(props: IteratorSimpleProps<T> & ListExtras): VNodeChild\n <T extends ObjectValue>(props: IteratorObjectProps<T> & ListExtras): VNodeChild\n (props: IteratorChildrenProps & ListExtras): VNodeChild\n (props: IteratorLooseProps & ListExtras): VNodeChild\n displayName?: string\n pkgName?: string\n PYREON__COMPONENT?: string\n}\n\nexport default Component as unknown as ListComponent\n","/**\n * Context for nested overlay coordination. When a child overlay opens, it\n * sets the parent's blocked state to true, preventing the parent from\n * closing in response to click/hover events that belong to the child.\n */\n\nimport type { VNodeChild } from '@pyreon/core'\nimport { createContext, nativeCompat, provide, useContext } from '@pyreon/core'\n\nexport interface OverlayContext {\n blocked: boolean | (() => boolean)\n setBlocked: () => void\n setUnblocked: () => void\n}\n\nconst context = createContext<OverlayContext>({} as OverlayContext)\n\nexport const useOverlayContext = () => useContext(context)\n\nconst Component = (props: OverlayContext & { children: VNodeChild }) => {\n const ctx = {\n blocked: props.blocked,\n setBlocked: props.setBlocked,\n setUnblocked: props.setUnblocked,\n }\n\n provide(context, ctx)\n\n return <>{props.children}</>\n}\n\n// Mark as native — invoked by Overlay internally; needs Pyreon's setup\n// frame for provide(context, ...) to reach descendant overlays.\nnativeCompat(Component)\n\nexport default Component\n","/**\n * Pure positioning helpers for the Overlay component. Split out from\n * `useOverlay.tsx` so the SSR-fallback branches (`typeof window === 'undefined'`)\n * can be exercised directly by tests that stub `globalThis.window` — the\n * `useOverlay` hook itself runs these via event handlers registered inside\n * `onMount`, which are unreachable during module-level test imports in\n * happy-dom (where `window` is always defined).\n */\n\nexport type OverlayPosition = Partial<{\n top: number | string\n bottom: number | string\n left: number | string\n right: number | string\n}>\n\nexport type Align = 'bottom' | 'top' | 'left' | 'right'\nexport type AlignX = 'left' | 'center' | 'right'\nexport type AlignY = 'bottom' | 'top' | 'center'\n\nexport type PositionResult = {\n pos: OverlayPosition\n resolvedAlignX: AlignX\n resolvedAlignY: AlignY\n}\n\nconst sel = <T,>(cond: boolean, a: T, b: T): T => (cond ? a : b)\n\nexport const calcDropdownVertical = (\n c: DOMRect,\n t: DOMRect,\n align: 'top' | 'bottom',\n alignX: AlignX,\n offsetX: number,\n offsetY: number,\n): PositionResult => {\n // SSR-fallback: positioning only runs in the mounted browser context, but\n // the explicit guard documents the SSR-safety contract at the callsite\n // and lets `no-window-in-ssr` prove it locally. Return shape mirrors the\n // \"no element\" path below (empty `pos`, alignment preserved).\n if (typeof window === 'undefined') return { pos: {}, resolvedAlignX: alignX, resolvedAlignY: align }\n const pos: OverlayPosition = {}\n\n const topPos = t.top - offsetY - c.height\n const bottomPos = t.bottom + offsetY\n const leftPos = t.left + offsetX\n const rightPos = t.right - offsetX - c.width\n\n const fitsTop = topPos >= 0\n const fitsBottom = bottomPos + c.height <= window.innerHeight\n const fitsLeft = leftPos + c.width <= window.innerWidth\n const fitsRight = rightPos >= 0\n\n const useTop = sel(align === 'top', fitsTop, !fitsBottom)\n pos.top = sel(useTop, topPos, bottomPos)\n const resolvedAlignY: AlignY = sel(useTop, 'top', 'bottom')\n\n let resolvedAlignX: AlignX = alignX\n if (alignX === 'left') {\n pos.left = sel(fitsLeft, leftPos, rightPos)\n resolvedAlignX = sel(fitsLeft, 'left', 'right')\n } else if (alignX === 'right') {\n pos.left = sel(fitsRight, rightPos, leftPos)\n resolvedAlignX = sel(fitsRight, 'right', 'left')\n } else {\n const center = t.left + (t.right - t.left) / 2 - c.width / 2\n const fitsCL = center >= 0\n const fitsCR = center + c.width <= window.innerWidth\n\n if (fitsCL && fitsCR) {\n resolvedAlignX = 'center'\n pos.left = center\n } else if (fitsCL) {\n resolvedAlignX = 'left'\n pos.left = leftPos\n } else if (fitsCR) {\n resolvedAlignX = 'right'\n pos.left = rightPos\n }\n }\n\n return { pos, resolvedAlignX, resolvedAlignY }\n}\n\nexport const calcDropdownHorizontal = (\n c: DOMRect,\n t: DOMRect,\n align: 'left' | 'right',\n alignY: AlignY,\n offsetX: number,\n offsetY: number,\n): PositionResult => {\n if (typeof window === 'undefined') return { pos: {}, resolvedAlignX: align, resolvedAlignY: alignY }\n const pos: OverlayPosition = {}\n\n const leftPos = t.left - offsetX - c.width\n const rightPos = t.right + offsetX\n const topPos = t.top + offsetY\n const bottomPos = t.bottom - offsetY - c.height\n\n const fitsLeft = leftPos >= 0\n const fitsRight = rightPos + c.width <= window.innerWidth\n const fitsTop = topPos + c.height <= window.innerHeight\n const fitsBottom = bottomPos >= 0\n\n const useLeft = sel(align === 'left', fitsLeft, !fitsRight)\n pos.left = sel(useLeft, leftPos, rightPos)\n const resolvedAlignX: AlignX = sel(useLeft, 'left', 'right')\n\n let resolvedAlignY: AlignY = alignY\n if (alignY === 'top') {\n pos.top = sel(fitsTop, topPos, bottomPos)\n resolvedAlignY = sel(fitsTop, 'top', 'bottom')\n } else if (alignY === 'bottom') {\n pos.top = sel(fitsBottom, bottomPos, topPos)\n resolvedAlignY = sel(fitsBottom, 'bottom', 'top')\n } else {\n const center = t.top + (t.bottom - t.top) / 2 - c.height / 2\n const fitsCT = center >= 0\n const fitsCB = center + c.height <= window.innerHeight\n\n if (fitsCT && fitsCB) {\n resolvedAlignY = 'center'\n pos.top = center\n } else if (fitsCT) {\n resolvedAlignY = 'top'\n pos.top = topPos\n } else if (fitsCB) {\n resolvedAlignY = 'bottom'\n pos.top = bottomPos\n }\n }\n\n return { pos, resolvedAlignX, resolvedAlignY }\n}\n\nexport const calcModalPos = (\n c: DOMRect,\n alignX: AlignX,\n alignY: AlignY,\n offsetX: number,\n offsetY: number,\n): OverlayPosition => {\n if (typeof window === 'undefined') return {}\n const pos: OverlayPosition = {}\n\n switch (alignX) {\n case 'right':\n pos.right = offsetX\n break\n case 'left':\n pos.left = offsetX\n break\n case 'center':\n pos.left = window.innerWidth / 2 - c.width / 2\n break\n default:\n pos.right = offsetX\n }\n\n switch (alignY) {\n case 'top':\n pos.top = offsetY\n break\n case 'center':\n pos.top = window.innerHeight / 2 - c.height / 2\n break\n case 'bottom':\n pos.bottom = offsetY\n break\n default:\n pos.top = offsetY\n }\n\n return pos\n}\n\nexport const adjustForAncestor = (\n pos: OverlayPosition,\n ancestor: { top: number; left: number },\n): OverlayPosition => {\n if (ancestor.top === 0 && ancestor.left === 0) return pos\n\n const result = { ...pos }\n if (typeof result.top === 'number') result.top -= ancestor.top\n if (typeof result.bottom === 'number') result.bottom += ancestor.top\n if (typeof result.left === 'number') result.left -= ancestor.left\n if (typeof result.right === 'number') result.right += ancestor.left\n\n return result\n}\n","/**\n * Core hook powering the Overlay component. Manages open/close state, DOM\n * event listeners (click, hover, scroll, resize, ESC key), and dynamic\n * positioning of overlay content relative to its trigger. Supports dropdown,\n * tooltip, popover, and modal types with automatic edge-of-viewport flipping.\n * Event handlers are throttled for performance, and nested overlay blocking\n * is coordinated through the overlay context.\n */\n\nimport { batch, signal } from '@pyreon/reactivity'\nimport { throttle } from '@pyreon/ui-core'\nimport { value } from '@pyreon/unistyle'\nimport { IS_DEVELOPMENT } from '../utils'\nimport Provider, { useOverlayContext } from './context'\nimport {\n adjustForAncestor,\n calcDropdownHorizontal,\n calcDropdownVertical,\n calcModalPos,\n type Align,\n type AlignX,\n type AlignY,\n type OverlayPosition,\n} from './positioning'\n\nexport type UseOverlayProps = Partial<{\n isOpen: boolean\n openOn: 'click' | 'hover' | 'manual'\n closeOn: 'click' | 'clickOnTrigger' | 'clickOutsideContent' | 'hover' | 'manual'\n type: 'dropdown' | 'tooltip' | 'popover' | 'modal' | 'custom'\n position: 'absolute' | 'fixed' | 'relative' | 'static'\n align: Align\n alignX: AlignX\n alignY: AlignY\n offsetX: number\n offsetY: number\n throttleDelay: number\n parentContainer: HTMLElement | null\n closeOnEsc: boolean\n hoverDelay: number\n disabled: boolean\n onOpen: () => void\n onClose: () => void\n}>\n\n// Reference counter for nested modals sharing document.body overflow lock.\nlet modalOverflowCount = 0\n\n// Hoisted: closeOn values that count as \"click-driven close\". Inlined\n// previously, allocating a fresh 3-element array on each click-listener\n// setupListeners re-run. Ported from vitus-labs `804dd0e2`.\nconst CLICK_CLOSE_KINDS: ReadonlySet<string> = new Set([\n 'click',\n 'clickOnTrigger',\n 'clickOutsideContent',\n])\n\nconst devWarn = (msg: string) => {\n if (!IS_DEVELOPMENT) return\n // oxlint-disable-next-line no-console\n console.warn(msg)\n}\n\n\ntype ComputeResult = {\n pos: OverlayPosition\n resolvedAlignX?: AlignX\n resolvedAlignY?: AlignY\n}\n\nconst computePosition = (\n type: string,\n align: Align,\n alignX: AlignX,\n alignY: AlignY,\n offsetX: number,\n offsetY: number,\n triggerEl: HTMLElement | null,\n contentEl: HTMLElement | null,\n ancestorOffset: { top: number; left: number },\n): ComputeResult => {\n const isDropdown = ['dropdown', 'tooltip', 'popover'].includes(type)\n\n if (isDropdown && (!triggerEl || !contentEl)) {\n devWarn(\n `[@pyreon/elements] Overlay (${type}): ` +\n `${triggerEl ? 'contentRef' : 'triggerRef'} is not attached. ` +\n 'Position cannot be calculated without both refs.',\n )\n return { pos: {} }\n }\n\n if (isDropdown && triggerEl && contentEl) {\n const c = contentEl.getBoundingClientRect()\n const t = triggerEl.getBoundingClientRect()\n const result =\n align === 'top' || align === 'bottom'\n ? calcDropdownVertical(c, t, align, alignX, offsetX, offsetY)\n : calcDropdownHorizontal(c, t, align as 'left' | 'right', alignY, offsetX, offsetY)\n\n return {\n pos: adjustForAncestor(result.pos, ancestorOffset),\n resolvedAlignX: result.resolvedAlignX,\n resolvedAlignY: result.resolvedAlignY,\n }\n }\n\n if (type === 'modal') {\n if (!contentEl) {\n devWarn(\n '[@pyreon/elements] Overlay (modal): contentRef is not attached. ' +\n 'Modal position cannot be calculated without a content element.',\n )\n return { pos: {} }\n }\n const c = contentEl.getBoundingClientRect()\n return {\n pos: adjustForAncestor(calcModalPos(c, alignX, alignY, offsetX, offsetY), ancestorOffset),\n }\n }\n\n return { pos: {} }\n}\n\nconst processVisibilityEvent = (\n e: Event,\n active: boolean,\n openOn: string,\n closeOn: string,\n isTrigger: (evt: Event) => boolean,\n isContent: (evt: Event) => boolean,\n showContent: () => void,\n hideContent: () => void,\n) => {\n if (!active && openOn === 'click' && e.type === 'click' && isTrigger(e)) {\n showContent()\n return\n }\n\n if (!active) return\n\n if (closeOn === 'hover' && e.type === 'scroll') {\n hideContent()\n return\n }\n\n if (e.type !== 'click') return\n\n if (closeOn === 'click') {\n hideContent()\n } else if (closeOn === 'clickOnTrigger' && isTrigger(e)) {\n hideContent()\n } else if (closeOn === 'clickOutsideContent' && !isContent(e)) {\n hideContent()\n }\n}\n\nconst useOverlay = ({\n isOpen = false,\n openOn = 'click',\n closeOn = 'click',\n type = 'dropdown',\n position = 'fixed',\n align = 'bottom',\n alignX: propAlignX = 'left',\n alignY: propAlignY = 'bottom',\n offsetX = 0,\n offsetY = 0,\n throttleDelay = 200,\n parentContainer,\n closeOnEsc = true,\n hoverDelay = 100,\n disabled,\n onOpen,\n onClose,\n}: Partial<UseOverlayProps> = {}) => {\n const ctx = useOverlayContext()\n\n // Signal-based state\n const active = signal(isOpen)\n const isContentLoaded = signal(false)\n const innerAlignX = signal(propAlignX)\n const innerAlignY = signal(propAlignY)\n const blockedCount = signal(0)\n\n const blocked = () => blockedCount() > 0\n\n // DOM refs (plain variables, component runs once)\n let triggerEl: HTMLElement | null = null\n let contentEl: HTMLElement | null = null\n const _prevFocusEl: HTMLElement | null = null\n let hoverTimeout: ReturnType<typeof setTimeout> | null = null\n\n const triggerRef = (node: HTMLElement | null) => {\n triggerEl = node\n }\n\n const contentRefCallback = (node: HTMLElement | null) => {\n contentEl = node\n isContentLoaded.set(!!node)\n }\n\n const setBlocked = () => blockedCount.update((c) => c + 1)\n const setUnblocked = () => blockedCount.update((c) => Math.max(0, c - 1))\n\n const showContent = () => {\n active.set(true)\n onOpen?.()\n ctx.setBlocked?.()\n }\n\n const hideContent = () => {\n // batch() so subscribers reading both active + isContentLoaded\n // (e.g. the overlay shell + the content portal) get notified once\n // per close, not twice. Fires on every overlay dismiss path.\n batch(() => {\n active.set(false)\n isContentLoaded.set(false)\n })\n onClose?.()\n ctx.setUnblocked?.()\n }\n\n // Position calculation helpers\n const getAncestorOffset = () => {\n if (typeof document === 'undefined') return { top: 0, left: 0 }\n if (position !== 'absolute' || !contentEl) {\n return { top: 0, left: 0 }\n }\n\n const offsetParent = contentEl.offsetParent as HTMLElement | null\n if (!offsetParent || offsetParent === document.body) {\n return { top: 0, left: 0 }\n }\n\n const rect = offsetParent.getBoundingClientRect()\n return { top: rect.top, left: rect.left }\n }\n\n const calculateContentPosition = () => {\n if (!active() || !isContentLoaded()) return {}\n\n const result = computePosition(\n type,\n align,\n propAlignX,\n propAlignY,\n offsetX,\n offsetY,\n triggerEl,\n contentEl,\n getAncestorOffset(),\n )\n\n // batch() so the resolved-align writes notify subscribers once\n // per recompute, not twice. Position recomputes on scroll/resize\n // (throttled but still frequent) and on every viewport change.\n if (result.resolvedAlignX || result.resolvedAlignY) {\n batch(() => {\n if (result.resolvedAlignX) innerAlignX.set(result.resolvedAlignX)\n if (result.resolvedAlignY) innerAlignY.set(result.resolvedAlignY)\n })\n }\n\n return result.pos\n }\n\n const assignContentPosition = (values: OverlayPosition = {}) => {\n if (!contentEl) return\n\n const el = contentEl\n const setValue = (param?: string | number) => value(param, 16) as string\n\n el.style.position = position\n\n el.style.top = values.top != null ? setValue(values.top) : ''\n el.style.bottom = values.bottom != null ? setValue(values.bottom) : ''\n el.style.left = values.left != null ? setValue(values.left) : ''\n el.style.right = values.right != null ? setValue(values.right) : ''\n }\n\n const setContentPosition = () => {\n const currentPosition = calculateContentPosition()\n assignContentPosition(currentPosition)\n }\n\n const isNodeOrChild = (getRef: () => HTMLElement | null) => (e: Event) => {\n const ref = getRef()\n if (e?.target && ref) {\n return ref.contains(e.target as Element) || e.target === ref\n }\n return false\n }\n\n const handleVisibilityByEventType = (e: Event) => {\n if (blocked() || disabled) return\n\n processVisibilityEvent(\n e,\n active(),\n openOn,\n closeOn,\n isNodeOrChild(() => triggerEl),\n isNodeOrChild(() => contentEl),\n showContent,\n hideContent,\n )\n }\n\n const handleContentPosition = throttle(() => setContentPosition(), throttleDelay)\n\n const handleClick = (e: Event) => handleVisibilityByEventType(e)\n\n const handleVisibility = throttle((e: Event) => handleVisibilityByEventType(e), throttleDelay)\n\n // --------------------------------------------------------------------------\n // Set up all event listeners on mount, clean up on unmount\n // --------------------------------------------------------------------------\n const setupListeners = () => {\n if (typeof window === 'undefined') return () => {}\n const cleanups: (() => void)[] = []\n\n // Click-based open/close\n const enabledClick = openOn === 'click' || CLICK_CLOSE_KINDS.has(closeOn)\n\n if (enabledClick) {\n window.addEventListener('click', handleClick)\n cleanups.push(() => window.removeEventListener('click', handleClick))\n }\n\n // ESC key\n if (closeOnEsc) {\n const handleEscKey = (e: KeyboardEvent) => {\n if (e.key === 'Escape' && active() && !blocked()) {\n hideContent()\n }\n }\n window.addEventListener('keydown', handleEscKey)\n cleanups.push(() => window.removeEventListener('keydown', handleEscKey))\n }\n\n // Hover-based open/close\n const enabledHover = openOn === 'hover' || closeOn === 'hover'\n if (enabledHover) {\n const clearHoverTimeout = () => {\n if (hoverTimeout != null) {\n clearTimeout(hoverTimeout)\n hoverTimeout = null\n }\n }\n\n const scheduleHide = () => {\n clearHoverTimeout()\n hoverTimeout = setTimeout(hideContent, hoverDelay)\n }\n\n const onTriggerEnter = () => {\n clearHoverTimeout()\n if (openOn === 'hover' && !active()) showContent()\n }\n\n const onTriggerLeave = () => {\n if (closeOn === 'hover' && active()) scheduleHide()\n }\n\n const onContentEnter = () => {\n clearHoverTimeout()\n }\n\n const onContentLeave = () => {\n if (closeOn === 'hover' && active()) scheduleHide()\n }\n\n // We need to defer listener attachment until refs are available\n const attachHoverListeners = () => {\n if (triggerEl) {\n triggerEl.addEventListener('mouseenter', onTriggerEnter)\n triggerEl.addEventListener('mouseleave', onTriggerLeave)\n }\n if (contentEl) {\n contentEl.addEventListener('mouseenter', onContentEnter)\n contentEl.addEventListener('mouseleave', onContentLeave)\n }\n }\n\n attachHoverListeners()\n\n cleanups.push(() => {\n clearHoverTimeout()\n if (triggerEl) {\n triggerEl.removeEventListener('mouseenter', onTriggerEnter)\n triggerEl.removeEventListener('mouseleave', onTriggerLeave)\n }\n if (contentEl) {\n contentEl.removeEventListener('mouseenter', onContentEnter)\n contentEl.removeEventListener('mouseleave', onContentLeave)\n }\n })\n }\n\n // Resize/scroll repositioning\n const shouldSetOverflow = type === 'modal'\n\n const onScroll = (e: Event) => {\n handleContentPosition()\n handleVisibility(e)\n }\n\n if (shouldSetOverflow) {\n modalOverflowCount++\n if (modalOverflowCount === 1) document.body.style.overflow = 'hidden'\n }\n\n window.addEventListener('resize', handleContentPosition)\n window.addEventListener('scroll', onScroll, { passive: true })\n cleanups.push(() => {\n handleContentPosition.cancel()\n handleVisibility.cancel()\n if (shouldSetOverflow) {\n modalOverflowCount--\n if (modalOverflowCount === 0) document.body.style.overflow = ''\n }\n window.removeEventListener('resize', handleContentPosition)\n window.removeEventListener('scroll', onScroll)\n })\n\n // Parent container scroll\n if (parentContainer) {\n if (closeOn !== 'hover') parentContainer.style.overflow = 'hidden'\n\n const onParentScroll = (e: Event) => {\n handleContentPosition()\n handleVisibility(e)\n }\n\n parentContainer.addEventListener('scroll', onParentScroll, {\n passive: true,\n })\n cleanups.push(() => {\n parentContainer.style.overflow = ''\n parentContainer.removeEventListener('scroll', onParentScroll)\n })\n }\n\n // Cleanup function\n return () => {\n for (const cleanup of cleanups) cleanup()\n }\n }\n\n // Handle disabled state\n if (disabled) {\n active.set(false)\n }\n\n return {\n triggerRef,\n contentRef: contentRefCallback,\n active,\n align,\n alignX: innerAlignX,\n alignY: innerAlignY,\n showContent,\n hideContent,\n blocked,\n setBlocked,\n setUnblocked,\n setupListeners,\n Provider,\n }\n}\n\nexport default useOverlay\n","/**\n * Overlay component that renders a trigger element and conditionally shows\n * content via a Portal. The trigger receives a ref and optional show/hide\n * callbacks; the content is positioned and managed by the useOverlay hook.\n * A context Provider wraps the content to support nested overlays (e.g.,\n * a dropdown inside another dropdown) via blocked-state propagation.\n */\n\nimport type { VNodeChild } from '@pyreon/core'\nimport { nativeCompat, onMount, Portal, splitProps } from '@pyreon/core'\nimport { render } from '@pyreon/ui-core'\nimport { PKG_NAME } from '../constants'\nimport type { Content, PyreonComponent } from '../types'\nimport useOverlay, { type UseOverlayProps } from './useOverlay'\n\nconst IS_BROWSER = typeof window !== 'undefined'\n\ntype Align = 'bottom' | 'top' | 'left' | 'right'\ntype AlignX = 'left' | 'center' | 'right'\ntype AlignY = 'bottom' | 'top' | 'center'\n\ntype TriggerRenderer = (\n props: Partial<{\n active: boolean\n showContent: () => void\n hideContent: () => void\n }>,\n) => VNodeChild\n\ntype ContentRenderer = (\n props: Partial<{\n active: boolean\n showContent: () => void\n hideContent: () => void\n align: Align\n alignX: AlignX\n alignY: AlignY\n }>,\n) => VNodeChild\n\nexport type Props = {\n children: ContentRenderer | Content\n trigger: TriggerRenderer | Content\n DOMLocation?: HTMLElement\n triggerRefName?: string\n contentRefName?: string\n} & UseOverlayProps\n\nconst Component: PyreonComponent<Props> = (props) => {\n const [own, overlayProps] = splitProps(props, [\n 'children',\n 'trigger',\n 'DOMLocation',\n 'triggerRefName',\n 'contentRefName',\n ])\n\n const triggerRefName = own.triggerRefName ?? 'ref'\n const contentRefName = own.contentRefName ?? 'ref'\n\n const {\n active,\n triggerRef,\n contentRef,\n showContent,\n hideContent,\n align,\n alignX,\n alignY,\n setupListeners,\n Provider,\n ...ctx\n } = useOverlay(overlayProps)\n\n const { openOn, closeOn, type } = overlayProps\n\n const passHandlers =\n openOn === 'manual' || closeOn === 'manual' || closeOn === 'clickOutsideContent'\n\n const ariaHasPopup = (() => {\n switch (type) {\n case 'modal':\n return 'dialog' as const\n case 'tooltip':\n return 'true' as const\n default:\n return 'menu' as const\n }\n })()\n\n // Set up event listeners on mount\n onMount(() => {\n const cleanup = setupListeners()\n return cleanup\n })\n\n return (\n <>\n {render(own.trigger, {\n [triggerRefName]: triggerRef,\n active: active(),\n 'aria-expanded': active(),\n 'aria-haspopup': ariaHasPopup,\n ...(passHandlers ? { showContent, hideContent } : {}),\n })}\n\n {() =>\n IS_BROWSER && active() ? (\n <Portal target={own.DOMLocation ?? document.body}>\n <Provider {...ctx}>\n {render(own.children, {\n [contentRefName]: contentRef,\n role: type === 'modal' ? 'dialog' : undefined,\n 'aria-modal': type === 'modal' ? true : undefined,\n active: active(),\n align,\n alignX: alignX(),\n alignY: alignY(),\n ...(passHandlers ? { showContent, hideContent } : {}),\n })}\n </Provider>\n </Portal>\n ) : null\n }\n </>\n )\n}\n\nconst name = `${PKG_NAME}/Overlay` as const\n\nComponent.displayName = name\nComponent.pkgName = PKG_NAME\nComponent.PYREON__COMPONENT = name\n\n// Mark as native — compat-mode jsx() runtimes skip wrapCompatComponent so\n// Overlay's onMount + Portal + useOverlay hook setup run inside Pyreon's\n// setup frame.\nnativeCompat(Component)\n\nexport default Component\n","/**\n * Portal — renders children into a per-instance wrapper element appended to\n * `DOMLocation` (defaults to `document.body`). Mirrors vitus-labs's Portal:\n * a fresh wrapper is created per Portal mount, children render INSIDE it\n * (not directly into DOMLocation), and the wrapper is removed on unmount.\n *\n * Per-instance wrapper isolation matters when multiple Portals share a\n * DOMLocation (e.g. several modals on `document.body`) — without the wrapper\n * their children would intermingle, defeating CSS scoping and making\n * cleanup brittle.\n */\n\nimport type { VNodeChild } from '@pyreon/core'\nimport { Portal as CorePortal, onUnmount } from '@pyreon/core'\nimport { PKG_NAME } from '../constants'\nimport type { PyreonComponent } from '../types'\n\nexport interface Props {\n /**\n * DOM element to mount the wrapper into. Defaults to `document.body`.\n */\n DOMLocation?: HTMLElement\n /**\n * Children rendered inside the wrapper.\n */\n children: VNodeChild\n /**\n * HTML tag for the per-instance wrapper element. Defaults to `'div'`.\n */\n tag?: string\n}\n\nconst Component: PyreonComponent<Props> = (props) => {\n if (typeof document === 'undefined') return null\n\n const tag = props.tag ?? 'div'\n const target = props.DOMLocation ?? document.body\n const wrapper = document.createElement(tag)\n target.appendChild(wrapper)\n\n onUnmount(() => {\n wrapper.remove()\n })\n\n return <CorePortal target={wrapper}>{props.children}</CorePortal>\n}\n\nconst name = `${PKG_NAME}/Portal` as const\n\nComponent.displayName = name\nComponent.pkgName = PKG_NAME\nComponent.PYREON__COMPONENT = name\n\nexport default Component\n","/**\n * Styled text primitive that inherits color, font-weight, and line-height\n * from its parent so it blends seamlessly into any context. Additional\n * styles can be injected via the responsive `extraStyles` prop processed\n * through makeItResponsive.\n */\nimport { config } from '@pyreon/ui-core'\nimport { extendCss, makeItResponsive } from '@pyreon/unistyle'\nimport type { Css, ResponsiveStylesCallback } from '../types'\n\nconst { styled, css, textComponent } = config\n\n// Per-breakpoint resolved theme for Text — `Css` (callback / CSSResult /\n// string) is what `extendCss` accepts. Text doesn't carry layout props,\n// so the theme is just the optional `extraStyles` injection.\ntype ThemeProps = { extraStyles?: Css }\n\nconst styles: ResponsiveStylesCallback<ThemeProps> = ({ css: cssFn, theme: t }) => cssFn`\n ${t.extraStyles && extendCss(t.extraStyles as Parameters<typeof extendCss>[0])};\n`\n\nexport default styled(textComponent, { layer: 'elements' })`\n ${css`\n color: inherit;\n font-weight: inherit;\n line-height: 1;\n `};\n\n ${makeItResponsive({\n key: '$text',\n styles,\n css,\n normalize: false,\n })};\n`\n","/**\n * Text component for rendering inline or block-level text. Supports a\n * `paragraph` shorthand that automatically renders as a `<p>` tag, or\n * a custom `tag` for semantic HTML (h1-h6, span, etc.). Marked with\n * a static `isText` flag so other components can detect text children.\n */\n\nimport { h, splitProps } from '@pyreon/core'\nimport type { PyreonHTMLAttributes, VNodeChild } from '@pyreon/core'\nimport type { HTMLTextTags } from '@pyreon/ui-core'\nimport { PKG_NAME } from '../constants'\nimport { buildSpreadProps } from '../helpers/buildSpreadProps'\nimport type { ExtendCss, PyreonComponent } from '../types'\nimport Styled from './styled'\n\nexport type Props = Partial<{\n /**\n * Label can be used instead of children for inline syntax. But **children** prop takes a precedence\n */\n label: VNodeChild\n /**\n * Children to be rendered within **Text** component.\n */\n children: VNodeChild\n /**\n * Defines whether should behave as a block text element. Automatically adds **p** HTML tag\n */\n paragraph: boolean\n /**\n * Defines what kind of HTML tag should be rendered\n */\n tag: HTMLTextTags\n /**\n * If an additional styling needs to be added, it can be do so via injecting styles using this property.\n */\n css: ExtendCss\n}> &\n PyreonHTMLAttributes\n\nconst Component: PyreonComponent<Props> & {\n isText?: true\n} = (props) => {\n const [own, rest] = splitProps(props, ['paragraph', 'label', 'children', 'tag', 'css', 'ref'])\n\n // `paragraph` shorthand maps to <p>; otherwise pass through `tag`. Ternary\n // form replaces the prior `let finalTag` + if/else block — V8 prefers the\n // single-assignment shape for inline-cache stability. Ported from\n // vitus-labs `804dd0e2`.\n const finalTag = own.paragraph ? 'p' : own.tag\n\n // Use `h(Styled, buildSpreadProps(rest, {..., children}))` instead of\n // JSX spread `<Styled ... {...rest}>` so compiler-emitted reactive\n // props (`_rp()` converted to getters by `makeReactiveProps`) survive\n // end-to-end. JSX spread fires every getter at the JS object-literal\n // layer; the descriptor-copying helper preserves getters.\n //\n // Children MUST go into the buildSpreadProps override (not h's third\n // arg) — otherwise `mount.ts` runs `{...vnode.props, children: ...}`\n // to merge h's children into props, and that JS spread fires every\n // getter on vnode.props, defeating the descriptor preservation. See\n // `helpers/buildSpreadProps.ts` JSDoc + the parallel pattern in\n // `Element/component.tsx`.\n return h(\n Styled,\n buildSpreadProps(rest as Record<string, unknown>, {\n ref: own.ref,\n as: finalTag,\n $text: { extraStyles: own.css },\n children: own.children ?? own.label,\n }),\n )\n}\n\n// ----------------------------------------------\n// DEFINE STATICS\n// ----------------------------------------------\nconst name = `${PKG_NAME}/Text` as const\n\nComponent.displayName = name\nComponent.pkgName = PKG_NAME\nComponent.PYREON__COMPONENT = name\nComponent.isText = true\n\nexport default Component\n","/**\n * Utility wrapper that injects className and/or style props into its\n * children without adding any DOM nodes of its own. Uses the core `render`\n * helper to clone children with the merged props.\n */\n\nimport type { VNode, VNodeChild } from '@pyreon/core'\nimport { render } from '@pyreon/ui-core'\nimport { PKG_NAME } from '../constants'\nimport type { PyreonComponent } from '../types'\n\nexport interface Props {\n /**\n * Children to be rendered within **Util** component.\n */\n children: VNodeChild\n /**\n * Class name(s) to be added to children component.\n */\n className?: string | string[] | undefined\n /**\n * Style property to extend children component inline styles\n */\n style?: Record<string, unknown> | undefined\n}\n\nconst Component: PyreonComponent<Props> = (({ children, className, style }: Props) => {\n const mergedClasses = Array.isArray(className) ? className.join(' ') : className\n\n const finalProps: Record<string, any> = {}\n if (style) finalProps.style = style\n if (mergedClasses) finalProps.className = mergedClasses\n\n return render(children, finalProps) as VNode | null\n}) as PyreonComponent<Props>\n\nconst name = `${PKG_NAME}/Util` as const\n\nComponent.displayName = name\nComponent.pkgName = PKG_NAME\nComponent.PYREON__COMPONENT = name\n\nexport default Component\n","import { registerSingleton } from '@pyreon/reactivity'\n\n// Singleton sentinel — fail-loud detection of duplicate @pyreon/elements\n// instances in the same heap. See @pyreon/reactivity/singleton-sentinel for\n// full rationale. Hardcoded version is acceptable here — it's a diagnostic\n// aid, not a load-bearing identity check.\nregisterSingleton('@pyreon/elements', '0.24.6', import.meta.url)\n\nimport { Provider } from '@pyreon/unistyle'\n\nexport type { ElementProps, PyreonElement } from './Element'\nexport { Element } from './Element'\nexport type {\n ChildrenProps as IteratorChildrenProps,\n ElementType,\n ExtendedProps,\n LooseProps as IteratorLooseProps,\n MaybeNull,\n ObjectProps as IteratorObjectProps,\n ObjectValue,\n Props as IteratorProps,\n PropsCallback,\n SimpleProps as IteratorSimpleProps,\n SimpleValue,\n} from './helpers/Iterator'\nexport { default as Iterator } from './helpers/Iterator'\nexport type { ListProps } from './List'\nexport { List } from './List'\nexport type { OverlayProps, UseOverlayProps } from './Overlay'\nexport { Overlay, OverlayProvider, useOverlay } from './Overlay'\nexport type { PortalProps } from './Portal'\nexport { Portal } from './Portal'\nexport type { TextProps } from './Text'\nexport { Text } from './Text'\nexport type {\n AlignX,\n AlignY,\n Content,\n ContentBoolean,\n Direction,\n ExtendCss,\n InnerRef,\n PyreonStatic,\n Responsive,\n ResponsiveBoolType,\n} from './types'\nexport type { UtilProps } from './Util'\nexport { Util } from './Util'\n\nexport { Provider }\n"],"mappings":";;;;;;;AAAA,MAAa,WAAW;;;;ACIxB,MAAa,iBAA0B,QAAQ,IAAI,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC2BhE,MAAa,oBACX,MACA,cAC4B;CAC5B,MAAM,SAAkC,CAAC;CACzC,MAAM,cAAc,OAAO,0BAA0B,IAAI;CACzD,KAAK,MAAM,OAAO,aAChB,OAAO,eAAe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UAAgD,EAAE,KAAK,OAAO,OAAO,QAAQ,KAAK;IACpF,EAAE,eAAe,UAAU,EAAE,WAA8C,EAAE;;AAGjF,qBAAe,OAAO,eAAe,EAAE,OAAO,WAAW,CAAC,CAAC;IACvD,GAAG;;;;IAIH;;IAEA,iBAAiB;CACjB,KAAK;CACL;CACA;CACA,WAAW;AACb,CAAC,EAAE;;;;;;;;;;;ACML,MAAMC,eAED,UAAU;CACb,MAAM,CAAC,KAAK,QAAQ,WAAW,OAAO;EAAC;EAAa;EAAS;EAAY;EAAO;EAAO;CAAK,CAAC;CAM7F,MAAM,WAAW,IAAI,YAAY,MAAM,IAAI;CAc3C,OAAO,EACLC,gBACA,iBAAiB,MAAiC;EAChD,KAAK,IAAI;EACT,IAAI;EACJ,OAAO,EAAE,aAAa,IAAI,IAAI;EAC9B,UAAU,IAAI,YAAY,IAAI;CAChC,CAAC,CACH;AACF;AAKA,MAAMC,SAAO,GAAG,SAAS;AAEzB,YAAU,cAAcA;AACxB,YAAU,UAAU;AACpB,YAAU,oBAAoBA;AAC9B,YAAU,SAAS;;;;ACvDnB,MAAMC,gBAAsC,EAAE,UAAU,WAAW,YAAmB;CACpF,MAAM,gBAAgB,MAAM,QAAQ,SAAS,IAAI,UAAU,KAAK,GAAG,IAAI;CAEvE,MAAM,aAAkC,CAAC;CACzC,IAAI,OAAO,WAAW,QAAQ;CAC9B,IAAI,eAAe,WAAW,YAAY;CAE1C,OAAO,OAAO,UAAU,UAAU;AACpC;AAEA,MAAM,OAAO,GAAG,SAAS;AAEzB,YAAU,cAAc;AACxB,YAAU,UAAU;AACpB,YAAU,oBAAoB;;;;AClC9B,kBAAkB,oBAAoB,UAAU,OAAO,KAAK,GAAG"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pyreon/elements",
3
- "version": "0.26.2",
3
+ "version": "0.26.3",
4
4
  "description": "Foundational UI components for Pyreon",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -40,22 +40,22 @@
40
40
  },
41
41
  "devDependencies": {
42
42
  "@pyreon/manifest": "0.13.1",
43
- "@pyreon/runtime-dom": "^0.26.2",
43
+ "@pyreon/runtime-dom": "^0.26.3",
44
44
  "@pyreon/test-utils": "^0.13.13",
45
- "@pyreon/typescript": "^0.26.2",
45
+ "@pyreon/typescript": "^0.26.3",
46
46
  "@pyreon/vitest-config": "0.13.1",
47
- "@vitest/browser-playwright": "^4.1.7",
47
+ "@vitest/browser-playwright": "^4.1.8",
48
48
  "@vitus-labs/tools-rolldown": "^2.5.0"
49
49
  },
50
50
  "engines": {
51
51
  "node": ">= 22"
52
52
  },
53
53
  "dependencies": {
54
- "@pyreon/ui-core": "^0.26.2",
55
- "@pyreon/unistyle": "^0.26.2"
54
+ "@pyreon/ui-core": "^0.26.3",
55
+ "@pyreon/unistyle": "^0.26.3"
56
56
  },
57
57
  "peerDependencies": {
58
- "@pyreon/core": "^0.26.2",
59
- "@pyreon/reactivity": "^0.26.2"
58
+ "@pyreon/core": "^0.26.3",
59
+ "@pyreon/reactivity": "^0.26.3"
60
60
  }
61
61
  }