@jfdevelops/react-layout 2.0.0 → 2.2.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.
Files changed (97) hide show
  1. package/dist/create-config/create-defined-resource-layout.cjs +14 -5
  2. package/dist/create-config/create-defined-resource-layout.cjs.map +1 -1
  3. package/dist/create-config/create-defined-resource-layout.d.cts +8 -6
  4. package/dist/create-config/create-defined-resource-layout.d.cts.map +1 -1
  5. package/dist/create-config/create-defined-resource-layout.d.mts +8 -6
  6. package/dist/create-config/create-defined-resource-layout.d.mts.map +1 -1
  7. package/dist/create-config/create-defined-resource-layout.mjs +14 -5
  8. package/dist/create-config/create-defined-resource-layout.mjs.map +1 -1
  9. package/dist/create-config/define-layout.cjs +69 -21
  10. package/dist/create-config/define-layout.cjs.map +1 -1
  11. package/dist/create-config/define-layout.d.cts +9 -8
  12. package/dist/create-config/define-layout.d.cts.map +1 -1
  13. package/dist/create-config/define-layout.d.mts +9 -8
  14. package/dist/create-config/define-layout.d.mts.map +1 -1
  15. package/dist/create-config/define-layout.mjs +72 -24
  16. package/dist/create-config/define-layout.mjs.map +1 -1
  17. package/dist/create-config/for-resources/create-component.d.cts +30 -24
  18. package/dist/create-config/for-resources/create-component.d.cts.map +1 -1
  19. package/dist/create-config/for-resources/create-component.d.mts +30 -24
  20. package/dist/create-config/for-resources/create-component.d.mts.map +1 -1
  21. package/dist/create-config/for-resources/create-for-resources.cjs +27 -6
  22. package/dist/create-config/for-resources/create-for-resources.cjs.map +1 -1
  23. package/dist/create-config/for-resources/create-for-resources.mjs +27 -6
  24. package/dist/create-config/for-resources/create-for-resources.mjs.map +1 -1
  25. package/dist/create-config/for-resources/scoped-layout.d.cts +2 -2
  26. package/dist/create-config/for-resources/scoped-layout.d.cts.map +1 -1
  27. package/dist/create-config/for-resources/scoped-layout.d.mts +2 -2
  28. package/dist/create-config/for-resources/scoped-layout.d.mts.map +1 -1
  29. package/dist/create-config/for-resources/scoped-render.cjs +38 -4
  30. package/dist/create-config/for-resources/scoped-render.cjs.map +1 -1
  31. package/dist/create-config/for-resources/scoped-render.d.cts +8 -1
  32. package/dist/create-config/for-resources/scoped-render.d.cts.map +1 -1
  33. package/dist/create-config/for-resources/scoped-render.d.mts +8 -1
  34. package/dist/create-config/for-resources/scoped-render.d.mts.map +1 -1
  35. package/dist/create-config/for-resources/scoped-render.mjs +38 -4
  36. package/dist/create-config/for-resources/scoped-render.mjs.map +1 -1
  37. package/dist/create-config/index.d.cts +1 -1
  38. package/dist/create-config/index.d.mts +1 -1
  39. package/dist/create-config/inspection.cjs +23 -1
  40. package/dist/create-config/inspection.cjs.map +1 -1
  41. package/dist/create-config/inspection.mjs +24 -3
  42. package/dist/create-config/inspection.mjs.map +1 -1
  43. package/dist/create-config/lazy-resource-layout.cjs +4 -4
  44. package/dist/create-config/lazy-resource-layout.cjs.map +1 -1
  45. package/dist/create-config/lazy-resource-layout.d.cts +1 -1
  46. package/dist/create-config/lazy-resource-layout.d.cts.map +1 -1
  47. package/dist/create-config/lazy-resource-layout.d.mts +1 -1
  48. package/dist/create-config/lazy-resource-layout.d.mts.map +1 -1
  49. package/dist/create-config/lazy-resource-layout.mjs +4 -4
  50. package/dist/create-config/lazy-resource-layout.mjs.map +1 -1
  51. package/dist/create-config/render-state-context.cjs +24 -0
  52. package/dist/create-config/render-state-context.cjs.map +1 -0
  53. package/dist/create-config/render-state-context.mjs +22 -0
  54. package/dist/create-config/render-state-context.mjs.map +1 -0
  55. package/dist/create-config/render-state.cjs +1 -0
  56. package/dist/create-config/render-state.cjs.map +1 -1
  57. package/dist/create-config/render-state.d.cts +26 -15
  58. package/dist/create-config/render-state.d.cts.map +1 -1
  59. package/dist/create-config/render-state.d.mts +26 -15
  60. package/dist/create-config/render-state.d.mts.map +1 -1
  61. package/dist/create-config/render-state.mjs +1 -0
  62. package/dist/create-config/render-state.mjs.map +1 -1
  63. package/dist/create-config/state-composable.cjs +4 -2
  64. package/dist/create-config/state-composable.cjs.map +1 -1
  65. package/dist/create-config/state-composable.d.cts.map +1 -1
  66. package/dist/create-config/state-composable.d.mts.map +1 -1
  67. package/dist/create-config/state-composable.mjs +4 -2
  68. package/dist/create-config/state-composable.mjs.map +1 -1
  69. package/dist/index.d.cts +3 -2
  70. package/dist/index.d.mts +3 -2
  71. package/dist/lazy/create-lazy-loader.cjs +30 -9
  72. package/dist/lazy/create-lazy-loader.cjs.map +1 -1
  73. package/dist/lazy/create-lazy-loader.mjs +31 -10
  74. package/dist/lazy/create-lazy-loader.mjs.map +1 -1
  75. package/dist/lazy/create-render-state.cjs +59 -0
  76. package/dist/lazy/create-render-state.cjs.map +1 -0
  77. package/dist/lazy/create-render-state.d.cts +33 -0
  78. package/dist/lazy/create-render-state.d.cts.map +1 -0
  79. package/dist/lazy/create-render-state.d.mts +33 -0
  80. package/dist/lazy/create-render-state.d.mts.map +1 -0
  81. package/dist/lazy/create-render-state.mjs +59 -0
  82. package/dist/lazy/create-render-state.mjs.map +1 -0
  83. package/dist/lazy/lazy-boundary.cjs +14 -6
  84. package/dist/lazy/lazy-boundary.cjs.map +1 -1
  85. package/dist/lazy/lazy-boundary.mjs +14 -6
  86. package/dist/lazy/lazy-boundary.mjs.map +1 -1
  87. package/dist/lazy/types.cjs.map +1 -1
  88. package/dist/lazy/types.d.cts +7 -6
  89. package/dist/lazy/types.d.cts.map +1 -1
  90. package/dist/lazy/types.d.mts +7 -6
  91. package/dist/lazy/types.d.mts.map +1 -1
  92. package/dist/lazy/types.mjs.map +1 -1
  93. package/package.json +4 -4
  94. package/dist/lazy/create-error-component.cjs +0 -17
  95. package/dist/lazy/create-error-component.cjs.map +0 -1
  96. package/dist/lazy/create-error-component.mjs +0 -16
  97. package/dist/lazy/create-error-component.mjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"scoped-layout.d.cts","names":[],"sources":["../../../src/create-config/for-resources/scoped-layout.ts"],"mappings":";;;;;;;;;;KA0CY,iCAAA,mBACQ,aAAA,CAAc,k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AAQ,YAAA,aACxC,MAAA,SAEE,WAAA,CACE,mBAAA,CACE,iBAAA,CAAkB,SAAA,GAClB,YAAA,EACA,iBAAA,CAAkB,SAAA;EAAA;IAI1B,IAAA,EAAM,KAAA,GAAQ,MAAA,CAAO,OAAA,OAAc,KAAA,EAAO,YAAA;EAAA,IAE3C,4BAAA,CACD,SAAA,EACA,OAAA,EACA,WAAA,EACA,YAAA,EACA,6BAAA,CAA8B,SAAA,EAAW,YAAA,EAAc,KAAA,EAAO,YAAA,GAC9D,WAAA,EACA,gBAAA,EACA,MAAA,EACA,aAAA;EA9UoB;;;;;;;;;;;;;;EAAA,4BAgWO,aAAA,CAAc,iBAAA,CAAkB,SAAA,+BAG3D,OAAA;IACE,SAAA,EAAW,aAAA,CAAc,iBAAA,CAAkB,SAAA;IAC3C,IAAA,GAAO,QAAA,EAAU,mBAAA,CAAoB,YAAA,cAA0B,IAAA;EAAA;IAC3D,SAAA,EAAW,YAAA;EAAA,IAChB,4BAAA,CACD,SAAA,EACA,OAAA,EACA,WAAA,EACA,YAAA,EACA,6BAAA,CAA8B,SAAA,EAAW,YAAA,EAAc,IAAA,GACvD,WAAA,EACA,gBAAA,EACA,MAAA,EACA,aAAA;EAjWA;;;;;;;;;;;;;EAAA,4DAmXwB,uBAAA,CAAwB,SAAA,EAAW,YAAA,GAE3D,OAAA,EAAS,SAAA,GACP,iCAAA,CAAkC,SAAA,EAAW,YAAA,IAC7C,OAAA,CACE,MAAA,CAAO,OAAA,cAAqB,iBAAA,CAAkB,SAAA,cAEhD,MAAA,CAAO,OAAA,OAAc,SAAA,EAAW,iBAAA,CAAkB,SAAA,aACnD,4BAAA,CACD,SAAA,EACA,OAAA,EACA,WAAA,EACA,YAAA,EACA,+BAAA,CAAgC,SAAA,GAChC,WAAA,EACA,gBAAA,EACA,MAAA,EACA,aAAA;AAAA"}
1
+ {"version":3,"file":"scoped-layout.d.cts","names":[],"sources":["../../../src/create-config/for-resources/scoped-layout.ts"],"mappings":";;;;;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AA"}
@@ -74,8 +74,8 @@ type ScopedCreateResourceLayoutFn<Resources extends ReadonlyArray<ResourceDefini
74
74
  * shared component render function.
75
75
  * @returns A component scoped to the selected resources.
76
76
  */
77
- createComponent: ScopedCreateComponent<Resources, InProps, Composables, Arguments, CustomProps>; /** Builds one reusable entry for the selected resources. */
78
- createResourceComponents: ScopedCreateResourceComponents<Resources, InProps, Composables, Arguments, CustomProps, {}, {}>;
77
+ createComponent: ScopedCreateComponent<Resources, InProps, Composables, Arguments, CustomProps, 'default' | Extract<keyof States, string>>; /** Builds one reusable entry for the selected resources. */
78
+ createResourceComponents: ScopedCreateResourceComponents<Resources, InProps, Composables, Arguments, CustomProps, {}, {}, 'default' | Extract<keyof States, string>>;
79
79
  forResource: ScopedCreateLayoutForResource<Resources, InProps, Composables, IncludeProps, Arguments, CustomProps, DefaultNamespace, States, DefaultNaming>;
80
80
  /**
81
81
  * Type-only property containing the target resource union. This property is
@@ -1 +1 @@
1
- {"version":3,"file":"scoped-layout.d.mts","names":[],"sources":["../../../src/create-config/for-resources/scoped-layout.ts"],"mappings":";;;;;;;;;;KA0CY,iCAAA,mBACQ,aAAA,CAAc,kBAAA,mBAChB,iBAAA,CAAkB,SAAA,uBACd,oBAAA,uBACC,kBAAA,CAAmB,SAAA,EAAW,OAAA,EAAS,WAAA,qBAC1C,aAAA,iDAED,uBAAA,CAAwB,SAAA,EAAW,SAAA,iBACtC,aAAA,IACZ,sBAAA,CAAuB,SAAA,EAAW,OAAA,EAAS,WAAA,EAAa,YAAA;EAC1D,QAAA,EAAU,QAAA;EACV,KAAA,GAAQ,KAAA;EACR,IAAA,GAAO,IAAA;AAAA;AAAA,KAGG,gCAAA,mBACQ,aAAA,CAAc,kBAAA,mBAChB,iBAAA,CAAkB,SAAA,uBACd,oBAAA,uBACC,kBAAA,CAAmB,SAAA,EAAW,OAAA,EAAS,WAAA,qBAC1C,aAAA,+BACE,aAAA,+EAGE,eAAA,wDAEL,uBAAA,CAAwB,SAAA,EAA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AAO,QAAA,EAAU,mBAAA,CAAoB,YAAA,cAA0B,IAAA;EAAA;IAC3D,SAAA,EAAW,YAAA;EAAA,IAChB,4BAAA,CACD,SAAA,EACA,OAAA,EACA,WAAA,EACA,YAAA,EACA,6BAAA,CAA8B,SAAA,EAAW,YAAA,EAAc,IAAA,GACvD,WAAA,EACA,gBAAA,EACA,MAAA,EACA,aAAA;EAjWA;;;;;;;;;;;;;EAAA,4DAmXwB,uBAAA,CAAwB,SAAA,EAAW,YAAA,GAE3D,OAAA,EAAS,SAAA,GACP,iCAAA,CAAkC,SAAA,EAAW,YAAA,IAC7C,OAAA,CACE,MAAA,CAAO,OAAA,cAAqB,iBAAA,CAAkB,SAAA,cAEhD,MAAA,CAAO,OAAA,OAAc,SAAA,EAAW,iBAAA,CAAkB,SAAA,aACnD,4BAAA,CACD,SAAA,EACA,OAAA,EACA,WAAA,EACA,YAAA,EACA,+BAAA,CAAgC,SAAA,GAChC,WAAA,EACA,gBAAA,EACA,MAAA,EACA,aAAA;AAAA"}
1
+ {"version":3,"file":"scoped-layout.d.mts","names":[],"sources":["../../../src/create-config/for-resources/scoped-layout.ts"],"mappings":";;;;;;;;;;KA0CY,iCAAA,mBACQ,aAAA,CAAc,kBAAA,mBAChB,iBAAA,CAAkB,SAAA,uBACd,oBAAA,uBACC,kBAAA,CAAmB,SAAA,EAAW,OAAA,EAAS,WAAA,qBAC1C,aAAA,iDAED,uBAAA,CAAwB,SAAA,EAAW,SAAA,iBACtC,aAAA,IACZ,sBAAA,CAAuB,SAAA,EAAW,OAAA,EAAS,WAAA,EAAa,YAAA;EAC1D,QAAA,EAAU,QAAA;EACV,KAAA,GAAQ,KAAA;EACR,IAAA,GAAO,IAAA;AAAA;AAAA,KAGG,gCAAA,mBACQ,aAAA,CAAc,kBAAA,mBAChB,iBAAA,CAAkB,SAAA,uBACd,oBAAA,uBACC,kBAAA,CAAmB,SAAA,EAAW,OAAA,EAAS,WAAA,qBAC1C,aAAA,+BACE,aAAA,+EA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AAkB,SAAA,+BAG3D,OAAA;IACE,SAAA,EAAW,aAAA,CAAc,iBAAA,CAAkB,SAAA;IAC3C,IAAA,GAAO,QAAA,EAAU,mBAAA,CAAoB,YAAA,cAA0B,IAAA;EAAA;IAC3D,SAAA,EAAW,YAAA;EAAA,IAChB,4BAAA,CACD,SAAA,EACA,OAAA,EACA,WAAA,EACA,YAAA,EACA,6BAAA,CAA8B,SAAA,EAAW,YAAA,EAAc,IAAA,GACvD,WAAA,EACA,gBAAA,EACA,MAAA,EACA,aAAA;EAnWA;;;;;;;;;;;;;EAAA,4DAqXwB,uBAAA,CAAwB,SAAA,EAAW,YAAA,GAE3D,OAAA,EAAS,SAAA,GACP,iCAAA,CAAkC,SAAA,EAAW,YAAA,IAC7C,OAAA,CACE,MAAA,CAAO,OAAA,cAAqB,iBAAA,CAAkB,SAAA,cAEhD,MAAA,CAAO,OAAA,OAAc,SAAA,EAAW,iBAAA,CAAkB,SAAA,aACnD,4BAAA,CACD,SAAA,EACA,OAAA,EACA,WAAA,EACA,YAAA,EACA,+BAAA,CAAgC,SAAA,GAChC,WAAA,EACA,gBAAA,EACA,MAAA,EACA,aAAA;AAAA"}
@@ -20,7 +20,8 @@ const reservedScopedComponentNames = new Set([
20
20
  "name",
21
21
  "props",
22
22
  "prototype",
23
- "resource"
23
+ "resource",
24
+ "state"
24
25
  ]);
25
26
  /**
26
27
  * `$$typeof` tags for object component wrappers that `createElement` accepts
@@ -58,7 +59,7 @@ function resolveScopedRenderResult(result, props = {}) {
58
59
  * Runtime counterpart of `ScopedComponentCompoundStaticKey` — keys that must
59
60
  * not be treated as compound component statics on a scoped wrapper.
60
61
  */
61
- const reservedScopedCompoundStaticKeys = new Set([
62
+ const reservedScopedCompoundStaticKeys = [
62
63
  "apply",
63
64
  "arguments",
64
65
  "bind",
@@ -71,12 +72,45 @@ const reservedScopedCompoundStaticKeys = new Set([
71
72
  "length",
72
73
  "name",
73
74
  "propTypes",
75
+ "PropTypes",
74
76
  "prototype",
75
77
  "toLocaleString",
76
78
  "toString",
77
79
  "valueOf",
78
80
  "$$typeof"
79
- ]);
81
+ ];
82
+ const reservedCompoundKeys = new Set(reservedScopedCompoundStaticKeys);
83
+ const compoundInitials = [
84
+ "A",
85
+ "B",
86
+ "C",
87
+ "D",
88
+ "E",
89
+ "F",
90
+ "G",
91
+ "H",
92
+ "I",
93
+ "J",
94
+ "K",
95
+ "L",
96
+ "M",
97
+ "N",
98
+ "O",
99
+ "P",
100
+ "Q",
101
+ "R",
102
+ "S",
103
+ "T",
104
+ "U",
105
+ "V",
106
+ "W",
107
+ "X",
108
+ "Y",
109
+ "Z"
110
+ ];
111
+ function isCompoundName(key) {
112
+ return compoundInitials.some((initial) => key.startsWith(initial));
113
+ }
80
114
  /**
81
115
  * Exposes compound statics (e.g. `DataTable.Loading`) on a scoped wrapper so
82
116
  * runtime matches `ScopedComponentCompoundStatics`.
@@ -89,7 +123,7 @@ const reservedScopedCompoundStaticKeys = new Set([
89
123
  */
90
124
  function withScopedCompoundStatics(wrapper, createCompoundStatic) {
91
125
  return new Proxy(wrapper, { get(target, property, receiver) {
92
- if (typeof property === "symbol" || reservedScopedCompoundStaticKeys.has(property) || property in target) return Reflect.get(target, property, receiver);
126
+ if (typeof property !== "string" || !isCompoundName(property) || reservedCompoundKeys.has(property) || property in target) return Reflect.get(target, property, receiver);
93
127
  const CompoundStatic = createCompoundStatic(property);
94
128
  target[property] = CompoundStatic;
95
129
  return CompoundStatic;
@@ -1 +1 @@
1
- {"version":3,"file":"scoped-render.cjs","names":[],"sources":["../../../src/create-config/for-resources/scoped-render.ts"],"sourcesContent":["import {\n createElement,\n isValidElement,\n type ComponentType,\n type JSX,\n type ReactNode,\n} from 'react';\n\n/**\n * Names a scoped component cannot use. Scoped components are attached to\n * function objects, so they collide with the component's own statics and with\n * non-writable `Function.prototype` properties. `__proto__` is reserved so\n * assignment cannot hit the prototype setter on a normal object.\n */\nexport const reservedScopedComponentNames = new Set([\n '__proto__',\n 'apply',\n 'arguments',\n 'bind',\n 'call',\n 'caller',\n 'displayName',\n 'length',\n 'makeComposable',\n 'name',\n 'props',\n 'prototype',\n 'resource',\n]);\n\n/**\n * Values a createComponent / scoped-component `render` may return.\n *\n * Alongside rendered nodes, a component type is allowed — the type constituent\n * of a React element — so factories like `createDataTable(columns)` can be\n * returned directly and mounted with the call-site props.\n *\n * At runtime, `resolveScopedRenderResult` distinguishes component types from\n * nodes (including portals). Getting that wrong mounts a portal via\n * `createElement` and blows up with an invalid-element-type error.\n */\n// Returned components declare their own props; a concrete props parameter would\n// be contravariant and reject the factories callers actually return.\n// eslint-disable-next-line @typescript-eslint/no-explicit-any -- see above\nexport type ScopedRenderResult = ReactNode | ComponentType<any>;\n\n/**\n * `$$typeof` tags for object component wrappers that `createElement` accepts\n * as `type` (forwardRef, memo, lazy).\n *\n * Do not treat \"any object with `$$typeof`\" as a component: portals also have\n * `$$typeof` (`Symbol.for('react.portal')`) and `isValidElement(portal)` is\n * false, so a naive check would mis-classify them.\n */\nconst reactForwardRefType = Symbol.for('react.forward_ref');\nconst reactMemoType = Symbol.for('react.memo');\nconst reactLazyType = Symbol.for('react.lazy');\n\n/**\n * True when `value` can be passed as the `type` argument to `createElement`.\n *\n * Functions always qualify. Object wrappers qualify only for the forwardRef /\n * memo / lazy tags above — not portals or other React nodes that happen to\n * carry `$$typeof`.\n */\nexport function isRenderableComponentType(\n value: unknown,\n): value is ComponentType<Record<string, unknown>> {\n if (typeof value === 'function') {\n return true;\n }\n\n if (\n typeof value !== 'object' ||\n value === null ||\n Array.isArray(value) ||\n isValidElement(value) ||\n !('$$typeof' in value)\n ) {\n return false;\n }\n\n const typeTag = (value as { $$typeof: unknown }).$$typeof;\n\n return (\n typeTag === reactForwardRefType ||\n typeTag === reactMemoType ||\n typeTag === reactLazyType\n );\n}\n\n/**\n * If `render` returned a component type, mount it with `props`; otherwise\n * return the node as-is (elements, portals, null, etc.).\n */\nexport function resolveScopedRenderResult(\n result: ScopedRenderResult,\n props: Record<string, unknown> = {},\n): JSX.Element {\n if (isRenderableComponentType(result)) {\n return createElement(result, props);\n }\n\n return result as JSX.Element;\n}\n\n/**\n * Runtime counterpart of `ScopedComponentCompoundStaticKey` — keys that must\n * not be treated as compound component statics on a scoped wrapper.\n */\nconst reservedScopedCompoundStaticKeys = new Set<PropertyKey>([\n 'apply',\n 'arguments',\n 'bind',\n 'call',\n 'caller',\n 'childContextTypes',\n 'contextTypes',\n 'defaultProps',\n 'displayName',\n 'length',\n 'name',\n 'propTypes',\n 'prototype',\n 'toLocaleString',\n 'toString',\n 'valueOf',\n '$$typeof',\n]);\n\ntype ScopedComponentWrapper = ((\n props?: Record<string, unknown>,\n) => JSX.Element) &\n Record<string, unknown>;\n\n/**\n * Exposes compound statics (e.g. `DataTable.Loading`) on a scoped wrapper so\n * runtime matches `ScopedComponentCompoundStatics`.\n *\n * Why a Proxy: JSX reads `components.DataTable.Loading` while building the\n * element tree — before `DataTable` itself renders — so statics cannot be\n * copied only after the first `render` call. Property access lazily creates a\n * stable wrapper component that re-runs the scoped `render` under context and\n * mounts the matching static from the returned component type.\n */\nexport function withScopedCompoundStatics(\n wrapper: (props?: Record<string, unknown>) => JSX.Element,\n createCompoundStatic: (\n staticName: string,\n ) => (ownProps?: Record<string, unknown>) => JSX.Element,\n): ScopedComponentWrapper {\n return new Proxy(wrapper as ScopedComponentWrapper, {\n get(target, property, receiver) {\n if (\n typeof property === 'symbol' ||\n reservedScopedCompoundStaticKeys.has(property) ||\n property in target\n ) {\n return Reflect.get(target, property, receiver);\n }\n\n // Cache on the target so repeated `.Loading` access keeps one identity.\n const CompoundStatic = createCompoundStatic(property);\n target[property] = CompoundStatic;\n return CompoundStatic;\n },\n });\n}\n"],"mappings":";;;;;;;;;AAcA,MAAa,+BAA+B,IAAI,IAAI;CAClD;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,CAAC;;;;;;;;;AA0BD,MAAM,sBAAsB,OAAO,IAAI,mBAAmB;AAC1D,MAAM,gBAAgB,OAAO,IAAI,YAAY;AAC7C,MAAM,gBAAgB,OAAO,IAAI,YAAY;;;;;;;;AAS7C,SAAgB,0BACd,OACiD;CACjD,IAAI,OAAO,UAAU,YACnB,OAAO;CAGT,IACE,OAAO,UAAU,YACjB,UAAU,QACV,MAAM,QAAQ,KAAK,+BACJ,KAAK,KACpB,EAAE,cAAc,QAEhB,OAAO;CAGT,MAAM,UAAW,MAAgC;CAEjD,OACE,YAAY,uBACZ,YAAY,iBACZ,YAAY;AAEhB;;;;;AAMA,SAAgB,0BACd,QACA,QAAiC,CAAC,GACrB;CACb,IAAI,0BAA0B,MAAM,GAClC,gCAAqB,QAAQ,KAAK;CAGpC,OAAO;AACT;;;;;AAMA,MAAM,mCAAmC,IAAI,IAAiB;CAC5D;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,CAAC;;;;;;;;;;;AAiBD,SAAgB,0BACd,SACA,sBAGwB;CACxB,OAAO,IAAI,MAAM,SAAmC,EAClD,IAAI,QAAQ,UAAU,UAAU;EAC9B,IACE,OAAO,aAAa,YACpB,iCAAiC,IAAI,QAAQ,KAC7C,YAAY,QAEZ,OAAO,QAAQ,IAAI,QAAQ,UAAU,QAAQ;EAI/C,MAAM,iBAAiB,qBAAqB,QAAQ;EACpD,OAAO,YAAY;EACnB,OAAO;CACT,EACF,CAAC;AACH"}
1
+ {"version":3,"file":"scoped-render.cjs","names":[],"sources":["../../../src/create-config/for-resources/scoped-render.ts"],"sourcesContent":["import {\n createElement,\n isValidElement,\n type ComponentType,\n type JSX,\n type ReactNode,\n} from 'react';\n\n/**\n * Names a scoped component cannot use. Scoped components are attached to\n * function objects, so they collide with the component's own statics and with\n * non-writable `Function.prototype` properties. `__proto__` is reserved so\n * assignment cannot hit the prototype setter on a normal object.\n */\nexport const reservedScopedComponentNames = new Set([\n '__proto__',\n 'apply',\n 'arguments',\n 'bind',\n 'call',\n 'caller',\n 'displayName',\n 'length',\n 'makeComposable',\n 'name',\n 'props',\n 'prototype',\n 'resource',\n 'state',\n]);\n\n/**\n * Values a createComponent / scoped-component `render` may return.\n *\n * Alongside rendered nodes, a component type is allowed — the type constituent\n * of a React element — so factories like `createDataTable(columns)` can be\n * returned directly and mounted with the call-site props.\n *\n * At runtime, `resolveScopedRenderResult` distinguishes component types from\n * nodes (including portals). Getting that wrong mounts a portal via\n * `createElement` and blows up with an invalid-element-type error.\n */\n// Returned components declare their own props; a concrete props parameter would\n// be contravariant and reject the factories callers actually return.\n// eslint-disable-next-line @typescript-eslint/no-explicit-any -- see above\nexport type ScopedRenderResult = ReactNode | ComponentType<any>;\n\n/**\n * `$$typeof` tags for object component wrappers that `createElement` accepts\n * as `type` (forwardRef, memo, lazy).\n *\n * Do not treat \"any object with `$$typeof`\" as a component: portals also have\n * `$$typeof` (`Symbol.for('react.portal')`) and `isValidElement(portal)` is\n * false, so a naive check would mis-classify them.\n */\nconst reactForwardRefType = Symbol.for('react.forward_ref');\nconst reactMemoType = Symbol.for('react.memo');\nconst reactLazyType = Symbol.for('react.lazy');\n\n/**\n * True when `value` can be passed as the `type` argument to `createElement`.\n *\n * Functions always qualify. Object wrappers qualify only for the forwardRef /\n * memo / lazy tags above — not portals or other React nodes that happen to\n * carry `$$typeof`.\n */\nexport function isRenderableComponentType(\n value: unknown,\n): value is ComponentType<Record<string, unknown>> {\n if (typeof value === 'function') {\n return true;\n }\n\n if (\n typeof value !== 'object' ||\n value === null ||\n Array.isArray(value) ||\n isValidElement(value) ||\n !('$$typeof' in value)\n ) {\n return false;\n }\n\n const typeTag = (value as { $$typeof: unknown }).$$typeof;\n\n return (\n typeTag === reactForwardRefType ||\n typeTag === reactMemoType ||\n typeTag === reactLazyType\n );\n}\n\n/**\n * If `render` returned a component type, mount it with `props`; otherwise\n * return the node as-is (elements, portals, null, etc.).\n */\nexport function resolveScopedRenderResult(\n result: ScopedRenderResult,\n props: Record<string, unknown> = {},\n): JSX.Element {\n if (isRenderableComponentType(result)) {\n return createElement(result, props);\n }\n\n return result as JSX.Element;\n}\n\n/**\n * Runtime counterpart of `ScopedComponentCompoundStaticKey` — keys that must\n * not be treated as compound component statics on a scoped wrapper.\n */\nexport const reservedScopedCompoundStaticKeys = [\n 'apply',\n 'arguments',\n 'bind',\n 'call',\n 'caller',\n 'childContextTypes',\n 'contextTypes',\n 'defaultProps',\n 'displayName',\n 'length',\n 'name',\n 'propTypes',\n 'PropTypes',\n 'prototype',\n 'toLocaleString',\n 'toString',\n 'valueOf',\n '$$typeof',\n] as const;\n\nconst reservedCompoundKeys = new Set<PropertyKey>(reservedScopedCompoundStaticKeys);\n\nconst compoundInitials = [\n 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',\n 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',\n] as const;\n\nexport type ScopedCompoundName = `${typeof compoundInitials[number]}${string}`;\n\nfunction isCompoundName(key: string): key is ScopedCompoundName {\n return compoundInitials.some((initial) => key.startsWith(initial));\n}\n\ntype ScopedComponentWrapper = ((\n props?: Record<string, unknown>,\n) => JSX.Element) &\n Record<string, unknown>;\n\n/**\n * Exposes compound statics (e.g. `DataTable.Loading`) on a scoped wrapper so\n * runtime matches `ScopedComponentCompoundStatics`.\n *\n * Why a Proxy: JSX reads `components.DataTable.Loading` while building the\n * element tree — before `DataTable` itself renders — so statics cannot be\n * copied only after the first `render` call. Property access lazily creates a\n * stable wrapper component that re-runs the scoped `render` under context and\n * mounts the matching static from the returned component type.\n */\nexport function withScopedCompoundStatics(\n wrapper: (props?: Record<string, unknown>) => JSX.Element,\n createCompoundStatic: (\n staticName: string,\n ) => (ownProps?: Record<string, unknown>) => JSX.Element,\n): ScopedComponentWrapper {\n return new Proxy(wrapper as ScopedComponentWrapper, {\n get(target, property, receiver) {\n if (\n typeof property !== 'string' ||\n !isCompoundName(property) ||\n reservedCompoundKeys.has(property) ||\n property in target\n ) {\n return Reflect.get(target, property, receiver);\n }\n\n // Cache on the target so repeated `.Loading` access keeps one identity.\n const CompoundStatic = createCompoundStatic(property);\n target[property] = CompoundStatic;\n return CompoundStatic;\n },\n });\n}\n"],"mappings":";;;;;;;;;AAcA,MAAa,+BAA+B,IAAI,IAAI;CAClD;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,CAAC;;;;;;;;;AA0BD,MAAM,sBAAsB,OAAO,IAAI,mBAAmB;AAC1D,MAAM,gBAAgB,OAAO,IAAI,YAAY;AAC7C,MAAM,gBAAgB,OAAO,IAAI,YAAY;;;;;;;;AAS7C,SAAgB,0BACd,OACiD;CACjD,IAAI,OAAO,UAAU,YACnB,OAAO;CAGT,IACE,OAAO,UAAU,YACjB,UAAU,QACV,MAAM,QAAQ,KAAK,+BACJ,KAAK,KACpB,EAAE,cAAc,QAEhB,OAAO;CAGT,MAAM,UAAW,MAAgC;CAEjD,OACE,YAAY,uBACZ,YAAY,iBACZ,YAAY;AAEhB;;;;;AAMA,SAAgB,0BACd,QACA,QAAiC,CAAC,GACrB;CACb,IAAI,0BAA0B,MAAM,GAClC,gCAAqB,QAAQ,KAAK;CAGpC,OAAO;AACT;;;;;AAMA,MAAa,mCAAmC;CAC9C;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAEA,MAAM,uBAAuB,IAAI,IAAiB,gCAAgC;AAElF,MAAM,mBAAmB;CACvB;CAAK;CAAK;CAAK;CAAK;CAAK;CAAK;CAAK;CAAK;CAAK;CAAK;CAAK;CAAK;CAC5D;CAAK;CAAK;CAAK;CAAK;CAAK;CAAK;CAAK;CAAK;CAAK;CAAK;CAAK;CAAK;AAC9D;AAIA,SAAS,eAAe,KAAwC;CAC9D,OAAO,iBAAiB,MAAM,YAAY,IAAI,WAAW,OAAO,CAAC;AACnE;;;;;;;;;;;AAiBA,SAAgB,0BACd,SACA,sBAGwB;CACxB,OAAO,IAAI,MAAM,SAAmC,EAClD,IAAI,QAAQ,UAAU,UAAU;EAC9B,IACE,OAAO,aAAa,YACpB,CAAC,eAAe,QAAQ,KACxB,qBAAqB,IAAI,QAAQ,KACjC,YAAY,QAEZ,OAAO,QAAQ,IAAI,QAAQ,UAAU,QAAQ;EAI/C,MAAM,iBAAiB,qBAAqB,QAAQ;EACpD,OAAO,YAAY;EACnB,OAAO;CACT,EACF,CAAC;AACH"}
@@ -13,6 +13,13 @@ import { ComponentType, JSX, ReactNode } from "react";
13
13
  * `createElement` and blows up with an invalid-element-type error.
14
14
  */
15
15
  type ScopedRenderResult = ReactNode | ComponentType<any>;
16
+ /**
17
+ * Runtime counterpart of `ScopedComponentCompoundStaticKey` — keys that must
18
+ * not be treated as compound component statics on a scoped wrapper.
19
+ */
20
+ declare const reservedScopedCompoundStaticKeys: readonly ["apply", "arguments", "bind", "call", "caller", "childContextTypes", "contextTypes", "defaultProps", "displayName", "length", "name", "propTypes", "PropTypes", "prototype", "toLocaleString", "toString", "valueOf", "$$typeof"];
21
+ declare const compoundInitials: readonly ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"];
22
+ type ScopedCompoundName = `${typeof compoundInitials[number]}${string}`;
16
23
  //#endregion
17
- export { ScopedRenderResult };
24
+ export { ScopedCompoundName, ScopedRenderResult, reservedScopedCompoundStaticKeys };
18
25
  //# sourceMappingURL=scoped-render.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"scoped-render.d.cts","names":[],"sources":["../../../src/create-config/for-resources/scoped-render.ts"],"mappings":";;;;;;;;;;;;;;KA4CY,kBAAA,GAAqB,SAAA,GAAY,aAAa"}
1
+ {"version":3,"file":"scoped-render.d.cts","names":[],"sources":["../../../src/create-config/for-resources/scoped-render.ts"],"mappings":";;;AA+GA;;;;AAmBU;AAAC;;;;AAOD;AAEV;AA5BA,KAlEY,kBAAA,GAAqB,SAAA,GAAY,aAAa;;;;;cAkE7C,gCAAA;AAAA,cAuBP,gBAAA;AAAA,KAKM,kBAAA,aAA+B,gBAAgB"}
@@ -13,6 +13,13 @@ import { ComponentType, JSX, ReactNode } from "react";
13
13
  * `createElement` and blows up with an invalid-element-type error.
14
14
  */
15
15
  type ScopedRenderResult = ReactNode | ComponentType<any>;
16
+ /**
17
+ * Runtime counterpart of `ScopedComponentCompoundStaticKey` — keys that must
18
+ * not be treated as compound component statics on a scoped wrapper.
19
+ */
20
+ declare const reservedScopedCompoundStaticKeys: readonly ["apply", "arguments", "bind", "call", "caller", "childContextTypes", "contextTypes", "defaultProps", "displayName", "length", "name", "propTypes", "PropTypes", "prototype", "toLocaleString", "toString", "valueOf", "$$typeof"];
21
+ declare const compoundInitials: readonly ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"];
22
+ type ScopedCompoundName = `${typeof compoundInitials[number]}${string}`;
16
23
  //#endregion
17
- export { ScopedRenderResult };
24
+ export { ScopedCompoundName, ScopedRenderResult, reservedScopedCompoundStaticKeys };
18
25
  //# sourceMappingURL=scoped-render.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"scoped-render.d.mts","names":[],"sources":["../../../src/create-config/for-resources/scoped-render.ts"],"mappings":";;;;;;;;;;;;;;KA4CY,kBAAA,GAAqB,SAAA,GAAY,aAAa"}
1
+ {"version":3,"file":"scoped-render.d.mts","names":[],"sources":["../../../src/create-config/for-resources/scoped-render.ts"],"mappings":";;;AA+GA;;;;AAmBU;AAAC;;;;AAOD;AAEV;AA5BA,KAlEY,kBAAA,GAAqB,SAAA,GAAY,aAAa;;;;;cAkE7C,gCAAA;AAAA,cAuBP,gBAAA;AAAA,KAKM,kBAAA,aAA+B,gBAAgB"}
@@ -20,7 +20,8 @@ const reservedScopedComponentNames = new Set([
20
20
  "name",
21
21
  "props",
22
22
  "prototype",
23
- "resource"
23
+ "resource",
24
+ "state"
24
25
  ]);
25
26
  /**
26
27
  * `$$typeof` tags for object component wrappers that `createElement` accepts
@@ -58,7 +59,7 @@ function resolveScopedRenderResult(result, props = {}) {
58
59
  * Runtime counterpart of `ScopedComponentCompoundStaticKey` — keys that must
59
60
  * not be treated as compound component statics on a scoped wrapper.
60
61
  */
61
- const reservedScopedCompoundStaticKeys = new Set([
62
+ const reservedScopedCompoundStaticKeys = [
62
63
  "apply",
63
64
  "arguments",
64
65
  "bind",
@@ -71,12 +72,45 @@ const reservedScopedCompoundStaticKeys = new Set([
71
72
  "length",
72
73
  "name",
73
74
  "propTypes",
75
+ "PropTypes",
74
76
  "prototype",
75
77
  "toLocaleString",
76
78
  "toString",
77
79
  "valueOf",
78
80
  "$$typeof"
79
- ]);
81
+ ];
82
+ const reservedCompoundKeys = new Set(reservedScopedCompoundStaticKeys);
83
+ const compoundInitials = [
84
+ "A",
85
+ "B",
86
+ "C",
87
+ "D",
88
+ "E",
89
+ "F",
90
+ "G",
91
+ "H",
92
+ "I",
93
+ "J",
94
+ "K",
95
+ "L",
96
+ "M",
97
+ "N",
98
+ "O",
99
+ "P",
100
+ "Q",
101
+ "R",
102
+ "S",
103
+ "T",
104
+ "U",
105
+ "V",
106
+ "W",
107
+ "X",
108
+ "Y",
109
+ "Z"
110
+ ];
111
+ function isCompoundName(key) {
112
+ return compoundInitials.some((initial) => key.startsWith(initial));
113
+ }
80
114
  /**
81
115
  * Exposes compound statics (e.g. `DataTable.Loading`) on a scoped wrapper so
82
116
  * runtime matches `ScopedComponentCompoundStatics`.
@@ -89,7 +123,7 @@ const reservedScopedCompoundStaticKeys = new Set([
89
123
  */
90
124
  function withScopedCompoundStatics(wrapper, createCompoundStatic) {
91
125
  return new Proxy(wrapper, { get(target, property, receiver) {
92
- if (typeof property === "symbol" || reservedScopedCompoundStaticKeys.has(property) || property in target) return Reflect.get(target, property, receiver);
126
+ if (typeof property !== "string" || !isCompoundName(property) || reservedCompoundKeys.has(property) || property in target) return Reflect.get(target, property, receiver);
93
127
  const CompoundStatic = createCompoundStatic(property);
94
128
  target[property] = CompoundStatic;
95
129
  return CompoundStatic;
@@ -1 +1 @@
1
- {"version":3,"file":"scoped-render.mjs","names":[],"sources":["../../../src/create-config/for-resources/scoped-render.ts"],"sourcesContent":["import {\n createElement,\n isValidElement,\n type ComponentType,\n type JSX,\n type ReactNode,\n} from 'react';\n\n/**\n * Names a scoped component cannot use. Scoped components are attached to\n * function objects, so they collide with the component's own statics and with\n * non-writable `Function.prototype` properties. `__proto__` is reserved so\n * assignment cannot hit the prototype setter on a normal object.\n */\nexport const reservedScopedComponentNames = new Set([\n '__proto__',\n 'apply',\n 'arguments',\n 'bind',\n 'call',\n 'caller',\n 'displayName',\n 'length',\n 'makeComposable',\n 'name',\n 'props',\n 'prototype',\n 'resource',\n]);\n\n/**\n * Values a createComponent / scoped-component `render` may return.\n *\n * Alongside rendered nodes, a component type is allowed — the type constituent\n * of a React element — so factories like `createDataTable(columns)` can be\n * returned directly and mounted with the call-site props.\n *\n * At runtime, `resolveScopedRenderResult` distinguishes component types from\n * nodes (including portals). Getting that wrong mounts a portal via\n * `createElement` and blows up with an invalid-element-type error.\n */\n// Returned components declare their own props; a concrete props parameter would\n// be contravariant and reject the factories callers actually return.\n// eslint-disable-next-line @typescript-eslint/no-explicit-any -- see above\nexport type ScopedRenderResult = ReactNode | ComponentType<any>;\n\n/**\n * `$$typeof` tags for object component wrappers that `createElement` accepts\n * as `type` (forwardRef, memo, lazy).\n *\n * Do not treat \"any object with `$$typeof`\" as a component: portals also have\n * `$$typeof` (`Symbol.for('react.portal')`) and `isValidElement(portal)` is\n * false, so a naive check would mis-classify them.\n */\nconst reactForwardRefType = Symbol.for('react.forward_ref');\nconst reactMemoType = Symbol.for('react.memo');\nconst reactLazyType = Symbol.for('react.lazy');\n\n/**\n * True when `value` can be passed as the `type` argument to `createElement`.\n *\n * Functions always qualify. Object wrappers qualify only for the forwardRef /\n * memo / lazy tags above — not portals or other React nodes that happen to\n * carry `$$typeof`.\n */\nexport function isRenderableComponentType(\n value: unknown,\n): value is ComponentType<Record<string, unknown>> {\n if (typeof value === 'function') {\n return true;\n }\n\n if (\n typeof value !== 'object' ||\n value === null ||\n Array.isArray(value) ||\n isValidElement(value) ||\n !('$$typeof' in value)\n ) {\n return false;\n }\n\n const typeTag = (value as { $$typeof: unknown }).$$typeof;\n\n return (\n typeTag === reactForwardRefType ||\n typeTag === reactMemoType ||\n typeTag === reactLazyType\n );\n}\n\n/**\n * If `render` returned a component type, mount it with `props`; otherwise\n * return the node as-is (elements, portals, null, etc.).\n */\nexport function resolveScopedRenderResult(\n result: ScopedRenderResult,\n props: Record<string, unknown> = {},\n): JSX.Element {\n if (isRenderableComponentType(result)) {\n return createElement(result, props);\n }\n\n return result as JSX.Element;\n}\n\n/**\n * Runtime counterpart of `ScopedComponentCompoundStaticKey` — keys that must\n * not be treated as compound component statics on a scoped wrapper.\n */\nconst reservedScopedCompoundStaticKeys = new Set<PropertyKey>([\n 'apply',\n 'arguments',\n 'bind',\n 'call',\n 'caller',\n 'childContextTypes',\n 'contextTypes',\n 'defaultProps',\n 'displayName',\n 'length',\n 'name',\n 'propTypes',\n 'prototype',\n 'toLocaleString',\n 'toString',\n 'valueOf',\n '$$typeof',\n]);\n\ntype ScopedComponentWrapper = ((\n props?: Record<string, unknown>,\n) => JSX.Element) &\n Record<string, unknown>;\n\n/**\n * Exposes compound statics (e.g. `DataTable.Loading`) on a scoped wrapper so\n * runtime matches `ScopedComponentCompoundStatics`.\n *\n * Why a Proxy: JSX reads `components.DataTable.Loading` while building the\n * element tree — before `DataTable` itself renders — so statics cannot be\n * copied only after the first `render` call. Property access lazily creates a\n * stable wrapper component that re-runs the scoped `render` under context and\n * mounts the matching static from the returned component type.\n */\nexport function withScopedCompoundStatics(\n wrapper: (props?: Record<string, unknown>) => JSX.Element,\n createCompoundStatic: (\n staticName: string,\n ) => (ownProps?: Record<string, unknown>) => JSX.Element,\n): ScopedComponentWrapper {\n return new Proxy(wrapper as ScopedComponentWrapper, {\n get(target, property, receiver) {\n if (\n typeof property === 'symbol' ||\n reservedScopedCompoundStaticKeys.has(property) ||\n property in target\n ) {\n return Reflect.get(target, property, receiver);\n }\n\n // Cache on the target so repeated `.Loading` access keeps one identity.\n const CompoundStatic = createCompoundStatic(property);\n target[property] = CompoundStatic;\n return CompoundStatic;\n },\n });\n}\n"],"mappings":";;;;;;;;;AAcA,MAAa,+BAA+B,IAAI,IAAI;CAClD;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,CAAC;;;;;;;;;AA0BD,MAAM,sBAAsB,OAAO,IAAI,mBAAmB;AAC1D,MAAM,gBAAgB,OAAO,IAAI,YAAY;AAC7C,MAAM,gBAAgB,OAAO,IAAI,YAAY;;;;;;;;AAS7C,SAAgB,0BACd,OACiD;CACjD,IAAI,OAAO,UAAU,YACnB,OAAO;CAGT,IACE,OAAO,UAAU,YACjB,UAAU,QACV,MAAM,QAAQ,KAAK,KACnB,eAAe,KAAK,KACpB,EAAE,cAAc,QAEhB,OAAO;CAGT,MAAM,UAAW,MAAgC;CAEjD,OACE,YAAY,uBACZ,YAAY,iBACZ,YAAY;AAEhB;;;;;AAMA,SAAgB,0BACd,QACA,QAAiC,CAAC,GACrB;CACb,IAAI,0BAA0B,MAAM,GAClC,OAAO,cAAc,QAAQ,KAAK;CAGpC,OAAO;AACT;;;;;AAMA,MAAM,mCAAmC,IAAI,IAAiB;CAC5D;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,CAAC;;;;;;;;;;;AAiBD,SAAgB,0BACd,SACA,sBAGwB;CACxB,OAAO,IAAI,MAAM,SAAmC,EAClD,IAAI,QAAQ,UAAU,UAAU;EAC9B,IACE,OAAO,aAAa,YACpB,iCAAiC,IAAI,QAAQ,KAC7C,YAAY,QAEZ,OAAO,QAAQ,IAAI,QAAQ,UAAU,QAAQ;EAI/C,MAAM,iBAAiB,qBAAqB,QAAQ;EACpD,OAAO,YAAY;EACnB,OAAO;CACT,EACF,CAAC;AACH"}
1
+ {"version":3,"file":"scoped-render.mjs","names":[],"sources":["../../../src/create-config/for-resources/scoped-render.ts"],"sourcesContent":["import {\n createElement,\n isValidElement,\n type ComponentType,\n type JSX,\n type ReactNode,\n} from 'react';\n\n/**\n * Names a scoped component cannot use. Scoped components are attached to\n * function objects, so they collide with the component's own statics and with\n * non-writable `Function.prototype` properties. `__proto__` is reserved so\n * assignment cannot hit the prototype setter on a normal object.\n */\nexport const reservedScopedComponentNames = new Set([\n '__proto__',\n 'apply',\n 'arguments',\n 'bind',\n 'call',\n 'caller',\n 'displayName',\n 'length',\n 'makeComposable',\n 'name',\n 'props',\n 'prototype',\n 'resource',\n 'state',\n]);\n\n/**\n * Values a createComponent / scoped-component `render` may return.\n *\n * Alongside rendered nodes, a component type is allowed — the type constituent\n * of a React element — so factories like `createDataTable(columns)` can be\n * returned directly and mounted with the call-site props.\n *\n * At runtime, `resolveScopedRenderResult` distinguishes component types from\n * nodes (including portals). Getting that wrong mounts a portal via\n * `createElement` and blows up with an invalid-element-type error.\n */\n// Returned components declare their own props; a concrete props parameter would\n// be contravariant and reject the factories callers actually return.\n// eslint-disable-next-line @typescript-eslint/no-explicit-any -- see above\nexport type ScopedRenderResult = ReactNode | ComponentType<any>;\n\n/**\n * `$$typeof` tags for object component wrappers that `createElement` accepts\n * as `type` (forwardRef, memo, lazy).\n *\n * Do not treat \"any object with `$$typeof`\" as a component: portals also have\n * `$$typeof` (`Symbol.for('react.portal')`) and `isValidElement(portal)` is\n * false, so a naive check would mis-classify them.\n */\nconst reactForwardRefType = Symbol.for('react.forward_ref');\nconst reactMemoType = Symbol.for('react.memo');\nconst reactLazyType = Symbol.for('react.lazy');\n\n/**\n * True when `value` can be passed as the `type` argument to `createElement`.\n *\n * Functions always qualify. Object wrappers qualify only for the forwardRef /\n * memo / lazy tags above — not portals or other React nodes that happen to\n * carry `$$typeof`.\n */\nexport function isRenderableComponentType(\n value: unknown,\n): value is ComponentType<Record<string, unknown>> {\n if (typeof value === 'function') {\n return true;\n }\n\n if (\n typeof value !== 'object' ||\n value === null ||\n Array.isArray(value) ||\n isValidElement(value) ||\n !('$$typeof' in value)\n ) {\n return false;\n }\n\n const typeTag = (value as { $$typeof: unknown }).$$typeof;\n\n return (\n typeTag === reactForwardRefType ||\n typeTag === reactMemoType ||\n typeTag === reactLazyType\n );\n}\n\n/**\n * If `render` returned a component type, mount it with `props`; otherwise\n * return the node as-is (elements, portals, null, etc.).\n */\nexport function resolveScopedRenderResult(\n result: ScopedRenderResult,\n props: Record<string, unknown> = {},\n): JSX.Element {\n if (isRenderableComponentType(result)) {\n return createElement(result, props);\n }\n\n return result as JSX.Element;\n}\n\n/**\n * Runtime counterpart of `ScopedComponentCompoundStaticKey` — keys that must\n * not be treated as compound component statics on a scoped wrapper.\n */\nexport const reservedScopedCompoundStaticKeys = [\n 'apply',\n 'arguments',\n 'bind',\n 'call',\n 'caller',\n 'childContextTypes',\n 'contextTypes',\n 'defaultProps',\n 'displayName',\n 'length',\n 'name',\n 'propTypes',\n 'PropTypes',\n 'prototype',\n 'toLocaleString',\n 'toString',\n 'valueOf',\n '$$typeof',\n] as const;\n\nconst reservedCompoundKeys = new Set<PropertyKey>(reservedScopedCompoundStaticKeys);\n\nconst compoundInitials = [\n 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',\n 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',\n] as const;\n\nexport type ScopedCompoundName = `${typeof compoundInitials[number]}${string}`;\n\nfunction isCompoundName(key: string): key is ScopedCompoundName {\n return compoundInitials.some((initial) => key.startsWith(initial));\n}\n\ntype ScopedComponentWrapper = ((\n props?: Record<string, unknown>,\n) => JSX.Element) &\n Record<string, unknown>;\n\n/**\n * Exposes compound statics (e.g. `DataTable.Loading`) on a scoped wrapper so\n * runtime matches `ScopedComponentCompoundStatics`.\n *\n * Why a Proxy: JSX reads `components.DataTable.Loading` while building the\n * element tree — before `DataTable` itself renders — so statics cannot be\n * copied only after the first `render` call. Property access lazily creates a\n * stable wrapper component that re-runs the scoped `render` under context and\n * mounts the matching static from the returned component type.\n */\nexport function withScopedCompoundStatics(\n wrapper: (props?: Record<string, unknown>) => JSX.Element,\n createCompoundStatic: (\n staticName: string,\n ) => (ownProps?: Record<string, unknown>) => JSX.Element,\n): ScopedComponentWrapper {\n return new Proxy(wrapper as ScopedComponentWrapper, {\n get(target, property, receiver) {\n if (\n typeof property !== 'string' ||\n !isCompoundName(property) ||\n reservedCompoundKeys.has(property) ||\n property in target\n ) {\n return Reflect.get(target, property, receiver);\n }\n\n // Cache on the target so repeated `.Loading` access keeps one identity.\n const CompoundStatic = createCompoundStatic(property);\n target[property] = CompoundStatic;\n return CompoundStatic;\n },\n });\n}\n"],"mappings":";;;;;;;;;AAcA,MAAa,+BAA+B,IAAI,IAAI;CAClD;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,CAAC;;;;;;;;;AA0BD,MAAM,sBAAsB,OAAO,IAAI,mBAAmB;AAC1D,MAAM,gBAAgB,OAAO,IAAI,YAAY;AAC7C,MAAM,gBAAgB,OAAO,IAAI,YAAY;;;;;;;;AAS7C,SAAgB,0BACd,OACiD;CACjD,IAAI,OAAO,UAAU,YACnB,OAAO;CAGT,IACE,OAAO,UAAU,YACjB,UAAU,QACV,MAAM,QAAQ,KAAK,KACnB,eAAe,KAAK,KACpB,EAAE,cAAc,QAEhB,OAAO;CAGT,MAAM,UAAW,MAAgC;CAEjD,OACE,YAAY,uBACZ,YAAY,iBACZ,YAAY;AAEhB;;;;;AAMA,SAAgB,0BACd,QACA,QAAiC,CAAC,GACrB;CACb,IAAI,0BAA0B,MAAM,GAClC,OAAO,cAAc,QAAQ,KAAK;CAGpC,OAAO;AACT;;;;;AAMA,MAAa,mCAAmC;CAC9C;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAEA,MAAM,uBAAuB,IAAI,IAAiB,gCAAgC;AAElF,MAAM,mBAAmB;CACvB;CAAK;CAAK;CAAK;CAAK;CAAK;CAAK;CAAK;CAAK;CAAK;CAAK;CAAK;CAAK;CAC5D;CAAK;CAAK;CAAK;CAAK;CAAK;CAAK;CAAK;CAAK;CAAK;CAAK;CAAK;CAAK;AAC9D;AAIA,SAAS,eAAe,KAAwC;CAC9D,OAAO,iBAAiB,MAAM,YAAY,IAAI,WAAW,OAAO,CAAC;AACnE;;;;;;;;;;;AAiBA,SAAgB,0BACd,SACA,sBAGwB;CACxB,OAAO,IAAI,MAAM,SAAmC,EAClD,IAAI,QAAQ,UAAU,UAAU;EAC9B,IACE,OAAO,aAAa,YACpB,CAAC,eAAe,QAAQ,KACxB,qBAAqB,IAAI,QAAQ,KACjC,YAAY,QAEZ,OAAO,QAAQ,IAAI,QAAQ,UAAU,QAAQ;EAI/C,MAAM,iBAAiB,qBAAqB,QAAQ;EACpD,OAAO,YAAY;EACnB,OAAO;CACT,EACF,CAAC;AACH"}
@@ -1,6 +1,6 @@
1
1
  import { LazyResourceErrorComponent, LazyResourceLoadingComponent, LazyResourceStates } from "../lazy/types.cjs";
2
2
  import { AsStateComposable, StateComposable, StateComposableOptions } from "./state-composable.cjs";
3
- import { AnyRenderStateDefinition, CreateLayoutBuildingBlocks, CreateLayoutBuildingBlocksArguments, CreateLayoutBuildingBlocksResult, CreateRenderState, CreateRenderStateBuilderArguments, CreateRenderStateBuilderResult, CreateRenderStateFromState, DeferredRenderState, DefineLayoutComposables, LayoutComposablesDefinition, LazyRenderState, RenderStateCallProps, RenderStateCallback, RenderStateComposablesDefinition, RenderStateContext, RenderStateFragment, RenderStateName, RenderStateOverloads, RenderStateProps, RenderStateReferences, TypedRenderStateCallback } from "./render-state.cjs";
3
+ import { AnyRenderStateDefinition, BuiltinRenderStateName, CreateLayoutBuildingBlocks, CreateLayoutBuildingBlocksArguments, CreateLayoutBuildingBlocksResult, CreateRenderState, CreateRenderStateBuilderArguments, CreateRenderStateBuilderResult, CreateRenderStateFromState, DeferredRenderState, DefineLayoutComposables, LayoutComposablesDefinition, LazyRenderState, RenderStateCallProps, RenderStateCallback, RenderStateComposablesDefinition, RenderStateContext, RenderStateFragment, RenderStateName, RenderStateOverloads, RenderStateProps, RenderStateReferences, TypedRenderStateCallback } from "./render-state.cjs";
4
4
  import { BaseResourceConfigComponents, ResourceConfig, ResourceConfigComponentKey, ResourceConfigComponents, ResourceConfigInput, ResourceConfigMap, SharedResourceConfigOptions, SubResourceConfig, SubResourceConfigComponentsFor } from "./types.cjs";
5
5
  import { ComponentPathVariable, ExtractPathVariables, PATH_VARIABLE_IDENTIFIER, PathHasVariables, PathVariable, ResourcePathVariable, SubResourcePathVariable } from "./paths/variables.cjs";
6
6
  import { ConfigResourceKeys, ConfigSubResourceKeys, ParameterizedEntryPath, ParameterizedResourcePath, PathComponentKeys, PathResourceCandidates, PathSubResourceKeys, PathVariables, PathVariablesForResource, ResolveParameterizedPathValue, ResourceSubResourceKeys } from "./paths/types.cjs";
@@ -1,6 +1,6 @@
1
1
  import { LazyResourceErrorComponent, LazyResourceLoadingComponent, LazyResourceStates } from "../lazy/types.mjs";
2
2
  import { AsStateComposable, StateComposable, StateComposableOptions } from "./state-composable.mjs";
3
- import { AnyRenderStateDefinition, CreateLayoutBuildingBlocks, CreateLayoutBuildingBlocksArguments, CreateLayoutBuildingBlocksResult, CreateRenderState, CreateRenderStateBuilderArguments, CreateRenderStateBuilderResult, CreateRenderStateFromState, DeferredRenderState, DefineLayoutComposables, LayoutComposablesDefinition, LazyRenderState, RenderStateCallProps, RenderStateCallback, RenderStateComposablesDefinition, RenderStateContext, RenderStateFragment, RenderStateName, RenderStateOverloads, RenderStateProps, RenderStateReferences, TypedRenderStateCallback } from "./render-state.mjs";
3
+ import { AnyRenderStateDefinition, BuiltinRenderStateName, CreateLayoutBuildingBlocks, CreateLayoutBuildingBlocksArguments, CreateLayoutBuildingBlocksResult, CreateRenderState, CreateRenderStateBuilderArguments, CreateRenderStateBuilderResult, CreateRenderStateFromState, DeferredRenderState, DefineLayoutComposables, LayoutComposablesDefinition, LazyRenderState, RenderStateCallProps, RenderStateCallback, RenderStateComposablesDefinition, RenderStateContext, RenderStateFragment, RenderStateName, RenderStateOverloads, RenderStateProps, RenderStateReferences, TypedRenderStateCallback } from "./render-state.mjs";
4
4
  import { BaseResourceConfigComponents, ResourceConfig, ResourceConfigComponentKey, ResourceConfigComponents, ResourceConfigInput, ResourceConfigMap, SharedResourceConfigOptions, SubResourceConfig, SubResourceConfigComponentsFor } from "./types.mjs";
5
5
  import { ComponentPathVariable, ExtractPathVariables, PATH_VARIABLE_IDENTIFIER, PathHasVariables, PathVariable, ResourcePathVariable, SubResourcePathVariable } from "./paths/variables.mjs";
6
6
  import { ConfigResourceKeys, ConfigSubResourceKeys, ParameterizedEntryPath, ParameterizedResourcePath, PathComponentKeys, PathResourceCandidates, PathSubResourceKeys, PathVariables, PathVariablesForResource, ResolveParameterizedPathValue, ResourceSubResourceKeys } from "./paths/types.mjs";
@@ -34,15 +34,36 @@ function inspectDefinition(resources, source) {
34
34
  resourceIds
35
35
  };
36
36
  }
37
+ const inspectedComposables = /* @__PURE__ */ new WeakSet();
38
+ /** Mark existing roots only; never add wrappers or forward props to user components. */
39
+ function markInspectionRoots(children, owners) {
40
+ if (process.env.NODE_ENV === "production") return children;
41
+ if (Array.isArray(children)) return children.map((child) => markInspectionRoots(child, owners));
42
+ if (!(0, react.isValidElement)(children)) return children;
43
+ if (children.type === react.Fragment) return (0, react.cloneElement)(children, { children: markInspectionRoots(children.props.children, owners) });
44
+ if (typeof children.type !== "string" && (typeof children.type !== "object" || !inspectedComposables.has(children.type))) return children;
45
+ let previous = [];
46
+ try {
47
+ const parsed = JSON.parse(children.props["data-rl-owners"] ?? "[]");
48
+ if (Array.isArray(parsed)) previous = parsed.filter((id) => typeof id === "string");
49
+ } catch {}
50
+ return (0, react.cloneElement)(children, { "data-rl-owners": JSON.stringify([...new Set([...previous, ...owners])]) });
51
+ }
37
52
  /** Preserve composable metadata while measuring committed React instances, not declarations. */
38
53
  function trackComposable(component, store, id) {
39
54
  const Tracked = (0, react.forwardRef)(function InspectedComposable(props, ref) {
40
55
  (0, react.useLayoutEffect)(() => store.mount(id), [store, id]);
41
- return (0, react.createElement)(component, ref == null ? props : {
56
+ const inspectedProps = process.env.NODE_ENV === "production" ? props : {
42
57
  ...props,
58
+ "data-rl-node": id,
59
+ "data-rl-composable": component.displayName ?? "Composable"
60
+ };
61
+ return (0, react.createElement)(component, ref == null ? inspectedProps : {
62
+ ...inspectedProps,
43
63
  ref
44
64
  });
45
65
  });
66
+ inspectedComposables.add(Tracked);
46
67
  for (const key of Reflect.ownKeys(component)) {
47
68
  if (typeof key === "string" && [
48
69
  "name",
@@ -63,5 +84,6 @@ function trackComposable(component, store, id) {
63
84
 
64
85
  //#endregion
65
86
  exports.inspectDefinition = inspectDefinition;
87
+ exports.markInspectionRoots = markInspectionRoots;
66
88
  exports.trackComposable = trackComposable;
67
89
  //# sourceMappingURL=inspection.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"inspection.cjs","names":[],"sources":["../../src/create-config/inspection.ts"],"sourcesContent":["import {\n createElement,\n forwardRef,\n useLayoutEffect,\n type ComponentType,\n} from 'react';\nimport {\n createInspectionStore,\n inspectionId,\n type InspectionStore,\n type SourceLocation,\n} from '@jfdevelops/react-layout-devtools-core';\nimport type { ResourceDefinition } from '../resource';\n\nexport function inspectDefinition(\n resources: readonly ResourceDefinition[],\n source?: SourceLocation\n) {\n const store = createInspectionStore();\n const definition = store.node({\n id: inspectionId('definition'),\n kind: 'definition',\n label: 'Layout definition',\n source,\n });\n const resourceIds = new Map<string, string>();\n\n function visit(\n items: readonly ResourceDefinition[],\n parent: string,\n prefix = ''\n ) {\n for (const item of items) {\n const slug = typeof item === 'string' ? item : item.value;\n const path = prefix ? `${prefix}.${slug}` : slug;\n const id = store.node({\n id: inspectionId('resource'),\n kind: 'resource',\n label: path,\n source,\n details: { path },\n });\n\n resourceIds.set(path, id);\n\n store.edge(parent, id, 'contains');\n\n if (typeof item !== 'string') visit(item.subResources, id, path);\n }\n }\n\n visit(resources, definition);\n\n return { store, definition, resourceIds };\n}\n\nexport interface ActiveInspection {\n store: InspectionStore;\n layout: string;\n resource?: string;\n state: string;\n}\n\n/** Preserve composable metadata while measuring committed React instances, not declarations. */\nexport function trackComposable<T extends object>(\n component: T,\n store: InspectionStore,\n id: string\n): T {\n const Tracked = forwardRef<unknown, Record<string, unknown>>(\n function InspectedComposable(props, ref) {\n useLayoutEffect(() => store.mount(id), [store, id]);\n\n return createElement(\n component as ComponentType<Record<string, unknown>>,\n ref == null ? props : { ...props, ref }\n );\n }\n );\n\n for (const key of Reflect.ownKeys(component)) {\n if (\n typeof key === 'string' &&\n [\n 'name',\n 'length',\n 'prototype',\n 'caller',\n 'arguments',\n '$$typeof',\n 'render',\n 'compare',\n 'type',\n ].includes(key)\n )\n continue;\n\n const descriptor = Object.getOwnPropertyDescriptor(component, key);\n\n if (descriptor) Object.defineProperty(Tracked, key, descriptor);\n }\n\n return Tracked as unknown as T;\n}\n"],"mappings":";;;;AAcA,SAAgB,kBACd,WACA,QACA;CACA,MAAM,0EAA8B;CACpC,MAAM,aAAa,MAAM,KAAK;EAC5B,6DAAiB,YAAY;EAC7B,MAAM;EACN,OAAO;EACP;CACF,CAAC;CACD,MAAM,8BAAc,IAAI,IAAoB;CAE5C,SAAS,MACP,OACA,QACA,SAAS,IACT;EACA,KAAK,MAAM,QAAQ,OAAO;GACxB,MAAM,OAAO,OAAO,SAAS,WAAW,OAAO,KAAK;GACpD,MAAM,OAAO,SAAS,GAAG,OAAO,GAAG,SAAS;GAC5C,MAAM,KAAK,MAAM,KAAK;IACpB,6DAAiB,UAAU;IAC3B,MAAM;IACN,OAAO;IACP;IACA,SAAS,EAAE,KAAK;GAClB,CAAC;GAED,YAAY,IAAI,MAAM,EAAE;GAExB,MAAM,KAAK,QAAQ,IAAI,UAAU;GAEjC,IAAI,OAAO,SAAS,UAAU,MAAM,KAAK,cAAc,IAAI,IAAI;EACjE;CACF;CAEA,MAAM,WAAW,UAAU;CAE3B,OAAO;EAAE;EAAO;EAAY;CAAY;AAC1C;;AAUA,SAAgB,gBACd,WACA,OACA,IACG;CACH,MAAM,gCACJ,SAAS,oBAAoB,OAAO,KAAK;EACvC,iCAAsB,MAAM,MAAM,EAAE,GAAG,CAAC,OAAO,EAAE,CAAC;EAElD,gCACE,WACA,OAAO,OAAO,QAAQ;GAAE,GAAG;GAAO;EAAI,CACxC;CACF,CACF;CAEA,KAAK,MAAM,OAAO,QAAQ,QAAQ,SAAS,GAAG;EAC5C,IACE,OAAO,QAAQ,YACf;GACE;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF,EAAE,SAAS,GAAG,GAEd;EAEF,MAAM,aAAa,OAAO,yBAAyB,WAAW,GAAG;EAEjE,IAAI,YAAY,OAAO,eAAe,SAAS,KAAK,UAAU;CAChE;CAEA,OAAO;AACT"}
1
+ {"version":3,"file":"inspection.cjs","names":["Fragment"],"sources":["../../src/create-config/inspection.ts"],"sourcesContent":["import {\n createElement,\n cloneElement,\n Fragment,\n isValidElement,\n type ReactNode,\n forwardRef,\n useLayoutEffect,\n type ComponentType,\n} from 'react';\nimport {\n createInspectionStore,\n inspectionId,\n type InspectionStore,\n type SourceLocation,\n} from '@jfdevelops/react-layout-devtools-core';\nimport type { ResourceDefinition } from '../resource';\n\nexport function inspectDefinition(\n resources: readonly ResourceDefinition[],\n source?: SourceLocation\n) {\n const store = createInspectionStore();\n const definition = store.node({\n id: inspectionId('definition'),\n kind: 'definition',\n label: 'Layout definition',\n source,\n });\n const resourceIds = new Map<string, string>();\n\n function visit(\n items: readonly ResourceDefinition[],\n parent: string,\n prefix = ''\n ) {\n for (const item of items) {\n const slug = typeof item === 'string' ? item : item.value;\n const path = prefix ? `${prefix}.${slug}` : slug;\n const id = store.node({\n id: inspectionId('resource'),\n kind: 'resource',\n label: path,\n source,\n details: { path },\n });\n\n resourceIds.set(path, id);\n\n store.edge(parent, id, 'contains');\n\n if (typeof item !== 'string') visit(item.subResources, id, path);\n }\n }\n\n visit(resources, definition);\n\n return { store, definition, resourceIds };\n}\n\nexport interface ActiveInspection {\n store: InspectionStore;\n layout: string;\n resource?: string;\n state: string;\n}\n\nconst inspectedComposables = new WeakSet<object>();\n\n/** Mark existing roots only; never add wrappers or forward props to user components. */\nexport function markInspectionRoots(\n children: ReactNode,\n owners: readonly string[]\n): ReactNode {\n if (process.env.NODE_ENV === 'production') return children;\n if (Array.isArray(children))\n return children.map((child) => markInspectionRoots(child, owners));\n if (\n !isValidElement<{ children?: ReactNode; 'data-rl-owners'?: string }>(\n children\n )\n )\n return children;\n if (children.type === Fragment) {\n return cloneElement(children, {\n children: markInspectionRoots(children.props.children, owners),\n });\n }\n if (\n typeof children.type !== 'string' &&\n (typeof children.type !== 'object' ||\n !inspectedComposables.has(children.type))\n )\n return children;\n let previous: string[] = [];\n try {\n const parsed: unknown = JSON.parse(\n children.props['data-rl-owners'] ?? '[]'\n );\n if (Array.isArray(parsed))\n previous = parsed.filter((id): id is string => typeof id === 'string');\n } catch {}\n return cloneElement(children, {\n 'data-rl-owners': JSON.stringify([...new Set([...previous, ...owners])]),\n });\n}\n\n/** Preserve composable metadata while measuring committed React instances, not declarations. */\nexport function trackComposable<T extends object>(\n component: T,\n store: InspectionStore,\n id: string\n): T {\n const Tracked = forwardRef<unknown, Record<string, unknown>>(\n function InspectedComposable(props, ref) {\n useLayoutEffect(() => store.mount(id), [store, id]);\n\n const inspectedProps =\n process.env.NODE_ENV === 'production'\n ? props\n : {\n ...props,\n 'data-rl-node': id,\n 'data-rl-composable':\n (component as { displayName?: string }).displayName ??\n 'Composable',\n };\n return createElement(\n component as ComponentType<Record<string, unknown>>,\n ref == null ? inspectedProps : { ...inspectedProps, ref }\n );\n }\n );\n\n inspectedComposables.add(Tracked);\n\n for (const key of Reflect.ownKeys(component)) {\n if (\n typeof key === 'string' &&\n [\n 'name',\n 'length',\n 'prototype',\n 'caller',\n 'arguments',\n '$$typeof',\n 'render',\n 'compare',\n 'type',\n ].includes(key)\n )\n continue;\n\n const descriptor = Object.getOwnPropertyDescriptor(component, key);\n\n if (descriptor) Object.defineProperty(Tracked, key, descriptor);\n }\n\n return Tracked as unknown as T;\n}\n"],"mappings":";;;;AAkBA,SAAgB,kBACd,WACA,QACA;CACA,MAAM,0EAA8B;CACpC,MAAM,aAAa,MAAM,KAAK;EAC5B,6DAAiB,YAAY;EAC7B,MAAM;EACN,OAAO;EACP;CACF,CAAC;CACD,MAAM,8BAAc,IAAI,IAAoB;CAE5C,SAAS,MACP,OACA,QACA,SAAS,IACT;EACA,KAAK,MAAM,QAAQ,OAAO;GACxB,MAAM,OAAO,OAAO,SAAS,WAAW,OAAO,KAAK;GACpD,MAAM,OAAO,SAAS,GAAG,OAAO,GAAG,SAAS;GAC5C,MAAM,KAAK,MAAM,KAAK;IACpB,6DAAiB,UAAU;IAC3B,MAAM;IACN,OAAO;IACP;IACA,SAAS,EAAE,KAAK;GAClB,CAAC;GAED,YAAY,IAAI,MAAM,EAAE;GAExB,MAAM,KAAK,QAAQ,IAAI,UAAU;GAEjC,IAAI,OAAO,SAAS,UAAU,MAAM,KAAK,cAAc,IAAI,IAAI;EACjE;CACF;CAEA,MAAM,WAAW,UAAU;CAE3B,OAAO;EAAE;EAAO;EAAY;CAAY;AAC1C;AASA,MAAM,uCAAuB,IAAI,QAAgB;;AAGjD,SAAgB,oBACd,UACA,QACW;CACX,IAAI,QAAQ,IAAI,aAAa,cAAc,OAAO;CAClD,IAAI,MAAM,QAAQ,QAAQ,GACxB,OAAO,SAAS,KAAK,UAAU,oBAAoB,OAAO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
- import { createElement, forwardRef, useLayoutEffect } from "react";
1
+ import { Fragment, cloneElement, createElement, forwardRef, isValidElement, useLayoutEffect } from "react";
2
2
  import { createInspectionStore, inspectionId } from "@jfdevelops/react-layout-devtools-core";
3
3
 
4
4
  //#region src/create-config/inspection.ts
@@ -34,15 +34,36 @@ function inspectDefinition(resources, source) {
34
34
  resourceIds
35
35
  };
36
36
  }
37
+ const inspectedComposables = /* @__PURE__ */ new WeakSet();
38
+ /** Mark existing roots only; never add wrappers or forward props to user components. */
39
+ function markInspectionRoots(children, owners) {
40
+ if (process.env.NODE_ENV === "production") return children;
41
+ if (Array.isArray(children)) return children.map((child) => markInspectionRoots(child, owners));
42
+ if (!isValidElement(children)) return children;
43
+ if (children.type === Fragment) return cloneElement(children, { children: markInspectionRoots(children.props.children, owners) });
44
+ if (typeof children.type !== "string" && (typeof children.type !== "object" || !inspectedComposables.has(children.type))) return children;
45
+ let previous = [];
46
+ try {
47
+ const parsed = JSON.parse(children.props["data-rl-owners"] ?? "[]");
48
+ if (Array.isArray(parsed)) previous = parsed.filter((id) => typeof id === "string");
49
+ } catch {}
50
+ return cloneElement(children, { "data-rl-owners": JSON.stringify([...new Set([...previous, ...owners])]) });
51
+ }
37
52
  /** Preserve composable metadata while measuring committed React instances, not declarations. */
38
53
  function trackComposable(component, store, id) {
39
54
  const Tracked = forwardRef(function InspectedComposable(props, ref) {
40
55
  useLayoutEffect(() => store.mount(id), [store, id]);
41
- return createElement(component, ref == null ? props : {
56
+ const inspectedProps = process.env.NODE_ENV === "production" ? props : {
42
57
  ...props,
58
+ "data-rl-node": id,
59
+ "data-rl-composable": component.displayName ?? "Composable"
60
+ };
61
+ return createElement(component, ref == null ? inspectedProps : {
62
+ ...inspectedProps,
43
63
  ref
44
64
  });
45
65
  });
66
+ inspectedComposables.add(Tracked);
46
67
  for (const key of Reflect.ownKeys(component)) {
47
68
  if (typeof key === "string" && [
48
69
  "name",
@@ -62,5 +83,5 @@ function trackComposable(component, store, id) {
62
83
  }
63
84
 
64
85
  //#endregion
65
- export { inspectDefinition, trackComposable };
86
+ export { inspectDefinition, markInspectionRoots, trackComposable };
66
87
  //# sourceMappingURL=inspection.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"inspection.mjs","names":[],"sources":["../../src/create-config/inspection.ts"],"sourcesContent":["import {\n createElement,\n forwardRef,\n useLayoutEffect,\n type ComponentType,\n} from 'react';\nimport {\n createInspectionStore,\n inspectionId,\n type InspectionStore,\n type SourceLocation,\n} from '@jfdevelops/react-layout-devtools-core';\nimport type { ResourceDefinition } from '../resource';\n\nexport function inspectDefinition(\n resources: readonly ResourceDefinition[],\n source?: SourceLocation\n) {\n const store = createInspectionStore();\n const definition = store.node({\n id: inspectionId('definition'),\n kind: 'definition',\n label: 'Layout definition',\n source,\n });\n const resourceIds = new Map<string, string>();\n\n function visit(\n items: readonly ResourceDefinition[],\n parent: string,\n prefix = ''\n ) {\n for (const item of items) {\n const slug = typeof item === 'string' ? item : item.value;\n const path = prefix ? `${prefix}.${slug}` : slug;\n const id = store.node({\n id: inspectionId('resource'),\n kind: 'resource',\n label: path,\n source,\n details: { path },\n });\n\n resourceIds.set(path, id);\n\n store.edge(parent, id, 'contains');\n\n if (typeof item !== 'string') visit(item.subResources, id, path);\n }\n }\n\n visit(resources, definition);\n\n return { store, definition, resourceIds };\n}\n\nexport interface ActiveInspection {\n store: InspectionStore;\n layout: string;\n resource?: string;\n state: string;\n}\n\n/** Preserve composable metadata while measuring committed React instances, not declarations. */\nexport function trackComposable<T extends object>(\n component: T,\n store: InspectionStore,\n id: string\n): T {\n const Tracked = forwardRef<unknown, Record<string, unknown>>(\n function InspectedComposable(props, ref) {\n useLayoutEffect(() => store.mount(id), [store, id]);\n\n return createElement(\n component as ComponentType<Record<string, unknown>>,\n ref == null ? props : { ...props, ref }\n );\n }\n );\n\n for (const key of Reflect.ownKeys(component)) {\n if (\n typeof key === 'string' &&\n [\n 'name',\n 'length',\n 'prototype',\n 'caller',\n 'arguments',\n '$$typeof',\n 'render',\n 'compare',\n 'type',\n ].includes(key)\n )\n continue;\n\n const descriptor = Object.getOwnPropertyDescriptor(component, key);\n\n if (descriptor) Object.defineProperty(Tracked, key, descriptor);\n }\n\n return Tracked as unknown as T;\n}\n"],"mappings":";;;;AAcA,SAAgB,kBACd,WACA,QACA;CACA,MAAM,QAAQ,sBAAsB;CACpC,MAAM,aAAa,MAAM,KAAK;EAC5B,IAAI,aAAa,YAAY;EAC7B,MAAM;EACN,OAAO;EACP;CACF,CAAC;CACD,MAAM,8BAAc,IAAI,IAAoB;CAE5C,SAAS,MACP,OACA,QACA,SAAS,IACT;EACA,KAAK,MAAM,QAAQ,OAAO;GACxB,MAAM,OAAO,OAAO,SAAS,WAAW,OAAO,KAAK;GACpD,MAAM,OAAO,SAAS,GAAG,OAAO,GAAG,SAAS;GAC5C,MAAM,KAAK,MAAM,KAAK;IACpB,IAAI,aAAa,UAAU;IAC3B,MAAM;IACN,OAAO;IACP;IACA,SAAS,EAAE,KAAK;GAClB,CAAC;GAED,YAAY,IAAI,MAAM,EAAE;GAExB,MAAM,KAAK,QAAQ,IAAI,UAAU;GAEjC,IAAI,OAAO,SAAS,UAAU,MAAM,KAAK,cAAc,IAAI,IAAI;EACjE;CACF;CAEA,MAAM,WAAW,UAAU;CAE3B,OAAO;EAAE;EAAO;EAAY;CAAY;AAC1C;;AAUA,SAAgB,gBACd,WACA,OACA,IACG;CACH,MAAM,UAAU,WACd,SAAS,oBAAoB,OAAO,KAAK;EACvC,sBAAsB,MAAM,MAAM,EAAE,GAAG,CAAC,OAAO,EAAE,CAAC;EAElD,OAAO,cACL,WACA,OAAO,OAAO,QAAQ;GAAE,GAAG;GAAO;EAAI,CACxC;CACF,CACF;CAEA,KAAK,MAAM,OAAO,QAAQ,QAAQ,SAAS,GAAG;EAC5C,IACE,OAAO,QAAQ,YACf;GACE;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF,EAAE,SAAS,GAAG,GAEd;EAEF,MAAM,aAAa,OAAO,yBAAyB,WAAW,GAAG;EAEjE,IAAI,YAAY,OAAO,eAAe,SAAS,KAAK,UAAU;CAChE;CAEA,OAAO;AACT"}
1
+ {"version":3,"file":"inspection.mjs","names":[],"sources":["../../src/create-config/inspection.ts"],"sourcesContent":["import {\n createElement,\n cloneElement,\n Fragment,\n isValidElement,\n type ReactNode,\n forwardRef,\n useLayoutEffect,\n type ComponentType,\n} from 'react';\nimport {\n createInspectionStore,\n inspectionId,\n type InspectionStore,\n type SourceLocation,\n} from '@jfdevelops/react-layout-devtools-core';\nimport type { ResourceDefinition } from '../resource';\n\nexport function inspectDefinition(\n resources: readonly ResourceDefinition[],\n source?: SourceLocation\n) {\n const store = createInspectionStore();\n const definition = store.node({\n id: inspectionId('definition'),\n kind: 'definition',\n label: 'Layout definition',\n source,\n });\n const resourceIds = new Map<string, string>();\n\n function visit(\n items: readonly ResourceDefinition[],\n parent: string,\n prefix = ''\n ) {\n for (const item of items) {\n const slug = typeof item === 'string' ? item : item.value;\n const path = prefix ? `${prefix}.${slug}` : slug;\n const id = store.node({\n id: inspectionId('resource'),\n kind: 'resource',\n label: path,\n source,\n details: { path },\n });\n\n resourceIds.set(path, id);\n\n store.edge(parent, id, 'contains');\n\n if (typeof item !== 'string') visit(item.subResources, id, path);\n }\n }\n\n visit(resources, definition);\n\n return { store, definition, resourceIds };\n}\n\nexport interface ActiveInspection {\n store: InspectionStore;\n layout: string;\n resource?: string;\n state: string;\n}\n\nconst inspectedComposables = new WeakSet<object>();\n\n/** Mark existing roots only; never add wrappers or forward props to user components. */\nexport function markInspectionRoots(\n children: ReactNode,\n owners: readonly string[]\n): ReactNode {\n if (process.env.NODE_ENV === 'production') return children;\n if (Array.isArray(children))\n return children.map((child) => markInspectionRoots(child, owners));\n if (\n !isValidElement<{ children?: ReactNode; 'data-rl-owners'?: string }>(\n children\n )\n )\n return children;\n if (children.type === Fragment) {\n return cloneElement(children, {\n children: markInspectionRoots(children.props.children, owners),\n });\n }\n if (\n typeof children.type !== 'string' &&\n (typeof children.type !== 'object' ||\n !inspectedComposables.has(children.type))\n )\n return children;\n let previous: string[] = [];\n try {\n const parsed: unknown = JSON.parse(\n children.props['data-rl-owners'] ?? '[]'\n );\n if (Array.isArray(parsed))\n previous = parsed.filter((id): id is string => typeof id === 'string');\n } catch {}\n return cloneElement(children, {\n 'data-rl-owners': JSON.stringify([...new Set([...previous, ...owners])]),\n });\n}\n\n/** Preserve composable metadata while measuring committed React instances, not declarations. */\nexport function trackComposable<T extends object>(\n component: T,\n store: InspectionStore,\n id: string\n): T {\n const Tracked = forwardRef<unknown, Record<string, unknown>>(\n function InspectedComposable(props, ref) {\n useLayoutEffect(() => store.mount(id), [store, id]);\n\n const inspectedProps =\n process.env.NODE_ENV === 'production'\n ? props\n : {\n ...props,\n 'data-rl-node': id,\n 'data-rl-composable':\n (component as { displayName?: string }).displayName ??\n 'Composable',\n };\n return createElement(\n component as ComponentType<Record<string, unknown>>,\n ref == null ? inspectedProps : { ...inspectedProps, ref }\n );\n }\n );\n\n inspectedComposables.add(Tracked);\n\n for (const key of Reflect.ownKeys(component)) {\n if (\n typeof key === 'string' &&\n [\n 'name',\n 'length',\n 'prototype',\n 'caller',\n 'arguments',\n '$$typeof',\n 'render',\n 'compare',\n 'type',\n ].includes(key)\n )\n continue;\n\n const descriptor = Object.getOwnPropertyDescriptor(component, key);\n\n if (descriptor) Object.defineProperty(Tracked, key, descriptor);\n }\n\n return Tracked as unknown as T;\n}\n"],"mappings":";;;;AAkBA,SAAgB,kBACd,WACA,QACA;CACA,MAAM,QAAQ,sBAAsB;CACpC,MAAM,aAAa,MAAM,KAAK;EAC5B,IAAI,aAAa,YAAY;EAC7B,MAAM;EACN,OAAO;EACP;CACF,CAAC;CACD,MAAM,8BAAc,IAAI,IAAoB;CAE5C,SAAS,MACP,OACA,QACA,SAAS,IACT;EACA,KAAK,MAAM,QAAQ,OAAO;GACxB,MAAM,OAAO,OAAO,SAAS,WAAW,OAAO,KAAK;GACp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;EACvC,sBAAsB,MAAM,MAAM,EAAE,GAAG,CAAC,OAAO,EAAE,CAAC;EAElD,MAAM,iBACJ,QAAQ,IAAI,aAAa,eACrB,QACA;GACE,GAAG;GACH,gBAAgB;GAChB,sBACG,UAAuC,eACxC;EACJ;EACN,OAAO,cACL,WACA,OAAO,OAAO,iBAAiB;GAAE,GAAG;GAAgB;EAAI,CAC1D;CACF,CACF;CAEA,qBAAqB,IAAI,OAAO;CAEhC,KAAK,MAAM,OAAO,QAAQ,QAAQ,SAAS,GAAG;EAC5C,IACE,OAAO,QAAQ,YACf;GACE;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF,EAAE,SAAS,GAAG,GAEd;EAEF,MAAM,aAAa,OAAO,yBAAyB,WAAW,GAAG;EAEjE,IAAI,YAAY,OAAO,eAAe,SAAS,KAAK,UAAU;CAChE;CAEA,OAAO;AACT"}
@@ -15,10 +15,6 @@ function findDefinedLayoutComponent(module, resource) {
15
15
  function createLazyResourceLayout(options, defaults, hooks = {}) {
16
16
  const runtime = options;
17
17
  const resource = runtime.resource;
18
- const states = {
19
- ...defaults,
20
- ...runtime.states
21
- };
22
18
  const loader = require_create_lazy_loader.createLazyLoader({
23
19
  load: runtime.load,
24
20
  select: (module) => findDefinedLayoutComponent(module, resource),
@@ -28,6 +24,10 @@ function createLazyResourceLayout(options, defaults, hooks = {}) {
28
24
  const members = /* @__PURE__ */ new Map();
29
25
  function createMember(member) {
30
26
  function LazyMember(props) {
27
+ const states = {
28
+ ...typeof defaults === "function" ? defaults() : defaults,
29
+ ...runtime.states
30
+ };
31
31
  const Loading = states.Loading;
32
32
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_lazy_boundary.LazyBoundary, {
33
33
  loader,
@@ -1 +1 @@
1
- {"version":3,"file":"lazy-resource-layout.cjs","names":["definedResourceLayoutComponentSymbol","LazyResourceModuleShapeError","createLazyLoader","LazyBoundary","componentPropDefinitionsSymbol"],"sources":["../../src/create-config/lazy-resource-layout.tsx"],"sourcesContent":["import { type ComponentProps, type ComponentType } from 'react';\nimport { LazyResourceModuleShapeError } from '../errors/lazy-resource-error';\nimport { componentPropDefinitionsSymbol } from '@jfdevelops/react-layout-validator';\nimport type { ResourcePath, ResourceDefinition } from '../resource';\nimport { definedResourceLayoutComponentSymbol } from './render-state';\nimport {\n createLazyLoader,\n type LazyResourceLoadHooks,\n} from '../lazy/create-lazy-loader';\nimport { LazyBoundary } from '../lazy/lazy-boundary';\nimport type {\n LazyHandle,\n LazyOptions,\n LazyResourceStates,\n} from '../lazy/types';\nexport type {\n LazyResourceErrorComponent,\n LazyResourceLoadingComponent,\n LazyResourceStates,\n} from '../lazy/types';\nexport type { LazyResourceLoadHooks } from '../lazy/create-lazy-loader';\n\ntype DefinedLayoutComponent = ComponentType<any> & {\n readonly [definedResourceLayoutComponentSymbol]: true;\n};\n\ntype UnwrapDefinedLayout<Export> = Export extends DefinedLayoutComponent\n ? Export\n : Export extends { Root: infer Root extends DefinedLayoutComponent }\n ? Root\n : never;\n\ntype DefinedLayoutFromModule<Module> = UnwrapDefinedLayout<\n Module[keyof Module]\n>;\n\ntype LazyUnsupportedStatic =\n | 'makeComposable'\n | 'props'\n | 'resource'\n | typeof componentPropDefinitionsSymbol\n | typeof definedResourceLayoutComponentSymbol;\n\n/**\n * Public surface available before a lazy module resolves. Component metadata\n * and composition factories are intentionally omitted because they cannot be\n * read synchronously without loading the module.\n */\nexport type LazyResourceLayoutComponent<Module> = ComponentType<\n ComponentProps<DefinedLayoutFromModule<Module>>\n> &\n LazyHandle &\n Pick<\n DefinedLayoutFromModule<Module>,\n Exclude<keyof DefinedLayoutFromModule<Module>, LazyUnsupportedStatic>\n >;\n\n/** Lazy resource options, sharing import and fallback semantics with lazy states. */\nexport type LazyResourceLayoutOptions<\n Resources extends ReadonlyArray<ResourceDefinition>,\n Module extends Record<string, unknown>,\n> = LazyOptions<Module> & {\n resource: ResourcePath<Resources>;\n states?: LazyResourceStates<ResourcePath<Resources>>;\n};\n\nfunction findDefinedLayoutComponent(\n module: Record<string, unknown>,\n resource: string,\n) {\n const components = Object.values(module)\n .map((value) =>\n typeof value === 'object' && value !== null && 'Root' in value\n ? value.Root\n : value,\n )\n .filter(\n (value): value is DefinedLayoutComponent =>\n typeof value === 'function' &&\n definedResourceLayoutComponentSymbol in value,\n );\n if (components.length !== 1)\n throw new LazyResourceModuleShapeError(resource, components.length);\n return components[0];\n}\n\n/** Cached resource component and its compound states, backed by the shared loader. */\nexport function createLazyResourceLayout<\n Resources extends ReadonlyArray<ResourceDefinition>,\n Module extends Record<string, unknown>,\n>(\n options: LazyResourceLayoutOptions<Resources, Module>,\n defaults: LazyResourceStates<any>,\n hooks: LazyResourceLoadHooks = {},\n): LazyResourceLayoutComponent<Module> {\n const runtime = options as unknown as LazyOptions<Module> & {\n resource: string;\n states?: LazyResourceStates;\n };\n const resource = runtime.resource;\n const states = { ...defaults, ...runtime.states } as LazyResourceStates;\n const loader = createLazyLoader({\n load: runtime.load,\n select: (module) => findDefinedLayoutComponent(module, resource),\n label: resource,\n hooks,\n });\n const members = new Map<string, ComponentType<any>>();\n function createMember(member?: string) {\n function LazyMember(props: Record<string, unknown>) {\n const Loading = states.Loading;\n return (\n <LazyBoundary\n loader={loader}\n member={member}\n resource={resource}\n componentProps={props}\n ErrorComponent={states.Error}\n onMount={hooks.onMount}\n fallback={\n runtime.fallback !== undefined ? (\n runtime.fallback\n ) : Loading ? (\n <Loading resource={resource} />\n ) : null\n }\n />\n );\n }\n LazyMember.displayName = `LazyResource(${resource})${member ? `.${member}` : ''}`;\n Object.defineProperties(LazyMember, {\n preload: { value: loader.preload },\n status: { get: () => loader.status },\n });\n return LazyMember;\n }\n const Component = createMember();\n const reservedStatics = new Set<PropertyKey>([\n 'makeComposable',\n 'props',\n 'resource',\n componentPropDefinitionsSymbol,\n definedResourceLayoutComponentSymbol,\n 'contextTypes',\n 'childContextTypes',\n 'contextType',\n 'propTypes',\n 'defaultProps',\n 'getDerivedStateFromProps',\n 'getDerivedStateFromError',\n 'getDefaultProps',\n '$$typeof',\n '_payload',\n '_init',\n 'render',\n 'compare',\n 'type',\n 'then',\n 'catch',\n 'finally',\n 'toJSON',\n 'asymmetricMatch',\n '__esModule',\n 'default',\n ]);\n return new Proxy(Component, {\n get(target, property, receiver) {\n if (Reflect.has(target, property))\n return Reflect.get(target, property, receiver);\n if (\n typeof property !== 'string' ||\n reservedStatics.has(property) ||\n !/^[A-Z]/.test(property)\n )\n return undefined;\n let component = members.get(property);\n if (!component) {\n component = createMember(property);\n members.set(property, component);\n }\n return component;\n },\n has: (target, property) => Reflect.has(target, property),\n }) as unknown as LazyResourceLayoutComponent<Module>;\n}\n"],"mappings":";;;;;;;;AAkEA,SAAS,2BACP,QACA,UACA;CACA,MAAM,aAAa,OAAO,OAAO,MAAM,EACpC,KAAK,UACJ,OAAO,UAAU,YAAY,UAAU,QAAQ,UAAU,QACrD,MAAM,OACN,KACN,EACC,QACE,UACC,OAAO,UAAU,cACjBA,6DAAwC,KAC5C;CACF,IAAI,WAAW,WAAW,GACxB,MAAM,IAAIC,yDAA6B,UAAU,WAAW,MAAM;CACpE,OAAO,WAAW;AACpB;;AAGA,SAAgB,yBAId,SACA,UACA,QAA+B,CAAC,GACK;CACrC,MAAM,UAAU;CAIhB,MAAM,WAAW,QAAQ;CACzB,MAAM,SAAS;EAAE,GAAG;EAAU,GAAG,QAAQ;CAAO;CAChD,MAAM,SAASC,4CAAiB;EAC9B,MAAM,QAAQ;EACd,SAAS,WAAW,2BAA2B,QAAQ,QAAQ;EAC/D,OAAO;EACP;CACF,CAAC;CACD,MAAM,0BAAU,IAAI,IAAgC;CACpD,SAAS,aAAa,QAAiB;EACrC,SAAS,WAAW,OAAgC;GAClD,MAAM,UAAU,OAAO;GACvB,OACE,2CAACC,oCAAD;IACU;IACA;IACE;IACV,gBAAgB;IAChB,gBAAgB,OAAO;IACvB,SAAS,MAAM;IACf,UACE,QAAQ,aAAa,SACnB,QAAQ,WACN,UACF,2CAAC,SAAD,EAAmB,SAAW,KAC5B;GAEP;EAEL;EACA,WAAW,cAAc,gBAAgB,SAAS,GAAG,SAAS,IAAI,WAAW;EAC7E,OAAO,iBAAiB,YAAY;GAClC,SAAS,EAAE,OAAO,OAAO,QAAQ;GACjC,QAAQ,EAAE,WAAW,OAAO,OAAO;EACrC,CAAC;EACD,OAAO;CACT;CACA,MAAM,YAAY,aAAa;CAC/B,MAAM,kBAAkB,IAAI,IAAiB;EAC3C;EACA;EACA;EACAC;EACAJ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF,CAAC;CACD,OAAO,IAAI,MAAM,WAAW;EAC1B,IAAI,QAAQ,UAAU,UAAU;GAC9B,IAAI,QAAQ,IAAI,QAAQ,QAAQ,GAC9B,OAAO,QAAQ,IAAI,QAAQ,UAAU,QAAQ;GAC/C,IACE,OAAO,aAAa,YACpB,gBAAgB,IAAI,QAAQ,KAC5B,CAAC,SAAS,KAAK,QAAQ,GAEvB,OAAO;GACT,IAAI,YAAY,QAAQ,IAAI,QAAQ;GACpC,IAAI,CAAC,WAAW;IACd,YAAY,aAAa,QAAQ;IACjC,QAAQ,IAAI,UAAU,SAAS;GACjC;GACA,OAAO;EACT;EACA,MAAM,QAAQ,aAAa,QAAQ,IAAI,QAAQ,QAAQ;CACzD,CAAC;AACH"}
1
+ {"version":3,"file":"lazy-resource-layout.cjs","names":["definedResourceLayoutComponentSymbol","LazyResourceModuleShapeError","createLazyLoader","LazyBoundary","componentPropDefinitionsSymbol"],"sources":["../../src/create-config/lazy-resource-layout.tsx"],"sourcesContent":["import { type ComponentProps, type ComponentType } from 'react';\nimport { LazyResourceModuleShapeError } from '../errors/lazy-resource-error';\nimport { componentPropDefinitionsSymbol } from '@jfdevelops/react-layout-validator';\nimport type { ResourcePath, ResourceDefinition } from '../resource';\nimport { definedResourceLayoutComponentSymbol } from './render-state';\nimport {\n createLazyLoader,\n type LazyResourceLoadHooks,\n} from '../lazy/create-lazy-loader';\nimport { LazyBoundary } from '../lazy/lazy-boundary';\nimport type {\n LazyHandle,\n LazyOptions,\n LazyResourceStates,\n} from '../lazy/types';\nexport type {\n LazyResourceErrorComponent,\n LazyResourceLoadingComponent,\n LazyResourceStates,\n} from '../lazy/types';\nexport type { LazyResourceLoadHooks } from '../lazy/create-lazy-loader';\n\ntype DefinedLayoutComponent = ComponentType<any> & {\n readonly [definedResourceLayoutComponentSymbol]: true;\n};\n\ntype UnwrapDefinedLayout<Export> = Export extends DefinedLayoutComponent\n ? Export\n : Export extends { Root: infer Root extends DefinedLayoutComponent }\n ? Root\n : never;\n\ntype DefinedLayoutFromModule<Module> = UnwrapDefinedLayout<\n Module[keyof Module]\n>;\n\ntype LazyUnsupportedStatic =\n | 'makeComposable'\n | 'props'\n | 'resource'\n | typeof componentPropDefinitionsSymbol\n | typeof definedResourceLayoutComponentSymbol;\n\n/**\n * Public surface available before a lazy module resolves. Component metadata\n * and composition factories are intentionally omitted because they cannot be\n * read synchronously without loading the module.\n */\nexport type LazyResourceLayoutComponent<Module> = ComponentType<\n ComponentProps<DefinedLayoutFromModule<Module>>\n> &\n LazyHandle &\n Pick<\n DefinedLayoutFromModule<Module>,\n Exclude<keyof DefinedLayoutFromModule<Module>, LazyUnsupportedStatic>\n >;\n\n/** Lazy resource options, sharing import and fallback semantics with lazy states. */\nexport type LazyResourceLayoutOptions<\n Resources extends ReadonlyArray<ResourceDefinition>,\n Module extends Record<string, unknown>,\n> = LazyOptions<Module> & {\n resource: ResourcePath<Resources>;\n states?: LazyResourceStates<ResourcePath<Resources>>;\n};\n\nfunction findDefinedLayoutComponent(\n module: Record<string, unknown>,\n resource: string,\n) {\n const components = Object.values(module)\n .map((value) =>\n typeof value === 'object' && value !== null && 'Root' in value\n ? value.Root\n : value,\n )\n .filter(\n (value): value is DefinedLayoutComponent =>\n typeof value === 'function' &&\n definedResourceLayoutComponentSymbol in value,\n );\n if (components.length !== 1)\n throw new LazyResourceModuleShapeError(resource, components.length);\n return components[0];\n}\n\n/** Cached resource component and its compound states, backed by the shared loader. */\nexport function createLazyResourceLayout<\n Resources extends ReadonlyArray<ResourceDefinition>,\n Module extends Record<string, unknown>,\n>(\n options: LazyResourceLayoutOptions<Resources, Module>,\n defaults: LazyResourceStates<any> | (() => LazyResourceStates<any>),\n hooks: LazyResourceLoadHooks = {},\n): LazyResourceLayoutComponent<Module> {\n const runtime = options as unknown as LazyOptions<Module> & {\n resource: string;\n states?: LazyResourceStates;\n };\n const resource = runtime.resource;\n const loader = createLazyLoader({\n load: runtime.load,\n select: (module) => findDefinedLayoutComponent(module, resource),\n label: resource,\n hooks,\n });\n const members = new Map<string, ComponentType<any>>();\n function createMember(member?: string) {\n function LazyMember(props: Record<string, unknown>) {\n const states = { ...(typeof defaults === 'function' ? defaults() : defaults), ...runtime.states } as LazyResourceStates;\n const Loading = states.Loading;\n return (\n <LazyBoundary\n loader={loader}\n member={member}\n resource={resource}\n componentProps={props}\n ErrorComponent={states.Error}\n onMount={hooks.onMount}\n fallback={\n runtime.fallback !== undefined ? (\n runtime.fallback\n ) : Loading ? (\n <Loading resource={resource} />\n ) : null\n }\n />\n );\n }\n LazyMember.displayName = `LazyResource(${resource})${member ? `.${member}` : ''}`;\n Object.defineProperties(LazyMember, {\n preload: { value: loader.preload },\n status: { get: () => loader.status },\n });\n return LazyMember;\n }\n const Component = createMember();\n const reservedStatics = new Set<PropertyKey>([\n 'makeComposable',\n 'props',\n 'resource',\n componentPropDefinitionsSymbol,\n definedResourceLayoutComponentSymbol,\n 'contextTypes',\n 'childContextTypes',\n 'contextType',\n 'propTypes',\n 'defaultProps',\n 'getDerivedStateFromProps',\n 'getDerivedStateFromError',\n 'getDefaultProps',\n '$$typeof',\n '_payload',\n '_init',\n 'render',\n 'compare',\n 'type',\n 'then',\n 'catch',\n 'finally',\n 'toJSON',\n 'asymmetricMatch',\n '__esModule',\n 'default',\n ]);\n return new Proxy(Component, {\n get(target, property, receiver) {\n if (Reflect.has(target, property))\n return Reflect.get(target, property, receiver);\n if (\n typeof property !== 'string' ||\n reservedStatics.has(property) ||\n !/^[A-Z]/.test(property)\n )\n return undefined;\n let component = members.get(property);\n if (!component) {\n component = createMember(property);\n members.set(property, component);\n }\n return component;\n },\n has: (target, property) => Reflect.has(target, property),\n }) as unknown as LazyResourceLayoutComponent<Module>;\n}\n"],"mappings":";;;;;;;;AAkEA,SAAS,2BACP,QACA,UACA;CACA,MAAM,aAAa,OAAO,OAAO,MAAM,EACpC,KAAK,UACJ,OAAO,UAAU,YAAY,UAAU,QAAQ,UAAU,QACrD,MAAM,OACN,KACN,EACC,QACE,UACC,OAAO,UAAU,cACjBA,6DAAwC,KAC5C;CACF,IAAI,WAAW,WAAW,GACxB,MAAM,IAAIC,yDAA6B,UAAU,WAAW,MAAM;CACpE,OAAO,WAAW;AACpB;;AAGA,SAAgB,yBAId,SACA,UACA,QAA+B,CAAC,GACK;CACrC,MAAM,UAAU;CAIhB,MAAM,WAAW,QAAQ;CACzB,MAAM,SAASC,4CAAiB;EAC9B,MAAM,QAAQ;EACd,SAAS,WAAW,2BAA2B,QAAQ,QAAQ;EAC/D,OAAO;EACP;CACF,CAAC;CACD,MAAM,0BAAU,IAAI,IAAgC;CACpD,SAAS,aAAa,QAAiB;EACrC,SAAS,WAAW,OAAgC;GAClD,MAAM,SAAS;IAAE,GAAI,OAAO,aAAa,aAAa,SAAS,IAAI;IAAW,GAAG,QAAQ;GAAO;GAChG,MAAM,UAAU,OAAO;GACvB,OACE,2CAACC,oCAAD;IACU;IACA;IACE;IACV,gBAAgB;IAChB,gBAAgB,OAAO;IACvB,SAAS,MAAM;IACf,UACE,QAAQ,aAAa,SACnB,QAAQ,WACN,UACF,2CAAC,SAAD,EAAmB,SAAW,KAC5B;GAEP;EAEL;EACA,WAAW,cAAc,gBAAgB,SAAS,GAAG,SAAS,IAAI,WAAW;EAC7E,OAAO,iBAAiB,YAAY;GAClC,SAAS,EAAE,OAAO,OAAO,QAAQ;GACjC,QAAQ,EAAE,WAAW,OAAO,OAAO;EACrC,CAAC;EACD,OAAO;CACT;CACA,MAAM,YAAY,aAAa;CAC/B,MAAM,kBAAkB,IAAI,IAAiB;EAC3C;EACA;EACA;EACAC;EACAJ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF,CAAC;CACD,OAAO,IAAI,MAAM,WAAW;EAC1B,IAAI,QAAQ,UAAU,UAAU;GAC9B,IAAI,QAAQ,IAAI,QAAQ,QAAQ,GAC9B,OAAO,QAAQ,IAAI,QAAQ,UAAU,QAAQ;GAC/C,IACE,OAAO,aAAa,YACpB,gBAAgB,IAAI,QAAQ,KAC5B,CAAC,SAAS,KAAK,QAAQ,GAEvB,OAAO;GACT,IAAI,YAAY,QAAQ,IAAI,QAAQ;GACpC,IAAI,CAAC,WAAW;IACd,YAAY,aAAa,QAAQ;IACjC,QAAQ,IAAI,UAAU,SAAS;GACjC;GACA,OAAO;EACT;EACA,MAAM,QAAQ,aAAa,QAAQ,IAAI,QAAQ,QAAQ;CACzD,CAAC;AACH"}
@@ -26,7 +26,7 @@ type LazyResourceLayoutOptions<Resources extends ReadonlyArray<ResourceDefinitio
26
26
  states?: LazyResourceStates<ResourcePath<Resources>>;
27
27
  };
28
28
  /** Cached resource component and its compound states, backed by the shared loader. */
29
- declare function createLazyResourceLayout<Resources extends ReadonlyArray<ResourceDefinition>, Module extends Record<string, unknown>>(options: LazyResourceLayoutOptions<Resources, Module>, defaults: LazyResourceStates<any>, hooks?: LazyResourceLoadHooks): LazyResourceLayoutComponent<Module>;
29
+ declare function createLazyResourceLayout<Resources extends ReadonlyArray<ResourceDefinition>, Module extends Record<string, unknown>>(options: LazyResourceLayoutOptions<Resources, Module>, defaults: LazyResourceStates<any> | (() => LazyResourceStates<any>), hooks?: LazyResourceLoadHooks): LazyResourceLayoutComponent<Module>;
30
30
  //#endregion
31
31
  export { LazyResourceLayoutComponent, LazyResourceLayoutOptions, createLazyResourceLayout };
32
32
  //# sourceMappingURL=lazy-resource-layout.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"lazy-resource-layout.d.cts","names":[],"sources":["../../src/create-config/lazy-resource-layout.tsx"],"mappings":";;;;;;;;KAsBK,sBAAA,GAAyB,aAAA;EAAA,UAClB,oCAAoC;AAAA;AAAA,KAG3C,mBAAA,WAA8B,MAAA,SAAe,sBAAA,GAC9C,MAAA,GACA,MAAA;EAAiB,IAAA,qBAAyB,sBAAA;AAAA,IACxC,IAAA;AAAA,KAGD,uBAAA,WAAkC,mBAAA,CACrC,MAAA,OAAa,MAAA;AAAA,KAGV,qBAAA,oDAIM,8BAAA,UACA,oCAAoC;;;;;;KAOnC,2BAAA,WAAsC,aAAA,CAChD,cAAA,CAAe,uBAAA,CAAwB,MAAA,MAEvC,UAAA,GACA,IAAA,CACE,uBAAA,CAAwB,MAAA,GACxB,OAAA,OAAc,uBAAA,CAAwB,MAAA,GAAS,qBAAA;;KAIvC,yBAAA,mBACQ,aAAA,CAAc,kBAAA,kBACjB,MAAA,qBACb,WAAA,CAAY,MAAA;EACd,QAAA,EAAU,YAAA,CAAa,SAAA;EACvB,MAAA,GAAS,kBAAA,CAAmB,YAAA,CAAa,SAAA;AAAA;;iBAwB3B,wBAAA,mBACI,aAAA,CAAc,kBAAA,kBACjB,MAAA,mBAEf,OAAA,EAAS,yBAAA,CAA0B,SAAA,EAAW,MAAA,GAC9C,QAAA,EAAU,kBAAA,OACV,KAAA,GAAO,qBAAA,GACN,2BAAA,CAA4B,MAAA"}
1
+ {"version":3,"file":"lazy-resource-layout.d.cts","names":[],"sources":["../../src/create-config/lazy-resource-layout.tsx"],"mappings":";;;;;;;;KAsBK,sBAAA,GAAyB,aAAA;EAAA,UAClB,oCAAoC;AAAA;AAAA,KAG3C,mBAAA,WAA8B,MAAA,SAAe,sBAAA,GAC9C,MAAA,GACA,MAAA;EAAiB,IAAA,qBAAyB,sBAAA;AAAA,IACxC,IAAA;AAAA,KAGD,uBAAA,WAAkC,mBAAA,CACrC,MAAA,OAAa,MAAA;AAAA,KAGV,qBAAA,oDAIM,8BAAA,UACA,oCAAoC;;;;;;KAOnC,2BAAA,WAAsC,aAAA,CAChD,cAAA,CAAe,uBAAA,CAAwB,MAAA,MAEvC,UAAA,GACA,IAAA,CACE,uBAAA,CAAwB,MAAA,GACxB,OAAA,OAAc,uBAAA,CAAwB,MAAA,GAAS,qBAAA;;KAIvC,yBAAA,mBACQ,aAAA,CAAc,kBAAA,kBACjB,MAAA,qBACb,WAAA,CAAY,MAAA;EACd,QAAA,EAAU,YAAA,CAAa,SAAA;EACvB,MAAA,GAAS,kBAAA,CAAmB,YAAA,CAAa,SAAA;AAAA;;iBAwB3B,wBAAA,mBACI,aAAA,CAAc,kBAAA,kBACjB,MAAA,mBAEf,OAAA,EAAS,yBAAA,CAA0B,SAAA,EAAW,MAAA,GAC9C,QAAA,EAAU,kBAAA,eAAiC,kBAAA,QAC3C,KAAA,GAAO,qBAAA,GACN,2BAAA,CAA4B,MAAA"}
@@ -26,7 +26,7 @@ type LazyResourceLayoutOptions<Resources extends ReadonlyArray<ResourceDefinitio
26
26
  states?: LazyResourceStates<ResourcePath<Resources>>;
27
27
  };
28
28
  /** Cached resource component and its compound states, backed by the shared loader. */
29
- declare function createLazyResourceLayout<Resources extends ReadonlyArray<ResourceDefinition>, Module extends Record<string, unknown>>(options: LazyResourceLayoutOptions<Resources, Module>, defaults: LazyResourceStates<any>, hooks?: LazyResourceLoadHooks): LazyResourceLayoutComponent<Module>;
29
+ declare function createLazyResourceLayout<Resources extends ReadonlyArray<ResourceDefinition>, Module extends Record<string, unknown>>(options: LazyResourceLayoutOptions<Resources, Module>, defaults: LazyResourceStates<any> | (() => LazyResourceStates<any>), hooks?: LazyResourceLoadHooks): LazyResourceLayoutComponent<Module>;
30
30
  //#endregion
31
31
  export { LazyResourceLayoutComponent, LazyResourceLayoutOptions, createLazyResourceLayout };
32
32
  //# sourceMappingURL=lazy-resource-layout.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"lazy-resource-layout.d.mts","names":[],"sources":["../../src/create-config/lazy-resource-layout.tsx"],"mappings":";;;;;;;;KAsBK,sBAAA,GAAyB,aAAA;EAAA,UAClB,oCAAoC;AAAA;AAAA,KAG3C,mBAAA,WAA8B,MAAA,SAAe,sBAAA,GAC9C,MAAA,GACA,MAAA;EAAiB,IAAA,qBAAyB,sBAAA;AAAA,IACxC,IAAA;AAAA,KAGD,uBAAA,WAAkC,mBAAA,CACrC,MAAA,OAAa,MAAA;AAAA,KAGV,qBAAA,oDAIM,8BAAA,UACA,oCAAoC;;;;;;KAOnC,2BAAA,WAAsC,aAAA,CAChD,cAAA,CAAe,uBAAA,CAAwB,MAAA,MAEvC,UAAA,GACA,IAAA,CACE,uBAAA,CAAwB,MAAA,GACxB,OAAA,OAAc,uBAAA,CAAwB,MAAA,GAAS,qBAAA;;KAIvC,yBAAA,mBACQ,aAAA,CAAc,kBAAA,kBACjB,MAAA,qBACb,WAAA,CAAY,MAAA;EACd,QAAA,EAAU,YAAA,CAAa,SAAA;EACvB,MAAA,GAAS,kBAAA,CAAmB,YAAA,CAAa,SAAA;AAAA;;iBAwB3B,wBAAA,mBACI,aAAA,CAAc,kBAAA,kBACjB,MAAA,mBAEf,OAAA,EAAS,yBAAA,CAA0B,SAAA,EAAW,MAAA,GAC9C,QAAA,EAAU,kBAAA,OACV,KAAA,GAAO,qBAAA,GACN,2BAAA,CAA4B,MAAA"}
1
+ {"version":3,"file":"lazy-resource-layout.d.mts","names":[],"sources":["../../src/create-config/lazy-resource-layout.tsx"],"mappings":";;;;;;;;KAsBK,sBAAA,GAAyB,aAAA;EAAA,UAClB,oCAAoC;AAAA;AAAA,KAG3C,mBAAA,WAA8B,MAAA,SAAe,sBAAA,GAC9C,MAAA,GACA,MAAA;EAAiB,IAAA,qBAAyB,sBAAA;AAAA,IACx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