@meonode/ui 0.1.58 → 0.1.60

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,89 @@
1
- import React from 'react';
2
- import type { ComponentNode, NodeElement, NodeInstance, NodeProps, PortalLauncher, PortalLauncherWithFixedProviders, PortalProps } from './node.type.js';
1
+ import { type ReactNode } from 'react';
2
+ import type { FinalNodeProps, NodeElement, NodeInstance, NodeProps, RawNodeProps, Theme } from './node.type.js';
3
+ import { type Root as ReactDOMRoot } from 'react-dom/client';
4
+ /**
5
+ * Represents a node in a React component tree with theme and styling capabilities.
6
+ * This class wraps React elements and handles:
7
+ * - Props processing and normalization
8
+ * - Theme inheritance and resolution
9
+ * - Child node processing and management
10
+ * - Style processing with theme variables
11
+ * @template E The type of React element or component this node represents
12
+ */
13
+ export declare class BaseNode<E extends NodeElement> implements NodeInstance<E> {
14
+ /** The underlying React element or component type that this node represents */
15
+ element: E;
16
+ /** Original props passed during construction, preserved for cloning/recreation */
17
+ rawProps?: RawNodeProps<E>;
18
+ /** Processed props after theme resolution, style processing, and child normalization */
19
+ props: FinalNodeProps;
20
+ private _portalDOMElement;
21
+ private _portalReactRoot;
22
+ /**
23
+ * Creates a new BaseNode instance that wraps a React element.
24
+ * Processes raw props by:
25
+ * - Extracting and resolving theme-aware styles
26
+ * - Processing DOM-related props
27
+ * - Normalizing children with theme inheritance
28
+ * @param element The React element/component to wrap
29
+ * @param rawProps Initial props including theme, styles, and children
30
+ */
31
+ constructor(element: E, rawProps?: RawNodeProps<E>);
32
+ /**
33
+ * Resolves theme variable references in an object's values recursively.
34
+ * Handles nested objects and prevents circular references.
35
+ * Theme variables are referenced using the format "theme.path.to.value".
36
+ * @param obj The object whose values should be resolved against the theme
37
+ * @param theme Optional theme object containing variable definitions
38
+ * @returns A new object with all theme variables resolved to their values
39
+ */
40
+ private _resolveObjWithTheme;
41
+ /**
42
+ * React component that renders the result of a function child, supporting theme propagation.
43
+ *
44
+ * This component is used to render children that are functions (i.e., `() => Children`).
45
+ * It ensures that if the returned value is a `BaseNode` instance without an explicit theme,
46
+ * the theme from the parent is injected. Otherwise, the result is rendered as-is.
47
+ * @param props The props for the renderer.
48
+ * @param props.render The function to invoke for rendering the child.
49
+ * @param props.passedTheme The theme to provide to the child, if applicable.
50
+ * @returns The rendered ReactNode, with theme applied if necessary.
51
+ */
52
+ private _functionRenderer;
53
+ /**
54
+ * Processes a single raw child element, converting it into a ProcessedChild.
55
+ * If the child is part of an array and lacks an explicit key, a stable indexed key
56
+ * (`elementName_child_index`) is generated for new BaseNode instances.
57
+ * @param rawNode The raw child element to process.
58
+ * @param parentTheme The theme inherited from the parent node.
59
+ * @param childIndex Optional index of the child if it's part of an array.
60
+ * @returns The processed child.
61
+ */
62
+ _processRawNode(rawNode: NodeElement, parentTheme?: Theme, childIndex?: number): NodeElement;
63
+ /**
64
+ * Normalizes a child node into a renderable ReactNode.
65
+ * Processes different types of child nodes to ensure they can be properly rendered
66
+ * while maintaining theme inheritance.
67
+ *
68
+ * Handles:
69
+ * - BaseNode instances (applies theme if needed)
70
+ * - React.Component instances (applies theme if needed)
71
+ * - Other valid React element types (returned as-is)
72
+ * - null/undefined values (returned as-is)
73
+ * @param child The child node to normalize into a renderable form
74
+ * @returns The normalized ReactNode that can be rendered by React
75
+ * @throws Error if child is an invalid element type
76
+ */
77
+ private _normalizeChild;
78
+ /**
79
+ * Converts this BaseNode instance into a renderable React node.
80
+ * Recursively processes child nodes and uses `React.createElement` to construct the final React element.
81
+ * @returns A ReactNode representing the rendered element.
82
+ */
83
+ render(): ReactNode;
84
+ private _ensurePortalInfrastructure;
85
+ toPortal(): ReactDOMRoot | null;
86
+ }
3
87
  /**
4
88
  * Factory function to create a BaseNode instance.
5
89
  * @param element The React element type.
@@ -7,59 +91,4 @@ import type { ComponentNode, NodeElement, NodeInstance, NodeProps, PortalLaunche
7
91
  * @returns NodeInstance<E> - A new BaseNode instance.
8
92
  */
9
93
  export declare function Node<E extends NodeElement>(element: E, props?: Partial<NodeProps<E>>): NodeInstance<E>;
10
- /**
11
- * Higher-order component wrapper that converts BaseNode components into React components.
12
- * This wrapper ensures proper theme propagation and component rendering in the React ecosystem.
13
- *
14
- * Key features:
15
- * - Converts BaseNode instances to React elements via render()
16
- * - Handles theme inheritance and merging
17
- * - Preserves component props
18
- * - Type-safe with generic prop types
19
- * @template P - The props type for the wrapped component
20
- * @param component Component function that returns a BaseNode or ReactNode
21
- * @returns A React function component that handles BaseNode conversion and theme propagation
22
- * @example
23
- * ```ts
24
- * // Basic usage
25
- * const App = Component(() => {
26
- * return Div({
27
- * theme: { color: 'blue' }
28
- * })
29
- * })
30
- * ```
31
- */
32
- export declare function Component<P extends Record<string, any>>(component: (props: P & {
33
- children?: NodeElement;
34
- }) => ComponentNode): (props?: Partial<P>) => React.ReactNode;
35
- /**
36
- * Creates a portal component that renders its content outside the normal DOM hierarchy.
37
- * Supports wrapping the portal content with provider components for context/theme inheritance.
38
- *
39
- * A portal creates a new DOM element and renders React content into it, useful for modals,
40
- * popovers, and other overlays that need to break out of their parent container's DOM hierarchy.
41
- *
42
- * The portal content can be wrapped with provider components to maintain context/theme inheritance:
43
- * 1. Fixed providers specified when creating the portal via Portal(providers, component)
44
- * 2. Dynamic providers passed as props when launching the portal
45
- * @template P - Props type for the portal's content component
46
- * @example
47
- * // Basic portal with no providers
48
- * const Modal = Portal((props) => Div({ children: props.children }));
49
- *
50
- * // Portal with fixed theme provider
51
- * const ThemedModal = Portal(
52
- * ThemeProvider({ theme }),
53
- * (props) => Div({ children: props.children })
54
- * )
55
- *
56
- * // Usage with dynamic providers
57
- * const modal = Modal({
58
- * providers: [ThemeProvider({ theme })],
59
- * children: "Modal content"
60
- * })
61
- * modal.unmount(); // Clean up when done
62
- */
63
- export declare function Portal<P extends Record<string, any>>(providers: NodeInstance<any> | NodeInstance<any>[], component: (props: PortalProps<P>) => ComponentNode): PortalLauncherWithFixedProviders<P>;
64
- export declare function Portal<P extends Record<string, any>>(component: (props: PortalProps<P>) => ComponentNode): PortalLauncher<P>;
65
94
  //# sourceMappingURL=core.node.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"core.node.d.ts","sourceRoot":"","sources":["../src/core.node.ts"],"names":[],"mappings":"AACA,OAAO,KAAyG,MAAM,OAAO,CAAA;AAC7H,OAAO,KAAK,EACV,aAAa,EAGb,WAAW,EACX,YAAY,EACZ,SAAS,EACT,cAAc,EACd,gCAAgC,EAChC,WAAW,EAGZ,MAAM,mBAAmB,CAAA;AAod1B;;;;;GAKG;AACH,wBAAgB,IAAI,CAAC,CAAC,SAAS,WAAW,EAAE,OAAO,EAAE,CAAC,EAAE,KAAK,GAAE,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAM,GAAG,YAAY,CAAC,CAAC,CAAC,CAU1G;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,SAAS,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACrD,SAAS,EAAE,CACT,KAAK,EAAE,CAAC,GAAG;IACT,QAAQ,CAAC,EAAE,WAAW,CAAA;CACvB,KACE,aAAa,IAkBG,QAAO,OAAO,CAAC,CAAC,CAAM,qBAG5C;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,MAAM,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAClD,SAAS,EAAE,YAAY,CAAC,GAAG,CAAC,GAAG,YAAY,CAAC,GAAG,CAAC,EAAE,EAClD,SAAS,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,KAAK,aAAa,GAClD,gCAAgC,CAAC,CAAC,CAAC,CAAA;AACtC,wBAAgB,MAAM,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,SAAS,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,KAAK,aAAa,GAAG,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AAO,EAAE,CAAC,EAAE,KAAK,GAAE,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAM,GAAG,YAAY,CAAC,CAAC,CAAC,CAU1G"}
package/dist/core.node.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";var _excluded=["children","nodetheme","theme"],_excluded2=["style"],_excluded3=["children","key"],_excluded4=["nodetheme"],_excluded5=["providers","nodetheme"];function _typeof(a){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},_typeof(a)}function _objectWithoutProperties(a,b){if(null==a)return{};var c,d,e=_objectWithoutPropertiesLoose(a,b);if(Object.getOwnPropertySymbols){var f=Object.getOwnPropertySymbols(a);for(d=0;d<f.length;d++)c=f[d],-1===b.indexOf(c)&&{}.propertyIsEnumerable.call(a,c)&&(e[c]=a[c])}return e}function _objectWithoutPropertiesLoose(a,b){if(null==a)return{};var c={};for(var d in a)if({}.hasOwnProperty.call(a,d)){if(-1!==b.indexOf(d))continue;c[d]=a[d]}return c}function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}function _classCallCheck(b,a){if(!(b instanceof a))throw new TypeError("Cannot call a class as a function")}function _defineProperties(a,b){for(var c,d=0;d<b.length;d++)c=b[d],c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(a,_toPropertyKey(c.key),c)}function _createClass(a,b,c){return b&&_defineProperties(a.prototype,b),c&&_defineProperties(a,c),Object.defineProperty(a,"prototype",{writable:!1}),a}function _defineProperty(a,b,c){return(b=_toPropertyKey(b))in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function _toPropertyKey(a){var b=_toPrimitive(a,"string");return"symbol"==_typeof(b)?b:b+""}function _toPrimitive(a,b){if("object"!=_typeof(a)||!a)return a;var c=a[Symbol.toPrimitive];if(void 0!==c){var d=c.call(a,b||"default");if("object"!=_typeof(d))return d;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===b?String:Number)(a)}import React,{createElement,isValidElement}from"react";import{getComponentType,getCSSProps,getDOMProps,getElementTypeName,getValueByPath}from"./node.helper.js";import{isForwardRef,isMemo,isReactClassComponent,isValidElementType}from"./react-is.helper.js";import{createRoot}from"react-dom/client";/**
1
+ "use strict";var _excluded=["children","nodetheme","theme"],_excluded2=["style"],_excluded3=["children","key"];function _typeof(a){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},_typeof(a)}function _objectWithoutProperties(a,b){if(null==a)return{};var c,d,e=_objectWithoutPropertiesLoose(a,b);if(Object.getOwnPropertySymbols){var f=Object.getOwnPropertySymbols(a);for(d=0;d<f.length;d++)c=f[d],-1===b.indexOf(c)&&{}.propertyIsEnumerable.call(a,c)&&(e[c]=a[c])}return e}function _objectWithoutPropertiesLoose(a,b){if(null==a)return{};var c={};for(var d in a)if({}.hasOwnProperty.call(a,d)){if(-1!==b.indexOf(d))continue;c[d]=a[d]}return c}function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}function _classCallCheck(b,a){if(!(b instanceof a))throw new TypeError("Cannot call a class as a function")}function _defineProperties(a,b){for(var c,d=0;d<b.length;d++)c=b[d],c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(a,_toPropertyKey(c.key),c)}function _createClass(a,b,c){return b&&_defineProperties(a.prototype,b),c&&_defineProperties(a,c),Object.defineProperty(a,"prototype",{writable:!1}),a}function _defineProperty(a,b,c){return(b=_toPropertyKey(b))in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function _toPropertyKey(a){var b=_toPrimitive(a,"string");return"symbol"==_typeof(b)?b:b+""}function _toPrimitive(a,b){if("object"!=_typeof(a)||!a)return a;var c=a[Symbol.toPrimitive];if(void 0!==c){var d=c.call(a,b||"default");if("object"!=_typeof(d))return d;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===b?String:Number)(a)}import React,{createElement,isValidElement}from"react";import{getComponentType,getCSSProps,getDOMProps,getElementTypeName,getValueByPath}from"./node.helper.js";import{isForwardRef,isMemo,isReactClassComponent,isValidElementType}from"./react-is.helper.js";import{createRoot}from"react-dom/client";/**
2
2
  * Represents a node in a React component tree with theme and styling capabilities.
3
3
  * This class wraps React elements and handles:
4
4
  * - Props processing and normalization
@@ -6,7 +6,7 @@
6
6
  * - Child node processing and management
7
7
  * - Style processing with theme variables
8
8
  * @template E The type of React element or component this node represents
9
- */var BaseNode=/*#__PURE__*/function(){/**
9
+ */export var BaseNode=/*#__PURE__*/function(){/**
10
10
  * Creates a new BaseNode instance that wraps a React element.
11
11
  * Processes raw props by:
12
12
  * - Extracting and resolving theme-aware styles
@@ -127,67 +127,4 @@ var i=_objectSpread(_objectSpread({},f),{},{key:e});return createElement(this.el
127
127
  */export function Node(a){var b=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},c=_objectSpread({},b);// Ensure we are working with a mutable copy
128
128
  // 'theme' prop itself is not directly used by BaseNode after this, nodetheme is used.
129
129
  // We can keep `theme` in rawProps if needed for cloning or inspection.
130
- return c.theme&&!c.nodetheme&&(c.nodetheme=c.theme),new BaseNode(a,c)}/**
131
- * Higher-order component wrapper that converts BaseNode components into React components.
132
- * This wrapper ensures proper theme propagation and component rendering in the React ecosystem.
133
- *
134
- * Key features:
135
- * - Converts BaseNode instances to React elements via render()
136
- * - Handles theme inheritance and merging
137
- * - Preserves component props
138
- * - Type-safe with generic prop types
139
- * @template P - The props type for the wrapped component
140
- * @param component Component function that returns a BaseNode or ReactNode
141
- * @returns A React function component that handles BaseNode conversion and theme propagation
142
- * @example
143
- * ```ts
144
- * // Basic usage
145
- * const App = Component(() => {
146
- * return Div({
147
- * theme: { color: 'blue' }
148
- * })
149
- * })
150
- * ```
151
- */export function Component(a){// Create a wrapper component that handles theme and rendering
152
- var b=function Renderer(b){var c=a(b);// Execute wrapped component
153
- // Handle BaseNode results - requires special processing
154
- if(c instanceof BaseNode){var d,e,f=(null===(d=c.rawProps)||void 0===d?void 0:d.nodetheme)||(null===(e=c.rawProps)||void 0===e?void 0:e.theme)||b.nodetheme||b.theme;return Node(c.element,_objectSpread(_objectSpread({},c.rawProps),{},{nodetheme:f})).render()}return c};return function Func(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{};return Node(b,a).render()}}/**
155
- * Creates a portal component that renders its content outside the normal DOM hierarchy.
156
- * Supports wrapping the portal content with provider components for context/theme inheritance.
157
- *
158
- * A portal creates a new DOM element and renders React content into it, useful for modals,
159
- * popovers, and other overlays that need to break out of their parent container's DOM hierarchy.
160
- *
161
- * The portal content can be wrapped with provider components to maintain context/theme inheritance:
162
- * 1. Fixed providers specified when creating the portal via Portal(providers, component)
163
- * 2. Dynamic providers passed as props when launching the portal
164
- * @template P - Props type for the portal's content component
165
- * @example
166
- * // Basic portal with no providers
167
- * const Modal = Portal((props) => Div({ children: props.children }));
168
- *
169
- * // Portal with fixed theme provider
170
- * const ThemedModal = Portal(
171
- * ThemeProvider({ theme }),
172
- * (props) => Div({ children: props.children })
173
- * )
174
- *
175
- * // Usage with dynamic providers
176
- * const modal = Modal({
177
- * providers: [ThemeProvider({ theme })],
178
- * children: "Modal content"
179
- * })
180
- * modal.unmount(); // Clean up when done
181
- */export function Portal(a,b){// Track fixed providers passed during portal creation
182
- var c,d=void 0,e=null;// Parse arguments to determine which overload is being used
183
- if("function"==typeof b&&(a instanceof BaseNode||Array.isArray(a)&&a.every(function(a){return a instanceof BaseNode})))// Overload 1: Portal(providers, component) - Fixed providers
184
- d=Array.isArray(a)?a:[a],c=b;else if("function"==typeof a&&b===void 0)// Overload 2: Portal(component) - Dynamic providers via props
185
- c=a;else throw new Error("Invalid arguments for Portal HOC. Use Portal(component) or Portal(providersArrayOrNodeInstance, component).");// Renderer function that executes portal content with control object
186
- var f=function Renderer(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},b=a.nodetheme,d=_objectWithoutProperties(a,_excluded4),f=c(_objectSpread(_objectSpread({},d),{},{portal:e}));// Handle BaseNode results by properly applying the theme
187
- if(f instanceof BaseNode){var g,h,i=(null===(g=f.rawProps)||void 0===g?void 0:g.nodetheme)||(null===(h=f.rawProps)||void 0===h?void 0:h.theme)||a.nodetheme;return Node(f.element,_objectSpread(_objectSpread({},f.rawProps),{},{nodetheme:i})).render()}return f};// Return launcher function that creates and manages the portal instance
188
- return function Func(a){var b,c=void 0;// Combine fixed and dynamic providers in the correct order
189
- d?c=d:a.providers&&(c=Array.isArray(a.providers)?a.providers:[a.providers]);// Extract props needed for portal setup vs content
190
- var g=a.providers,h=a.nodetheme,i=_objectWithoutProperties(a,_excluded5),j=_objectSpread(_objectSpread({},i),{},{nodetheme:h}),k=Node(f,j);// Create node for portal content with renderer
191
- // Wrap content with providers if any exist
192
- return b=c&&0<c.length?c.reduceRight(function(a,b){var c,d;// Validate each provider is a proper NodeInstance
193
- return b instanceof BaseNode?Node(b.element,_objectSpread(_objectSpread({},b.rawProps),{},{children:a,nodetheme:(null===(c=b.rawProps)||void 0===c?void 0:c.nodetheme)||(null===(d=b.rawProps)||void 0===d?void 0:d.theme)||h})):(console.warn("Portal: Item in providers array is not a valid NodeInstance. Skipping.",b),a)},k):k,e=b.toPortal(),e}}
130
+ return c.theme&&!c.nodetheme&&(c.nodetheme=c.theme),new BaseNode(a,c)}
@@ -1 +1 @@
1
- {"version":3,"file":"css-properties.d.ts","sourceRoot":"","sources":["../../src/data/css-properties.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,aAAa,UAimBlB,CAAA;AAED,eAAe,aAAa,CAAA"}
1
+ {"version":3,"file":"css-properties.d.ts","sourceRoot":"","sources":["../../src/data/css-properties.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,aAAa,UAirBlB,CAAA;AAED,eAAe,aAAa,CAAA"}
@@ -1 +1 @@
1
- var cssProperties=["-ms-accelerator","-ms-block-progression","-ms-content-zoom-chaining","-ms-content-zoom-limit","-ms-content-zoom-limit-max","-ms-content-zoom-limit-min","-ms-content-zoom-snap","-ms-content-zoom-snap-points","-ms-content-zoom-snap-type","-ms-content-zooming","-ms-filter","-ms-flow-from","-ms-flow-into","-ms-grid-columns","-ms-grid-rows","-ms-high-contrast-adjust","-ms-hyphenate-limit-chars","-ms-hyphenate-limit-lines","-ms-hyphenate-limit-zone","-ms-ime-align","-ms-overflow-style","-ms-scroll-chaining","-ms-scroll-limit","-ms-scroll-limit-x-max","-ms-scroll-limit-x-min","-ms-scroll-limit-y-max","-ms-scroll-limit-y-min","-ms-scroll-rails","-ms-scroll-snap-points-x","-ms-scroll-snap-points-y","-ms-scroll-snap-type","-ms-scroll-snap-x","-ms-scroll-snap-y","-ms-scroll-translation","-ms-scrollbar-3dlight-color","-ms-scrollbar-arrow-color","-ms-scrollbar-base-color","-ms-scrollbar-darkshadow-color","-ms-scrollbar-face-color","-ms-scrollbar-highlight-color","-ms-scrollbar-shadow-color","-ms-scrollbar-track-color","-ms-text-autospace","-ms-touch-select","-ms-user-select","-ms-wrap-flow","-ms-wrap-margin","-ms-wrap-through","-moz-appearance","-moz-binding","-moz-border-bottom-colors","-moz-border-left-colors","-moz-border-right-colors","-moz-border-top-colors","-moz-context-properties","-moz-float-edge","-moz-force-broken-image-icon","-moz-image-region","-moz-orient","-moz-outline-radius","-moz-outline-radius-bottomleft","-moz-outline-radius-bottomright","-moz-outline-radius-topleft","-moz-outline-radius-topright","-moz-stack-sizing","-moz-text-blink","-moz-user-focus","-moz-user-input","-moz-user-modify","-moz-window-dragging","-moz-window-shadow","-webkit-appearance","-webkit-border-before","-webkit-border-before-color","-webkit-border-before-style","-webkit-border-before-width","-webkit-box-reflect","-webkit-line-clamp","-webkit-mask","-webkit-mask-attachment","-webkit-mask-clip","-webkit-mask-composite","-webkit-mask-image","-webkit-mask-origin","-webkit-mask-position","-webkit-mask-position-x","-webkit-mask-position-y","-webkit-mask-repeat","-webkit-mask-repeat-x","-webkit-mask-repeat-y","-webkit-mask-size","-webkit-overflow-scrolling","-webkit-tap-highlight-color","-webkit-text-fill-color","-webkit-text-stroke","-webkit-text-stroke-color","-webkit-text-stroke-width","-webkit-touch-callout","-webkit-user-modify","-webkit-user-select","accent-color","align-content","align-items","align-self","align-tracks","alignment-baseline","all","anchor-name","anchor-scope","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret","caret-color","caret-shape","clear","clip","clip-path","clip-rule","color","color-interpolation-filters","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cursor","cx","cy","d","direction","display","dominant-baseline","empty-cells","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","font","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","font-width","forced-color-adjust","gap","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","interpolate-size","isolation","justify-content","justify-items","justify-self","justify-tracks","left","letter-spacing","lighting-color","line-break","line-clamp","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-lines","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","object-fit","object-position","object-view-box","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-box","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-area","position-try","position-try-fallbacks","position-try-order","position-visibility","print-color-adjust","quotes","r","resize","right","rotate","row-gap","ruby-align","ruby-merge","ruby-overhang","ruby-position","rx","ry","scale","scroll-behavior","scroll-initial-target","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-coordinate","scroll-snap-destination","scroll-snap-points-x","scroll-snap-points-y","scroll-snap-stop","scroll-snap-type","scroll-snap-type-x","scroll-snap-type-y","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak-as","stop-color","stop-opacity","stroke","stroke-color","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-last","text-anchor","text-box","text-box-edge","text-box-trim","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-spacing-trim","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-class","view-transition-name","visibility","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"];export default cssProperties;
1
+ var cssProperties=["MozAnimation","MozAnimationDelay","MozAnimationDirection","MozAnimationDuration","MozAnimationFillMode","MozAnimationIterationCount","MozAnimationName","MozAnimationPlayState","MozAnimationTimingFunction","MozAppearance","MozBinding","MozBorderBottomColors","MozBorderEndColor","MozBorderEndStyle","MozBorderEndWidth","MozBorderImage","MozBorderLeftColors","MozBorderRightColors","MozBorderStartColor","MozBorderStartStyle","MozBorderTopColors","MozBoxSizing","MozColumnCount","MozColumnFill","MozColumnRule","MozColumnRuleColor","MozColumnRuleStyle","MozColumnRuleWidth","MozColumnWidth","MozColumns","MozContextProperties","MozFontFeatureSettings","MozFontLanguageOverride","MozHyphens","MozImageRegion","MozMarginEnd","MozMarginStart","MozOrient","MozOsxFontSmoothing","MozOutlineRadius","MozOutlineRadiusBottomleft","MozOutlineRadiusBottomright","MozOutlineRadiusTopleft","MozOutlineRadiusTopright","MozPaddingEnd","MozPaddingStart","MozStackSizing","MozTabSize","MozTextBlink","MozTextSizeAdjust","MozUserFocus","MozUserModify","MozUserSelect","MozWindowDragging","MozWindowShadow","WebkitAlignContent","WebkitAlignItems","WebkitAlignSelf","WebkitAnimation","WebkitAnimationDelay","WebkitAnimationDirection","WebkitAnimationDuration","WebkitAnimationFillMode","WebkitAnimationIterationCount","WebkitAnimationName","WebkitAnimationPlayState","WebkitAnimationTimingFunction","WebkitAppearance","WebkitBackdropFilter","WebkitBackfaceVisibility","WebkitBackgroundClip","WebkitBackgroundOrigin","WebkitBackgroundSize","WebkitBorderBefore","WebkitBorderBeforeColor","WebkitBorderBeforeStyle","WebkitBorderBeforeWidth","WebkitBorderBottomLeftRadius","WebkitBorderBottomRightRadius","WebkitBorderImage","WebkitBorderImageSlice","WebkitBorderRadius","WebkitBorderTopLeftRadius","WebkitBorderTopRightRadius","WebkitBoxDecorationBreak","WebkitBoxReflect","WebkitBoxShadow","WebkitBoxSizing","WebkitClipPath","WebkitColumnCount","WebkitColumnFill","WebkitColumnRule","WebkitColumnRuleColor","WebkitColumnRuleStyle","WebkitColumnRuleWidth","WebkitColumnSpan","WebkitColumnWidth","WebkitColumns","WebkitFilter","WebkitFlex","WebkitFlexBasis","WebkitFlexDirection","WebkitFlexFlow","WebkitFlexGrow","WebkitFlexShrink","WebkitFlexWrap","WebkitFontFeatureSettings","WebkitFontKerning","WebkitFontSmoothing","WebkitFontVariantLigatures","WebkitHyphenateCharacter","WebkitHyphens","WebkitInitialLetter","WebkitJustifyContent","WebkitLineBreak","WebkitLineClamp","WebkitMarginEnd","WebkitMarginStart","WebkitMask","WebkitMaskAttachment","WebkitMaskBoxImage","WebkitMaskBoxImageOutset","WebkitMaskBoxImageRepeat","WebkitMaskBoxImageSlice","WebkitMaskBoxImageSource","WebkitMaskBoxImageWidth","WebkitMaskClip","WebkitMaskComposite","WebkitMaskImage","WebkitMaskOrigin","WebkitMaskPosition","WebkitMaskPositionX","WebkitMaskPositionY","WebkitMaskRepeat","WebkitMaskRepeatX","WebkitMaskRepeatY","WebkitMaskSize","WebkitMaxInlineSize","WebkitOrder","WebkitOverflowScrolling","WebkitPaddingEnd","WebkitPaddingStart","WebkitPerspective","WebkitPerspectiveOrigin","WebkitPrintColorAdjust","WebkitRubyPosition","WebkitScrollSnapType","WebkitShapeMargin","WebkitTapHighlightColor","WebkitTextCombine","WebkitTextDecorationColor","WebkitTextDecorationLine","WebkitTextDecorationSkip","WebkitTextDecorationStyle","WebkitTextEmphasis","WebkitTextEmphasisColor","WebkitTextEmphasisPosition","WebkitTextEmphasisStyle","WebkitTextFillColor","WebkitTextOrientation","WebkitTextSizeAdjust","WebkitTextStroke","WebkitTextStrokeColor","WebkitTextStrokeWidth","WebkitTextUnderlinePosition","WebkitTouchCallout","WebkitTransform","WebkitTransformOrigin","WebkitTransformStyle","WebkitTransition","WebkitTransitionDelay","WebkitTransitionDuration","WebkitTransitionProperty","WebkitTransitionTimingFunction","WebkitUserModify","WebkitUserSelect","WebkitWritingMode","accentColor","alignContent","alignItems","alignSelf","alignTracks","all","animation","animationComposition","animationDelay","animationDirection","animationDuration","animationFillMode","animationIterationCount","animationName","animationPlayState","animationRange","animationRangeEnd","animationRangeStart","animationTimeline","animationTimingFunction","appearance","aspectRatio","backdropFilter","backfaceVisibility","background","backgroundAttachment","backgroundBlendMode","backgroundClip","backgroundColor","backgroundImage","backgroundOrigin","backgroundPosition","backgroundPositionX","backgroundPositionY","backgroundRepeat","backgroundSize","blockOverflow","blockSize","border","borderBlock","borderBlockColor","borderBlockEnd","borderBlockEndColor","borderBlockEndStyle","borderBlockEndWidth","borderBlockStart","borderBlockStartColor","borderBlockStartStyle","borderBlockStartWidth","borderBlockStyle","borderBlockWidth","borderBottom","borderBottomColor","borderBottomLeftRadius","borderBottomRightRadius","borderBottomStyle","borderBottomWidth","borderCollapse","borderColor","borderEndEndRadius","borderEndStartRadius","borderImage","borderImageOutset","borderImageRepeat","borderImageSlice","borderImageSource","borderImageWidth","borderInline","borderInlineColor","borderInlineEnd","borderInlineEndColor","borderInlineEndStyle","borderInlineEndWidth","borderInlineStart","borderInlineStartColor","borderInlineStartStyle","borderInlineStartWidth","borderInlineStyle","borderInlineWidth","borderLeft","borderLeftColor","borderLeftStyle","borderLeftWidth","borderRadius","borderRight","borderRightColor","borderRightStyle","borderRightWidth","borderSpacing","borderStartEndRadius","borderStartStartRadius","borderStyle","borderTop","borderTopColor","borderTopLeftRadius","borderTopRightRadius","borderTopStyle","borderTopWidth","borderWidth","bottom","boxDecorationBreak","boxShadow","boxSizing","breakAfter","breakBefore","breakInside","captionSide","caret","caretColor","caretShape","clear","clipPath","color","colorAdjust","colorScheme","columnCount","columnFill","columnGap","columnRule","columnRuleColor","columnRuleStyle","columnRuleWidth","columnSpan","columnWidth","columns","contain","containIntrinsicBlockSize","containIntrinsicHeight","containIntrinsicInlineSize","containIntrinsicSize","containIntrinsicWidth","container","containerName","containerType","content","contentVisibility","counterIncrement","counterReset","counterSet","cursor","direction","display","emptyCells","filter","flex","flexBasis","flexDirection","flexFlow","flexGrow","flexShrink","flexWrap","float","font","fontFamily","fontFeatureSettings","fontKerning","fontLanguageOverride","fontOpticalSizing","fontPalette","fontSize","fontSizeAdjust","fontSmooth","fontStretch","fontStyle","fontSynthesis","fontSynthesisPosition","fontSynthesisSmallCaps","fontSynthesisStyle","fontSynthesisWeight","fontVariant","fontVariantAlternates","fontVariantCaps","fontVariantEastAsian","fontVariantEmoji","fontVariantLigatures","fontVariantNumeric","fontVariantPosition","fontVariationSettings","fontWeight","forcedColorAdjust","gap","grid","gridArea","gridAutoColumns","gridAutoFlow","gridAutoRows","gridColumn","gridColumnEnd","gridColumnStart","gridRow","gridRowEnd","gridRowStart","gridTemplate","gridTemplateAreas","gridTemplateColumns","gridTemplateRows","hangingPunctuation","height","hyphenateCharacter","hyphenateLimitChars","hyphens","imageOrientation","imageRendering","imageResolution","initialLetter","inlineSize","inputSecurity","inset","insetBlock","insetBlockEnd","insetBlockStart","insetInline","insetInlineEnd","insetInlineStart","isolation","justifyContent","justifyItems","justifySelf","justifyTracks","left","letterSpacing","lineBreak","lineClamp","lineHeight","lineHeightStep","listStyle","listStyleImage","listStylePosition","listStyleType","margin","marginBlock","marginBlockEnd","marginBlockStart","marginBottom","marginInline","marginInlineEnd","marginInlineStart","marginLeft","marginRight","marginTop","marginTrim","mask","maskBorder","maskBorderMode","maskBorderOutset","maskBorderRepeat","maskBorderSlice","maskBorderSource","maskBorderWidth","maskClip","maskComposite","maskImage","maskMode","maskOrigin","maskPosition","maskRepeat","maskSize","maskType","masonryAutoFlow","mathDepth","mathShift","mathStyle","maxBlockSize","maxHeight","maxInlineSize","maxLines","maxWidth","minBlockSize","minHeight","minInlineSize","minWidth","mixBlendMode","motion","motionDistance","motionPath","motionRotation","msAccelerator","msBlockProgression","msContentZoomChaining","msContentZoomLimit","msContentZoomLimitMax","msContentZoomLimitMin","msContentZoomSnap","msContentZoomSnapPoints","msContentZoomSnapType","msContentZooming","msFilter","msFlex","msFlexDirection","msFlexPositive","msFlowFrom","msFlowInto","msGridColumns","msGridRows","msHighContrastAdjust","msHyphenateLimitChars","msHyphenateLimitLines","msHyphenateLimitZone","msHyphens","msImeAlign","msLineBreak","msOrder","msOverflowStyle","msOverflowX","msOverflowY","msScrollChaining","msScrollLimit","msScrollLimitXMax","msScrollLimitXMin","msScrollLimitYMax","msScrollLimitYMin","msScrollRails","msScrollSnapPointsX","msScrollSnapPointsY","msScrollSnapType","msScrollSnapX","msScrollSnapY","msScrollTranslation","msScrollbar3dlightColor","msScrollbarArrowColor","msScrollbarBaseColor","msScrollbarDarkshadowColor","msScrollbarFaceColor","msScrollbarHighlightColor","msScrollbarShadowColor","msScrollbarTrackColor","msTextAutospace","msTextCombineHorizontal","msTextOverflow","msTouchAction","msTouchSelect","msTransform","msTransformOrigin","msTransition","msTransitionDelay","msTransitionDuration","msTransitionProperty","msTransitionTimingFunction","msUserSelect","msWordBreak","msWrapFlow","msWrapMargin","msWrapThrough","msWritingMode","objectFit","objectPosition","offset","offsetAnchor","offsetDistance","offsetPath","offsetPosition","offsetRotate","offsetRotation","opacity","order","orphans","outline","outlineColor","outlineOffset","outlineStyle","outlineWidth","overflow","overflowAnchor","overflowBlock","overflowClipBox","overflowClipMargin","overflowInline","overflowWrap","overflowX","overflowY","overlay","overscrollBehavior","overscrollBehaviorBlock","overscrollBehaviorInline","overscrollBehaviorX","overscrollBehaviorY","padding","paddingBlock","paddingBlockEnd","paddingBlockStart","paddingBottom","paddingInline","paddingInlineEnd","paddingInlineStart","paddingLeft","paddingRight","paddingTop","page","pageBreakAfter","pageBreakBefore","pageBreakInside","paintOrder","perspective","perspectiveOrigin","placeContent","placeItems","placeSelf","pointerEvents","position","printColorAdjust","quotes","resize","right","rotate","rowGap","rubyAlign","rubyMerge","rubyPosition","scale","scrollBehavior","scrollMargin","scrollMarginBlock","scrollMarginBlockEnd","scrollMarginBlockStart","scrollMarginBottom","scrollMarginInline","scrollMarginInlineEnd","scrollMarginInlineStart","scrollMarginLeft","scrollMarginRight","scrollMarginTop","scrollPadding","scrollPaddingBlock","scrollPaddingBlockEnd","scrollPaddingBlockStart","scrollPaddingBottom","scrollPaddingInline","scrollPaddingInlineEnd","scrollPaddingInlineStart","scrollPaddingLeft","scrollPaddingRight","scrollPaddingTop","scrollSnapAlign","scrollSnapMargin","scrollSnapMarginBottom","scrollSnapMarginLeft","scrollSnapMarginRight","scrollSnapMarginTop","scrollSnapStop","scrollSnapType","scrollTimeline","scrollTimelineAxis","scrollTimelineName","scrollbarColor","scrollbarGutter","scrollbarWidth","shapeImageThreshold","shapeMargin","shapeOutside","tabSize","tableLayout","textAlign","textAlignLast","textCombineUpright","textDecoration","textDecorationColor","textDecorationLine","textDecorationSkip","textDecorationSkipInk","textDecorationStyle","textDecorationThickness","textEmphasis","textEmphasisColor","textEmphasisPosition","textEmphasisStyle","textIndent","textJustify","textOrientation","textOverflow","textRendering","textShadow","textSizeAdjust","textTransform","textUnderlineOffset","textUnderlinePosition","textWrap","timelineScope","top","touchAction","transform","transformBox","transformOrigin","transformStyle","transition","transitionBehavior","transitionDelay","transitionDuration","transitionProperty","transitionTimingFunction","translate","unicodeBidi","userSelect","verticalAlign","viewTimeline","viewTimelineAxis","viewTimelineInset","viewTimelineName","viewTransitionName","visibility","whiteSpace","whiteSpaceCollapse","whiteSpaceTrim","widows","width","willChange","wordBreak","wordSpacing","wordWrap","writingMode","zIndex","zoom"];export default cssProperties;
@@ -0,0 +1,28 @@
1
+ import type { ComponentNode, NodeElement } from '../node.type';
2
+ import type { ReactNode } from 'react';
3
+ /**
4
+ * Higher-order component wrapper that converts BaseNode components into React components.
5
+ * This wrapper ensures proper theme propagation and component rendering in the React ecosystem.
6
+ *
7
+ * Key features:
8
+ * - Converts BaseNode instances to React elements via render()
9
+ * - Handles theme inheritance and merging
10
+ * - Preserves component props
11
+ * - Type-safe with generic prop types
12
+ * @template P - The props type for the wrapped component
13
+ * @param component Component function that returns a BaseNode or ReactNode
14
+ * @returns A React function component that handles BaseNode conversion and theme propagation
15
+ * @example
16
+ * ```ts
17
+ * // Basic usage
18
+ * const App = Component(() => {
19
+ * return Div({
20
+ * theme: { color: 'blue' }
21
+ * })
22
+ * })
23
+ * ```
24
+ */
25
+ export declare function Component<P extends Record<string, any>>(component: (props: P & {
26
+ children?: NodeElement;
27
+ }) => ComponentNode): (props?: Partial<P>) => ReactNode;
28
+ //# sourceMappingURL=component.hoc.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"component.hoc.d.ts","sourceRoot":"","sources":["../../src/hoc/component.hoc.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAChE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,SAAS,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACrD,SAAS,EAAE,CACT,KAAK,EAAE,CAAC,GAAG;IACT,QAAQ,CAAC,EAAE,WAAW,CAAA;CACvB,KACE,aAAa,IAkBG,QAAO,OAAO,CAAC,CAAC,CAAM,eAG5C"}
@@ -0,0 +1,25 @@
1
+ "use strict";function _typeof(a){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},_typeof(a)}function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}function _defineProperty(a,b,c){return(b=_toPropertyKey(b))in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function _toPropertyKey(a){var b=_toPrimitive(a,"string");return"symbol"==_typeof(b)?b:b+""}function _toPrimitive(a,b){if("object"!=_typeof(a)||!a)return a;var c=a[Symbol.toPrimitive];if(void 0!==c){var d=c.call(a,b||"default");if("object"!=_typeof(d))return d;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===b?String:Number)(a)}import{BaseNode,Node}from"../core.node";/**
2
+ * Higher-order component wrapper that converts BaseNode components into React components.
3
+ * This wrapper ensures proper theme propagation and component rendering in the React ecosystem.
4
+ *
5
+ * Key features:
6
+ * - Converts BaseNode instances to React elements via render()
7
+ * - Handles theme inheritance and merging
8
+ * - Preserves component props
9
+ * - Type-safe with generic prop types
10
+ * @template P - The props type for the wrapped component
11
+ * @param component Component function that returns a BaseNode or ReactNode
12
+ * @returns A React function component that handles BaseNode conversion and theme propagation
13
+ * @example
14
+ * ```ts
15
+ * // Basic usage
16
+ * const App = Component(() => {
17
+ * return Div({
18
+ * theme: { color: 'blue' }
19
+ * })
20
+ * })
21
+ * ```
22
+ */export function Component(a){// Create a wrapper component that handles theme and rendering
23
+ var b=function Renderer(b){var c=a(b);// Execute wrapped component
24
+ // Handle BaseNode results - requires special processing
25
+ if(c instanceof BaseNode){var d,e,f=(null===(d=c.rawProps)||void 0===d?void 0:d.nodetheme)||(null===(e=c.rawProps)||void 0===e?void 0:e.theme)||b.nodetheme||b.theme;return Node(c.element,_objectSpread(_objectSpread({},c.rawProps),{},{nodetheme:f})).render()}return c};return function Func(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{};return Node(b,a).render()}}
@@ -0,0 +1,3 @@
1
+ export * from '../hoc/portal.hoc';
2
+ export * from '../hoc/component.hoc';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hoc/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAA;AACnC,cAAc,wBAAwB,CAAA"}
@@ -0,0 +1 @@
1
+ export*from"./portal.hoc";export*from"./component.hoc";
@@ -0,0 +1,77 @@
1
+ import type { ComponentNode, NodeInstance, PortalLauncher, PortalProps } from '../node.type';
2
+ /**
3
+ * Creates a portal component with a fixed set of providers by passing an array of `NodeInstance`s.
4
+ * The content component will be rendered within these providers. This method is considered deprecated.
5
+ * @deprecated Use `Portal(provider: NodeInstance<any>, component: ...)` instead for fixed providers.
6
+ * Passing an array of providers for fixed setup is deprecated and will trigger a console warning.
7
+ * @param provider An array of `NodeInstance`s that will wrap the portal content. Each NodeInstance
8
+ * should represent a React context provider (e.g., `ThemeProvider({ theme })`).
9
+ * @param component The React component function that defines the portal's content. It receives
10
+ * props of type `PortalProps<P>` and should return a `ComponentNode`.
11
+ * @returns A launcher function that, when called, creates and controls the portal instance.
12
+ * @example
13
+ * ```ts
14
+ * // Example of a deprecated usage with an array of fixed providers:
15
+ * const DeprecatedThemedModal = Portal(
16
+ * [ThemeProvider({ theme: 'dark' }), LanguageProvider({ lang: 'en' })],
17
+ * (props) => Div({ children: props.children, style: { background: props.nodetheme?.background } })
18
+ * );
19
+ *
20
+ * const deprecatedModalInstance = DeprecatedThemedModal({ children: "Deprecated content" });
21
+ * // A console warning will be logged when DeprecatedThemedModal is created.
22
+ * deprecatedModalInstance.unmount();
23
+ * ```
24
+ */
25
+ export declare function Portal<P extends Record<string, any>>(provider: NodeInstance<any>[], component: (props: PortalProps<P>) => ComponentNode): PortalLauncher<P>;
26
+ /**
27
+ * Creates a portal component with a single fixed provider.
28
+ * The content component will be rendered within this provider. This is the preferred method
29
+ * for providing fixed context to your portal content.
30
+ * @param provider A single `NodeInstance` that will wrap the portal content. This should typically
31
+ * be a React context provider (e.g., `ThemeProvider({ theme })`).
32
+ * @param component The React component function that defines the portal's content. It receives
33
+ * props of type `PortalProps<P>` and should return a `ComponentNode`.
34
+ * @returns A launcher function that, when called, creates and controls the portal instance.
35
+ * @example
36
+ * ```ts
37
+ * // Example of preferred usage with a single fixed provider:
38
+ * const ThemedModal = Portal(
39
+ * ThemeProvider({ theme: 'light' }),
40
+ * (props) => Div({ children: props.children, style: { background: props.nodetheme?.background } })
41
+ * );
42
+ *
43
+ * const modalInstance = ThemedModal({ children: "Preferred content" });
44
+ * modalInstance.unmount();
45
+ * ```
46
+ */
47
+ export declare function Portal<P extends Record<string, any>>(provider: NodeInstance<any>, component: (props: PortalProps<P>) => ComponentNode): PortalLauncher<P>;
48
+ /**
49
+ * Creates a basic portal component without any fixed providers.
50
+ * Dynamic providers can still be passed as props when launching the portal instance.
51
+ * @param component The React component function that defines the portal's content. It receives
52
+ * props of type `PortalProps<P>` and should return a `ComponentNode`.
53
+ * @returns A launcher function that, when called, creates and controls the portal instance.
54
+ * @example
55
+ * ```ts
56
+ * // Example of basic usage without fixed providers:
57
+ * const BasicModal = Portal(
58
+ * (props) => Div({ children: props.children, style: { padding: '20px', border: '1px solid black' } })
59
+ * );
60
+ *
61
+ * const basicModalInstance = BasicModal({ children: "Hello from a basic portal!" });
62
+ * basicModalInstance.unmount();
63
+ *
64
+ * // Example with dynamic providers when launching:
65
+ * const DynamicThemedModal = Portal(
66
+ * (props) => Div({ children: props.children, style: { background: props.nodetheme?.background || 'white' } })
67
+ * );
68
+ *
69
+ * const dynamicModalInstance = DynamicThemedModal({
70
+ * providers: ThemeProvider({ theme: 'blue' }), // Dynamic provider
71
+ * children: "Content with dynamic theme"
72
+ * });
73
+ * dynamicModalInstance.unmount();
74
+ * ```
75
+ */
76
+ export declare function Portal<P extends Record<string, any>>(component: (props: PortalProps<P>) => ComponentNode): PortalLauncher<P>;
77
+ //# sourceMappingURL=portal.hoc.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"portal.hoc.d.ts","sourceRoot":"","sources":["../../src/hoc/portal.hoc.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAa,cAAc,EAAE,WAAW,EAAS,MAAM,gBAAgB,CAAA;AAIhH;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,MAAM,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,QAAQ,EAAE,YAAY,CAAC,GAAG,CAAC,EAAE,EAAE,SAAS,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,KAAK,aAAa,GAAG,cAAc,CAAC,CAAC,CAAC,CAAA;AAE5J;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,MAAM,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,QAAQ,EAAE,YAAY,CAAC,GAAG,CAAC,EAAE,SAAS,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,KAAK,aAAa,GAAG,cAAc,CAAC,CAAC,CAAC,CAAA;AAE1J;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,MAAM,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,SAAS,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,KAAK,aAAa,GAAG,cAAc,CAAC,CAAC,CAAC,CAAA"}
@@ -0,0 +1,94 @@
1
+ "use strict";var _excluded=["nodetheme"],_excluded2=["provider","nodetheme"];function _typeof(a){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},_typeof(a)}function _toConsumableArray(a){return _arrayWithoutHoles(a)||_iterableToArray(a)||_unsupportedIterableToArray(a)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(b,c){if(b){if("string"==typeof b)return _arrayLikeToArray(b,c);var a={}.toString.call(b).slice(8,-1);return"Object"===a&&b.constructor&&(a=b.constructor.name),"Map"===a||"Set"===a?Array.from(b):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?_arrayLikeToArray(b,c):void 0}}function _iterableToArray(a){if("undefined"!=typeof Symbol&&null!=a[Symbol.iterator]||null!=a["@@iterator"])return Array.from(a)}function _arrayWithoutHoles(a){if(Array.isArray(a))return _arrayLikeToArray(a)}function _arrayLikeToArray(b,c){(null==c||c>b.length)&&(c=b.length);for(var d=0,f=Array(c);d<c;d++)f[d]=b[d];return f}function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}function _defineProperty(a,b,c){return(b=_toPropertyKey(b))in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function _toPropertyKey(a){var b=_toPrimitive(a,"string");return"symbol"==_typeof(b)?b:b+""}function _toPrimitive(a,b){if("object"!=_typeof(a)||!a)return a;var c=a[Symbol.toPrimitive];if(void 0!==c){var d=c.call(a,b||"default");if("object"!=_typeof(d))return d;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===b?String:Number)(a)}function _objectWithoutProperties(a,b){if(null==a)return{};var c,d,e=_objectWithoutPropertiesLoose(a,b);if(Object.getOwnPropertySymbols){var f=Object.getOwnPropertySymbols(a);for(d=0;d<f.length;d++)c=f[d],-1===b.indexOf(c)&&{}.propertyIsEnumerable.call(a,c)&&(e[c]=a[c])}return e}function _objectWithoutPropertiesLoose(a,b){if(null==a)return{};var c={};for(var d in a)if({}.hasOwnProperty.call(a,d)){if(-1!==b.indexOf(d))continue;c[d]=a[d]}return c}import{BaseNode,Node}from"../core.node";/**
2
+ * Creates a portal component with a fixed set of providers by passing an array of `NodeInstance`s.
3
+ * The content component will be rendered within these providers. This method is considered deprecated.
4
+ * @deprecated Use `Portal(provider: NodeInstance<any>, component: ...)` instead for fixed providers.
5
+ * Passing an array of providers for fixed setup is deprecated and will trigger a console warning.
6
+ * @param provider An array of `NodeInstance`s that will wrap the portal content. Each NodeInstance
7
+ * should represent a React context provider (e.g., `ThemeProvider({ theme })`).
8
+ * @param component The React component function that defines the portal's content. It receives
9
+ * props of type `PortalProps<P>` and should return a `ComponentNode`.
10
+ * @returns A launcher function that, when called, creates and controls the portal instance.
11
+ * @example
12
+ * ```ts
13
+ * // Example of a deprecated usage with an array of fixed providers:
14
+ * const DeprecatedThemedModal = Portal(
15
+ * [ThemeProvider({ theme: 'dark' }), LanguageProvider({ lang: 'en' })],
16
+ * (props) => Div({ children: props.children, style: { background: props.nodetheme?.background } })
17
+ * );
18
+ *
19
+ * const deprecatedModalInstance = DeprecatedThemedModal({ children: "Deprecated content" });
20
+ * // A console warning will be logged when DeprecatedThemedModal is created.
21
+ * deprecatedModalInstance.unmount();
22
+ * ```
23
+ *//**
24
+ * Creates a portal component with a single fixed provider.
25
+ * The content component will be rendered within this provider. This is the preferred method
26
+ * for providing fixed context to your portal content.
27
+ * @param provider A single `NodeInstance` that will wrap the portal content. This should typically
28
+ * be a React context provider (e.g., `ThemeProvider({ theme })`).
29
+ * @param component The React component function that defines the portal's content. It receives
30
+ * props of type `PortalProps<P>` and should return a `ComponentNode`.
31
+ * @returns A launcher function that, when called, creates and controls the portal instance.
32
+ * @example
33
+ * ```ts
34
+ * // Example of preferred usage with a single fixed provider:
35
+ * const ThemedModal = Portal(
36
+ * ThemeProvider({ theme: 'light' }),
37
+ * (props) => Div({ children: props.children, style: { background: props.nodetheme?.background } })
38
+ * );
39
+ *
40
+ * const modalInstance = ThemedModal({ children: "Preferred content" });
41
+ * modalInstance.unmount();
42
+ * ```
43
+ *//**
44
+ * Creates a basic portal component without any fixed providers.
45
+ * Dynamic providers can still be passed as props when launching the portal instance.
46
+ * @param component The React component function that defines the portal's content. It receives
47
+ * props of type `PortalProps<P>` and should return a `ComponentNode`.
48
+ * @returns A launcher function that, when called, creates and controls the portal instance.
49
+ * @example
50
+ * ```ts
51
+ * // Example of basic usage without fixed providers:
52
+ * const BasicModal = Portal(
53
+ * (props) => Div({ children: props.children, style: { padding: '20px', border: '1px solid black' } })
54
+ * );
55
+ *
56
+ * const basicModalInstance = BasicModal({ children: "Hello from a basic portal!" });
57
+ * basicModalInstance.unmount();
58
+ *
59
+ * // Example with dynamic providers when launching:
60
+ * const DynamicThemedModal = Portal(
61
+ * (props) => Div({ children: props.children, style: { background: props.nodetheme?.background || 'white' } })
62
+ * );
63
+ *
64
+ * const dynamicModalInstance = DynamicThemedModal({
65
+ * providers: ThemeProvider({ theme: 'blue' }), // Dynamic provider
66
+ * children: "Content with dynamic theme"
67
+ * });
68
+ * dynamicModalInstance.unmount();
69
+ * ```
70
+ */// --- Implementation ---
71
+ export function Portal(a,b){// --- Initialization ---
72
+ var c,d=void 0,e=null;// --- Argument Parsing and Overload Handling ---
73
+ // Determines which Portal overload was called (e.g., with fixed provider or just component).
74
+ if("function"==typeof b&&(a instanceof BaseNode||Array.isArray(a)&&a.every(function(a){return a instanceof BaseNode})))Array.isArray(a)?(console.warn("Portal: Passing an array of providers as the first argument is deprecated. Please pass a single NodeInstance instead."),d=a):d=[a],c=b;else if("function"==typeof a&&b===void 0)// Handles the case where only the component function is passed.
75
+ c=a;else throw new Error("Invalid arguments for Portal HOC. Use Portal(component), Portal(providerNodeInstance, component), or (deprecated) Portal(providerArray, component).");// --- Core Content Renderer Function ---
76
+ // This function is the actual React component that will be rendered inside the portal.
77
+ // It receives props and handles theme application and portal control.
78
+ var f=function Renderer(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},b=a.nodetheme,d=_objectWithoutProperties(a,_excluded),f=c(_objectSpread(_objectSpread({},d),{},{portal:e// Passes the portal control object to the content component
79
+ }));// Ensures that the theme is correctly applied if the result is a BaseNode.
80
+ if(f instanceof BaseNode){var g,h,i=(null===(g=f.rawProps)||void 0===g?void 0:g.nodetheme)||(null===(h=f.rawProps)||void 0===h?void 0:h.theme)||a.nodetheme;return Node(f.element,_objectSpread(_objectSpread({},f.rawProps),{},{nodetheme:i})).render()}return f};// --- Portal Launcher Function (Returned to User) ---
81
+ // This is the function that developers call to actually create and manage a portal instance.
82
+ return function Func(a){// --- Helper for Deep Content Injection ---
83
+ // Recursively injects content into the deepest child of a provider chain.
84
+ function injectContentDeeply(a,b,c){var d,e,f,g=null===(d=a.rawProps)||void 0===d?void 0:d.children;// If no children, or children is not a NodeInstance, inject directly
85
+ if(!g||!(g instanceof BaseNode)){var h,i;return Node(a.element,_objectSpread(_objectSpread({},a.rawProps),{},{children:b,nodetheme:(null===(h=a.rawProps)||void 0===h?void 0:h.nodetheme)||(null===(i=a.rawProps)||void 0===i?void 0:i.theme)||c}))}// Recursively inject into the deepest node
86
+ var j=injectContentDeeply(g,b);return Node(a.element,_objectSpread(_objectSpread({},a.rawProps),{},{children:j,nodetheme:(null===(e=a.rawProps)||void 0===e?void 0:e.nodetheme)||(null===(f=a.rawProps)||void 0===f?void 0:f.theme)||c}))}// --- Provider Wrapping Logic ---
87
+ // Iterates through the combined providers (fixed + dynamic) to wrap the content.
88
+ // Providers are applied in reverse order to ensure the innermost content is wrapped by the outermost provider.
89
+ var b,c=[];// Combine fixed and dynamic providers
90
+ Array.isArray(a.provider)?(console.warn("Portal: Passing an array of providers as the `provider` prop is deprecated. Please pass a single NodeInstance instead."),c.push.apply(c,_toConsumableArray(a.provider))):a.provider&&c.push(a.provider);var g=[].concat(_toConsumableArray(null!==d&&void 0!==d?d:[]),c),h=a.provider,i=a.nodetheme,j=_objectWithoutProperties(a,_excluded2),k=_objectSpread(_objectSpread({},j),{},{nodetheme:i}),l=Node(f,k);// Separates props for the portal's content from internal props like 'provider' or 'nodetheme'.
91
+ // Creates the base node for the portal's content.
92
+ return b=0<g.length?g.reduceRight(function(a,b){var c,d,e;if(!(b instanceof BaseNode))return console.warn("Portal: Item in provider is not a valid NodeInstance. Skipping.",b),a;var f=(null===(c=b.rawProps)||void 0===c?void 0:c.children)instanceof BaseNode;// If the provider already has nested children, inject content deeply.
93
+ // Otherwise, simply set currentWrappedContent as its direct child.
94
+ return f?injectContentDeeply(b,a,i):Node(b.element,_objectSpread(_objectSpread({},b.rawProps),{},{children:a,nodetheme:(null===(d=b.rawProps)||void 0===d?void 0:d.nodetheme)||(null===(e=b.rawProps)||void 0===e?void 0:e.theme)||i}))},l):l,e=b.toPortal(),e}}
package/dist/main.d.ts CHANGED
@@ -1,5 +1,6 @@
1
- export * from './core.node';
1
+ export { Node } from './core.node';
2
+ export * from './hoc';
2
3
  export * from './node.helper';
3
- export * from './html.node';
4
4
  export * from './node.type';
5
+ export * from './html.node';
5
6
  //# sourceMappingURL=main.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,kBAAkB,CAAA;AAChC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,gBAAgB,CAAA"}
1
+ {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAA;AACrC,cAAc,UAAU,CAAA;AACxB,cAAc,kBAAkB,CAAA;AAChC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,gBAAgB,CAAA"}
package/dist/main.js CHANGED
@@ -1 +1 @@
1
- export*from"./core.node";export*from"./node.helper";export*from"./html.node";export*from"./node.type";
1
+ export{Node}from"./core.node";export*from"./hoc";export*from"./node.helper";export*from"./node.type";export*from"./html.node";
@@ -1 +1 @@
1
- {"version":3,"file":"node.helper.d.ts","sourceRoot":"","sources":["../src/node.helper.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,OAAO,CAAA;AACvE,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAkBpE;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,gBAAgB,GAC3B,YAAY,WAAW,KAErB,OAAO,GACP,YAAY,GACZ,MAAM,GACN,QAAQ,GACR,UAAU,GACV,UAAU,GACV,QAAQ,GACR,UAAU,GACV,aAAa,GACb,UAAU,GACV,eAAe,GACf,kBAAkB,GAClB,kBAAkB,GAClB,MAAM,GACN,SAAS,GACT,SAAS,GACT,MAgBH,CAAA;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,CAsFxD;AAmBD;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,GAAG,CAAC,MAAM,CAA2C,CAAA;AAElF;;;;;;;;;;;GAWG;AACH,wBAAgB,WAAW,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,OAAO,CAAC,aAAa,CAAC,CAU3F;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,WAAW,CAAC,CAAC,SAAS,WAAW,EAAE,CAAC,SAAS,cAAc,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,OAAO,CAAC,cAAc,CAAC,CAUjH;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,YAAK,EAAE,IAAI,EAAE,MAAM,uBAEzE"}
1
+ {"version":3,"file":"node.helper.d.ts","sourceRoot":"","sources":["../src/node.helper.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,OAAO,CAAA;AACvE,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAkBpE;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,gBAAgB,GAC3B,YAAY,WAAW,KAErB,OAAO,GACP,YAAY,GACZ,MAAM,GACN,QAAQ,GACR,UAAU,GACV,UAAU,GACV,QAAQ,GACR,UAAU,GACV,aAAa,GACb,UAAU,GACV,eAAe,GACf,kBAAkB,GAClB,kBAAkB,GAClB,MAAM,GACN,SAAS,GACT,SAAS,GACT,MAgBH,CAAA;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,CAsFxD;AAED;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,GAAG,CAAC,MAAM,CAA0B,CAAA;AAEjE;;;;;;;;;;;GAWG;AACH,wBAAgB,WAAW,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,OAAO,CAAC,aAAa,CAAC,CAU3F;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,WAAW,CAAC,CAAC,SAAS,WAAW,EAAE,CAAC,SAAS,cAAc,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,OAAO,CAAC,cAAc,CAAC,CAUjH;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,YAAK,EAAE,IAAI,EAAE,MAAM,uBAEzE"}
@@ -23,21 +23,9 @@
23
23
  * @param node The ElementType or ReactElement (e.g., 'div', MyComponent, <MyComponent />).
24
24
  * @returns A string representation of the element type's name.
25
25
  */export function getElementTypeName(a){var b,c;function getDisplayName(a,b){var c=(null===a||void 0===a?void 0:a.displayName)||(null===a||void 0===a?void 0:a.name);return!c||"render"===c?b:c}if(null===a||a===void 0)return"UnknownElementType";var d=a,e=getComponentType(d);switch(e){case"string":return a;case"class":return getDisplayName(d,"ClassComponent");case"function":return getDisplayName(d,"AnonymousFunctionComponent");case"forwardRef":return getDisplayName(d,"")||getDisplayName(d.render,"")||"ForwardRefComponent";case"memo":return getDisplayName(d,"")||(d.type?getElementTypeName(d.type):"MemoComponent");case"element":return getElementTypeName(d.type);case"fragment":return"Fragment";case"portal":return"Portal";case"profiler":return getDisplayName(d,"Profiler");case"strict-mode":return"StrictMode";case"suspense":return getDisplayName(d,"Suspense");case"suspense-list":return"SuspenseList";case"context-consumer":return null!==(b=d._context)&&void 0!==b&&b.displayName?"".concat(d._context.displayName,".Consumer"):"ContextConsumer";case"context-provider":return null!==(c=d._context)&&void 0!==c&&c.displayName?"".concat(d._context.displayName,".Provider"):"ContextProvider";case"lazy":return getDisplayName(d,"LazyComponent");case"object":return getDisplayName(d,"")?getDisplayName(d,""):"function"==typeof d.render?getDisplayName(d.render,"ObjectWithRender"):d.type&&d.type!==a?"Wrapped<".concat(getElementTypeName(d.type),">"):getDisplayName(d,"ObjectComponent");case"symbol":if("symbol"===_typeof(a)){var f;return(null===(f=a.description)||void 0===f?void 0:f.replace(/^react\./,"").split(".").map(function(a){var b;return(null===(b=a[0])||void 0===b?void 0:b.toUpperCase())+a.slice(1)}).join(""))||a.toString()}return"SymbolComponent";case"unknown":return"UnknownElementType";default:return"UnsupportedType<".concat(e,">")}}/**
26
- * Converts kebab-case CSS property names to camelCase, preserving CSS custom properties.
27
- * Converts kebab-case CSS property names to their camelCase equivalents
28
- * Preserves CSS custom properties that start with --
29
- * @param prop The CSS property name to convert
30
- * @returns The camelCase property name
31
- * @example
32
- * ```ts
33
- * toCamelCase('background-color') // 'backgroundColor'
34
- * toCamelCase('--custom-prop') // '--custom-prop'
35
- * ```
36
- */var toCamelCase=function toCamelCase(a){return a.startsWith("--")?a:a.replace(/-([a-z])/g,function(a,b){return b.toUpperCase()});// Preserve CSS variables
37
- };/**
38
26
  * A set of valid CSS property names in camelCase, including CSS custom properties, used for validation.
39
27
  * This set contains all CSS properties including non-standard vendor prefixed properties.
40
- */export var CSSPropertySet=new Set(cssProperties.map(toCamelCase));/**
28
+ */export var CSSPropertySet=new Set(cssProperties);/**
41
29
  * Filters an object to only include valid CSS properties
42
30
  * @param props The object containing potential CSS properties
43
31
  * @returns An object containing only valid CSS properties
@@ -118,19 +118,18 @@ export type PortalProps<T extends Record<string, any>> = T & {
118
118
  };
119
119
  };
120
120
  /**
121
- * Function type for creating portal instances when Portal is called with just a component.
121
+ * Function type for creating portal instances.
122
122
  * Allows passing providers through props at portal creation time.
123
- * @template P_Content The portal content component's prop types
123
+ * @template P The portal content component's prop types
124
124
  */
125
125
  export type PortalLauncher<P extends Record<string, any>> = (props: P & {
126
126
  /** Optional provider components to wrap the portal content */
127
- providers?: NodeInstance<any> | NodeInstance<any>[];
127
+ provider?: NodeInstance<any>
128
+ /**
129
+ * @deprecated
130
+ * Use a single NodeInstance instead of an array for fixed provider.
131
+ */
132
+ | NodeInstance<any>[];
128
133
  } & Omit<PortalProps<P>, 'portal'>) => ReactDOMRoot | null;
129
- /**
130
- * Function type for creating portal instances when Portal is called with providers and component.
131
- * Uses fixed providers specified at HOC creation time.
132
- * @template P The portal content component's prop types
133
- */
134
- export type PortalLauncherWithFixedProviders<P extends Record<string, any>> = (props: P & Omit<PortalProps<P>, 'portal'>) => ReactDOMRoot | null;
135
134
  export {};
136
135
  //# sourceMappingURL=node.type.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"node.type.d.ts","sourceRoot":"","sources":["../src/node.type.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,UAAU,IAAI,eAAe,EAC7B,cAAc,EACd,aAAa,EACb,SAAS,EACT,GAAG,EACH,WAAW,EACX,aAAa,EACb,qBAAqB,EACrB,SA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+C,CAAA;AAE1F;;;;GAIG;AACH,eAAO,MAAM,UAAU,GAAI,QAAQ,OAAO,KAAG,OAAiD,CAAA;AAE9F;;;;GAIG;AACH,eAAO,MAAM,YAAY,GAAI,QAAQ,OAAO,KAAG,OAAoD,CAAA;AAEnG;;;;GAIG;AACH,eAAO,MAAM,UAAU,GAAI,QAAQ,OAAO,KAAG,OAAiD,CAAA;AAE9F;;;;GAIG;AACH,eAAO,MAAM,cAAc,GAAI,QAAQ,OAAO,KAAG,OAAsD,CAAA;AAgBvG;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,GAAI,CAAC,EAAE,MAAM,CAAC,KAAG,OAgB/C,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,GAAI,WAAW,OAAO,KAAG,SAAS,IAAI,KAAK,CAAC,aAS7E,CAAA"}
@@ -1,8 +1,8 @@
1
- function _typeof(a){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},_typeof(a)}/**
1
+ "use strict";/**
2
2
  * Custom React Type Checker (TypeScript Version)
3
3
  * Provides utilities for identifying and checking React component/element types.
4
4
  * Inspired by react-is package but implemented in TypeScript with type safety.
5
- */import React from"react";/**
5
+ */function _typeof(a){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},_typeof(a)}import React from"react";/**
6
6
  * Symbol identifiers for React internal component types
7
7
  * These are used to identify different kinds of React elements and components
8
8
  */export var REACT_ELEMENT_TYPE=Symbol["for"]("react.transitional.element");export var REACT_PORTAL_TYPE=Symbol["for"]("react.portal");export var REACT_FRAGMENT_TYPE=Symbol["for"]("react.fragment");export var REACT_STRICT_MODE_TYPE=Symbol["for"]("react.strict_mode");export var REACT_PROFILER_TYPE=Symbol["for"]("react.profiler");export var REACT_PROVIDER_TYPE=Symbol["for"]("react.provider");export var REACT_CONSUMER_TYPE=Symbol["for"]("react.consumer");export var REACT_CONTEXT_TYPE=Symbol["for"]("react.context");export var REACT_FORWARD_REF_TYPE=Symbol["for"]("react.forward_ref");export var REACT_SUSPENSE_TYPE=Symbol["for"]("react.suspense");export var REACT_SUSPENSE_LIST_TYPE=Symbol["for"]("react.suspense_list");export var REACT_MEMO_TYPE=Symbol["for"]("react.memo");export var REACT_LAZY_TYPE=Symbol["for"]("react.lazy");export var REACT_VIEW_TRANSITION_TYPE=Symbol["for"]("react.view_transition");export var REACT_CLIENT_REFERENCE=Symbol["for"]("react.client.reference");/**
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@meonode/ui",
3
3
  "description": "A structured approach to component composition with built-in theming, prop separation, and dynamic children handling.",
4
- "version": "0.1.58",
4
+ "version": "0.1.60",
5
5
  "type": "module",
6
6
  "main": "./dist/main.js",
7
7
  "types": "./dist/main.d.ts",