@pyreon/rocketstyle 0.30.0 → 0.32.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -278,7 +278,7 @@ For a 150-component page with 8 dimensions each: ~1,350 Set allocations, ~300 ar
278
278
 
279
279
  ## Documentation
280
280
 
281
- Full docs: [docs.pyreon.dev/docs/rocketstyle](https://docs.pyreon.dev/docs/rocketstyle) (or `docs/docs/rocketstyle.md` in this repo).
281
+ Full docs: [docs.pyreon.dev/docs/rocketstyle](https://docs.pyreon.dev/docs/rocketstyle) (or `docs/src/content/docs/rocketstyle.md` in this repo).
282
282
 
283
283
  ## License
284
284
 
package/lib/index.d.ts CHANGED
@@ -377,6 +377,21 @@ type IsRocketComponent = <T>(component: T) => boolean;
377
377
  /** Runtime type guard — checks if a component was created by `rocketstyle()`. */
378
378
  declare const isRocketComponent: IsRocketComponent;
379
379
  //#endregion
380
+ //#region src/utils/theme.d.ts
381
+ /**
382
+ * Resolve any `var(--<prefix>-m-<hash>)` mode-pair references in a value to
383
+ * their raw light/dark value, for non-CSS render targets. Unknown var names
384
+ * (theme-leaf vars — those live in `themeToCssVars`'s registry — or anything
385
+ * not allocated by the mode factory) are left untouched; pair this with
386
+ * `resolveCssVarReferences` from `@pyreon/unistyle` to resolve those too.
387
+ * Non-strings and strings without a var ref pass through unchanged.
388
+ *
389
+ * @example
390
+ * // after `<X color={mode('#000', '#fff')} />` under cssVariables:
391
+ * resolveModeVar('var(--px-m-abc123)', 'dark') // '#fff'
392
+ */
393
+ declare function resolveModeVar(value: unknown, mode?: 'light' | 'dark'): unknown;
394
+ //#endregion
380
395
  //#region src/index.d.ts
381
396
  /**
382
397
  * Resolve a $rocketstyle value — handles both function accessor and plain object.
@@ -391,5 +406,5 @@ declare const isRocketComponent: IsRocketComponent;
391
406
  */
392
407
  declare function resolveTheme<T = Record<string, unknown>>(value: (() => T) | T): T;
393
408
  //#endregion
394
- export { type AttrsCb, type AttrsHelpers, type ComponentFn, type ComposeParam, type ConfigAttrs, type ConsumerCb, type ConsumerCtxCBValue, type ConsumerCtxCb, type DefaultProps, type DimensionCallbackParam, type DimensionProps, type DimensionValue, type Dimensions, type ElementType, type ExtractDimensionProps, type ExtractDimensions, type ExtractProps, type GenericHoc, type IRocketStyleComponent, type IsRocketComponent, type MergeTypes, Provider, type RocketComponentType, type RocketProviderState, type RocketStyleComponent, type RocketStyleInterpolationProps, type Rocketstyle, type StylesCb, type StylesDefault, type TDKP, type TObj, type TProvider, type ThemeCb, type ThemeDefault, type ThemeMode, type ThemeModeCallback, type ThemeModeKeys, context, rocketstyle as default, rocketstyle, isRocketComponent, resolveTheme };
409
+ export { type AttrsCb, type AttrsHelpers, type ComponentFn, type ComposeParam, type ConfigAttrs, type ConsumerCb, type ConsumerCtxCBValue, type ConsumerCtxCb, type DefaultProps, type DimensionCallbackParam, type DimensionProps, type DimensionValue, type Dimensions, type ElementType, type ExtractDimensionProps, type ExtractDimensions, type ExtractProps, type GenericHoc, type IRocketStyleComponent, type IsRocketComponent, type MergeTypes, Provider, type RocketComponentType, type RocketProviderState, type RocketStyleComponent, type RocketStyleInterpolationProps, type Rocketstyle, type StylesCb, type StylesDefault, type TDKP, type TObj, type TProvider, type ThemeCb, type ThemeDefault, type ThemeMode, type ThemeModeCallback, type ThemeModeKeys, context, rocketstyle as default, rocketstyle, isRocketComponent, resolveModeVar, resolveTheme };
395
410
  //# sourceMappingURL=index2.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index2.d.ts","names":[],"sources":["../../src/context/context.ts","../../src/constants/defaultDimensions.ts","../../src/types/pseudo.ts","../../src/types/utils.ts","../../src/types/styles.ts","../../src/constants/index.ts","../../src/types/theme.ts","../../src/types/dimensions.ts","../../src/types/config.ts","../../src/types/configuration.ts","../../src/types/attrs.ts","../../src/types/hoc.ts","../../src/types/rocketstyle.ts","../../src/types/rocketComponent.ts","../../src/init.ts","../../src/isRocketComponent.ts","../../src/index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WAAA;;;;;;;;;;;;AXvLF;;WWsMW,UAAA,EAAY,aAAA,EAAe,KAAA,EAAO,MAAA,sBAA4B,MAAA;AAAA;;;KCrN7D,eAAA,WACA,WAAA,GAAc,WAAA,YACd,IAAA,mBACE,IAAA,iBACF,UAAA,GAAa,iBAAA,mCAEpB,KAAA,EAAO,aAAA,CAAc,CAAA,EAAG,CAAA,MAAO,oBAAA,CAElC,YAAA,CAAa,CAAA,OAGb,CAAA,EACA,GAAA,UAGA,CAAA,EACA,EAAA;;;KCPU,WAAA,oBACM,UAAA,GAAa,iBAAA;EAG7B,UAAA;EACA;AAAA;EAEA,UAAA,GAAa,CAAA;EACb,WAAA,GAAc,EAAA;AAAA,iBACC,WAAA;EACf,IAAA;EACA;AAAA;EAEA,IAAA;EACA,SAAA,EAAW,CAAA;AAAA,MACP,UAAA,CAAW,eAAA,CAAgB,CAAA,UAAW,CAAA,EAAG,EAAA;AAAA,cAmDzC,WAAA,EAiBa,WAAW;;;KCjGlB,iBAAA,OAAwB,SAAA,EAAW,CAAC;;cAG1C,iBAAA,EAAmB,iBAUxB;;;;;;;;;;;;;;iBCmFe,YAAA,KAAiB,MAAA,kBAAA,CAC/B,KAAA,SAAc,CAAA,IAAK,CAAA,GAClB,CAAA"}
1
+ {"version":3,"file":"index2.d.ts","names":[],"sources":["../../src/context/context.ts","../../src/constants/defaultDimensions.ts","../../src/types/pseudo.ts","../../src/types/utils.ts","../../src/types/styles.ts","../../src/constants/index.ts","../../src/types/theme.ts","../../src/types/dimensions.ts","../../src/types/config.ts","../../src/types/configuration.ts","../../src/types/attrs.ts","../../src/types/hoc.ts","../../src/types/rocketstyle.ts","../../src/types/rocketComponent.ts","../../src/init.ts","../../src/isRocketComponent.ts","../../src/utils/theme.ts","../../src/index.ts"],"mappings":";;;;KAiBK,OAAA;EACH,QAAA;EACA,WAAA,GAAc,MAAA;AAAA,IACZ,MAAM;AAAA,KAEE,SAAA;EACV,QAAA,EAAU,UAAA;EACV,KAAA,GAAQ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ACd,IAAA,mBACE,IAAA,iBACF,UAAA,GAAa,iBAAA,mCAEpB,KAAA,EAAO,aAAA,CAAc,CAAA,EAAG,CAAA,MAAO,oBAAA,CAElC,YAAA,CAAa,CAAA,OAGb,CAAA,EACA,GAAA,UAGA,CAAA,EACA,EAAA;;;KCPU,WAAA,oBACM,UAAA,GAAa,iBAAA;EAG7B,UAAA;EACA;AAAA;EAEA,UAAA,GAAa,CAAA;EACb,WAAA,GAAc,EAAA;AAAA,iBACC,WAAA;EACf,IAAA;EACA;AAAA;EAEA,IAAA;EACA,SAAA,EAAW,CAAA;AAAA,MACP,UAAA,CAAW,eAAA,CAAgB,CAAA,UAAW,CAAA,EAAG,EAAA;AAAA,cAmDzC,WAAA,EAiBa,WAAW;;;KCjGlB,iBAAA,OAAwB,SAAA,EAAW,CAAC;;cAG1C,iBAAA,EAAmB,iBAUxB;;;;AfXkE;;;;;;;;;AAkBzD;AAEV;iBgBsFgB,cAAA,CAAe,KAAA,WAAgB,IAAgC;;;;;;;;;;;;;;iBCZ/D,YAAA,KAAiB,MAAA,kBAAA,CAC/B,KAAA,SAAc,CAAA,IAAK,CAAA,GAClB,CAAA"}
package/lib/index.js CHANGED
@@ -1,11 +1,12 @@
1
1
  import { batch, registerSingleton, signal } from "@pyreon/reactivity";
2
2
  import { createContext, mergeProps, nativeCompat, provide, removeUndefinedProps, useContext } from "@pyreon/core";
3
- import { Provider as Provider$1, compose, config, context, get, hoistNonReactStatics, isEmpty, merge, omit, pick, render, set } from "@pyreon/ui-core";
3
+ import { Provider as Provider$1, compose, config, context, get, hoistNonReactStatics, isEmpty, merge, omit, pick, render, resolveCssVariables, set } from "@pyreon/ui-core";
4
4
  import { SizedMap } from "@pyreon/sized-map";
5
+ import { sheet } from "@pyreon/styler";
5
6
 
6
7
  //#region package.json
7
8
  var name = "@pyreon/rocketstyle";
8
- var version = "0.30.0";
9
+ var version = "0.32.0";
9
10
 
10
11
  //#endregion
11
12
  //#region src/constants/index.ts
@@ -471,10 +472,69 @@ const themeModeCallback = (light, dark) => {
471
472
  return fn;
472
473
  };
473
474
  const isModeCallback = (value) => typeof value === "function" && value.__brand === MODE_CALLBACK_BRAND;
475
+ const fnv1a = (s) => {
476
+ let h = 2166136261;
477
+ for (let i = 0; i < s.length; i++) {
478
+ h ^= s.charCodeAt(i);
479
+ h = Math.imul(h, 16777619) >>> 0;
480
+ }
481
+ return h.toString(36);
482
+ };
483
+ /**
484
+ * The `mode(light, dark)` factory used when `init({ cssVariables: true })`
485
+ * is on. Instead of a branded callback resolved per mode at theme-resolution
486
+ * time, it allocates ONE hashed custom property carrying both values
487
+ * (`:root`/light + `[data-theme="dark"]` rules, injected idempotently) and
488
+ * returns the `var(--px-m-<hash>)` reference. Component themes become
489
+ * mode-FREE — the dark/light flip happens in the CSS cascade via the mode
490
+ * attribute, never in JS.
491
+ *
492
+ * Returns a STRING where the classic factory returns a branded function —
493
+ * `getThemeByMode` passes strings through untouched, so the resolved theme
494
+ * needs no mode walk at all. Typed via the same `ThemeModeCallback` surface
495
+ * so `.theme()` callbacks are agnostic to which factory they received.
496
+ */
497
+ const varThemeModeCallback = ((light, dark) => {
498
+ const { prefix, attribute } = resolveCssVariables();
499
+ if (process.env.NODE_ENV !== "production") {
500
+ if (typeof light === "number" || typeof dark === "number") console.warn("[Pyreon] mode(light, dark) under cssVariables received a NUMBER. The pair is emitted verbatim into CSS, so unit conversion cannot apply — pass unit-complete values (mode('8px', '12px') / mode('0.5rem', '0.75rem')) or unitless-valid ones (line-height).");
501
+ }
502
+ const l = String(light);
503
+ const d = String(dark);
504
+ const varName = `--${prefix}-m-${fnv1a(`${l}\u0000${d}`)}`;
505
+ modePairRegistry.set(varName, {
506
+ light: l,
507
+ dark: d
508
+ });
509
+ sheet.injectRules([`:root, [${attribute}="light"] { ${varName}: ${l}; }`, `[${attribute}="dark"] { ${varName}: ${d}; }`], varName);
510
+ return `var(${varName})`;
511
+ });
512
+ const modePairRegistry = /* @__PURE__ */ new Map();
513
+ const VAR_REF_RE = /var\((--[a-zA-Z0-9-]+)\)/g;
514
+ /**
515
+ * Resolve any `var(--<prefix>-m-<hash>)` mode-pair references in a value to
516
+ * their raw light/dark value, for non-CSS render targets. Unknown var names
517
+ * (theme-leaf vars — those live in `themeToCssVars`'s registry — or anything
518
+ * not allocated by the mode factory) are left untouched; pair this with
519
+ * `resolveCssVarReferences` from `@pyreon/unistyle` to resolve those too.
520
+ * Non-strings and strings without a var ref pass through unchanged.
521
+ *
522
+ * @example
523
+ * // after `<X color={mode('#000', '#fff')} />` under cssVariables:
524
+ * resolveModeVar('var(--px-m-abc123)', 'dark') // '#fff'
525
+ */
526
+ function resolveModeVar(value, mode = "light") {
527
+ if (typeof value !== "string" || value.indexOf("var(") === -1) return value;
528
+ return value.replace(VAR_REF_RE, (whole, name) => {
529
+ const pair = modePairRegistry.get(name);
530
+ return pair ? pair[mode] : whole;
531
+ });
532
+ }
474
533
  const getThemeFromChain = (options, theme) => {
475
534
  const result = {};
476
535
  if (!options || isEmpty(options)) return result;
477
- return options.reduce((acc, item) => merge(acc, item(theme, themeModeCallback, config.css)), result);
536
+ const modeFactory = resolveCssVariables().enabled ? varThemeModeCallback : themeModeCallback;
537
+ return options.reduce((acc, item) => merge(acc, item(theme, modeFactory, config.css)), result);
478
538
  };
479
539
  const getDimensionThemes = (theme, options) => {
480
540
  const dims = options.dimensions;
@@ -617,8 +677,9 @@ const rocketComponent = (options) => {
617
677
  }
618
678
  const localPseudo = localCtx?.pseudo;
619
679
  const _resolveRsEntry = () => {
680
+ const cssVarsOn = resolveCssVariables().enabled;
620
681
  const theme = themeAttrs.theme;
621
- const mode = themeAttrs.mode;
682
+ const mode = cssVarsOn ? "light" : themeAttrs.mode;
622
683
  const propsRec = props;
623
684
  const rocketstateRaw = _calculateStylingAttrs({
624
685
  props: pickStyledAttrs(propsRec, reservedPropNames),
@@ -660,18 +721,26 @@ const rocketComponent = (options) => {
660
721
  if (process.env.NODE_ENV !== "production") _countSink.__pyreon_count__?.("rocketstyle.localThemeManager.hit");
661
722
  } else dimHelper.set(theme, getDimensionThemes(theme, options));
662
723
  const themes = dimHelper.get(theme);
663
- const modeBaseHelper = ThemeManager$1.modeBaseTheme[mode];
664
- if (modeBaseHelper.has(baseTheme)) {
665
- if (process.env.NODE_ENV !== "production") _countSink.__pyreon_count__?.("rocketstyle.localThemeManager.hit");
666
- } else modeBaseHelper.set(baseTheme, getThemeByMode(baseTheme, mode));
667
- const currentModeBaseTheme = modeBaseHelper.get(baseTheme);
668
- const modeDimHelper = ThemeManager$1.modeDimensionTheme[mode];
669
- if (modeDimHelper.has(themes)) {
670
- if (process.env.NODE_ENV !== "production") _countSink.__pyreon_count__?.("rocketstyle.localThemeManager.hit");
671
- } else modeDimHelper.set(themes, getThemeByMode(themes, mode));
724
+ let currentModeBaseTheme;
725
+ let currentModeThemes;
726
+ if (cssVarsOn) {
727
+ currentModeBaseTheme = baseTheme;
728
+ currentModeThemes = themes;
729
+ } else {
730
+ const modeBaseHelper = ThemeManager$1.modeBaseTheme[mode];
731
+ if (modeBaseHelper.has(baseTheme)) {
732
+ if (process.env.NODE_ENV !== "production") _countSink.__pyreon_count__?.("rocketstyle.localThemeManager.hit");
733
+ } else modeBaseHelper.set(baseTheme, getThemeByMode(baseTheme, mode));
734
+ currentModeBaseTheme = modeBaseHelper.get(baseTheme);
735
+ const modeDimHelper = ThemeManager$1.modeDimensionTheme[mode];
736
+ if (modeDimHelper.has(themes)) {
737
+ if (process.env.NODE_ENV !== "production") _countSink.__pyreon_count__?.("rocketstyle.localThemeManager.hit");
738
+ } else modeDimHelper.set(themes, getThemeByMode(themes, mode));
739
+ currentModeThemes = modeDimHelper.get(themes);
740
+ }
672
741
  const rocketstyle = getTheme({
673
742
  rocketstate: rocketstateRaw,
674
- themes: modeDimHelper.get(themes),
743
+ themes: currentModeThemes,
675
744
  baseTheme: currentModeBaseTheme,
676
745
  transformKeys: options.transformKeys,
677
746
  appTheme: theme
@@ -862,5 +931,5 @@ function resolveTheme(value) {
862
931
  var src_default = rocketstyle;
863
932
 
864
933
  //#endregion
865
- export { Provider, context, src_default as default, isRocketComponent, resolveTheme, rocketstyle };
934
+ export { Provider, context, src_default as default, isRocketComponent, resolveModeVar, resolveTheme, rocketstyle };
866
935
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["CoreProvider","useTheme","ThemeManager","LocalThemeManager","rocketstyleAttrsHoc","useTheme","defaultDimensions","__pkgName","__pkgVersion"],"sources":["../package.json","../src/constants/index.ts","../src/context/context.ts","../src/constants/defaultDimensions.ts","../src/cache/LocalThemeManager.ts","../src/context/localContext.ts","../src/context/createLocalProvider.ts","../src/hooks/useTheme.ts","../src/utils/attrs.ts","../src/hoc/rocketstyleAttrsHoc.ts","../src/utils/chaining.ts","../src/utils/compose.ts","../src/utils/dimensions.ts","../src/utils/statics.ts","../src/utils/styles.ts","../src/utils/collection.ts","../src/utils/theme.ts","../src/rocketstyle.ts","../src/init.ts","../src/isRocketComponent.ts","../src/index.ts"],"sourcesContent":["","/** Default theme mode used when no mode is provided via context. */\nexport const MODE_DEFAULT = 'light'\n\n/** Pseudo-state interaction keys tracked for styling (hover, active, focus, pressed). */\nexport const PSEUDO_KEYS = ['hover', 'active', 'focus', 'pressed'] as const\n\n/** Meta pseudo-state keys representing non-interactive states (disabled, readOnly). */\nexport const PSEUDO_META_KEYS = ['disabled', 'readOnly'] as const\n\n/**\n * Pre-merged interaction + meta keys. Hoisted from `rocketstyle.ts`'s\n * `rocketComponent` definition scope to module scope so the merged\n * 6-element array is allocated ONCE per process, not once per\n * rocketstyle definition. Ported from vitus-labs `00fdadc2`.\n */\nexport const PSEUDO_AND_META_KEYS = [...PSEUDO_KEYS, ...PSEUDO_META_KEYS] as const\n\n/** Supported theme mode flags. */\nexport const THEME_MODES = {\n light: true,\n dark: true,\n} as const\n\n/** Maps each theme mode to its inverse (light -> dark, dark -> light). */\nexport const THEME_MODES_INVERSED = {\n dark: 'light',\n light: 'dark',\n} as const\n\n/** Reserved configuration keys accepted by the `.config()` chaining method. */\nexport const CONFIG_KEYS = [\n 'provider',\n 'consumer',\n 'DEBUG',\n 'name',\n 'component',\n 'inversed',\n 'passProps',\n 'styled',\n] as const\n\n/** Keys for theme and styles chaining methods. */\nexport const STYLING_KEYS = ['theme', 'styles'] as const\nexport const STATIC_KEYS = [...STYLING_KEYS, 'compose'] as const\n\n/** Union of all reserved keys that cannot be used as dimension names. */\nexport const ALL_RESERVED_KEYS = [\n ...Object.keys(THEME_MODES),\n ...CONFIG_KEYS,\n ...STATIC_KEYS,\n 'attrs',\n] as const\n","import type { VNodeChild } from '@pyreon/core'\nimport { nativeCompat, useContext } from '@pyreon/core'\nimport { Provider as CoreProvider, context } from '@pyreon/ui-core'\nimport { MODE_DEFAULT, THEME_MODES_INVERSED } from '../constants'\n\n// Both `rootSize` and `breakpoints` are OPTIONAL — the rest of the chain\n// handles their absence: `enrichTheme` defaults rootSize to 16,\n// `makeItResponsive` short-circuits to plain CSS when breakpoints are\n// empty, and `value()` defaults rootSize to 16 internally. Marking\n// either as required here over-constrained user themes downstream\n// (e.g. a minimal `{ colors: { primary: '#228be6' } }` theme passed\n// to the public Provider was a TS error even though it works at runtime).\n//\n// Shape matches `@pyreon/unistyle` `PyreonTheme` and the downstream\n// `@pyreon/ui-core` Provider's `Partial<...>`-wrapped theme — `?:` with\n// no explicit `| undefined` so the downstream Partial composition holds\n// under `exactOptionalPropertyTypes: true`.\ntype Theme = {\n rootSize?: number\n breakpoints?: Record<string, number>\n} & Record<string, unknown>\n\nexport type TProvider = {\n children: VNodeChild\n theme?: Theme | undefined\n mode?: 'light' | 'dark' | undefined\n inversed?: boolean | undefined\n provider?: ((props: Record<string, unknown>) => VNodeChild) | undefined\n}\n\n/**\n * Top-level theme and mode provider for rocketstyle components.\n * Reads the parent context, merges incoming props, and resolves\n * the active mode (with optional inversion for nested dark/light switching).\n *\n * In Pyreon, context is provided via provide() instead of React.Provider.\n */\nconst Provider = ({ provider = CoreProvider, inversed, ...props }: TProvider): VNodeChild => {\n const getCtx = useContext(context)\n const ctx = getCtx()\n\n const merged = { ...ctx, ...props, provider } as unknown as TProvider & Record<string, unknown>\n const { theme, mode, provider: RocketstyleProvider, children } = merged\n\n let newMode = MODE_DEFAULT\n\n if (mode) {\n newMode = inversed ? THEME_MODES_INVERSED[mode] : mode\n }\n\n const FinalProvider = RocketstyleProvider ?? CoreProvider\n const result = FinalProvider({\n mode: newMode,\n isDark: newMode === 'dark',\n isLight: newMode === 'light',\n ...(theme !== undefined ? { theme } : {}),\n provider,\n children,\n })\n\n return result ?? null\n}\n\n// Mark as native — reads useContext() and delegates to CoreProvider, both\n// of which need Pyreon's setup frame.\nnativeCompat(Provider)\n\nexport { context }\n\nexport default Provider\n","/**\n * Default dimension configuration for rocketstyle components.\n * Defines four built-in dimensions: `states`, `sizes`, `variants`,\n * and `multiple` (a multi-select dimension).\n */\nconst DEFAULT_DIMENSIONS = {\n states: 'state',\n sizes: 'size',\n variants: 'variant',\n multiple: {\n propName: 'multiple',\n multi: true,\n },\n modifiers: {\n propName: 'modifier',\n multi: true,\n transform: true,\n },\n} as const\n\nexport type DefaultDimensions = typeof DEFAULT_DIMENSIONS\n\nexport default DEFAULT_DIMENSIONS\n","/**\n * WeakMap-based multi-tier cache for computed theme objects.\n * Maintains separate caches for base themes, dimension themes,\n * and their light/dark mode variants to avoid recalculation on re-renders.\n */\nexport default class ThemeManager {\n baseTheme = new WeakMap()\n\n dimensionsThemes = new WeakMap()\n\n modeBaseTheme = { light: new WeakMap(), dark: new WeakMap() }\n\n modeDimensionTheme = { light: new WeakMap(), dark: new WeakMap() }\n}\n","import { createContext, useContext } from '@pyreon/core'\nimport type { PseudoState } from '../types/pseudo'\n\ntype LocalContext = Partial<\n {\n pseudo: PseudoState\n } & Record<string, string>\n>\n\n/**\n * Local context for propagating pseudo-state (hover, focus, pressed)\n * and additional styling attributes from a parent provider component\n * to its rocketstyle children.\n */\nconst localContext = createContext<LocalContext>({})\n\nconst EMPTY_CTX = { pseudo: {} } as LocalContext\n\n/**\n * Retrieves the local pseudo-state context. When a consumer callback\n * is provided, it transforms the raw context; otherwise returns defaults.\n *\n * In Pyreon, components are plain functions that run once — no useMemo needed.\n */\ntype UseLocalContext = (consumer: any) => LocalContext\nexport const useLocalContext: UseLocalContext = (consumer) => {\n const ctx = useContext(localContext)\n\n if (!consumer) return EMPTY_CTX\n\n const result = consumer((callback: any) => callback(ctx))\n return { pseudo: {}, ...result }\n}\n\nexport { localContext }\n\nexport default localContext\n","import { mergeProps, provide } from '@pyreon/core'\nimport { batch, signal } from '@pyreon/reactivity'\nimport { omit } from '@pyreon/ui-core'\nimport type { PseudoProps } from '../types/pseudo'\nimport type { ComponentFn } from '../types/utils'\nimport { localContext } from './localContext'\n\ntype Props = PseudoProps & Record<string, any>\n\n// Keys this HOC consumes — extracted into a frozen Set so `omit()` can\n// reuse the pre-built shape on every render (saves the per-call Set\n// allocation the array-form would pay).\nconst HOC_OWN_KEYS = new Set([\n 'onMouseEnter',\n 'onMouseLeave',\n 'onMouseUp',\n 'onMouseDown',\n 'onFocus',\n 'onBlur',\n '$rocketstate',\n])\n\n/**\n * Higher-order component that wraps a component with a LocalProvider,\n * detecting pseudo-states (hover, focus, pressed) via mouse/focus events\n * and broadcasting them through local context to child rocketstyle components.\n *\n * In Pyreon, context is provided via provide(), and state is managed\n * with signals instead of useState.\n *\n * **Descriptor preservation contract** — pre-fix this HOC used a\n * parameter-destructure (`({ onMouseEnter, …, ...props })`) and a final\n * value-spread (`{ ...props, ...events, $rocketstate }`). Both fire\n * every getter on the incoming props object — including the\n * `_rp(() => signal())`-converted getter descriptors that\n * `makeReactiveProps` installs for compiler-emitted reactive props.\n * Result: any signal-driven prop (`href`, `disabled`, `class`, ...) on a\n * rocketstyle-wrapped component with `provider: true` got snapshot-read\n * at this HOC entry, collapsing the live subscription to a one-shot\n * value. Downstream `applyProp` / `_bind` never re-fired on signal\n * change, so the DOM stayed static.\n *\n * Post-fix: receive `props` as a single argument; read named keys lazily\n * inside the event closures (so event-handler property descriptors fire\n * at mouse-event time, not at HOC setup); use `omit()` (descriptor-copy\n * from `@pyreon/ui-core`) to build the rest-props object and\n * `mergeProps` (from `@pyreon/core`) to assemble the final props passed\n * downstream.\n *\n * Same contract PR #584 established for the outer attrs / styled HOCs.\n * createLocalProvider was missed by that sweep — it sits between\n * EnhancedComponent and the styled leaf only when `options.provider: true`\n * (top-level rocketstyle wrappers), which is exactly the surface where\n * consumer-reported reactive-href breakage was seen on ui-components\n * Buttons.\n */\nconst createLocalProvider = (WrappedComponent: ComponentFn<any>) => {\n const HOCComponent: ComponentFn<Props> = (props) => {\n const hover = signal(false)\n const focus = signal(false)\n const pressed = signal(false)\n\n const events = {\n onMouseEnter: (e: MouseEvent) => {\n hover.set(true)\n // Read the user-supplied handler lazily — fires the descriptor\n // getter (if any) at mouse-event time, never at HOC setup. Event\n // handlers are typically stable function values so the getter\n // resolves to a function; calling it forwards the event.\n const user = props.onMouseEnter as ((e: MouseEvent) => void) | undefined\n if (user) user(e)\n },\n onMouseLeave: (e: MouseEvent) => {\n // batch() so consumers reading both hover + pressed (the common\n // styled-component case — pseudo-state CSS depends on both) get\n // notified once per mouseleave, not twice. Fires on every\n // mouseleave on every rocketstyle-styled component → hot.\n batch(() => {\n hover.set(false)\n pressed.set(false)\n })\n const user = props.onMouseLeave as ((e: MouseEvent) => void) | undefined\n if (user) user(e)\n },\n onMouseDown: (e: MouseEvent) => {\n pressed.set(true)\n const user = props.onMouseDown as ((e: MouseEvent) => void) | undefined\n if (user) user(e)\n },\n onMouseUp: (e: MouseEvent) => {\n pressed.set(false)\n const user = props.onMouseUp as ((e: MouseEvent) => void) | undefined\n if (user) user(e)\n },\n onFocus: (e: FocusEvent) => {\n focus.set(true)\n const user = props.onFocus as ((e: FocusEvent) => void) | undefined\n if (user) user(e)\n },\n onBlur: (e: FocusEvent) => {\n focus.set(false)\n const user = props.onBlur as ((e: FocusEvent) => void) | undefined\n if (user) user(e)\n },\n }\n\n // Use getters so pseudo-state signals are read lazily by consumers\n // inside their own reactive scopes — NOT eagerly during parent setup.\n // Without getters, hover()/focus()/pressed() reads here would register\n // as dependencies of any parent effect, causing cascading re-renders\n // on every mouse event.\n // Resolve $rocketstate if it's a function accessor (from EnhancedComponent).\n // This single property access fires the descriptor's getter (if any) —\n // intentional, since $rocketstate's getter returns a stable accessor\n // function and we need it now to construct updatedState.\n const incomingState = props.$rocketstate\n const resolvedState =\n typeof incomingState === 'function' ? incomingState() : incomingState\n const updatedState = {\n ...resolvedState,\n pseudo: {\n ...resolvedState?.pseudo,\n get hover() {\n return hover()\n },\n get focus() {\n return focus()\n },\n get pressed() {\n return pressed()\n },\n },\n }\n\n // Provide local context for child rocketstyle components\n provide(localContext, updatedState)\n\n // Build the rest-props object via descriptor-copy (omit() from\n // @pyreon/ui-core preserves getter descriptors). Then merge with our\n // event handlers and the resolved $rocketstate using canonical\n // `mergeProps` from @pyreon/core — the events + $rocketstate layers\n // are static data so their data descriptors override any same-named\n // getters on restProps. All three sources are non-null at this site\n // (omit always returns an object; events and $rocketstate are\n // freshly-constructed literals).\n const restProps = omit(props, HOC_OWN_KEYS)\n const finalProps = mergeProps(restProps as Record<string, unknown>, events, {\n $rocketstate: updatedState,\n })\n\n return WrappedComponent(finalProps)\n }\n\n return HOCComponent\n}\n\nexport default createLocalProvider\n","import { useContext } from '@pyreon/core'\nimport { THEME_MODES_INVERSED } from '../constants'\nimport { context } from '../context/context'\nimport type { ThemeModeKeys } from '../types/theme'\n\ntype Context = {\n theme: Record<string, unknown>\n mode: ThemeModeKeys\n isDark: boolean\n isLight: boolean\n}\n\ntype UseThemeAttrs = ({ inversed }: { inversed?: boolean | undefined }) => Context\n\n/**\n * Retrieves the current theme object and resolved mode from context.\n *\n * Returns an object with getter properties so that mode/isDark/isLight\n * are evaluated lazily on each access. The context is a ReactiveContext,\n * so useContext returns `() => CoreContextValue` — we call it inside\n * each getter to ensure reactive tracking.\n */\nconst useThemeAttrs: UseThemeAttrs = ({ inversed }) => {\n // ReactiveContext: useContext returns () => CoreContextValue.\n // Call the getter inside each property getter for reactive tracking.\n const getCtx = useContext(context)\n\n return {\n get theme() {\n return getCtx().theme ?? ({} as Record<string, unknown>)\n },\n get mode() {\n const ctxMode = getCtx().mode ?? 'light'\n return inversed ? THEME_MODES_INVERSED[ctxMode] : ctxMode\n },\n get isDark() {\n const ctxDark = getCtx().isDark ?? false\n return inversed ? !ctxDark : ctxDark\n },\n get isLight() {\n const ctxDark = getCtx().isDark ?? false\n const isDark = inversed ? !ctxDark : ctxDark\n return !isDark\n },\n }\n}\n\nexport default useThemeAttrs\n","import type { MultiKeys } from '../types/dimensions'\n\n// --------------------------------------------------------\n// remove undefined props\n// --------------------------------------------------------\n// The reactive-prop-aware \"drop undefined, keep getter descriptors\" filter is a\n// `@pyreon/core` primitive (it operates on core's own `_rp` / `makeReactiveProps`\n// encoding) — re-exported here so the rocketstyle attrs HOC keeps importing it\n// from `../utils/attrs`. Previously hand-rolled identically in both this package\n// and `@pyreon/attrs`; consolidating removes the divergence that let the attrs\n// copy ship a value-copy reactivity bug.\nexport { removeUndefinedProps } from '@pyreon/core'\n\n// --------------------------------------------------------\n// pick styled props\n// --------------------------------------------------------\n/** Picks only the props whose keys exist in the dimension keywords lookup and have truthy values. */\nexport const pickStyledAttrs = <\n T extends Record<string, any>,\n K extends Record<string, true | undefined>,\n>(\n props: T,\n keywords: K,\n): { [I in keyof K & keyof T]: T[I] } => {\n // Direct `for...in` avoids the `Object.keys(props)` array allocation\n // that `for (const key of Object.keys(props))` paid on every render.\n // The hot path is rocketstyle's `EnhancedComponent` body — fires once\n // per render of every rocketstyle-wrapped component. Ported from\n // vitus-labs `00fdadc2`.\n const result: Record<string, unknown> = {}\n for (const key in props) {\n if (keywords[key] && props[key]) result[key] = props[key]\n }\n return result as { [I in keyof K & keyof T]: T[I] }\n}\n\n// --------------------------------------------------------\n// combine values\n// --------------------------------------------------------\n/**\n * Returns a curried function that evaluates an array of `.attrs()` callbacks,\n * spreading each result into a single merged props object via `Object.assign`.\n */\ntype OptionFunc<A> = (...arg: A[]) => Record<string, unknown>\ntype CalculateChainOptions = <A>(\n options?: OptionFunc<A>[],\n) => (args: A[]) => ReturnType<OptionFunc<A>>\n\nexport const calculateChainOptions: CalculateChainOptions = (options) => (args) => {\n if (!options || options.length === 0) return {}\n\n return options.reduce<Record<string, unknown>>(\n (acc, item) => Object.assign(acc, item(...args)),\n {},\n )\n}\n\n// --------------------------------------------------------\n// get style attributes\n// --------------------------------------------------------\n/**\n * Resolves the active value for each styling dimension from component props.\n * First checks for explicit prop values (string, number, or array for multi-keys),\n * then falls back to boolean shorthand props when `useBooleans` is enabled.\n */\ntype CalculateStylingAttrs = ({\n useBooleans,\n multiKeys,\n}: {\n useBooleans?: boolean\n multiKeys?: MultiKeys\n}) => ({\n props,\n dimensions,\n}: {\n props: Record<string, unknown>\n dimensions: Record<string, unknown>\n}) => Record<string, any>\nexport const calculateStylingAttrs: CalculateStylingAttrs =\n ({ useBooleans, multiKeys }) =>\n ({ props, dimensions }) => {\n const result: Record<string, any> = {}\n\n // (1) find dimension keys values & initialize\n for (const item in dimensions) {\n const pickedProp = props[item]\n const t = typeof pickedProp\n\n if (multiKeys?.[item] && Array.isArray(pickedProp)) {\n result[item] = pickedProp\n } else if (t === 'string' || t === 'number') {\n result[item] = pickedProp\n } else {\n result[item] = undefined\n }\n }\n\n // (2) if booleans are being used let's find the rest\n // Use `in` operator on the dimension map instead of allocating\n // a new Set per dimension — the map is already an object with\n // the keywords as keys.\n if (useBooleans) {\n for (const key in result) {\n if (result[key]) continue // already assigned\n\n const dimensionMap = dimensions[key] as Record<string, unknown>\n const isMultiKey = multiKeys?.[key]\n let newDimensionValue: string | string[] | undefined\n\n if (isMultiKey) {\n const matches: string[] = []\n for (const propKey in props) {\n if (propKey in dimensionMap) matches.push(propKey)\n }\n newDimensionValue = matches.length > 0 ? matches : undefined\n } else {\n // Iterate props to find last matching keyword\n // (last wins for priority)\n for (const k in props) {\n if (k in dimensionMap && props[k]) {\n newDimensionValue = k\n }\n }\n }\n\n result[key] = newDimensionValue\n }\n }\n\n return result\n }\n","import { mergeProps } from '@pyreon/core'\nimport { render } from '@pyreon/ui-core'\nimport { useTheme } from '../hooks'\nimport type { Configuration } from '../types/configuration'\nimport type { ComponentFn } from '../types/utils'\nimport { calculateChainOptions, removeUndefinedProps } from '../utils/attrs'\n\nexport type RocketStyleHOC = ({\n inversed,\n attrs,\n priorityAttrs,\n}: Pick<Configuration, 'inversed' | 'attrs' | 'priorityAttrs'>) => (\n WrappedComponent: ComponentFn<any>,\n) => ComponentFn<any>\n\n/**\n * HOC that resolves the `.attrs()` chain before the inner component renders.\n * Evaluates both regular and priority attrs callbacks with the current theme\n * and mode, then merges the results with explicit props (priority attrs\n * are applied first, regular attrs can be overridden by direct props).\n *\n * In Pyreon, there is no forwardRef — ref flows as a normal prop.\n * Components are plain functions.\n */\nconst rocketStyleHOC: RocketStyleHOC = ({ inversed, attrs, priorityAttrs }) => {\n const calculateAttrs = calculateChainOptions(attrs)\n const hasAttrs = (attrs?.length ?? 0) > 0\n const hasPriorityAttrs = (priorityAttrs?.length ?? 0) > 0\n\n const makeCallbackParams = (themeAttrs: ReturnType<typeof useTheme>) => [\n themeAttrs.theme,\n { render, mode: themeAttrs.mode, isDark: themeAttrs.isDark, isLight: themeAttrs.isLight },\n ]\n\n // Fast path — no `.priorityAttrs()` chain. This is the dominant case in\n // practice (priorityAttrs is unused across the whole component library), so\n // `prioritizedAttrs` would always be `{}`. The full path below would then\n // (a) call `calculatePriorityAttrs` to produce `{}`, (b) run a wasted\n // `mergeProps({}, filteredProps)` — a full descriptor copy of every prop just\n // to merge with `{}` — and (c) pass that empty `{}` as the first arg of the\n // final 3-way merge. The fast path skips all three. `removeUndefinedProps`\n // (load-bearing: strips `undefined` so consumer props don't shadow `.attrs()`\n // defaults) is kept. Variant picked at factory time so render-time work is\n // fixed. Merge precedence is preserved: props win over attrs win over {}.\n if (!hasPriorityAttrs) {\n const Enhanced = (WrappedComponent: ComponentFn<any>) => {\n const HOCComponent: ComponentFn<any> = (props) => {\n const themeAttrs = useTheme({ inversed })\n const filteredProps = removeUndefinedProps(props)\n if (!hasAttrs) {\n // No chain at all — filteredProps IS the final props (the full path\n // would just re-copy them via `mergeProps({}, {}, filteredProps)`).\n return WrappedComponent(filteredProps)\n }\n const finalAttrs = calculateAttrs([filteredProps, ...makeCallbackParams(themeAttrs)])\n return WrappedComponent(mergeProps(finalAttrs, filteredProps))\n }\n return HOCComponent\n }\n return Enhanced\n }\n\n // Full path — `.priorityAttrs()` present.\n const calculatePriorityAttrs = calculateChainOptions(priorityAttrs)\n const Enhanced = (WrappedComponent: ComponentFn<any>) => {\n const HOCComponent: ComponentFn<any> = (props) => {\n // IMPORTANT: Do NOT destructure — useTheme returns getter properties.\n // Keep the object reference so properties re-evaluate lazily.\n const themeAttrs = useTheme({ inversed })\n const filteredProps = removeUndefinedProps(props)\n const callbackParams = makeCallbackParams(themeAttrs)\n const prioritizedAttrs = calculatePriorityAttrs([filteredProps, ...callbackParams])\n // Merge via canonical `mergeProps` so reactive getter props survive the\n // chain (a `{...A, ...B}` spread would fire every getter and break the\n // reactive subscription downstream). Attrs callbacks legitimately read\n // prop VALUES (`({ href }) => ({ tag: href ? 'a' : 'button' })`) — a\n // one-shot read at setup time by design.\n const finalAttrs = calculateAttrs([\n mergeProps(prioritizedAttrs, filteredProps),\n ...callbackParams,\n ])\n return WrappedComponent(mergeProps(prioritizedAttrs, finalAttrs, filteredProps))\n }\n return HOCComponent\n }\n return Enhanced\n}\n\nexport default rocketStyleHOC\n","type Func = (...args: any) => Record<string, unknown>\ntype Obj = Record<string, unknown>\n\n// --------------------------------------------------------\n// Chain Options\n// --------------------------------------------------------\n/**\n * Appends a new option (function or plain object) to an existing chain\n * of option callbacks. Objects are wrapped in a thunk for uniform handling.\n */\ntype ChainOptions = (opts: Obj | Func | undefined, defaultOpts: Func[]) => Func[]\n\nexport const chainOptions: ChainOptions = (opts, defaultOpts = []) => {\n const result = [...defaultOpts]\n\n if (typeof opts === 'function') result.push(opts)\n else if (typeof opts === 'object') result.push(() => opts)\n\n return result\n}\n\n// --------------------------------------------------------\n// Chain Or Options\n// --------------------------------------------------------\n/**\n * For each key, picks the new value if truthy, otherwise falls back\n * to the default. Used for config keys that replace rather than merge.\n */\ntype ChainOrOptions = (\n keys: readonly string[],\n opts: Obj,\n defaultOpts: Obj,\n) => Record<string, unknown>\n\nexport const chainOrOptions: ChainOrOptions = (keys, opts, defaultOpts) =>\n keys.reduce<Record<string, unknown>>((acc, item) => {\n acc[item] = opts[item] || defaultOpts[item]\n return acc\n }, {})\n\n// --------------------------------------------------------\n// Chain Reserved Options\n// --------------------------------------------------------\n/**\n * Chains option callbacks for reserved dimension and styling keys,\n * delegating to `chainOptions` for each key individually.\n */\ntype ChainReservedKeyOptions = (\n keys: readonly string[],\n opts: Record<string, Obj | Func>,\n defaultOpts: Record<string, Func[]>,\n) => Record<string, ReturnType<typeof chainOptions>>\n\nexport const chainReservedKeyOptions: ChainReservedKeyOptions = (keys, opts, defaultOpts) =>\n keys.reduce<Record<string, ReturnType<typeof chainOptions>>>((acc, item) => {\n acc[item] = chainOptions(opts[item], defaultOpts[item] ?? [])\n return acc\n }, {})\n","/**\n * Extracts HOC functions from the compose configuration object,\n * filters out non-function entries, and reverses them so the\n * outermost HOC in the chain wraps first (inside-out composition).\n */\ntype CalculateHocsFuncs = (options: Record<string, any>) => ((arg: any) => any)[]\n\nexport const calculateHocsFuncs: CalculateHocsFuncs = (options = {}) =>\n Object.values(options)\n .filter((item) => typeof item === 'function')\n .reverse()\n","import { get, isEmpty, set } from '@pyreon/ui-core'\nimport type { Dimensions, DimensionValue, MultiKeys } from '../types/dimensions'\n\n// --------------------------------------------------------\n// Is value a valid key\n// --------------------------------------------------------\n/** Checks whether a dimension value is defined and not explicitly disabled (false). */\ntype IsValidKey = (value: any) => boolean\nexport const isValidKey: IsValidKey = (value) =>\n value !== undefined && value !== null && value !== false\n\n// --------------------------------------------------------\n// Is value a multi key\n// --------------------------------------------------------\n/** Determines if a dimension value is a multi-key config object, returning [isMulti, propName]. */\ntype IsMultiKey = (value: string | Record<string, unknown>) => [boolean, string]\nexport const isMultiKey: IsMultiKey = (value) => {\n if (typeof value === 'object' && value !== null) return [true, get(value, 'propName') as string]\n return [false, value]\n}\n\n// --------------------------------------------------------\n// calculate dimensions map\n// --------------------------------------------------------\n/**\n * Builds a two-level map (`keysMap`) of dimension -> option -> true,\n * and a flat `keywords` lookup of all prop names reserved by dimensions\n * (including boolean shorthand keys when `useBooleans` is enabled).\n */\ntype GetDimensionsMap = <T extends Record<string, any>>({\n themes,\n useBooleans,\n}: {\n themes: T\n useBooleans?: boolean\n}) => { keysMap: Record<string, any>; keywords: Record<string, any> }\n\nexport const getDimensionsMap: GetDimensionsMap = ({ themes, useBooleans }) => {\n const result = {\n keysMap: {} as Record<string, any>,\n keywords: {} as Record<string, any>,\n }\n\n if (isEmpty(themes)) return result\n\n return Object.entries(themes).reduce((accumulator, [key, value]) => {\n const { keysMap, keywords } = accumulator\n keywords[key] = true\n\n Object.entries(value).forEach(([itemKey, itemValue]) => {\n if (!isValidKey(itemValue)) return\n\n if (useBooleans) {\n keywords[itemKey] = true\n }\n\n set(keysMap, [key, itemKey], true)\n })\n\n return accumulator\n }, result)\n}\n\n// --------------------------------------------------------\n// simple object getters\n// --------------------------------------------------------\n/** Returns the keys of an object with proper typing. */\ntype GetKeys = <T extends Record<string, unknown>>(obj: T) => Array<keyof T>\nexport const getKeys: GetKeys = (obj) => Object.keys(obj)\n\ntype GetValues = <T extends Record<string, unknown>, K extends keyof T>(obj: T) => T[K][]\nexport const getValues = (<T extends Record<string, unknown>>(obj: T) =>\n Object.values(obj)) as GetValues\n\n// --------------------------------------------------------\n// get dimensions values array\n// --------------------------------------------------------\n/** Extracts the prop name from each dimension value, unwrapping multi-key config objects. */\ntype ValueType<T> = T extends string ? T : T[][0]\ntype GetDimensionsValues = <T extends Dimensions, K extends keyof T>(obj: T) => ValueType<T[K]>[]\n\nexport const getDimensionsValues = (<T extends Dimensions>(obj: T) =>\n getValues(obj).map((item: DimensionValue) => {\n if (typeof item === 'object') {\n return item.propName as string\n }\n\n return item\n })) as GetDimensionsValues\n\n// --------------------------------------------------------\n// get multiple dimensions map\n// --------------------------------------------------------\n/** Builds a lookup of dimension prop names that accept multiple simultaneous values. */\ntype GetMultipleDimensions = <T extends Dimensions>(obj: T) => MultiKeys<T>\n\nexport const getMultipleDimensions: GetMultipleDimensions = (obj) =>\n getValues(obj).reduce(\n (accumulator, value: DimensionValue) => {\n if (typeof value === 'object') {\n if (value.multi === true) accumulator[value.propName] = true\n }\n\n return accumulator\n },\n {} as Record<string, true>,\n )\n\n// --------------------------------------------------------\n// get transform dimensions map\n// --------------------------------------------------------\n/** Builds a lookup of dimension prop names that are transform dimensions (evaluated last with function values). */\ntype TransformKeys = Partial<Record<string, true>>\ntype GetTransformDimensions = <T extends Dimensions>(obj: T) => TransformKeys\n\nexport const getTransformDimensions: GetTransformDimensions = (obj) =>\n getValues(obj).reduce(\n (accumulator, value: DimensionValue) => {\n if (typeof value === 'object') {\n if (value.transform === true) accumulator[value.propName] = true\n }\n\n return accumulator\n },\n {} as Record<string, true>,\n )\n","import { isEmpty } from '@pyreon/ui-core'\nimport { STATIC_KEYS } from '../constants'\n\n// --------------------------------------------------------\n// helpers for create statics chaining methods on component\n// --------------------------------------------------------\n/**\n * Attaches chaining static methods (e.g. `.states()`, `.sizes()`, `.theme()`)\n * to a component. Each method calls `cloneAndEnhance` with the corresponding key.\n */\ntype CreateStaticsChainingEnhancers = <O extends Record<string, any>, DK extends string[]>(props: {\n context: Record<string, any>\n dimensionKeys: DK\n func: (defaultOpts: O, opts: any) => void\n options: O\n}) => void\n\nexport const createStaticsChainingEnhancers: CreateStaticsChainingEnhancers = ({\n context,\n dimensionKeys,\n func,\n options,\n}) => {\n const keys = [...dimensionKeys, ...STATIC_KEYS]\n\n keys.forEach((item) => {\n context[item] = (props: any) => func(options, { [item]: props })\n })\n}\n\n// --------------------------------------------------------\n// helpers for create statics on component\n// --------------------------------------------------------\n/** Copies user-defined static properties onto the component's `meta` object. */\ntype CreateStaticsEnhancers = (params: {\n context: Record<string, any>\n options: Record<string, any>\n}) => void\n\nexport const createStaticsEnhancers: CreateStaticsEnhancers = ({ context, options }) => {\n if (!isEmpty(options)) {\n Object.assign(context, options)\n }\n}\n","import { config } from '@pyreon/ui-core'\nimport type { StylesCbArray } from '../types/styles'\n\n// --------------------------------------------------------\n// Calculate styles\n// --------------------------------------------------------\n/**\n * Evaluates an array of style callback functions with the configured\n * `css` tagged-template helper, producing the final CSS interpolations\n * to be passed into the styled-component template literal.\n */\ntype CalculateStyles = (styles: StylesCbArray | undefined) => ReturnType<StylesCbArray[number]>[]\n\nexport const calculateStyles: CalculateStyles = (styles) => {\n if (!styles) return []\n\n return styles.map((item) => item(config.css as Parameters<typeof item>[0]))\n}\n","// --------------------------------------------------------\n// Remove Nullable values\n// --------------------------------------------------------\n/** Filters out entries with `null`, `undefined`, or `false` values from an object. */\ntype RemoveNullableValues = (obj: Record<string, any>) => Record<string, any>\nexport const removeNullableValues: RemoveNullableValues = (obj) =>\n Object.entries(obj)\n .filter(([, v]) => v != null && v !== false)\n .reduce<Record<string, any>>((acc, [k, v]) => {\n acc[k] = v\n return acc\n }, {})\n","import { config, isEmpty, merge } from '@pyreon/ui-core'\nimport type { ThemeModeCallback } from '../types/theme'\nimport { removeNullableValues } from './collection'\nimport { isMultiKey } from './dimensions'\n\n// --------------------------------------------------------\n// Theme Mode Callback\n// --------------------------------------------------------\nconst MODE_CALLBACK_BRAND = Symbol.for('pyreon.themeModeCallback')\n\n/** Creates a mode-switching function that returns the light or dark value based on the active mode. */\nexport const themeModeCallback: ThemeModeCallback = (light, dark) => {\n const fn = (mode: string) => {\n if (!mode || mode === 'light') return light\n return dark\n }\n ;(fn as unknown as Record<string, unknown>).__brand = MODE_CALLBACK_BRAND\n return fn\n}\n\n// --------------------------------------------------------\n// Theme Mode Callback Check\n// --------------------------------------------------------\n/** Detects whether a value is a `themeModeCallback` function via Symbol brand. */\ntype IsModeCallback = (value: unknown) => boolean\nconst isModeCallback: IsModeCallback = (value: unknown) =>\n typeof value === 'function' &&\n (value as unknown as Record<string, unknown>).__brand === MODE_CALLBACK_BRAND\n\n// --------------------------------------------------------\n// Get Theme From Chain\n// --------------------------------------------------------\n/** Reduces an array of chained `.theme()` callbacks into a single merged theme object. */\ntype OptionFunc = (...arg: any) => Record<string, unknown>\ntype GetThemeFromChain = (\n options: OptionFunc[] | undefined | null,\n theme: Record<string, any>,\n) => ReturnType<OptionFunc>\n\nexport const getThemeFromChain: GetThemeFromChain = (options, theme) => {\n const result = {}\n if (!options || isEmpty(options)) return result\n\n return options.reduce(\n (acc, item) => merge(acc, item(theme, themeModeCallback, config.css)),\n result,\n )\n}\n\n// --------------------------------------------------------\n// calculate dimension themes\n// --------------------------------------------------------\n/**\n * Computes the theme object for each dimension by evaluating its\n * chained callbacks against the global theme, then strips nullable values.\n */\ntype GetDimensionThemes = (\n theme: Record<string, any>,\n options: Record<string, any>,\n) => Record<string, any>\n\nexport const getDimensionThemes: GetDimensionThemes = (theme, options) => {\n const dims = options.dimensions\n if (isEmpty(dims)) return {}\n\n const result: Record<string, any> = {}\n\n for (const key in dims) {\n const [, dimension] = isMultiKey(dims[key] as string | Record<string, unknown>)\n const helper = options[key]\n\n if (Array.isArray(helper) && helper.length > 0) {\n result[dimension] = removeNullableValues(getThemeFromChain(helper, theme))\n }\n }\n\n return result\n}\n\n// --------------------------------------------------------\n// combine values\n// --------------------------------------------------------\n/** Reduces an array of option callbacks by calling each with the given args and deep-merging results. */\ntype CalculateChainOptions = (\n options: OptionFunc[] | undefined | null,\n args: any[],\n) => Record<string, any>\n\nexport const calculateChainOptions: CalculateChainOptions = (options, args) => {\n const result = {}\n if (!options || isEmpty(options)) return result\n\n return options.reduce((acc, item) => merge(acc, item(...args)), result)\n}\n\n// --------------------------------------------------------\n// generate theme\n// --------------------------------------------------------\n/**\n * Generates the final theme object by starting with the base theme\n * and merging in dimension-specific theme slices based on the current\n * rocketstate (active dimension values). Supports multi-key dimensions.\n *\n * Transform dimensions (marked with `transform: true`) are evaluated last.\n * Their values are functions that receive the fully accumulated theme and\n * return overrides — enabling derived styles like \"outlined\" or \"inversed\".\n */\nexport type GetTheme = (params: {\n rocketstate: Record<string, string | string[]>\n themes: Record<string, Record<string, any>>\n baseTheme: Record<string, any>\n transformKeys?: Partial<Record<string, true>>\n /** App theme from context — passed to transform dimension callbacks. */\n appTheme?: Record<string, any>\n}) => Record<string, unknown>\n\n// Shared empty object for pseudo-state defaults — allocated once, reused by\n// every getTheme call. Frozen to prevent accidental mutation.\nconst EMPTY_PSEUDO: Record<string, never> = Object.freeze({}) as Record<string, never>\n\nexport const getTheme: GetTheme = ({ rocketstate, themes, baseTheme, transformKeys, appTheme }) => {\n // Spread baseTheme into result — this is unavoidable (we must not mutate\n // the cached baseTheme). But we merge dimension slices in-place onto\n // finalTheme instead of creating a new {} target each merge() call.\n const finalTheme: Record<string, any> = { ...baseTheme }\n type TransformFn = (\n currentTheme: Record<string, any>,\n currentAppTheme: Record<string, any>,\n mode: typeof themeModeCallback,\n cssFn: typeof config.css,\n ) => Record<string, any>\n const deferredTransforms: TransformFn[] = []\n\n for (const key in rocketstate) {\n const value = rocketstate[key]\n if (value == null) continue\n const keyTheme: Record<string, any> = themes[key] ?? {}\n const isTransform = transformKeys?.[key]\n\n const mergeValue = (item: string) => {\n const val = keyTheme[item]\n if (val == null) return\n if (isTransform && typeof val === 'function') {\n deferredTransforms.push(val as TransformFn)\n } else {\n // Merge in-place onto finalTheme — avoids allocating a fresh {}\n // as merge target on every dimension slice.\n merge(finalTheme, val)\n }\n }\n\n if (Array.isArray(value)) {\n for (let i = 0; i < value.length; i++) mergeValue(value[i] as string)\n } else {\n mergeValue(value as string)\n }\n }\n\n // Apply transform dimension values last with the fully accumulated theme\n for (let i = 0; i < deferredTransforms.length; i++) {\n merge(finalTheme, deferredTransforms[i]!(finalTheme, appTheme ?? {}, themeModeCallback, config.css))\n }\n\n // Ensure pseudo-state keys always exist as objects so .styles() can\n // destructure without defaults: const { hover, focus, ... } = $rocketstyle\n // Uses a frozen shared empty object instead of allocating 6 new {} per call.\n finalTheme.hover ??= EMPTY_PSEUDO\n finalTheme.focus ??= EMPTY_PSEUDO\n finalTheme.active ??= EMPTY_PSEUDO\n finalTheme.disabled ??= EMPTY_PSEUDO\n finalTheme.pressed ??= EMPTY_PSEUDO\n finalTheme.readOnly ??= EMPTY_PSEUDO\n\n return finalTheme\n}\n\n// --------------------------------------------------------\n// resolve theme by mode\n// --------------------------------------------------------\n/**\n * Recursively traverses a theme object and resolves any `themeModeCallback`\n * functions to their concrete light or dark values for the given mode.\n */\nexport type GetThemeByMode = (\n object: Record<string, any>,\n mode: 'light' | 'dark',\n) => Partial<{\n baseTheme: Record<string, unknown>\n themes: Record<string, unknown>\n}>\n\nexport const getThemeByMode: GetThemeByMode = (object, mode) => {\n // Recursive theme walker — `for...in` avoids the per-node\n // `Object.keys` array allocation that the prior reduce paid. Called\n // from inside cached `LocalThemeManager` WeakMap tiers (one per\n // theme/mode transition), so the win is smaller than per-render\n // helpers but the pattern is consistent. Ported from vitus-labs\n // `00fdadc2`.\n const acc: Record<string, any> = {}\n for (const key in object) {\n const value = object[key]\n if (typeof value === 'object' && value !== null) {\n acc[key] = getThemeByMode(value, mode)\n } else if (isModeCallback(value)) {\n acc[key] = value(mode)\n } else {\n acc[key] = value\n }\n }\n return acc\n}\n","import { mergeProps } from '@pyreon/core'\nimport { SizedMap } from '@pyreon/sized-map'\nimport { compose, config, hoistNonReactStatics, omit, pick, render } from '@pyreon/ui-core'\nimport { LocalThemeManager } from './cache'\nimport { CONFIG_KEYS, PSEUDO_AND_META_KEYS, PSEUDO_KEYS, STYLING_KEYS } from './constants'\nimport createLocalProvider from './context/createLocalProvider'\nimport { useLocalContext } from './context/localContext'\nimport { rocketstyleAttrsHoc } from './hoc'\nimport { useTheme } from './hooks'\nimport type { Configuration, ExtendedConfiguration } from './types/configuration'\nimport type { RocketComponent } from './types/rocketComponent'\nimport type { InnerComponentProps, RocketStyleComponent } from './types/rocketstyle'\nimport type { ComponentFn } from './types/utils'\nimport {\n calculateChainOptions,\n calculateStylingAttrs,\n pickStyledAttrs,\n} from './utils/attrs'\nimport { chainOptions, chainOrOptions, chainReservedKeyOptions } from './utils/chaining'\nimport { calculateHocsFuncs } from './utils/compose'\nimport { getDimensionsMap } from './utils/dimensions'\nimport { createStaticsChainingEnhancers, createStaticsEnhancers } from './utils/statics'\nimport { calculateStyles } from './utils/styles'\nimport { getDimensionThemes, getTheme, getThemeByMode, getThemeFromChain } from './utils/theme'\n\n// Dev-time counter sink — see packages/internals/perf-harness for contract.\nconst _countSink = globalThis as { __pyreon_count__?: (name: string, n?: number) => void }\n\n/**\n * Core rocketstyle component factory. Creates a fully-featured Pyreon component\n * that integrates theme management (with light/dark mode support), multi-tier\n * WeakMap caching, dimension-based styling props, pseudo-state detection, and\n * chainable static methods (`.attrs()`, `.theme()`, `.styles()`, `.config()`, etc.).\n *\n * In Pyreon, components are plain functions that run once per mount.\n * No forwardRef, useMemo, useState — ref flows as a normal prop.\n */\n\n// --------------------------------------------------------\n// cloneAndEnhance\n// --------------------------------------------------------\ntype CloneAndEnhance = (\n defaultOpts: Configuration,\n opts: Partial<ExtendedConfiguration>,\n) => ReturnType<typeof rocketComponent>\n\n/**\n * Clones the current configuration and merges new options, returning a fresh\n * rocketComponent.\n *\n * Component-swap reset: when `opts.component` is set AND differs from the\n * current `defaultOpts.component`, the prior `attrs`, `priorityAttrs`,\n * `filterAttrs`, and `compose` chains are dropped — they were tailored to the\n * previous component's prop shape, and applying them to a different component\n * silently leaks invalid props through to the DOM (e.g. `disabled` on an\n * `<a>`). Callers who want to preserve them must re-chain explicitly:\n *\n * const NewBtn = Button.config({ component: 'a' }).attrs(sharedAttrs)\n */\nconst cloneAndEnhance: CloneAndEnhance = (defaultOpts, opts) => {\n const componentChanged =\n opts.component != null && opts.component !== defaultOpts.component\n\n return rocketComponent({\n ...defaultOpts,\n attrs: componentChanged\n ? chainOptions(opts.attrs, [])\n : chainOptions(opts.attrs, defaultOpts.attrs),\n filterAttrs: componentChanged\n ? [...(opts.filterAttrs ?? [])]\n : [...(defaultOpts.filterAttrs ?? []), ...(opts.filterAttrs ?? [])],\n priorityAttrs: componentChanged\n ? chainOptions(opts.priorityAttrs, [])\n : chainOptions(opts.priorityAttrs, defaultOpts.priorityAttrs),\n statics: { ...defaultOpts.statics, ...opts.statics },\n compose: componentChanged\n ? { ...opts.compose }\n : { ...defaultOpts.compose, ...opts.compose },\n ...chainOrOptions(CONFIG_KEYS, opts, defaultOpts),\n ...chainReservedKeyOptions([...defaultOpts.dimensionKeys, ...STYLING_KEYS], opts, defaultOpts),\n } as Parameters<typeof rocketComponent>[0])\n}\n\n// --------------------------------------------------------\n// rocketComponent\n// --------------------------------------------------------\n// @ts-expect-error\nconst rocketComponent: RocketComponent = (options) => {\n const { component, styles } = options\n const { styled } = config\n\n const _calculateStylingAttrs = calculateStylingAttrs({\n multiKeys: options.multiKeys,\n useBooleans: options.useBooleans,\n })\n\n const componentName = options.name ?? options.component.displayName ?? options.component.name\n\n // Create styled component with all options.styles if available.\n // Rocketstyle CSS lives in `@layer rocketstyle`, which is declared\n // AFTER `@layer elements` in the cascade ordering (see sheet.ts).\n // This ensures rocketstyle theme styles always override element base\n // styles regardless of source order.\n const STYLED_COMPONENT =\n (component.IS_ROCKETSTYLE ?? options.styled !== true)\n ? component\n : styled(component, { layer: 'rocketstyle' })`\n ${calculateStyles(styles)};\n `\n\n // --------------------------------------------------------\n // COMPONENT - Final component to be rendered\n // --------------------------------------------------------\n const RenderComponent: ComponentFn<any> = options.provider\n ? createLocalProvider(STYLED_COMPONENT)\n : STYLED_COMPONENT\n\n // --------------------------------------------------------\n // THEME - Cached & Calculated theme(s)\n // --------------------------------------------------------\n const ThemeManager = new LocalThemeManager()\n\n // ── Per-definition caches (shared across all instances) ──────────────\n // getDimensionsMap + Object.keys(reservedPropNames) are theme-independent\n // (dimension structure comes from .sizes()/.states()/.variants() chain,\n // not from runtime theme values). Cache them so 50 instances of the same\n // component definition skip the rebuild entirely.\n const _dimensionsCache = new WeakMap<\n object,\n { keysMap: Record<string, unknown>; keywords: Record<string, true | undefined> }\n >()\n const _reservedKeysCache = new WeakMap<object, string[]>()\n\n // Reuse the module-scope pre-merged constant. Cast away `readonly` for\n // the downstream consumers that take a plain `string[]`. Saves the\n // 6-element array allocation that fired once per `rocketstyle()`\n // definition. Ported from vitus-labs `00fdadc2`.\n const ALL_PSEUDO_KEYS = PSEUDO_AND_META_KEYS as unknown as string[]\n // Static portion of omit keys — PSEUDO_KEYS + filterAttrs + 'pseudo' are definition-scoped.\n // RESERVED_STYLING_PROPS_KEYS is dimension-dependent but also cached per definition.\n // 'pseudo' is included here so we can skip the destructuring spread of mergedProps.\n const STATIC_OMIT_KEYS = ['pseudo', ...PSEUDO_KEYS, ...(options.filterAttrs ?? [])]\n // Pre-built Set for omit() — avoids per-call Set allocation. Built once the\n // dimension-dependent reserved keys are known (first mount), then reused.\n const _omitSetCache = new WeakMap<string[], Set<string>>()\n\n // ── Dimension-prop memo (per-definition) ─────────────────────────────\n // Keyed on theme identity → Map<keyString, { rocketstyle, rocketstate }>.\n // The accessors below build a key from (mode, dimension prop tuple,\n // pseudo state tuple) and look up here. On hit they return the SAME\n // object identities for both `$rocketstyle` and `$rocketstate`, which\n // lets the styler's existing `classCache` (keyed on those identities)\n // skip the entire CSS resolve pipeline. On miss they compute fresh\n // and store the result.\n //\n // Why this matters: pre-memo, every Button mount fired 22\n // styler.resolve calls even when the styler-sheet cache hit\n // — the cache catches at the LAST step (insert dedup), but the resolve\n // pipeline still runs to compute the hash. Stable accessor identities\n // mean the styler's classCache hits earlier and the resolves don't run.\n //\n // LRU bound prevents unbounded growth from prop-tuple churn (e.g. a\n // table where every cell has a unique state). 128 entries per theme\n // covers the E2 perf-dashboard reference workload AND high-cardinality\n // surfaces (data tables, design systems with many tokens crossed with\n // size/variant axes, dashboards rendering many small interactive\n // components). The previous cap of 32 was sized for the reference\n // workload only and thrashed at higher cardinalities — measured 45%\n // cache-miss rate (888/2000 lookups) on a 60-unique-tuple Button\n // mount loop, 46% wall-clock regression vs the cap-fits-workload\n // case. Raising the cap 32 → 128 zeroes the cold-resolves counter\n // for that 60-tuple workload at zero implementation cost (the\n // rs-precompute spike's bisect on `spike/rocketstyle-precompute`).\n // Memory: ~12KB per definition\n // per theme at 128 entries × ~100 bytes per entry — negligible vs\n // the 46% runtime win.\n type RsMemoEntry = { readonly rocketstyle: object; readonly rocketstate: object }\n const _rsMemo = new WeakMap<object, SizedMap<string, RsMemoEntry>>()\n const RS_MEMO_CAP = 128\n\n // --------------------------------------------------------\n // COMPOSE - high-order components\n // --------------------------------------------------------\n const hocsFuncs = [rocketstyleAttrsHoc(options), ...calculateHocsFuncs(options.compose)]\n\n // --------------------------------------------------------\n // ENHANCED COMPONENT\n // --------------------------------------------------------\n // In Pyreon, components are plain functions — no forwardRef needed.\n // Ref flows as a normal prop through the chain.\n const EnhancedComponent: ComponentFn<InnerComponentProps> = (props) => {\n // --------------------------------------------------\n // hover - focus - pressed state passed via context from parent component\n // --------------------------------------------------\n const localCtx = useLocalContext(options.consumer)\n\n // --------------------------------------------------\n // general theme and theme mode dark / light passed in context\n // --------------------------------------------------\n // IMPORTANT: Do NOT destructure — useTheme returns getter properties.\n // Destructuring calls getters once and captures static values.\n // Keep the object reference so mode/isDark/isLight re-evaluate lazily.\n const themeAttrs = useTheme(options)\n\n // --------------------------------------------------\n // Dimension KEY structure is theme-independent — dimension names (e.g.\n // `level3`, `primary`) come from the .sizes()/.states()/.variants()\n // callback structure at component-definition time, not from theme values.\n // Compute reservedPropNames + dimensions once using the initial theme;\n // they remain stable across theme swaps.\n //\n // Dimension VALUES (used in $rocketstyleAccessor) DO depend on theme and\n // are resolved inside the accessor on each tracked invocation — allowing\n // whole-theme swaps (user preference themes) to re-resolve CSS without\n // remounting. WeakMap caches in ThemeManager keep the common static-theme\n // case O(1).\n // --------------------------------------------------\n const initialTheme = themeAttrs.theme\n const initialBaseTheme = (() => {\n const helper = ThemeManager.baseTheme\n if (!helper.has(initialTheme)) {\n helper.set(initialTheme, getThemeFromChain(options.theme, initialTheme))\n }\n return helper.get(initialTheme)\n })()\n const initialDimensionThemes = (() => {\n const helper = ThemeManager.dimensionsThemes\n if (!helper.has(initialTheme)) {\n helper.set(initialTheme, getDimensionThemes(initialTheme, options))\n }\n return helper.get(initialTheme)\n })()\n\n // Cache getDimensionsMap per dimension-themes identity — all instances\n // of the same component definition share the same dimension structure.\n let dimResult = _dimensionsCache.get(initialDimensionThemes as object)\n if (dimResult) {\n if (process.env.NODE_ENV !== 'production')\n _countSink.__pyreon_count__?.('rocketstyle.dimensionsMap.hit')\n } else {\n dimResult = getDimensionsMap({\n themes: initialDimensionThemes,\n useBooleans: options.useBooleans,\n })\n _dimensionsCache.set(initialDimensionThemes as object, dimResult)\n }\n const { keysMap: dimensions, keywords: reservedPropNames } = dimResult\n\n // Cache Object.keys() result — same dimension structure = same keys\n let RESERVED_STYLING_PROPS_KEYS = _reservedKeysCache.get(reservedPropNames as object)\n if (!RESERVED_STYLING_PROPS_KEYS) {\n RESERVED_STYLING_PROPS_KEYS = Object.keys(reservedPropNames)\n _reservedKeysCache.set(reservedPropNames as object, RESERVED_STYLING_PROPS_KEYS)\n }\n\n // Silence \"unused\" warnings for initialBaseTheme / initialDimensionThemes —\n // they're eagerly populated into ThemeManager caches so the first accessor\n // call hits cache, but not referenced directly.\n void initialBaseTheme\n void initialDimensionThemes\n\n // Capture pseudo from localCtx once at setup — pseudo properties are\n // getters (from createLocalProvider) that read signals lazily.\n // Passing them through preserves reactivity without subscribing here.\n const localPseudo = localCtx?.pseudo\n\n // --------------------------------------------------\n // Shared accessor resolver.\n //\n // Both `$rocketstyleAccessor` and `$rocketstateAccessor` derive from the\n // same input set (theme, mode, dimension props, pseudo state). Folding\n // them into one resolver lets the dimension-prop memo return the SAME\n // object identities for both — which is what the styler's `classCache`\n // (keyed on `(rocketstyle, rocketstate)` identity) needs to skip the\n // resolve pipeline on cache hit.\n //\n // Reactive contract: this runs inside the styler's `computed()` (one per\n // mounted instance). All signal reads — theme, mode, dimension props,\n // pseudo getters from localCtx — are TRACKED, so any change re-runs the\n // computed which re-resolves the entry. Same key → cached entry; new key\n // → fresh computation, stored under LRU cap.\n // --------------------------------------------------\n const _resolveRsEntry = (): RsMemoEntry => {\n // Read reactive inputs (tracks theme + mode signals)\n const theme = themeAttrs.theme\n const mode = themeAttrs.mode\n const propsRec = props as Record<string, unknown>\n\n // Resolve active dimensions FIRST so the cache key uses the RESOLVED\n // dimension values, not the raw prop names. Under `useBooleans: true`\n // the user writes `<X primary />` / `<X secondary />` — both map to\n // `state=\"primary\"` / `state=\"secondary\"` after _calculateStylingAttrs\n // resolves the boolean shorthand. Keying off `propsRec[dimName]` would\n // read `undefined` for both (the dimension prop itself was never set)\n // and collide every variant onto the first cached entry. Reading\n // `rocketstateRaw[dimName]` gives the resolved string and partitions\n // them correctly.\n // Resolved from props (not localCtx which has pseudo getters).\n const rocketstateRaw = _calculateStylingAttrs({\n props: pickStyledAttrs(propsRec, reservedPropNames),\n dimensions,\n })\n\n // Build key: mode | dimensionValues | pseudoState. Reading dimension\n // props + pseudo signals here tracks them in the surrounding computed\n // so any change re-runs us with a different key.\n let key = mode as string\n for (const dimName in dimensions) {\n const v = rocketstateRaw[dimName]\n // Multi-key dimensions (e.g. variant={['primary', 'rounded']}) are\n // arrays. Sort + join so equivalent sets hash identically; without\n // this both `['a','b']` and `['b','a']` would produce different keys.\n if (Array.isArray(v)) {\n key +=\n '|' + (v.length === 0 ? '' : (v as unknown[]).slice().sort().join(','))\n } else {\n // String/number/boolean serialize directly. Anything else (including\n // undefined / objects) gets a typeof tag so we don't collide.\n key +=\n '|' +\n (typeof v === 'string' || typeof v === 'number' || typeof v === 'boolean'\n ? String(v)\n : v === undefined\n ? ''\n : '~' + typeof v)\n }\n }\n for (const k of ALL_PSEUDO_KEYS) {\n const propV = propsRec[k]\n const localV = localPseudo?.[k as keyof typeof localPseudo]\n const v = propV !== undefined ? propV : localV\n key += '|' + (v === undefined ? '' : v ? '1' : '0')\n }\n\n // Cache lookup. SizedMap with lru:true does the touch-on-read\n // internally, so the get() hit path no longer needs the explicit\n // delete + re-set.\n let themeMemo = _rsMemo.get(theme as object)\n if (!themeMemo) {\n themeMemo = new SizedMap({ maxEntries: RS_MEMO_CAP, lru: true })\n _rsMemo.set(theme as object, themeMemo)\n }\n\n const cached = themeMemo.get(key)\n if (cached) {\n if (process.env.NODE_ENV !== 'production')\n _countSink.__pyreon_count__?.('rocketstyle.dimensionMemo.hit')\n return cached\n }\n\n // Miss: compute fresh. Counter measures actual theme resolutions\n // (not accessor invocations) — see COUNTERS.md.\n if (process.env.NODE_ENV !== 'production')\n _countSink.__pyreon_count__?.('rocketstyle.getTheme')\n\n // Resolve base + dimension themes for the CURRENT theme. WeakMap\n // keyed on theme identity — stable-theme renders hit cache in O(1),\n // theme swaps fall through to recompute (once per new theme).\n const baseThemeHelper = ThemeManager.baseTheme\n if (baseThemeHelper.has(theme)) {\n if (process.env.NODE_ENV !== 'production')\n _countSink.__pyreon_count__?.('rocketstyle.localThemeManager.hit')\n } else {\n baseThemeHelper.set(theme, getThemeFromChain(options.theme, theme))\n }\n const baseTheme = baseThemeHelper.get(theme)\n\n const dimHelper = ThemeManager.dimensionsThemes\n if (dimHelper.has(theme)) {\n if (process.env.NODE_ENV !== 'production')\n _countSink.__pyreon_count__?.('rocketstyle.localThemeManager.hit')\n } else {\n dimHelper.set(theme, getDimensionThemes(theme, options))\n }\n const themes = dimHelper.get(theme)\n\n // Resolve mode-specific theme\n const modeBaseHelper = ThemeManager.modeBaseTheme[mode]\n if (modeBaseHelper.has(baseTheme)) {\n if (process.env.NODE_ENV !== 'production')\n _countSink.__pyreon_count__?.('rocketstyle.localThemeManager.hit')\n } else {\n modeBaseHelper.set(baseTheme, getThemeByMode(baseTheme, mode))\n }\n const currentModeBaseTheme = modeBaseHelper.get(baseTheme)\n\n const modeDimHelper = ThemeManager.modeDimensionTheme[mode]\n if (modeDimHelper.has(themes)) {\n if (process.env.NODE_ENV !== 'production')\n _countSink.__pyreon_count__?.('rocketstyle.localThemeManager.hit')\n } else {\n modeDimHelper.set(themes, getThemeByMode(themes, mode))\n }\n const currentModeThemes = modeDimHelper.get(themes)\n\n const rocketstyle = getTheme({\n rocketstate: rocketstateRaw,\n themes: currentModeThemes,\n baseTheme: currentModeBaseTheme,\n transformKeys: options.transformKeys,\n appTheme: theme,\n })\n\n // $rocketstate carries dimension state + pseudo flags so the styler\n // emits matching pseudo selectors (`:hover`, `:focus`, etc.).\n const propPseudo = pick(propsRec, ALL_PSEUDO_KEYS)\n const rocketstate = {\n ...rocketstateRaw,\n pseudo: { ...localPseudo, ...propPseudo },\n }\n\n // SizedMap.set handles cap-enforced LRU eviction internally.\n const entry: RsMemoEntry = { rocketstyle, rocketstate }\n themeMemo.set(key, entry)\n return entry\n }\n\n const $rocketstyleAccessor = () => _resolveRsEntry().rocketstyle\n const $rocketstateAccessor = () => _resolveRsEntry().rocketstate\n\n // --------------------------------------------------\n // final props passed to WrappedComponent\n // --------------------------------------------------\n // Cache a pre-built Set for omit() — avoids building a new Set from\n // the key array on every mount. Same dimension structure = same Set.\n let omitSet = _omitSetCache.get(RESERVED_STYLING_PROPS_KEYS)\n if (omitSet) {\n if (process.env.NODE_ENV !== 'production')\n _countSink.__pyreon_count__?.('rocketstyle.omitSet.hit')\n } else {\n omitSet = new Set([...RESERVED_STYLING_PROPS_KEYS, ...STATIC_OMIT_KEYS])\n _omitSetCache.set(RESERVED_STYLING_PROPS_KEYS, omitSet)\n }\n\n // Merge localCtx + props via canonical `mergeProps` from @pyreon/core\n // so reactive getter props on `props` (compiler-emitted `_rp(() =>\n // signal())` wrappers converted to getters by `makeReactiveProps`)\n // survive the merge. A plain `{ ...localCtx, ...props }` spread would\n // fire every getter and collapse to static values, defeating\n // reactivity for any downstream JSX accessor reading `props.x`.\n const mergedProps = localCtx\n ? mergeProps(localCtx as Record<string, unknown>, props as Record<string, unknown>)\n : props\n\n // omit() preserves descriptors (since ui-core's omit was updated to\n // copy descriptors), so reactive getters carry through to finalProps.\n const finalProps = omit(mergedProps as Record<string, unknown>, omitSet) as Record<string, any>\n\n if (options.passProps) {\n const passed = pick(mergedProps, options.passProps)\n // Copy descriptors so any reactive getters in passProps survive.\n // Plain `finalProps[k] = passed[k]` would fire getters at setup time\n // AND silently fail when finalProps[k] is already a getter-only\n // descriptor (assignment to a getter-only property is a no-op in\n // non-strict mode, throws in strict mode).\n const passedDescriptors = Object.getOwnPropertyDescriptors(passed)\n for (const k of Object.keys(passedDescriptors)) {\n Object.defineProperty(finalProps, k, passedDescriptors[k]!)\n }\n }\n\n // Use defineProperty for these last writes too — if props.ref or\n // an existing finalProps slot happened to carry a getter-only\n // descriptor, plain assignment would silently fail. defineProperty\n // explicitly replaces the descriptor regardless of shape.\n const refDescriptor = Object.getOwnPropertyDescriptor(props, 'ref')\n if (refDescriptor) {\n Object.defineProperty(finalProps, 'ref', refDescriptor)\n }\n // Function accessors — DynamicStyled wraps them in a computed() so\n // mode/dimension changes produce a new CSS class reactively. The\n // computed tracks only these two accessors; the resolve itself runs\n // untracked to prevent exponential cascade from theme deep-reads.\n Object.defineProperty(finalProps, '$rocketstyle', {\n value: $rocketstyleAccessor,\n writable: true,\n enumerable: true,\n configurable: true,\n })\n Object.defineProperty(finalProps, '$rocketstate', {\n value: $rocketstateAccessor,\n writable: true,\n enumerable: true,\n configurable: true,\n })\n\n // development debugging — tree-shaken in production via import.meta.env.DEV\n if (process.env.NODE_ENV !== 'production') {\n // defineProperty rather than `=` to be safe against any preserved\n // descriptor in this slot (defense-in-depth — `data-rocketstyle`\n // is unlikely to be passed as a user prop, but the writes above\n // use defineProperty for the same reason).\n Object.defineProperty(finalProps, 'data-rocketstyle', {\n value: componentName,\n writable: true,\n enumerable: true,\n configurable: true,\n })\n\n if (options.DEBUG) {\n const debugPayload = {\n component: componentName,\n rocketstate: $rocketstateAccessor(),\n rocketstyle: $rocketstyleAccessor(),\n dimensions,\n mode: themeAttrs.mode,\n reservedPropNames: RESERVED_STYLING_PROPS_KEYS,\n filteredAttrs: options.filterAttrs,\n }\n\n // oxlint-disable-next-line no-console\n console.debug(`[rocketstyle] ${componentName} render:`, debugPayload)\n }\n }\n\n // STATIC VNode — created once, never remounted on mode change.\n // The styled component handles reactive class swaps internally.\n return RenderComponent(finalProps)\n }\n\n // ------------------------------------------------------\n // Compose HOC chain and create final component\n // ------------------------------------------------------\n const FinalComponent: RocketStyleComponent = compose(...hocsFuncs)(EnhancedComponent)\n FinalComponent.IS_ROCKETSTYLE = true\n FinalComponent.displayName = componentName\n\n hoistNonReactStatics(FinalComponent as Record<string, unknown>, options.component)\n\n // ------------------------------------------------------\n // enhance for chaining methods\n // ------------------------------------------------------\n createStaticsChainingEnhancers({\n context: FinalComponent,\n dimensionKeys: options.dimensionKeys,\n func: cloneAndEnhance,\n options,\n })\n\n FinalComponent.IS_ROCKETSTYLE = true\n FinalComponent.displayName = componentName\n FinalComponent.meta = {}\n\n // ------------------------------------------------------\n // enhance for statics\n // ------------------------------------------------------\n createStaticsEnhancers({\n context: FinalComponent.meta,\n options: options.statics,\n })\n\n // Also assign statics directly onto the component so they are\n // discoverable via `\"key\" in Component` checks (e.g. _documentType).\n createStaticsEnhancers({\n context: FinalComponent,\n options: options.statics,\n })\n\n // ─── Hoisted attrs chain (T3.1) ──────────────────────────────────────\n //\n // Expose the accumulated `.attrs()` callback chain on the component so\n // external inspectors (notably `extractDocumentTree` from\n // `@pyreon/connector-document`) can compute the post-attrs props\n // without invoking the full component. The previous Path B workaround\n // had to run the entire styled wrapper — JSX tree creation, dimension\n // resolution, the lot — just to read `_documentProps` off the result.\n //\n // Typed surface: `RocketStyleComponent.__rs_attrs` is a `readonly\n // ReadonlyArray<(props) => Record<string, unknown>>`. Empty when\n // no `.attrs()` was ever called. `chain.reduce(Object.assign, {})`\n // produces the post-attrs result for a given props bag.\n //\n // The `readonly` modifier guards external CONSUMERS — internal\n // assignment from the factory itself is the only legitimate write,\n // hence the cast. Do not drop the readonly on the type.\n ;(FinalComponent as unknown as { __rs_attrs: typeof options.attrs }).__rs_attrs =\n options.attrs ?? []\n\n Object.assign(FinalComponent, {\n attrs: (attrs: any, { priority, filter }: any = {}) => {\n const result: Record<string, any> = {}\n\n if (filter) {\n result.filterAttrs = filter\n }\n\n if (priority) {\n result.priorityAttrs = attrs as ExtendedConfiguration['priorityAttrs']\n\n return cloneAndEnhance(options, result)\n }\n\n result.attrs = attrs as ExtendedConfiguration['attrs']\n\n return cloneAndEnhance(options, result)\n },\n\n config: (opts: any = {}) => {\n const result = pick(opts, CONFIG_KEYS) as ExtendedConfiguration\n\n return cloneAndEnhance(options, result)\n },\n\n statics: (opts: any) => cloneAndEnhance(options, { statics: opts }),\n\n getStaticDimensions: (theme: any) => {\n const themes = getDimensionThemes(theme, options)\n\n const { keysMap, keywords } = getDimensionsMap({\n themes,\n useBooleans: options.useBooleans,\n })\n\n return {\n dimensions: keysMap,\n keywords,\n useBooleans: options.useBooleans,\n multiKeys: options.multiKeys,\n }\n },\n\n getDefaultAttrs: (props: any, theme: any, mode: any) =>\n calculateChainOptions(options.attrs)([\n props,\n theme,\n {\n render,\n mode,\n isDark: mode === 'dark',\n isLight: mode === 'light',\n },\n ]),\n })\n\n return FinalComponent\n}\n\nexport default rocketComponent\n","import { isEmpty } from '@pyreon/ui-core'\nimport { ALL_RESERVED_KEYS } from './constants'\nimport defaultDimensions from './constants/defaultDimensions'\nimport rocketComponent from './rocketstyle'\nimport type { DefaultDimensions, Dimensions } from './types/dimensions'\nimport type { RocketComponent } from './types/rocketComponent'\nimport type { ElementType } from './types/utils'\nimport {\n getDimensionsValues,\n getKeys,\n getMultipleDimensions,\n getTransformDimensions,\n} from './utils/dimensions'\n\nexport type Rocketstyle = <\n const D extends Dimensions = DefaultDimensions,\n UB extends boolean = false,\n>({\n dimensions,\n useBooleans,\n}?: {\n dimensions?: D\n useBooleans?: UB\n}) => <C extends ElementType>({\n name,\n component,\n}: {\n name: string\n component: C\n}) => ReturnType<RocketComponent<C, {}, {}, D, UB>>\n\n/**\n * Factory initializer for rocketstyle components. Validates dimension\n * configurations against reserved keys, then delegates to the core\n * `rocketComponent` builder with pre-computed dimension metadata.\n */\ntype InitErrors = Partial<{\n component: string\n name: string\n dimensions: string\n invalidDimensions: string\n}>\n\nconst validateInit = (name: string, component: unknown, dimensions: Dimensions) => {\n const errors: InitErrors = {}\n\n if (!component) {\n errors.component = 'Parameter `component` is missing in params!'\n }\n\n if (!name) {\n errors.name = 'Parameter `name` is missing in params!'\n }\n\n if (isEmpty(dimensions)) {\n errors.dimensions = 'Parameter `dimensions` is missing in params!'\n } else {\n const definedDimensions = getKeys(dimensions)\n const invalidDimension = ALL_RESERVED_KEYS.some((item) =>\n definedDimensions.some((d) => d === item),\n )\n\n if (invalidDimension) {\n errors.invalidDimensions = `Some of your \\`dimensions\\` is invalid and uses reserved static keys which are\n ${defaultDimensions.toString()}`\n }\n }\n\n if (!isEmpty(errors)) {\n throw Error(JSON.stringify(errors))\n }\n}\n\n// The impl-level `component: unknown` and `rocketComponent as unknown as ...`\n// casts bridge the outer `Rocketstyle` generic contract (5 type-parameters,\n// captures `C extends ElementType`) to the internal `rocketComponent`'s\n// `Configuration<C, D>` shape. The outer cast on line 93 (`as unknown as\n// Rocketstyle`) is the authoritative type; the impl just has to be runtime-\n// correct. Previously this used `any` here, which silently exempted these\n// call sites from `noImplicitAny` audits — `unknown` is more honest.\nconst rocketstyle = (({ dimensions = defaultDimensions, useBooleans = false } = {}) =>\n ({ name, component }: { name: string; component: unknown }) => {\n if (process.env.NODE_ENV !== 'production') {\n validateInit(name, component, dimensions)\n }\n\n return (rocketComponent as unknown as (opts: Record<string, unknown>) => unknown)({\n name,\n component,\n useBooleans,\n dimensions,\n dimensionKeys: getKeys(dimensions),\n dimensionValues: getDimensionsValues(dimensions),\n multiKeys: getMultipleDimensions(dimensions),\n transformKeys: getTransformDimensions(dimensions),\n styled: true,\n })\n }) as unknown as Rocketstyle\n\nexport default rocketstyle\n","export type IsRocketComponent = <T>(component: T) => boolean\n\n/** Runtime type guard — checks if a component was created by `rocketstyle()`. */\nconst isRocketComponent: IsRocketComponent = (component) => {\n if (\n component &&\n (typeof component === 'object' || typeof component === 'function') &&\n Object.hasOwn(component as object, 'IS_ROCKETSTYLE')\n ) {\n return true\n }\n\n return false\n}\n\nexport default isRocketComponent\n","import { name as __pkgName, version as __pkgVersion } from '../package.json' with { type: 'json' }\nimport { registerSingleton } from '@pyreon/reactivity'\n\n// Singleton sentinel — fail-loud detection of duplicate @pyreon/rocketstyle\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(__pkgName, __pkgVersion, import.meta.url)\n\nimport type { TProvider } from './context/context'\nimport Provider, { context } from './context/context'\nimport type { Rocketstyle } from './init'\nimport rocketstyle from './init'\nimport type { IsRocketComponent } from './isRocketComponent'\nimport isRocketComponent from './isRocketComponent'\nimport type { AttrsCb, AttrsHelpers } from './types/attrs'\nimport type {\n ConfigAttrs,\n ConsumerCb,\n ConsumerCtxCBValue,\n ConsumerCtxCb,\n RocketComponentType,\n RocketProviderState,\n} from './types/config'\nimport type { DefaultProps } from './types/configuration'\nimport type {\n DimensionCallbackParam,\n DimensionProps,\n Dimensions,\n DimensionValue,\n ExtractDimensionProps,\n ExtractDimensions,\n TDKP,\n} from './types/dimensions'\nimport type { ComposeParam, GenericHoc } from './types/hoc'\nimport type { IRocketStyleComponent, RocketStyleComponent } from './types/rocketstyle'\nimport type { RocketStyleInterpolationProps, StylesCb, StylesDefault } from './types/styles'\nimport type {\n ThemeCb,\n ThemeDefault,\n ThemeMode,\n ThemeModeCallback,\n ThemeModeKeys,\n} from './types/theme'\nimport type { ComponentFn, ElementType, ExtractProps, MergeTypes, TObj } from './types/utils'\n\nexport type {\n AttrsCb,\n AttrsHelpers,\n ComponentFn,\n ComposeParam,\n ConfigAttrs,\n ConsumerCb,\n ConsumerCtxCBValue,\n ConsumerCtxCb,\n DefaultProps,\n DimensionCallbackParam,\n DimensionProps,\n Dimensions,\n DimensionValue,\n ElementType,\n ExtractDimensionProps,\n ExtractDimensions,\n ExtractProps,\n GenericHoc,\n IRocketStyleComponent,\n IsRocketComponent,\n MergeTypes,\n RocketComponentType,\n RocketProviderState,\n RocketStyleComponent,\n RocketStyleInterpolationProps,\n Rocketstyle,\n StylesCb,\n StylesDefault,\n TDKP,\n ThemeCb,\n ThemeDefault,\n ThemeMode,\n ThemeModeCallback,\n ThemeModeKeys,\n TObj,\n TProvider,\n}\n\n/**\n * Resolve a $rocketstyle value — handles both function accessor and plain object.\n * Use in styled() interpolation functions when $rocketstyle may be a reactive accessor.\n *\n * @example\n * ```ts\n * styled(Component)`\n * color: ${(props) => resolveTheme(props.$rocketstyle).color};\n * `\n * ```\n */\nexport function resolveTheme<T = Record<string, unknown>>(\n value: (() => T) | T,\n): T {\n return typeof value === 'function' ? (value as () => T)() : value\n}\n\nexport { context, isRocketComponent, Provider, rocketstyle }\nexport default rocketstyle\n"],"mappings":";;;;;;;;;;;;ACCA,MAAa,eAAe;;AAG5B,MAAa,cAAc;CAAC;CAAS;CAAU;CAAS;AAAS;;AAGjE,MAAa,mBAAmB,CAAC,YAAY,UAAU;;;;;;;AAQvD,MAAa,uBAAuB,CAAC,GAAG,aAAa,GAAG,gBAAgB;;AAGxE,MAAa,cAAc;CACzB,OAAO;CACP,MAAM;AACR;;AAGA,MAAa,uBAAuB;CAClC,MAAM;CACN,OAAO;AACT;;AAGA,MAAa,cAAc;CACzB;CACA;CACA;CACA;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AI,QAAQ,IAAI,aAAa,cAC3B,aAAa,MAAM,WAAW,UAAU;CAG1C,OAAQ,gBAA0E;EAChF;EACA;EACA;EACA;EACA,eAAe,QAAQ,UAAU;EACjC,iBAAiB,oBAAoB,UAAU;EAC/C,WAAW,sBAAsB,UAAU;EAC3C,eAAe,uBAAuB,UAAU;EAChD,QAAQ;CACV,CAAC;AACH;;;;;AC9FF,MAAM,qBAAwC,cAAc;CAC1D,IACE,cACC,OAAO,cAAc,YAAY,OAAO,cAAc,eACvD,OAAO,OAAO,WAAqB,gBAAgB,GAEnD,OAAO;CAGT,OAAO;AACT;;;;ACNA,kBAAkBC,MAAWC,SAAc,OAAO,KAAK,GAAG;;;;;;;;;;;;AAyF1D,SAAgB,aACd,OACG;CACH,OAAO,OAAO,UAAU,aAAc,MAAkB,IAAI;AAC9D;AAGA,kBAAe"}
1
+ {"version":3,"file":"index.js","names":["CoreProvider","useTheme","ThemeManager","LocalThemeManager","rocketstyleAttrsHoc","useTheme","defaultDimensions","__pkgName","__pkgVersion"],"sources":["../package.json","../src/constants/index.ts","../src/context/context.ts","../src/constants/defaultDimensions.ts","../src/cache/LocalThemeManager.ts","../src/context/localContext.ts","../src/context/createLocalProvider.ts","../src/hooks/useTheme.ts","../src/utils/attrs.ts","../src/hoc/rocketstyleAttrsHoc.ts","../src/utils/chaining.ts","../src/utils/compose.ts","../src/utils/dimensions.ts","../src/utils/statics.ts","../src/utils/styles.ts","../src/utils/collection.ts","../src/utils/theme.ts","../src/rocketstyle.ts","../src/init.ts","../src/isRocketComponent.ts","../src/index.ts"],"sourcesContent":["","/** Default theme mode used when no mode is provided via context. */\nexport const MODE_DEFAULT = 'light'\n\n/** Pseudo-state interaction keys tracked for styling (hover, active, focus, pressed). */\nexport const PSEUDO_KEYS = ['hover', 'active', 'focus', 'pressed'] as const\n\n/** Meta pseudo-state keys representing non-interactive states (disabled, readOnly). */\nexport const PSEUDO_META_KEYS = ['disabled', 'readOnly'] as const\n\n/**\n * Pre-merged interaction + meta keys. Hoisted from `rocketstyle.ts`'s\n * `rocketComponent` definition scope to module scope so the merged\n * 6-element array is allocated ONCE per process, not once per\n * rocketstyle definition. Ported from vitus-labs `00fdadc2`.\n */\nexport const PSEUDO_AND_META_KEYS = [...PSEUDO_KEYS, ...PSEUDO_META_KEYS] as const\n\n/** Supported theme mode flags. */\nexport const THEME_MODES = {\n light: true,\n dark: true,\n} as const\n\n/** Maps each theme mode to its inverse (light -> dark, dark -> light). */\nexport const THEME_MODES_INVERSED = {\n dark: 'light',\n light: 'dark',\n} as const\n\n/** Reserved configuration keys accepted by the `.config()` chaining method. */\nexport const CONFIG_KEYS = [\n 'provider',\n 'consumer',\n 'DEBUG',\n 'name',\n 'component',\n 'inversed',\n 'passProps',\n 'styled',\n] as const\n\n/** Keys for theme and styles chaining methods. */\nexport const STYLING_KEYS = ['theme', 'styles'] as const\nexport const STATIC_KEYS = [...STYLING_KEYS, 'compose'] as const\n\n/** Union of all reserved keys that cannot be used as dimension names. */\nexport const ALL_RESERVED_KEYS = [\n ...Object.keys(THEME_MODES),\n ...CONFIG_KEYS,\n ...STATIC_KEYS,\n 'attrs',\n] as const\n","import type { VNodeChild } from '@pyreon/core'\nimport { nativeCompat, useContext } from '@pyreon/core'\nimport { Provider as CoreProvider, context } from '@pyreon/ui-core'\nimport { MODE_DEFAULT, THEME_MODES_INVERSED } from '../constants'\n\n// Both `rootSize` and `breakpoints` are OPTIONAL — the rest of the chain\n// handles their absence: `enrichTheme` defaults rootSize to 16,\n// `makeItResponsive` short-circuits to plain CSS when breakpoints are\n// empty, and `value()` defaults rootSize to 16 internally. Marking\n// either as required here over-constrained user themes downstream\n// (e.g. a minimal `{ colors: { primary: '#228be6' } }` theme passed\n// to the public Provider was a TS error even though it works at runtime).\n//\n// Shape matches `@pyreon/unistyle` `PyreonTheme` and the downstream\n// `@pyreon/ui-core` Provider's `Partial<...>`-wrapped theme — `?:` with\n// no explicit `| undefined` so the downstream Partial composition holds\n// under `exactOptionalPropertyTypes: true`.\ntype Theme = {\n rootSize?: number\n breakpoints?: Record<string, number>\n} & Record<string, unknown>\n\nexport type TProvider = {\n children: VNodeChild\n theme?: Theme | undefined\n mode?: 'light' | 'dark' | undefined\n inversed?: boolean | undefined\n provider?: ((props: Record<string, unknown>) => VNodeChild) | undefined\n}\n\n/**\n * Top-level theme and mode provider for rocketstyle components.\n * Reads the parent context, merges incoming props, and resolves\n * the active mode (with optional inversion for nested dark/light switching).\n *\n * In Pyreon, context is provided via provide() instead of React.Provider.\n */\nconst Provider = ({ provider = CoreProvider, inversed, ...props }: TProvider): VNodeChild => {\n const getCtx = useContext(context)\n const ctx = getCtx()\n\n const merged = { ...ctx, ...props, provider } as unknown as TProvider & Record<string, unknown>\n const { theme, mode, provider: RocketstyleProvider, children } = merged\n\n let newMode = MODE_DEFAULT\n\n if (mode) {\n newMode = inversed ? THEME_MODES_INVERSED[mode] : mode\n }\n\n const FinalProvider = RocketstyleProvider ?? CoreProvider\n const result = FinalProvider({\n mode: newMode,\n isDark: newMode === 'dark',\n isLight: newMode === 'light',\n ...(theme !== undefined ? { theme } : {}),\n provider,\n children,\n })\n\n return result ?? null\n}\n\n// Mark as native — reads useContext() and delegates to CoreProvider, both\n// of which need Pyreon's setup frame.\nnativeCompat(Provider)\n\nexport { context }\n\nexport default Provider\n","/**\n * Default dimension configuration for rocketstyle components.\n * Defines four built-in dimensions: `states`, `sizes`, `variants`,\n * and `multiple` (a multi-select dimension).\n */\nconst DEFAULT_DIMENSIONS = {\n states: 'state',\n sizes: 'size',\n variants: 'variant',\n multiple: {\n propName: 'multiple',\n multi: true,\n },\n modifiers: {\n propName: 'modifier',\n multi: true,\n transform: true,\n },\n} as const\n\nexport type DefaultDimensions = typeof DEFAULT_DIMENSIONS\n\nexport default DEFAULT_DIMENSIONS\n","/**\n * WeakMap-based multi-tier cache for computed theme objects.\n * Maintains separate caches for base themes, dimension themes,\n * and their light/dark mode variants to avoid recalculation on re-renders.\n */\nexport default class ThemeManager {\n baseTheme = new WeakMap()\n\n dimensionsThemes = new WeakMap()\n\n modeBaseTheme = { light: new WeakMap(), dark: new WeakMap() }\n\n modeDimensionTheme = { light: new WeakMap(), dark: new WeakMap() }\n}\n","import { createContext, useContext } from '@pyreon/core'\nimport type { PseudoState } from '../types/pseudo'\n\ntype LocalContext = Partial<\n {\n pseudo: PseudoState\n } & Record<string, string>\n>\n\n/**\n * Local context for propagating pseudo-state (hover, focus, pressed)\n * and additional styling attributes from a parent provider component\n * to its rocketstyle children.\n */\nconst localContext = createContext<LocalContext>({})\n\nconst EMPTY_CTX = { pseudo: {} } as LocalContext\n\n/**\n * Retrieves the local pseudo-state context. When a consumer callback\n * is provided, it transforms the raw context; otherwise returns defaults.\n *\n * In Pyreon, components are plain functions that run once — no useMemo needed.\n */\ntype UseLocalContext = (consumer: any) => LocalContext\nexport const useLocalContext: UseLocalContext = (consumer) => {\n const ctx = useContext(localContext)\n\n if (!consumer) return EMPTY_CTX\n\n const result = consumer((callback: any) => callback(ctx))\n return { pseudo: {}, ...result }\n}\n\nexport { localContext }\n\nexport default localContext\n","import { mergeProps, provide } from '@pyreon/core'\nimport { batch, signal } from '@pyreon/reactivity'\nimport { omit } from '@pyreon/ui-core'\nimport type { PseudoProps } from '../types/pseudo'\nimport type { ComponentFn } from '../types/utils'\nimport { localContext } from './localContext'\n\ntype Props = PseudoProps & Record<string, any>\n\n// Keys this HOC consumes — extracted into a frozen Set so `omit()` can\n// reuse the pre-built shape on every render (saves the per-call Set\n// allocation the array-form would pay).\nconst HOC_OWN_KEYS = new Set([\n 'onMouseEnter',\n 'onMouseLeave',\n 'onMouseUp',\n 'onMouseDown',\n 'onFocus',\n 'onBlur',\n '$rocketstate',\n])\n\n/**\n * Higher-order component that wraps a component with a LocalProvider,\n * detecting pseudo-states (hover, focus, pressed) via mouse/focus events\n * and broadcasting them through local context to child rocketstyle components.\n *\n * In Pyreon, context is provided via provide(), and state is managed\n * with signals instead of useState.\n *\n * **Descriptor preservation contract** — pre-fix this HOC used a\n * parameter-destructure (`({ onMouseEnter, …, ...props })`) and a final\n * value-spread (`{ ...props, ...events, $rocketstate }`). Both fire\n * every getter on the incoming props object — including the\n * `_rp(() => signal())`-converted getter descriptors that\n * `makeReactiveProps` installs for compiler-emitted reactive props.\n * Result: any signal-driven prop (`href`, `disabled`, `class`, ...) on a\n * rocketstyle-wrapped component with `provider: true` got snapshot-read\n * at this HOC entry, collapsing the live subscription to a one-shot\n * value. Downstream `applyProp` / `_bind` never re-fired on signal\n * change, so the DOM stayed static.\n *\n * Post-fix: receive `props` as a single argument; read named keys lazily\n * inside the event closures (so event-handler property descriptors fire\n * at mouse-event time, not at HOC setup); use `omit()` (descriptor-copy\n * from `@pyreon/ui-core`) to build the rest-props object and\n * `mergeProps` (from `@pyreon/core`) to assemble the final props passed\n * downstream.\n *\n * Same contract PR #584 established for the outer attrs / styled HOCs.\n * createLocalProvider was missed by that sweep — it sits between\n * EnhancedComponent and the styled leaf only when `options.provider: true`\n * (top-level rocketstyle wrappers), which is exactly the surface where\n * consumer-reported reactive-href breakage was seen on ui-components\n * Buttons.\n */\nconst createLocalProvider = (WrappedComponent: ComponentFn<any>) => {\n const HOCComponent: ComponentFn<Props> = (props) => {\n const hover = signal(false)\n const focus = signal(false)\n const pressed = signal(false)\n\n const events = {\n onMouseEnter: (e: MouseEvent) => {\n hover.set(true)\n // Read the user-supplied handler lazily — fires the descriptor\n // getter (if any) at mouse-event time, never at HOC setup. Event\n // handlers are typically stable function values so the getter\n // resolves to a function; calling it forwards the event.\n const user = props.onMouseEnter as ((e: MouseEvent) => void) | undefined\n if (user) user(e)\n },\n onMouseLeave: (e: MouseEvent) => {\n // batch() so consumers reading both hover + pressed (the common\n // styled-component case — pseudo-state CSS depends on both) get\n // notified once per mouseleave, not twice. Fires on every\n // mouseleave on every rocketstyle-styled component → hot.\n batch(() => {\n hover.set(false)\n pressed.set(false)\n })\n const user = props.onMouseLeave as ((e: MouseEvent) => void) | undefined\n if (user) user(e)\n },\n onMouseDown: (e: MouseEvent) => {\n pressed.set(true)\n const user = props.onMouseDown as ((e: MouseEvent) => void) | undefined\n if (user) user(e)\n },\n onMouseUp: (e: MouseEvent) => {\n pressed.set(false)\n const user = props.onMouseUp as ((e: MouseEvent) => void) | undefined\n if (user) user(e)\n },\n onFocus: (e: FocusEvent) => {\n focus.set(true)\n const user = props.onFocus as ((e: FocusEvent) => void) | undefined\n if (user) user(e)\n },\n onBlur: (e: FocusEvent) => {\n focus.set(false)\n const user = props.onBlur as ((e: FocusEvent) => void) | undefined\n if (user) user(e)\n },\n }\n\n // Use getters so pseudo-state signals are read lazily by consumers\n // inside their own reactive scopes — NOT eagerly during parent setup.\n // Without getters, hover()/focus()/pressed() reads here would register\n // as dependencies of any parent effect, causing cascading re-renders\n // on every mouse event.\n // Resolve $rocketstate if it's a function accessor (from EnhancedComponent).\n // This single property access fires the descriptor's getter (if any) —\n // intentional, since $rocketstate's getter returns a stable accessor\n // function and we need it now to construct updatedState.\n const incomingState = props.$rocketstate\n const resolvedState =\n typeof incomingState === 'function' ? incomingState() : incomingState\n const updatedState = {\n ...resolvedState,\n pseudo: {\n ...resolvedState?.pseudo,\n get hover() {\n return hover()\n },\n get focus() {\n return focus()\n },\n get pressed() {\n return pressed()\n },\n },\n }\n\n // Provide local context for child rocketstyle components\n provide(localContext, updatedState)\n\n // Build the rest-props object via descriptor-copy (omit() from\n // @pyreon/ui-core preserves getter descriptors). Then merge with our\n // event handlers and the resolved $rocketstate using canonical\n // `mergeProps` from @pyreon/core — the events + $rocketstate layers\n // are static data so their data descriptors override any same-named\n // getters on restProps. All three sources are non-null at this site\n // (omit always returns an object; events and $rocketstate are\n // freshly-constructed literals).\n const restProps = omit(props, HOC_OWN_KEYS)\n const finalProps = mergeProps(restProps as Record<string, unknown>, events, {\n $rocketstate: updatedState,\n })\n\n return WrappedComponent(finalProps)\n }\n\n return HOCComponent\n}\n\nexport default createLocalProvider\n","import { useContext } from '@pyreon/core'\nimport { THEME_MODES_INVERSED } from '../constants'\nimport { context } from '../context/context'\nimport type { ThemeModeKeys } from '../types/theme'\n\ntype Context = {\n theme: Record<string, unknown>\n mode: ThemeModeKeys\n isDark: boolean\n isLight: boolean\n}\n\ntype UseThemeAttrs = ({ inversed }: { inversed?: boolean | undefined }) => Context\n\n/**\n * Retrieves the current theme object and resolved mode from context.\n *\n * Returns an object with getter properties so that mode/isDark/isLight\n * are evaluated lazily on each access. The context is a ReactiveContext,\n * so useContext returns `() => CoreContextValue` — we call it inside\n * each getter to ensure reactive tracking.\n */\nconst useThemeAttrs: UseThemeAttrs = ({ inversed }) => {\n // ReactiveContext: useContext returns () => CoreContextValue.\n // Call the getter inside each property getter for reactive tracking.\n const getCtx = useContext(context)\n\n return {\n get theme() {\n return getCtx().theme ?? ({} as Record<string, unknown>)\n },\n get mode() {\n const ctxMode = getCtx().mode ?? 'light'\n return inversed ? THEME_MODES_INVERSED[ctxMode] : ctxMode\n },\n get isDark() {\n const ctxDark = getCtx().isDark ?? false\n return inversed ? !ctxDark : ctxDark\n },\n get isLight() {\n const ctxDark = getCtx().isDark ?? false\n const isDark = inversed ? !ctxDark : ctxDark\n return !isDark\n },\n }\n}\n\nexport default useThemeAttrs\n","import type { MultiKeys } from '../types/dimensions'\n\n// --------------------------------------------------------\n// remove undefined props\n// --------------------------------------------------------\n// The reactive-prop-aware \"drop undefined, keep getter descriptors\" filter is a\n// `@pyreon/core` primitive (it operates on core's own `_rp` / `makeReactiveProps`\n// encoding) — re-exported here so the rocketstyle attrs HOC keeps importing it\n// from `../utils/attrs`. Previously hand-rolled identically in both this package\n// and `@pyreon/attrs`; consolidating removes the divergence that let the attrs\n// copy ship a value-copy reactivity bug.\nexport { removeUndefinedProps } from '@pyreon/core'\n\n// --------------------------------------------------------\n// pick styled props\n// --------------------------------------------------------\n/** Picks only the props whose keys exist in the dimension keywords lookup and have truthy values. */\nexport const pickStyledAttrs = <\n T extends Record<string, any>,\n K extends Record<string, true | undefined>,\n>(\n props: T,\n keywords: K,\n): { [I in keyof K & keyof T]: T[I] } => {\n // Direct `for...in` avoids the `Object.keys(props)` array allocation\n // that `for (const key of Object.keys(props))` paid on every render.\n // The hot path is rocketstyle's `EnhancedComponent` body — fires once\n // per render of every rocketstyle-wrapped component. Ported from\n // vitus-labs `00fdadc2`.\n const result: Record<string, unknown> = {}\n for (const key in props) {\n if (keywords[key] && props[key]) result[key] = props[key]\n }\n return result as { [I in keyof K & keyof T]: T[I] }\n}\n\n// --------------------------------------------------------\n// combine values\n// --------------------------------------------------------\n/**\n * Returns a curried function that evaluates an array of `.attrs()` callbacks,\n * spreading each result into a single merged props object via `Object.assign`.\n */\ntype OptionFunc<A> = (...arg: A[]) => Record<string, unknown>\ntype CalculateChainOptions = <A>(\n options?: OptionFunc<A>[],\n) => (args: A[]) => ReturnType<OptionFunc<A>>\n\nexport const calculateChainOptions: CalculateChainOptions = (options) => (args) => {\n if (!options || options.length === 0) return {}\n\n return options.reduce<Record<string, unknown>>(\n (acc, item) => Object.assign(acc, item(...args)),\n {},\n )\n}\n\n// --------------------------------------------------------\n// get style attributes\n// --------------------------------------------------------\n/**\n * Resolves the active value for each styling dimension from component props.\n * First checks for explicit prop values (string, number, or array for multi-keys),\n * then falls back to boolean shorthand props when `useBooleans` is enabled.\n */\ntype CalculateStylingAttrs = ({\n useBooleans,\n multiKeys,\n}: {\n useBooleans?: boolean\n multiKeys?: MultiKeys\n}) => ({\n props,\n dimensions,\n}: {\n props: Record<string, unknown>\n dimensions: Record<string, unknown>\n}) => Record<string, any>\nexport const calculateStylingAttrs: CalculateStylingAttrs =\n ({ useBooleans, multiKeys }) =>\n ({ props, dimensions }) => {\n const result: Record<string, any> = {}\n\n // (1) find dimension keys values & initialize\n for (const item in dimensions) {\n const pickedProp = props[item]\n const t = typeof pickedProp\n\n if (multiKeys?.[item] && Array.isArray(pickedProp)) {\n result[item] = pickedProp\n } else if (t === 'string' || t === 'number') {\n result[item] = pickedProp\n } else {\n result[item] = undefined\n }\n }\n\n // (2) if booleans are being used let's find the rest\n // Use `in` operator on the dimension map instead of allocating\n // a new Set per dimension — the map is already an object with\n // the keywords as keys.\n if (useBooleans) {\n for (const key in result) {\n if (result[key]) continue // already assigned\n\n const dimensionMap = dimensions[key] as Record<string, unknown>\n const isMultiKey = multiKeys?.[key]\n let newDimensionValue: string | string[] | undefined\n\n if (isMultiKey) {\n const matches: string[] = []\n for (const propKey in props) {\n if (propKey in dimensionMap) matches.push(propKey)\n }\n newDimensionValue = matches.length > 0 ? matches : undefined\n } else {\n // Iterate props to find last matching keyword\n // (last wins for priority)\n for (const k in props) {\n if (k in dimensionMap && props[k]) {\n newDimensionValue = k\n }\n }\n }\n\n result[key] = newDimensionValue\n }\n }\n\n return result\n }\n","import { mergeProps } from '@pyreon/core'\nimport { render } from '@pyreon/ui-core'\nimport { useTheme } from '../hooks'\nimport type { Configuration } from '../types/configuration'\nimport type { ComponentFn } from '../types/utils'\nimport { calculateChainOptions, removeUndefinedProps } from '../utils/attrs'\n\nexport type RocketStyleHOC = ({\n inversed,\n attrs,\n priorityAttrs,\n}: Pick<Configuration, 'inversed' | 'attrs' | 'priorityAttrs'>) => (\n WrappedComponent: ComponentFn<any>,\n) => ComponentFn<any>\n\n/**\n * HOC that resolves the `.attrs()` chain before the inner component renders.\n * Evaluates both regular and priority attrs callbacks with the current theme\n * and mode, then merges the results with explicit props (priority attrs\n * are applied first, regular attrs can be overridden by direct props).\n *\n * In Pyreon, there is no forwardRef — ref flows as a normal prop.\n * Components are plain functions.\n */\nconst rocketStyleHOC: RocketStyleHOC = ({ inversed, attrs, priorityAttrs }) => {\n const calculateAttrs = calculateChainOptions(attrs)\n const hasAttrs = (attrs?.length ?? 0) > 0\n const hasPriorityAttrs = (priorityAttrs?.length ?? 0) > 0\n\n const makeCallbackParams = (themeAttrs: ReturnType<typeof useTheme>) => [\n themeAttrs.theme,\n { render, mode: themeAttrs.mode, isDark: themeAttrs.isDark, isLight: themeAttrs.isLight },\n ]\n\n // Fast path — no `.priorityAttrs()` chain. This is the dominant case in\n // practice (priorityAttrs is unused across the whole component library), so\n // `prioritizedAttrs` would always be `{}`. The full path below would then\n // (a) call `calculatePriorityAttrs` to produce `{}`, (b) run a wasted\n // `mergeProps({}, filteredProps)` — a full descriptor copy of every prop just\n // to merge with `{}` — and (c) pass that empty `{}` as the first arg of the\n // final 3-way merge. The fast path skips all three. `removeUndefinedProps`\n // (load-bearing: strips `undefined` so consumer props don't shadow `.attrs()`\n // defaults) is kept. Variant picked at factory time so render-time work is\n // fixed. Merge precedence is preserved: props win over attrs win over {}.\n if (!hasPriorityAttrs) {\n const Enhanced = (WrappedComponent: ComponentFn<any>) => {\n const HOCComponent: ComponentFn<any> = (props) => {\n const themeAttrs = useTheme({ inversed })\n const filteredProps = removeUndefinedProps(props)\n if (!hasAttrs) {\n // No chain at all — filteredProps IS the final props (the full path\n // would just re-copy them via `mergeProps({}, {}, filteredProps)`).\n return WrappedComponent(filteredProps)\n }\n const finalAttrs = calculateAttrs([filteredProps, ...makeCallbackParams(themeAttrs)])\n return WrappedComponent(mergeProps(finalAttrs, filteredProps))\n }\n return HOCComponent\n }\n return Enhanced\n }\n\n // Full path — `.priorityAttrs()` present.\n const calculatePriorityAttrs = calculateChainOptions(priorityAttrs)\n const Enhanced = (WrappedComponent: ComponentFn<any>) => {\n const HOCComponent: ComponentFn<any> = (props) => {\n // IMPORTANT: Do NOT destructure — useTheme returns getter properties.\n // Keep the object reference so properties re-evaluate lazily.\n const themeAttrs = useTheme({ inversed })\n const filteredProps = removeUndefinedProps(props)\n const callbackParams = makeCallbackParams(themeAttrs)\n const prioritizedAttrs = calculatePriorityAttrs([filteredProps, ...callbackParams])\n // Merge via canonical `mergeProps` so reactive getter props survive the\n // chain (a `{...A, ...B}` spread would fire every getter and break the\n // reactive subscription downstream). Attrs callbacks legitimately read\n // prop VALUES (`({ href }) => ({ tag: href ? 'a' : 'button' })`) — a\n // one-shot read at setup time by design.\n const finalAttrs = calculateAttrs([\n mergeProps(prioritizedAttrs, filteredProps),\n ...callbackParams,\n ])\n return WrappedComponent(mergeProps(prioritizedAttrs, finalAttrs, filteredProps))\n }\n return HOCComponent\n }\n return Enhanced\n}\n\nexport default rocketStyleHOC\n","type Func = (...args: any) => Record<string, unknown>\ntype Obj = Record<string, unknown>\n\n// --------------------------------------------------------\n// Chain Options\n// --------------------------------------------------------\n/**\n * Appends a new option (function or plain object) to an existing chain\n * of option callbacks. Objects are wrapped in a thunk for uniform handling.\n */\ntype ChainOptions = (opts: Obj | Func | undefined, defaultOpts: Func[]) => Func[]\n\nexport const chainOptions: ChainOptions = (opts, defaultOpts = []) => {\n const result = [...defaultOpts]\n\n if (typeof opts === 'function') result.push(opts)\n else if (typeof opts === 'object') result.push(() => opts)\n\n return result\n}\n\n// --------------------------------------------------------\n// Chain Or Options\n// --------------------------------------------------------\n/**\n * For each key, picks the new value if truthy, otherwise falls back\n * to the default. Used for config keys that replace rather than merge.\n */\ntype ChainOrOptions = (\n keys: readonly string[],\n opts: Obj,\n defaultOpts: Obj,\n) => Record<string, unknown>\n\nexport const chainOrOptions: ChainOrOptions = (keys, opts, defaultOpts) =>\n keys.reduce<Record<string, unknown>>((acc, item) => {\n acc[item] = opts[item] || defaultOpts[item]\n return acc\n }, {})\n\n// --------------------------------------------------------\n// Chain Reserved Options\n// --------------------------------------------------------\n/**\n * Chains option callbacks for reserved dimension and styling keys,\n * delegating to `chainOptions` for each key individually.\n */\ntype ChainReservedKeyOptions = (\n keys: readonly string[],\n opts: Record<string, Obj | Func>,\n defaultOpts: Record<string, Func[]>,\n) => Record<string, ReturnType<typeof chainOptions>>\n\nexport const chainReservedKeyOptions: ChainReservedKeyOptions = (keys, opts, defaultOpts) =>\n keys.reduce<Record<string, ReturnType<typeof chainOptions>>>((acc, item) => {\n acc[item] = chainOptions(opts[item], defaultOpts[item] ?? [])\n return acc\n }, {})\n","/**\n * Extracts HOC functions from the compose configuration object,\n * filters out non-function entries, and reverses them so the\n * outermost HOC in the chain wraps first (inside-out composition).\n */\ntype CalculateHocsFuncs = (options: Record<string, any>) => ((arg: any) => any)[]\n\nexport const calculateHocsFuncs: CalculateHocsFuncs = (options = {}) =>\n Object.values(options)\n .filter((item) => typeof item === 'function')\n .reverse()\n","import { get, isEmpty, set } from '@pyreon/ui-core'\nimport type { Dimensions, DimensionValue, MultiKeys } from '../types/dimensions'\n\n// --------------------------------------------------------\n// Is value a valid key\n// --------------------------------------------------------\n/** Checks whether a dimension value is defined and not explicitly disabled (false). */\ntype IsValidKey = (value: any) => boolean\nexport const isValidKey: IsValidKey = (value) =>\n value !== undefined && value !== null && value !== false\n\n// --------------------------------------------------------\n// Is value a multi key\n// --------------------------------------------------------\n/** Determines if a dimension value is a multi-key config object, returning [isMulti, propName]. */\ntype IsMultiKey = (value: string | Record<string, unknown>) => [boolean, string]\nexport const isMultiKey: IsMultiKey = (value) => {\n if (typeof value === 'object' && value !== null) return [true, get(value, 'propName') as string]\n return [false, value]\n}\n\n// --------------------------------------------------------\n// calculate dimensions map\n// --------------------------------------------------------\n/**\n * Builds a two-level map (`keysMap`) of dimension -> option -> true,\n * and a flat `keywords` lookup of all prop names reserved by dimensions\n * (including boolean shorthand keys when `useBooleans` is enabled).\n */\ntype GetDimensionsMap = <T extends Record<string, any>>({\n themes,\n useBooleans,\n}: {\n themes: T\n useBooleans?: boolean\n}) => { keysMap: Record<string, any>; keywords: Record<string, any> }\n\nexport const getDimensionsMap: GetDimensionsMap = ({ themes, useBooleans }) => {\n const result = {\n keysMap: {} as Record<string, any>,\n keywords: {} as Record<string, any>,\n }\n\n if (isEmpty(themes)) return result\n\n return Object.entries(themes).reduce((accumulator, [key, value]) => {\n const { keysMap, keywords } = accumulator\n keywords[key] = true\n\n Object.entries(value).forEach(([itemKey, itemValue]) => {\n if (!isValidKey(itemValue)) return\n\n if (useBooleans) {\n keywords[itemKey] = true\n }\n\n set(keysMap, [key, itemKey], true)\n })\n\n return accumulator\n }, result)\n}\n\n// --------------------------------------------------------\n// simple object getters\n// --------------------------------------------------------\n/** Returns the keys of an object with proper typing. */\ntype GetKeys = <T extends Record<string, unknown>>(obj: T) => Array<keyof T>\nexport const getKeys: GetKeys = (obj) => Object.keys(obj)\n\ntype GetValues = <T extends Record<string, unknown>, K extends keyof T>(obj: T) => T[K][]\nexport const getValues = (<T extends Record<string, unknown>>(obj: T) =>\n Object.values(obj)) as GetValues\n\n// --------------------------------------------------------\n// get dimensions values array\n// --------------------------------------------------------\n/** Extracts the prop name from each dimension value, unwrapping multi-key config objects. */\ntype ValueType<T> = T extends string ? T : T[][0]\ntype GetDimensionsValues = <T extends Dimensions, K extends keyof T>(obj: T) => ValueType<T[K]>[]\n\nexport const getDimensionsValues = (<T extends Dimensions>(obj: T) =>\n getValues(obj).map((item: DimensionValue) => {\n if (typeof item === 'object') {\n return item.propName as string\n }\n\n return item\n })) as GetDimensionsValues\n\n// --------------------------------------------------------\n// get multiple dimensions map\n// --------------------------------------------------------\n/** Builds a lookup of dimension prop names that accept multiple simultaneous values. */\ntype GetMultipleDimensions = <T extends Dimensions>(obj: T) => MultiKeys<T>\n\nexport const getMultipleDimensions: GetMultipleDimensions = (obj) =>\n getValues(obj).reduce(\n (accumulator, value: DimensionValue) => {\n if (typeof value === 'object') {\n if (value.multi === true) accumulator[value.propName] = true\n }\n\n return accumulator\n },\n {} as Record<string, true>,\n )\n\n// --------------------------------------------------------\n// get transform dimensions map\n// --------------------------------------------------------\n/** Builds a lookup of dimension prop names that are transform dimensions (evaluated last with function values). */\ntype TransformKeys = Partial<Record<string, true>>\ntype GetTransformDimensions = <T extends Dimensions>(obj: T) => TransformKeys\n\nexport const getTransformDimensions: GetTransformDimensions = (obj) =>\n getValues(obj).reduce(\n (accumulator, value: DimensionValue) => {\n if (typeof value === 'object') {\n if (value.transform === true) accumulator[value.propName] = true\n }\n\n return accumulator\n },\n {} as Record<string, true>,\n )\n","import { isEmpty } from '@pyreon/ui-core'\nimport { STATIC_KEYS } from '../constants'\n\n// --------------------------------------------------------\n// helpers for create statics chaining methods on component\n// --------------------------------------------------------\n/**\n * Attaches chaining static methods (e.g. `.states()`, `.sizes()`, `.theme()`)\n * to a component. Each method calls `cloneAndEnhance` with the corresponding key.\n */\ntype CreateStaticsChainingEnhancers = <O extends Record<string, any>, DK extends string[]>(props: {\n context: Record<string, any>\n dimensionKeys: DK\n func: (defaultOpts: O, opts: any) => void\n options: O\n}) => void\n\nexport const createStaticsChainingEnhancers: CreateStaticsChainingEnhancers = ({\n context,\n dimensionKeys,\n func,\n options,\n}) => {\n const keys = [...dimensionKeys, ...STATIC_KEYS]\n\n keys.forEach((item) => {\n context[item] = (props: any) => func(options, { [item]: props })\n })\n}\n\n// --------------------------------------------------------\n// helpers for create statics on component\n// --------------------------------------------------------\n/** Copies user-defined static properties onto the component's `meta` object. */\ntype CreateStaticsEnhancers = (params: {\n context: Record<string, any>\n options: Record<string, any>\n}) => void\n\nexport const createStaticsEnhancers: CreateStaticsEnhancers = ({ context, options }) => {\n if (!isEmpty(options)) {\n Object.assign(context, options)\n }\n}\n","import { config } from '@pyreon/ui-core'\nimport type { StylesCbArray } from '../types/styles'\n\n// --------------------------------------------------------\n// Calculate styles\n// --------------------------------------------------------\n/**\n * Evaluates an array of style callback functions with the configured\n * `css` tagged-template helper, producing the final CSS interpolations\n * to be passed into the styled-component template literal.\n */\ntype CalculateStyles = (styles: StylesCbArray | undefined) => ReturnType<StylesCbArray[number]>[]\n\nexport const calculateStyles: CalculateStyles = (styles) => {\n if (!styles) return []\n\n return styles.map((item) => item(config.css as Parameters<typeof item>[0]))\n}\n","// --------------------------------------------------------\n// Remove Nullable values\n// --------------------------------------------------------\n/** Filters out entries with `null`, `undefined`, or `false` values from an object. */\ntype RemoveNullableValues = (obj: Record<string, any>) => Record<string, any>\nexport const removeNullableValues: RemoveNullableValues = (obj) =>\n Object.entries(obj)\n .filter(([, v]) => v != null && v !== false)\n .reduce<Record<string, any>>((acc, [k, v]) => {\n acc[k] = v\n return acc\n }, {})\n","import { sheet } from '@pyreon/styler'\nimport { config, isEmpty, merge, resolveCssVariables } from '@pyreon/ui-core'\nimport type { ThemeModeCallback } from '../types/theme'\nimport { removeNullableValues } from './collection'\nimport { isMultiKey } from './dimensions'\n\n// --------------------------------------------------------\n// Theme Mode Callback\n// --------------------------------------------------------\nconst MODE_CALLBACK_BRAND = Symbol.for('pyreon.themeModeCallback')\n\n/** Creates a mode-switching function that returns the light or dark value based on the active mode. */\nexport const themeModeCallback: ThemeModeCallback = (light, dark) => {\n const fn = (mode: string) => {\n if (!mode || mode === 'light') return light\n return dark\n }\n ;(fn as unknown as Record<string, unknown>).__brand = MODE_CALLBACK_BRAND\n return fn\n}\n\n// --------------------------------------------------------\n// Theme Mode Callback Check\n// --------------------------------------------------------\n/** Detects whether a value is a `themeModeCallback` function via Symbol brand. */\ntype IsModeCallback = (value: unknown) => boolean\nconst isModeCallback: IsModeCallback = (value: unknown) =>\n typeof value === 'function' &&\n (value as unknown as Record<string, unknown>).__brand === MODE_CALLBACK_BRAND\n\n// --------------------------------------------------------\n// CSS-variables mode — var-pair factory\n// --------------------------------------------------------\n// FNV-1a (32-bit, base36) over the pair — STABLE var names for the same\n// (light, dark) values across SSR and client, so hydration sees identical\n// CSS, and across call sites, so identical pairs dedupe to one variable.\nconst fnv1a = (s: string): string => {\n let h = 0x811c9dc5\n for (let i = 0; i < s.length; i++) {\n h ^= s.charCodeAt(i)\n h = Math.imul(h, 0x01000193) >>> 0\n }\n return h.toString(36)\n}\n\n/**\n * The `mode(light, dark)` factory used when `init({ cssVariables: true })`\n * is on. Instead of a branded callback resolved per mode at theme-resolution\n * time, it allocates ONE hashed custom property carrying both values\n * (`:root`/light + `[data-theme=\"dark\"]` rules, injected idempotently) and\n * returns the `var(--px-m-<hash>)` reference. Component themes become\n * mode-FREE — the dark/light flip happens in the CSS cascade via the mode\n * attribute, never in JS.\n *\n * Returns a STRING where the classic factory returns a branded function —\n * `getThemeByMode` passes strings through untouched, so the resolved theme\n * needs no mode walk at all. Typed via the same `ThemeModeCallback` surface\n * so `.theme()` callbacks are agnostic to which factory they received.\n */\nconst varThemeModeCallback = ((light: unknown, dark: unknown) => {\n const { prefix, attribute } = resolveCssVariables()\n if (process.env.NODE_ENV !== 'production') {\n if (typeof light === 'number' || typeof dark === 'number') {\n // oxlint-disable-next-line no-console\n console.warn(\n '[Pyreon] mode(light, dark) under cssVariables received a NUMBER. The pair is emitted ' +\n 'verbatim into CSS, so unit conversion cannot apply — pass unit-complete values ' +\n \"(mode('8px', '12px') / mode('0.5rem', '0.75rem')) or unitless-valid ones (line-height).\",\n )\n }\n }\n const l = String(light)\n const d = String(dark)\n const varName = `--${prefix}-m-${fnv1a(`${l}\\u0000${d}`)}`\n modePairRegistry.set(varName, { light: l, dark: d })\n sheet.injectRules(\n [\n `:root, [${attribute}=\"light\"] { ${varName}: ${l}; }`,\n `[${attribute}=\"dark\"] { ${varName}: ${d}; }`,\n ],\n varName,\n )\n return `var(${varName})`\n}) as unknown as ThemeModeCallback\n\n// --------------------------------------------------------\n// CSS-variables mode — mode-pair registry (for non-CSS consumers)\n// --------------------------------------------------------\n// `varName -> { light, dark }` for every `mode(a, b)` pair the var factory\n// allocates. Consumers that cannot evaluate CSS custom properties (PDF /\n// DOCX / email export via `@pyreon/connector-document`) resolve a\n// `var(--<prefix>-m-<hash>)` reference to its raw value for a given mode.\nconst modePairRegistry = new Map<string, { light: string; dark: string }>()\n\nconst VAR_REF_RE = /var\\((--[a-zA-Z0-9-]+)\\)/g\n\n/**\n * Resolve any `var(--<prefix>-m-<hash>)` mode-pair references in a value to\n * their raw light/dark value, for non-CSS render targets. Unknown var names\n * (theme-leaf vars — those live in `themeToCssVars`'s registry — or anything\n * not allocated by the mode factory) are left untouched; pair this with\n * `resolveCssVarReferences` from `@pyreon/unistyle` to resolve those too.\n * Non-strings and strings without a var ref pass through unchanged.\n *\n * @example\n * // after `<X color={mode('#000', '#fff')} />` under cssVariables:\n * resolveModeVar('var(--px-m-abc123)', 'dark') // '#fff'\n */\nexport function resolveModeVar(value: unknown, mode: 'light' | 'dark' = 'light'): unknown {\n if (typeof value !== 'string' || value.indexOf('var(') === -1) return value\n return value.replace(VAR_REF_RE, (whole: string, name: string) => {\n const pair = modePairRegistry.get(name)\n return pair ? pair[mode] : whole\n })\n}\n\n/** Test-only: clear the mode-pair registry for cross-test isolation. */\nexport function __resetModePairRegistryForTesting(): void {\n modePairRegistry.clear()\n}\n\n// --------------------------------------------------------\n// Get Theme From Chain\n// --------------------------------------------------------\n/** Reduces an array of chained `.theme()` callbacks into a single merged theme object. */\ntype OptionFunc = (...arg: any) => Record<string, unknown>\ntype GetThemeFromChain = (\n options: OptionFunc[] | undefined | null,\n theme: Record<string, any>,\n) => ReturnType<OptionFunc>\n\nexport const getThemeFromChain: GetThemeFromChain = (options, theme) => {\n const result = {}\n if (!options || isEmpty(options)) return result\n\n // One factory pick covers every consumer (base themes AND dimension\n // themes route through here): classic branded callbacks, or — under\n // cssVariables — the var-pair factory that makes resolved themes mode-free.\n const modeFactory = resolveCssVariables().enabled ? varThemeModeCallback : themeModeCallback\n\n return options.reduce(\n (acc, item) => merge(acc, item(theme, modeFactory, config.css)),\n result,\n )\n}\n\n// --------------------------------------------------------\n// calculate dimension themes\n// --------------------------------------------------------\n/**\n * Computes the theme object for each dimension by evaluating its\n * chained callbacks against the global theme, then strips nullable values.\n */\ntype GetDimensionThemes = (\n theme: Record<string, any>,\n options: Record<string, any>,\n) => Record<string, any>\n\nexport const getDimensionThemes: GetDimensionThemes = (theme, options) => {\n const dims = options.dimensions\n if (isEmpty(dims)) return {}\n\n const result: Record<string, any> = {}\n\n for (const key in dims) {\n const [, dimension] = isMultiKey(dims[key] as string | Record<string, unknown>)\n const helper = options[key]\n\n if (Array.isArray(helper) && helper.length > 0) {\n result[dimension] = removeNullableValues(getThemeFromChain(helper, theme))\n }\n }\n\n return result\n}\n\n// --------------------------------------------------------\n// combine values\n// --------------------------------------------------------\n/** Reduces an array of option callbacks by calling each with the given args and deep-merging results. */\ntype CalculateChainOptions = (\n options: OptionFunc[] | undefined | null,\n args: any[],\n) => Record<string, any>\n\nexport const calculateChainOptions: CalculateChainOptions = (options, args) => {\n const result = {}\n if (!options || isEmpty(options)) return result\n\n return options.reduce((acc, item) => merge(acc, item(...args)), result)\n}\n\n// --------------------------------------------------------\n// generate theme\n// --------------------------------------------------------\n/**\n * Generates the final theme object by starting with the base theme\n * and merging in dimension-specific theme slices based on the current\n * rocketstate (active dimension values). Supports multi-key dimensions.\n *\n * Transform dimensions (marked with `transform: true`) are evaluated last.\n * Their values are functions that receive the fully accumulated theme and\n * return overrides — enabling derived styles like \"outlined\" or \"inversed\".\n */\nexport type GetTheme = (params: {\n rocketstate: Record<string, string | string[]>\n themes: Record<string, Record<string, any>>\n baseTheme: Record<string, any>\n transformKeys?: Partial<Record<string, true>>\n /** App theme from context — passed to transform dimension callbacks. */\n appTheme?: Record<string, any>\n}) => Record<string, unknown>\n\n// Shared empty object for pseudo-state defaults — allocated once, reused by\n// every getTheme call. Frozen to prevent accidental mutation.\nconst EMPTY_PSEUDO: Record<string, never> = Object.freeze({}) as Record<string, never>\n\nexport const getTheme: GetTheme = ({ rocketstate, themes, baseTheme, transformKeys, appTheme }) => {\n // Spread baseTheme into result — this is unavoidable (we must not mutate\n // the cached baseTheme). But we merge dimension slices in-place onto\n // finalTheme instead of creating a new {} target each merge() call.\n const finalTheme: Record<string, any> = { ...baseTheme }\n type TransformFn = (\n currentTheme: Record<string, any>,\n currentAppTheme: Record<string, any>,\n mode: typeof themeModeCallback,\n cssFn: typeof config.css,\n ) => Record<string, any>\n const deferredTransforms: TransformFn[] = []\n\n for (const key in rocketstate) {\n const value = rocketstate[key]\n if (value == null) continue\n const keyTheme: Record<string, any> = themes[key] ?? {}\n const isTransform = transformKeys?.[key]\n\n const mergeValue = (item: string) => {\n const val = keyTheme[item]\n if (val == null) return\n if (isTransform && typeof val === 'function') {\n deferredTransforms.push(val as TransformFn)\n } else {\n // Merge in-place onto finalTheme — avoids allocating a fresh {}\n // as merge target on every dimension slice.\n merge(finalTheme, val)\n }\n }\n\n if (Array.isArray(value)) {\n for (let i = 0; i < value.length; i++) mergeValue(value[i] as string)\n } else {\n mergeValue(value as string)\n }\n }\n\n // Apply transform dimension values last with the fully accumulated theme\n for (let i = 0; i < deferredTransforms.length; i++) {\n merge(finalTheme, deferredTransforms[i]!(finalTheme, appTheme ?? {}, themeModeCallback, config.css))\n }\n\n // Ensure pseudo-state keys always exist as objects so .styles() can\n // destructure without defaults: const { hover, focus, ... } = $rocketstyle\n // Uses a frozen shared empty object instead of allocating 6 new {} per call.\n finalTheme.hover ??= EMPTY_PSEUDO\n finalTheme.focus ??= EMPTY_PSEUDO\n finalTheme.active ??= EMPTY_PSEUDO\n finalTheme.disabled ??= EMPTY_PSEUDO\n finalTheme.pressed ??= EMPTY_PSEUDO\n finalTheme.readOnly ??= EMPTY_PSEUDO\n\n return finalTheme\n}\n\n// --------------------------------------------------------\n// resolve theme by mode\n// --------------------------------------------------------\n/**\n * Recursively traverses a theme object and resolves any `themeModeCallback`\n * functions to their concrete light or dark values for the given mode.\n */\nexport type GetThemeByMode = (\n object: Record<string, any>,\n mode: 'light' | 'dark',\n) => Partial<{\n baseTheme: Record<string, unknown>\n themes: Record<string, unknown>\n}>\n\nexport const getThemeByMode: GetThemeByMode = (object, mode) => {\n // Recursive theme walker — `for...in` avoids the per-node\n // `Object.keys` array allocation that the prior reduce paid. Called\n // from inside cached `LocalThemeManager` WeakMap tiers (one per\n // theme/mode transition), so the win is smaller than per-render\n // helpers but the pattern is consistent. Ported from vitus-labs\n // `00fdadc2`.\n const acc: Record<string, any> = {}\n for (const key in object) {\n const value = object[key]\n if (typeof value === 'object' && value !== null) {\n acc[key] = getThemeByMode(value, mode)\n } else if (isModeCallback(value)) {\n acc[key] = value(mode)\n } else {\n acc[key] = value\n }\n }\n return acc\n}\n","import { mergeProps } from '@pyreon/core'\nimport { SizedMap } from '@pyreon/sized-map'\nimport { compose, config, hoistNonReactStatics, omit, pick, render, resolveCssVariables } from '@pyreon/ui-core'\nimport { LocalThemeManager } from './cache'\nimport { CONFIG_KEYS, PSEUDO_AND_META_KEYS, PSEUDO_KEYS, STYLING_KEYS } from './constants'\nimport createLocalProvider from './context/createLocalProvider'\nimport { useLocalContext } from './context/localContext'\nimport { rocketstyleAttrsHoc } from './hoc'\nimport { useTheme } from './hooks'\nimport type { Configuration, ExtendedConfiguration } from './types/configuration'\nimport type { RocketComponent } from './types/rocketComponent'\nimport type { InnerComponentProps, RocketStyleComponent } from './types/rocketstyle'\nimport type { ComponentFn } from './types/utils'\nimport {\n calculateChainOptions,\n calculateStylingAttrs,\n pickStyledAttrs,\n} from './utils/attrs'\nimport { chainOptions, chainOrOptions, chainReservedKeyOptions } from './utils/chaining'\nimport { calculateHocsFuncs } from './utils/compose'\nimport { getDimensionsMap } from './utils/dimensions'\nimport { createStaticsChainingEnhancers, createStaticsEnhancers } from './utils/statics'\nimport { calculateStyles } from './utils/styles'\nimport { getDimensionThemes, getTheme, getThemeByMode, getThemeFromChain } from './utils/theme'\n\n// Dev-time counter sink — see packages/internals/perf-harness for contract.\nconst _countSink = globalThis as { __pyreon_count__?: (name: string, n?: number) => void }\n\n/**\n * Core rocketstyle component factory. Creates a fully-featured Pyreon component\n * that integrates theme management (with light/dark mode support), multi-tier\n * WeakMap caching, dimension-based styling props, pseudo-state detection, and\n * chainable static methods (`.attrs()`, `.theme()`, `.styles()`, `.config()`, etc.).\n *\n * In Pyreon, components are plain functions that run once per mount.\n * No forwardRef, useMemo, useState — ref flows as a normal prop.\n */\n\n// --------------------------------------------------------\n// cloneAndEnhance\n// --------------------------------------------------------\ntype CloneAndEnhance = (\n defaultOpts: Configuration,\n opts: Partial<ExtendedConfiguration>,\n) => ReturnType<typeof rocketComponent>\n\n/**\n * Clones the current configuration and merges new options, returning a fresh\n * rocketComponent.\n *\n * Component-swap reset: when `opts.component` is set AND differs from the\n * current `defaultOpts.component`, the prior `attrs`, `priorityAttrs`,\n * `filterAttrs`, and `compose` chains are dropped — they were tailored to the\n * previous component's prop shape, and applying them to a different component\n * silently leaks invalid props through to the DOM (e.g. `disabled` on an\n * `<a>`). Callers who want to preserve them must re-chain explicitly:\n *\n * const NewBtn = Button.config({ component: 'a' }).attrs(sharedAttrs)\n */\nconst cloneAndEnhance: CloneAndEnhance = (defaultOpts, opts) => {\n const componentChanged =\n opts.component != null && opts.component !== defaultOpts.component\n\n return rocketComponent({\n ...defaultOpts,\n attrs: componentChanged\n ? chainOptions(opts.attrs, [])\n : chainOptions(opts.attrs, defaultOpts.attrs),\n filterAttrs: componentChanged\n ? [...(opts.filterAttrs ?? [])]\n : [...(defaultOpts.filterAttrs ?? []), ...(opts.filterAttrs ?? [])],\n priorityAttrs: componentChanged\n ? chainOptions(opts.priorityAttrs, [])\n : chainOptions(opts.priorityAttrs, defaultOpts.priorityAttrs),\n statics: { ...defaultOpts.statics, ...opts.statics },\n compose: componentChanged\n ? { ...opts.compose }\n : { ...defaultOpts.compose, ...opts.compose },\n ...chainOrOptions(CONFIG_KEYS, opts, defaultOpts),\n ...chainReservedKeyOptions([...defaultOpts.dimensionKeys, ...STYLING_KEYS], opts, defaultOpts),\n } as Parameters<typeof rocketComponent>[0])\n}\n\n// --------------------------------------------------------\n// rocketComponent\n// --------------------------------------------------------\n// @ts-expect-error\nconst rocketComponent: RocketComponent = (options) => {\n const { component, styles } = options\n const { styled } = config\n\n const _calculateStylingAttrs = calculateStylingAttrs({\n multiKeys: options.multiKeys,\n useBooleans: options.useBooleans,\n })\n\n const componentName = options.name ?? options.component.displayName ?? options.component.name\n\n // Create styled component with all options.styles if available.\n // Rocketstyle CSS lives in `@layer rocketstyle`, which is declared\n // AFTER `@layer elements` in the cascade ordering (see sheet.ts).\n // This ensures rocketstyle theme styles always override element base\n // styles regardless of source order.\n const STYLED_COMPONENT =\n (component.IS_ROCKETSTYLE ?? options.styled !== true)\n ? component\n : styled(component, { layer: 'rocketstyle' })`\n ${calculateStyles(styles)};\n `\n\n // --------------------------------------------------------\n // COMPONENT - Final component to be rendered\n // --------------------------------------------------------\n const RenderComponent: ComponentFn<any> = options.provider\n ? createLocalProvider(STYLED_COMPONENT)\n : STYLED_COMPONENT\n\n // --------------------------------------------------------\n // THEME - Cached & Calculated theme(s)\n // --------------------------------------------------------\n const ThemeManager = new LocalThemeManager()\n\n // ── Per-definition caches (shared across all instances) ──────────────\n // getDimensionsMap + Object.keys(reservedPropNames) are theme-independent\n // (dimension structure comes from .sizes()/.states()/.variants() chain,\n // not from runtime theme values). Cache them so 50 instances of the same\n // component definition skip the rebuild entirely.\n const _dimensionsCache = new WeakMap<\n object,\n { keysMap: Record<string, unknown>; keywords: Record<string, true | undefined> }\n >()\n const _reservedKeysCache = new WeakMap<object, string[]>()\n\n // Reuse the module-scope pre-merged constant. Cast away `readonly` for\n // the downstream consumers that take a plain `string[]`. Saves the\n // 6-element array allocation that fired once per `rocketstyle()`\n // definition. Ported from vitus-labs `00fdadc2`.\n const ALL_PSEUDO_KEYS = PSEUDO_AND_META_KEYS as unknown as string[]\n // Static portion of omit keys — PSEUDO_KEYS + filterAttrs + 'pseudo' are definition-scoped.\n // RESERVED_STYLING_PROPS_KEYS is dimension-dependent but also cached per definition.\n // 'pseudo' is included here so we can skip the destructuring spread of mergedProps.\n const STATIC_OMIT_KEYS = ['pseudo', ...PSEUDO_KEYS, ...(options.filterAttrs ?? [])]\n // Pre-built Set for omit() — avoids per-call Set allocation. Built once the\n // dimension-dependent reserved keys are known (first mount), then reused.\n const _omitSetCache = new WeakMap<string[], Set<string>>()\n\n // ── Dimension-prop memo (per-definition) ─────────────────────────────\n // Keyed on theme identity → Map<keyString, { rocketstyle, rocketstate }>.\n // The accessors below build a key from (mode, dimension prop tuple,\n // pseudo state tuple) and look up here. On hit they return the SAME\n // object identities for both `$rocketstyle` and `$rocketstate`, which\n // lets the styler's existing `classCache` (keyed on those identities)\n // skip the entire CSS resolve pipeline. On miss they compute fresh\n // and store the result.\n //\n // Why this matters: pre-memo, every Button mount fired 22\n // styler.resolve calls even when the styler-sheet cache hit\n // — the cache catches at the LAST step (insert dedup), but the resolve\n // pipeline still runs to compute the hash. Stable accessor identities\n // mean the styler's classCache hits earlier and the resolves don't run.\n //\n // LRU bound prevents unbounded growth from prop-tuple churn (e.g. a\n // table where every cell has a unique state). 128 entries per theme\n // covers the E2 perf-dashboard reference workload AND high-cardinality\n // surfaces (data tables, design systems with many tokens crossed with\n // size/variant axes, dashboards rendering many small interactive\n // components). The previous cap of 32 was sized for the reference\n // workload only and thrashed at higher cardinalities — measured 45%\n // cache-miss rate (888/2000 lookups) on a 60-unique-tuple Button\n // mount loop, 46% wall-clock regression vs the cap-fits-workload\n // case. Raising the cap 32 → 128 zeroes the cold-resolves counter\n // for that 60-tuple workload at zero implementation cost (the\n // rs-precompute spike's bisect on `spike/rocketstyle-precompute`).\n // Memory: ~12KB per definition\n // per theme at 128 entries × ~100 bytes per entry — negligible vs\n // the 46% runtime win.\n type RsMemoEntry = { readonly rocketstyle: object; readonly rocketstate: object }\n const _rsMemo = new WeakMap<object, SizedMap<string, RsMemoEntry>>()\n const RS_MEMO_CAP = 128\n\n // --------------------------------------------------------\n // COMPOSE - high-order components\n // --------------------------------------------------------\n const hocsFuncs = [rocketstyleAttrsHoc(options), ...calculateHocsFuncs(options.compose)]\n\n // --------------------------------------------------------\n // ENHANCED COMPONENT\n // --------------------------------------------------------\n // In Pyreon, components are plain functions — no forwardRef needed.\n // Ref flows as a normal prop through the chain.\n const EnhancedComponent: ComponentFn<InnerComponentProps> = (props) => {\n // --------------------------------------------------\n // hover - focus - pressed state passed via context from parent component\n // --------------------------------------------------\n const localCtx = useLocalContext(options.consumer)\n\n // --------------------------------------------------\n // general theme and theme mode dark / light passed in context\n // --------------------------------------------------\n // IMPORTANT: Do NOT destructure — useTheme returns getter properties.\n // Destructuring calls getters once and captures static values.\n // Keep the object reference so mode/isDark/isLight re-evaluate lazily.\n const themeAttrs = useTheme(options)\n\n // --------------------------------------------------\n // Dimension KEY structure is theme-independent — dimension names (e.g.\n // `level3`, `primary`) come from the .sizes()/.states()/.variants()\n // callback structure at component-definition time, not from theme values.\n // Compute reservedPropNames + dimensions once using the initial theme;\n // they remain stable across theme swaps.\n //\n // Dimension VALUES (used in $rocketstyleAccessor) DO depend on theme and\n // are resolved inside the accessor on each tracked invocation — allowing\n // whole-theme swaps (user preference themes) to re-resolve CSS without\n // remounting. WeakMap caches in ThemeManager keep the common static-theme\n // case O(1).\n // --------------------------------------------------\n const initialTheme = themeAttrs.theme\n const initialBaseTheme = (() => {\n const helper = ThemeManager.baseTheme\n if (!helper.has(initialTheme)) {\n helper.set(initialTheme, getThemeFromChain(options.theme, initialTheme))\n }\n return helper.get(initialTheme)\n })()\n const initialDimensionThemes = (() => {\n const helper = ThemeManager.dimensionsThemes\n if (!helper.has(initialTheme)) {\n helper.set(initialTheme, getDimensionThemes(initialTheme, options))\n }\n return helper.get(initialTheme)\n })()\n\n // Cache getDimensionsMap per dimension-themes identity — all instances\n // of the same component definition share the same dimension structure.\n let dimResult = _dimensionsCache.get(initialDimensionThemes as object)\n if (dimResult) {\n if (process.env.NODE_ENV !== 'production')\n _countSink.__pyreon_count__?.('rocketstyle.dimensionsMap.hit')\n } else {\n dimResult = getDimensionsMap({\n themes: initialDimensionThemes,\n useBooleans: options.useBooleans,\n })\n _dimensionsCache.set(initialDimensionThemes as object, dimResult)\n }\n const { keysMap: dimensions, keywords: reservedPropNames } = dimResult\n\n // Cache Object.keys() result — same dimension structure = same keys\n let RESERVED_STYLING_PROPS_KEYS = _reservedKeysCache.get(reservedPropNames as object)\n if (!RESERVED_STYLING_PROPS_KEYS) {\n RESERVED_STYLING_PROPS_KEYS = Object.keys(reservedPropNames)\n _reservedKeysCache.set(reservedPropNames as object, RESERVED_STYLING_PROPS_KEYS)\n }\n\n // Silence \"unused\" warnings for initialBaseTheme / initialDimensionThemes —\n // they're eagerly populated into ThemeManager caches so the first accessor\n // call hits cache, but not referenced directly.\n void initialBaseTheme\n void initialDimensionThemes\n\n // Capture pseudo from localCtx once at setup — pseudo properties are\n // getters (from createLocalProvider) that read signals lazily.\n // Passing them through preserves reactivity without subscribing here.\n const localPseudo = localCtx?.pseudo\n\n // --------------------------------------------------\n // Shared accessor resolver.\n //\n // Both `$rocketstyleAccessor` and `$rocketstateAccessor` derive from the\n // same input set (theme, mode, dimension props, pseudo state). Folding\n // them into one resolver lets the dimension-prop memo return the SAME\n // object identities for both — which is what the styler's `classCache`\n // (keyed on `(rocketstyle, rocketstate)` identity) needs to skip the\n // resolve pipeline on cache hit.\n //\n // Reactive contract: this runs inside the styler's `computed()` (one per\n // mounted instance). All signal reads — theme, mode, dimension props,\n // pseudo getters from localCtx — are TRACKED, so any change re-runs the\n // computed which re-resolves the entry. Same key → cached entry; new key\n // → fresh computation, stored under LRU cap.\n // --------------------------------------------------\n const _resolveRsEntry = (): RsMemoEntry => {\n // Read reactive inputs (tracks theme + mode signals).\n //\n // Under cssVariables, resolution is mode-FREE — themes carry var()\n // references and the dark/light flip happens in the CSS cascade via\n // the mode attribute. Don't even READ the mode signal: reading would\n // subscribe the surrounding computed and re-run every component's\n // resolver on each flip for nothing. The constant also collapses the\n // memo key's mode segment, so both modes share one cache entry (and\n // one identity — letting styler's identity-keyed classCache skip the\n // resolve pipeline on a flip entirely).\n const cssVarsOn = resolveCssVariables().enabled\n const theme = themeAttrs.theme\n const mode = cssVarsOn ? 'light' : themeAttrs.mode\n const propsRec = props as Record<string, unknown>\n\n // Resolve active dimensions FIRST so the cache key uses the RESOLVED\n // dimension values, not the raw prop names. Under `useBooleans: true`\n // the user writes `<X primary />` / `<X secondary />` — both map to\n // `state=\"primary\"` / `state=\"secondary\"` after _calculateStylingAttrs\n // resolves the boolean shorthand. Keying off `propsRec[dimName]` would\n // read `undefined` for both (the dimension prop itself was never set)\n // and collide every variant onto the first cached entry. Reading\n // `rocketstateRaw[dimName]` gives the resolved string and partitions\n // them correctly.\n // Resolved from props (not localCtx which has pseudo getters).\n const rocketstateRaw = _calculateStylingAttrs({\n props: pickStyledAttrs(propsRec, reservedPropNames),\n dimensions,\n })\n\n // Build key: mode | dimensionValues | pseudoState. Reading dimension\n // props + pseudo signals here tracks them in the surrounding computed\n // so any change re-runs us with a different key.\n let key = mode as string\n for (const dimName in dimensions) {\n const v = rocketstateRaw[dimName]\n // Multi-key dimensions (e.g. variant={['primary', 'rounded']}) are\n // arrays. Sort + join so equivalent sets hash identically; without\n // this both `['a','b']` and `['b','a']` would produce different keys.\n if (Array.isArray(v)) {\n key +=\n '|' + (v.length === 0 ? '' : (v as unknown[]).slice().sort().join(','))\n } else {\n // String/number/boolean serialize directly. Anything else (including\n // undefined / objects) gets a typeof tag so we don't collide.\n key +=\n '|' +\n (typeof v === 'string' || typeof v === 'number' || typeof v === 'boolean'\n ? String(v)\n : v === undefined\n ? ''\n : '~' + typeof v)\n }\n }\n for (const k of ALL_PSEUDO_KEYS) {\n const propV = propsRec[k]\n const localV = localPseudo?.[k as keyof typeof localPseudo]\n const v = propV !== undefined ? propV : localV\n key += '|' + (v === undefined ? '' : v ? '1' : '0')\n }\n\n // Cache lookup. SizedMap with lru:true does the touch-on-read\n // internally, so the get() hit path no longer needs the explicit\n // delete + re-set.\n let themeMemo = _rsMemo.get(theme as object)\n if (!themeMemo) {\n themeMemo = new SizedMap({ maxEntries: RS_MEMO_CAP, lru: true })\n _rsMemo.set(theme as object, themeMemo)\n }\n\n const cached = themeMemo.get(key)\n if (cached) {\n if (process.env.NODE_ENV !== 'production')\n _countSink.__pyreon_count__?.('rocketstyle.dimensionMemo.hit')\n return cached\n }\n\n // Miss: compute fresh. Counter measures actual theme resolutions\n // (not accessor invocations) — see COUNTERS.md.\n if (process.env.NODE_ENV !== 'production')\n _countSink.__pyreon_count__?.('rocketstyle.getTheme')\n\n // Resolve base + dimension themes for the CURRENT theme. WeakMap\n // keyed on theme identity — stable-theme renders hit cache in O(1),\n // theme swaps fall through to recompute (once per new theme).\n const baseThemeHelper = ThemeManager.baseTheme\n if (baseThemeHelper.has(theme)) {\n if (process.env.NODE_ENV !== 'production')\n _countSink.__pyreon_count__?.('rocketstyle.localThemeManager.hit')\n } else {\n baseThemeHelper.set(theme, getThemeFromChain(options.theme, theme))\n }\n const baseTheme = baseThemeHelper.get(theme)\n\n const dimHelper = ThemeManager.dimensionsThemes\n if (dimHelper.has(theme)) {\n if (process.env.NODE_ENV !== 'production')\n _countSink.__pyreon_count__?.('rocketstyle.localThemeManager.hit')\n } else {\n dimHelper.set(theme, getDimensionThemes(theme, options))\n }\n const themes = dimHelper.get(theme)\n\n // Resolve mode-specific theme. Under cssVariables the chains contain\n // NO branded mode callbacks (the var-pair factory already returned\n // plain `var()` strings), so the per-mode walk would be a pure deep\n // copy — skip it and use the resolved themes directly.\n let currentModeBaseTheme: ReturnType<typeof getThemeByMode>\n let currentModeThemes: ReturnType<typeof getThemeByMode>\n if (cssVarsOn) {\n currentModeBaseTheme = baseTheme\n currentModeThemes = themes\n } else {\n const modeBaseHelper = ThemeManager.modeBaseTheme[mode]\n if (modeBaseHelper.has(baseTheme)) {\n if (process.env.NODE_ENV !== 'production')\n _countSink.__pyreon_count__?.('rocketstyle.localThemeManager.hit')\n } else {\n modeBaseHelper.set(baseTheme, getThemeByMode(baseTheme, mode))\n }\n currentModeBaseTheme = modeBaseHelper.get(baseTheme)\n\n const modeDimHelper = ThemeManager.modeDimensionTheme[mode]\n if (modeDimHelper.has(themes)) {\n if (process.env.NODE_ENV !== 'production')\n _countSink.__pyreon_count__?.('rocketstyle.localThemeManager.hit')\n } else {\n modeDimHelper.set(themes, getThemeByMode(themes, mode))\n }\n currentModeThemes = modeDimHelper.get(themes)\n }\n\n const rocketstyle = getTheme({\n rocketstate: rocketstateRaw,\n themes: currentModeThemes,\n baseTheme: currentModeBaseTheme,\n transformKeys: options.transformKeys,\n appTheme: theme,\n })\n\n // $rocketstate carries dimension state + pseudo flags so the styler\n // emits matching pseudo selectors (`:hover`, `:focus`, etc.).\n const propPseudo = pick(propsRec, ALL_PSEUDO_KEYS)\n const rocketstate = {\n ...rocketstateRaw,\n pseudo: { ...localPseudo, ...propPseudo },\n }\n\n // SizedMap.set handles cap-enforced LRU eviction internally.\n const entry: RsMemoEntry = { rocketstyle, rocketstate }\n themeMemo.set(key, entry)\n return entry\n }\n\n const $rocketstyleAccessor = () => _resolveRsEntry().rocketstyle\n const $rocketstateAccessor = () => _resolveRsEntry().rocketstate\n\n // --------------------------------------------------\n // final props passed to WrappedComponent\n // --------------------------------------------------\n // Cache a pre-built Set for omit() — avoids building a new Set from\n // the key array on every mount. Same dimension structure = same Set.\n let omitSet = _omitSetCache.get(RESERVED_STYLING_PROPS_KEYS)\n if (omitSet) {\n if (process.env.NODE_ENV !== 'production')\n _countSink.__pyreon_count__?.('rocketstyle.omitSet.hit')\n } else {\n omitSet = new Set([...RESERVED_STYLING_PROPS_KEYS, ...STATIC_OMIT_KEYS])\n _omitSetCache.set(RESERVED_STYLING_PROPS_KEYS, omitSet)\n }\n\n // Merge localCtx + props via canonical `mergeProps` from @pyreon/core\n // so reactive getter props on `props` (compiler-emitted `_rp(() =>\n // signal())` wrappers converted to getters by `makeReactiveProps`)\n // survive the merge. A plain `{ ...localCtx, ...props }` spread would\n // fire every getter and collapse to static values, defeating\n // reactivity for any downstream JSX accessor reading `props.x`.\n const mergedProps = localCtx\n ? mergeProps(localCtx as Record<string, unknown>, props as Record<string, unknown>)\n : props\n\n // omit() preserves descriptors (since ui-core's omit was updated to\n // copy descriptors), so reactive getters carry through to finalProps.\n const finalProps = omit(mergedProps as Record<string, unknown>, omitSet) as Record<string, any>\n\n if (options.passProps) {\n const passed = pick(mergedProps, options.passProps)\n // Copy descriptors so any reactive getters in passProps survive.\n // Plain `finalProps[k] = passed[k]` would fire getters at setup time\n // AND silently fail when finalProps[k] is already a getter-only\n // descriptor (assignment to a getter-only property is a no-op in\n // non-strict mode, throws in strict mode).\n const passedDescriptors = Object.getOwnPropertyDescriptors(passed)\n for (const k of Object.keys(passedDescriptors)) {\n Object.defineProperty(finalProps, k, passedDescriptors[k]!)\n }\n }\n\n // Use defineProperty for these last writes too — if props.ref or\n // an existing finalProps slot happened to carry a getter-only\n // descriptor, plain assignment would silently fail. defineProperty\n // explicitly replaces the descriptor regardless of shape.\n const refDescriptor = Object.getOwnPropertyDescriptor(props, 'ref')\n if (refDescriptor) {\n Object.defineProperty(finalProps, 'ref', refDescriptor)\n }\n // Function accessors — DynamicStyled wraps them in a computed() so\n // mode/dimension changes produce a new CSS class reactively. The\n // computed tracks only these two accessors; the resolve itself runs\n // untracked to prevent exponential cascade from theme deep-reads.\n Object.defineProperty(finalProps, '$rocketstyle', {\n value: $rocketstyleAccessor,\n writable: true,\n enumerable: true,\n configurable: true,\n })\n Object.defineProperty(finalProps, '$rocketstate', {\n value: $rocketstateAccessor,\n writable: true,\n enumerable: true,\n configurable: true,\n })\n\n // development debugging — tree-shaken in production via import.meta.env.DEV\n if (process.env.NODE_ENV !== 'production') {\n // defineProperty rather than `=` to be safe against any preserved\n // descriptor in this slot (defense-in-depth — `data-rocketstyle`\n // is unlikely to be passed as a user prop, but the writes above\n // use defineProperty for the same reason).\n Object.defineProperty(finalProps, 'data-rocketstyle', {\n value: componentName,\n writable: true,\n enumerable: true,\n configurable: true,\n })\n\n if (options.DEBUG) {\n const debugPayload = {\n component: componentName,\n rocketstate: $rocketstateAccessor(),\n rocketstyle: $rocketstyleAccessor(),\n dimensions,\n mode: themeAttrs.mode,\n reservedPropNames: RESERVED_STYLING_PROPS_KEYS,\n filteredAttrs: options.filterAttrs,\n }\n\n // oxlint-disable-next-line no-console\n console.debug(`[rocketstyle] ${componentName} render:`, debugPayload)\n }\n }\n\n // STATIC VNode — created once, never remounted on mode change.\n // The styled component handles reactive class swaps internally.\n return RenderComponent(finalProps)\n }\n\n // ------------------------------------------------------\n // Compose HOC chain and create final component\n // ------------------------------------------------------\n const FinalComponent: RocketStyleComponent = compose(...hocsFuncs)(EnhancedComponent)\n FinalComponent.IS_ROCKETSTYLE = true\n FinalComponent.displayName = componentName\n\n hoistNonReactStatics(FinalComponent as Record<string, unknown>, options.component)\n\n // ------------------------------------------------------\n // enhance for chaining methods\n // ------------------------------------------------------\n createStaticsChainingEnhancers({\n context: FinalComponent,\n dimensionKeys: options.dimensionKeys,\n func: cloneAndEnhance,\n options,\n })\n\n FinalComponent.IS_ROCKETSTYLE = true\n FinalComponent.displayName = componentName\n FinalComponent.meta = {}\n\n // ------------------------------------------------------\n // enhance for statics\n // ------------------------------------------------------\n createStaticsEnhancers({\n context: FinalComponent.meta,\n options: options.statics,\n })\n\n // Also assign statics directly onto the component so they are\n // discoverable via `\"key\" in Component` checks (e.g. _documentType).\n createStaticsEnhancers({\n context: FinalComponent,\n options: options.statics,\n })\n\n // ─── Hoisted attrs chain (T3.1) ──────────────────────────────────────\n //\n // Expose the accumulated `.attrs()` callback chain on the component so\n // external inspectors (notably `extractDocumentTree` from\n // `@pyreon/connector-document`) can compute the post-attrs props\n // without invoking the full component. The previous Path B workaround\n // had to run the entire styled wrapper — JSX tree creation, dimension\n // resolution, the lot — just to read `_documentProps` off the result.\n //\n // Typed surface: `RocketStyleComponent.__rs_attrs` is a `readonly\n // ReadonlyArray<(props) => Record<string, unknown>>`. Empty when\n // no `.attrs()` was ever called. `chain.reduce(Object.assign, {})`\n // produces the post-attrs result for a given props bag.\n //\n // The `readonly` modifier guards external CONSUMERS — internal\n // assignment from the factory itself is the only legitimate write,\n // hence the cast. Do not drop the readonly on the type.\n ;(FinalComponent as unknown as { __rs_attrs: typeof options.attrs }).__rs_attrs =\n options.attrs ?? []\n\n Object.assign(FinalComponent, {\n attrs: (attrs: any, { priority, filter }: any = {}) => {\n const result: Record<string, any> = {}\n\n if (filter) {\n result.filterAttrs = filter\n }\n\n if (priority) {\n result.priorityAttrs = attrs as ExtendedConfiguration['priorityAttrs']\n\n return cloneAndEnhance(options, result)\n }\n\n result.attrs = attrs as ExtendedConfiguration['attrs']\n\n return cloneAndEnhance(options, result)\n },\n\n config: (opts: any = {}) => {\n const result = pick(opts, CONFIG_KEYS) as ExtendedConfiguration\n\n return cloneAndEnhance(options, result)\n },\n\n statics: (opts: any) => cloneAndEnhance(options, { statics: opts }),\n\n getStaticDimensions: (theme: any) => {\n const themes = getDimensionThemes(theme, options)\n\n const { keysMap, keywords } = getDimensionsMap({\n themes,\n useBooleans: options.useBooleans,\n })\n\n return {\n dimensions: keysMap,\n keywords,\n useBooleans: options.useBooleans,\n multiKeys: options.multiKeys,\n }\n },\n\n getDefaultAttrs: (props: any, theme: any, mode: any) =>\n calculateChainOptions(options.attrs)([\n props,\n theme,\n {\n render,\n mode,\n isDark: mode === 'dark',\n isLight: mode === 'light',\n },\n ]),\n })\n\n return FinalComponent\n}\n\nexport default rocketComponent\n","import { isEmpty } from '@pyreon/ui-core'\nimport { ALL_RESERVED_KEYS } from './constants'\nimport defaultDimensions from './constants/defaultDimensions'\nimport rocketComponent from './rocketstyle'\nimport type { DefaultDimensions, Dimensions } from './types/dimensions'\nimport type { RocketComponent } from './types/rocketComponent'\nimport type { ElementType } from './types/utils'\nimport {\n getDimensionsValues,\n getKeys,\n getMultipleDimensions,\n getTransformDimensions,\n} from './utils/dimensions'\n\nexport type Rocketstyle = <\n const D extends Dimensions = DefaultDimensions,\n UB extends boolean = false,\n>({\n dimensions,\n useBooleans,\n}?: {\n dimensions?: D\n useBooleans?: UB\n}) => <C extends ElementType>({\n name,\n component,\n}: {\n name: string\n component: C\n}) => ReturnType<RocketComponent<C, {}, {}, D, UB>>\n\n/**\n * Factory initializer for rocketstyle components. Validates dimension\n * configurations against reserved keys, then delegates to the core\n * `rocketComponent` builder with pre-computed dimension metadata.\n */\ntype InitErrors = Partial<{\n component: string\n name: string\n dimensions: string\n invalidDimensions: string\n}>\n\nconst validateInit = (name: string, component: unknown, dimensions: Dimensions) => {\n const errors: InitErrors = {}\n\n if (!component) {\n errors.component = 'Parameter `component` is missing in params!'\n }\n\n if (!name) {\n errors.name = 'Parameter `name` is missing in params!'\n }\n\n if (isEmpty(dimensions)) {\n errors.dimensions = 'Parameter `dimensions` is missing in params!'\n } else {\n const definedDimensions = getKeys(dimensions)\n const invalidDimension = ALL_RESERVED_KEYS.some((item) =>\n definedDimensions.some((d) => d === item),\n )\n\n if (invalidDimension) {\n errors.invalidDimensions = `Some of your \\`dimensions\\` is invalid and uses reserved static keys which are\n ${defaultDimensions.toString()}`\n }\n }\n\n if (!isEmpty(errors)) {\n throw Error(JSON.stringify(errors))\n }\n}\n\n// The impl-level `component: unknown` and `rocketComponent as unknown as ...`\n// casts bridge the outer `Rocketstyle` generic contract (5 type-parameters,\n// captures `C extends ElementType`) to the internal `rocketComponent`'s\n// `Configuration<C, D>` shape. The outer cast on line 93 (`as unknown as\n// Rocketstyle`) is the authoritative type; the impl just has to be runtime-\n// correct. Previously this used `any` here, which silently exempted these\n// call sites from `noImplicitAny` audits — `unknown` is more honest.\nconst rocketstyle = (({ dimensions = defaultDimensions, useBooleans = false } = {}) =>\n ({ name, component }: { name: string; component: unknown }) => {\n if (process.env.NODE_ENV !== 'production') {\n validateInit(name, component, dimensions)\n }\n\n return (rocketComponent as unknown as (opts: Record<string, unknown>) => unknown)({\n name,\n component,\n useBooleans,\n dimensions,\n dimensionKeys: getKeys(dimensions),\n dimensionValues: getDimensionsValues(dimensions),\n multiKeys: getMultipleDimensions(dimensions),\n transformKeys: getTransformDimensions(dimensions),\n styled: true,\n })\n }) as unknown as Rocketstyle\n\nexport default rocketstyle\n","export type IsRocketComponent = <T>(component: T) => boolean\n\n/** Runtime type guard — checks if a component was created by `rocketstyle()`. */\nconst isRocketComponent: IsRocketComponent = (component) => {\n if (\n component &&\n (typeof component === 'object' || typeof component === 'function') &&\n Object.hasOwn(component as object, 'IS_ROCKETSTYLE')\n ) {\n return true\n }\n\n return false\n}\n\nexport default isRocketComponent\n","import { name as __pkgName, version as __pkgVersion } from '../package.json' with { type: 'json' }\nimport { registerSingleton } from '@pyreon/reactivity'\n\n// Singleton sentinel — fail-loud detection of duplicate @pyreon/rocketstyle\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(__pkgName, __pkgVersion, import.meta.url)\n\nimport type { TProvider } from './context/context'\nimport Provider, { context } from './context/context'\nimport type { Rocketstyle } from './init'\nimport rocketstyle from './init'\nimport type { IsRocketComponent } from './isRocketComponent'\nimport isRocketComponent from './isRocketComponent'\nimport type { AttrsCb, AttrsHelpers } from './types/attrs'\nimport type {\n ConfigAttrs,\n ConsumerCb,\n ConsumerCtxCBValue,\n ConsumerCtxCb,\n RocketComponentType,\n RocketProviderState,\n} from './types/config'\nimport type { DefaultProps } from './types/configuration'\nimport type {\n DimensionCallbackParam,\n DimensionProps,\n Dimensions,\n DimensionValue,\n ExtractDimensionProps,\n ExtractDimensions,\n TDKP,\n} from './types/dimensions'\nimport type { ComposeParam, GenericHoc } from './types/hoc'\nimport type { IRocketStyleComponent, RocketStyleComponent } from './types/rocketstyle'\nimport type { RocketStyleInterpolationProps, StylesCb, StylesDefault } from './types/styles'\nimport type {\n ThemeCb,\n ThemeDefault,\n ThemeMode,\n ThemeModeCallback,\n ThemeModeKeys,\n} from './types/theme'\nimport type { ComponentFn, ElementType, ExtractProps, MergeTypes, TObj } from './types/utils'\n\nexport type {\n AttrsCb,\n AttrsHelpers,\n ComponentFn,\n ComposeParam,\n ConfigAttrs,\n ConsumerCb,\n ConsumerCtxCBValue,\n ConsumerCtxCb,\n DefaultProps,\n DimensionCallbackParam,\n DimensionProps,\n Dimensions,\n DimensionValue,\n ElementType,\n ExtractDimensionProps,\n ExtractDimensions,\n ExtractProps,\n GenericHoc,\n IRocketStyleComponent,\n IsRocketComponent,\n MergeTypes,\n RocketComponentType,\n RocketProviderState,\n RocketStyleComponent,\n RocketStyleInterpolationProps,\n Rocketstyle,\n StylesCb,\n StylesDefault,\n TDKP,\n ThemeCb,\n ThemeDefault,\n ThemeMode,\n ThemeModeCallback,\n ThemeModeKeys,\n TObj,\n TProvider,\n}\n\n/**\n * Resolve a $rocketstyle value — handles both function accessor and plain object.\n * Use in styled() interpolation functions when $rocketstyle may be a reactive accessor.\n *\n * @example\n * ```ts\n * styled(Component)`\n * color: ${(props) => resolveTheme(props.$rocketstyle).color};\n * `\n * ```\n */\nexport function resolveTheme<T = Record<string, unknown>>(\n value: (() => T) | T,\n): T {\n return typeof value === 'function' ? (value as () => T)() : value\n}\n\nexport { resolveModeVar } from './utils/theme'\nexport { context, isRocketComponent, Provider, rocketstyle }\nexport default rocketstyle\n"],"mappings":";;;;;;;;;;;;;ACCA,MAAa,eAAe;;AAG5B,MAAa,cAAc;CAAC;CAAS;CAAU;CAAS;AAAS;;AAGjE,MAAa,mBAAmB,CAAC,YAAY,UAAU;;;;;;;AAQvD,MAAa,uBAAuB,CAAC,GAAG,aAAa,GAAG,gBAAgB;;AAGxE,MAAa,cAAc;CACzB,OAAO;CACP,MAAM;AACR;;AAGA,MAAa,uBAAuB;CAClC,MAAM;CACN,OAAO;AACT;;AAGA,MAAa,cAAc;CACzB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;;AAGA,MAAa,eAAe,CAAC,SAAS,QAAQ;AAC9C,MAAa,cAAc,CAAC,GAAG,cAAc,SAAS;;AAGtD,MAAa,oBAAoB;CAC/B,GAAG,OAAO,KAAK,WAAW;CAC1B,GAAG;CACH,GAAG;CACH;AACF;;;;;;;;;;;ACdA,MAAM,YAAY,EAAE,WAAWA,YAAc,UAAU,GAAG,YAAmC;CAK3F,MAAM,EAAE,OAAO,MAAM,UAAU,qBAAqB,aAAa;EADhD,GAHF,WAAW,OACT,EAEK;EAAG,GAAG;EAAO;CACmC;CAEtE,IAAI,UAAU;CAEd,IAAI,MACF,UAAU,WAAW,qBAAqB,QAAQ;CAapD,QAVsB,uBAAuBA,YAChB;EAC3B,MAAM;EACN,QAAQ,YAAY;EACpB,SAAS,YAAY;EACrB,GAAI,UAAU,SAAY,EAAE,MAAM,IAAI,CAAC;EACvC;EACA;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6 +1,6 @@
1
1
  {
2
2
  "name": "@pyreon/rocketstyle",
3
- "version": "0.30.0",
3
+ "version": "0.32.0",
4
4
  "description": "Multi-dimensional style composition for Pyreon components",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/pyreon/pyreon/tree/main/packages/ui-system/rocketstyle#readme",
@@ -40,18 +40,18 @@
40
40
  "typecheck": "tsc --noEmit"
41
41
  },
42
42
  "peerDependencies": {
43
- "@pyreon/core": "^0.30.0",
44
- "@pyreon/reactivity": "^0.30.0"
43
+ "@pyreon/core": "^0.32.0",
44
+ "@pyreon/reactivity": "^0.32.0"
45
45
  },
46
46
  "dependencies": {
47
- "@pyreon/sized-map": "0.30.0",
48
- "@pyreon/styler": "^0.30.0",
49
- "@pyreon/ui-core": "^0.30.0"
47
+ "@pyreon/sized-map": "0.32.0",
48
+ "@pyreon/styler": "^0.32.0",
49
+ "@pyreon/ui-core": "^0.32.0"
50
50
  },
51
51
  "devDependencies": {
52
- "@pyreon/test-utils": "^0.13.18",
53
- "@pyreon/typescript": "^0.30.0",
54
- "@pyreon/vitest-config": "0.13.2",
52
+ "@pyreon/test-utils": "^0.13.20",
53
+ "@pyreon/typescript": "^0.32.0",
54
+ "@pyreon/vitest-config": "0.13.3",
55
55
  "@vitest/browser-playwright": "^4.1.8",
56
56
  "@vitus-labs/tools-rolldown": "^2.5.0"
57
57
  },