@meonode/ui 0.3.11 → 0.3.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,17 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.3.13] - 2025-10-30
9
+
10
+ ### Fixed
11
+ - **theme.helper**: process theme strings returned from functions ([`5c004fa`](https://github.com/l7aromeo/meonode-ui/commit/5c004fa32f2957a4936aa84123c630abde708fb8))
12
+
13
+ ## [0.3.12] - 2025-10-23
14
+
15
+ ### Added
16
+ - **react**: add Suspense component and JSDoc for Activity and Suspense ([`c1760fd`](https://github.com/l7aromeo/meonode-ui/commit/c1760fd))
17
+
18
+
8
19
  ## [0.3.11] - 2025-10-19
9
20
 
10
21
  ### Added
@@ -1,4 +1,35 @@
1
+ /**
2
+ * Lets you hide and restore the UI and internal state of its children.
3
+ * @see {@link https://react.dev/reference/react/Activity React Docs}
4
+ * @example
5
+ *
6
+ * ```typescript
7
+ * import { Activity } from '@meonode/ui';
8
+ *
9
+ * Activity({
10
+ * mode: isShowingSidebar ? "visible" : "hidden",
11
+ * children: Div(...),
12
+ * })
13
+ * ```
14
+ */
1
15
  export declare const Activity: (<AdditionalProps extends Record<string, any> = Record<string, any>>(props: import("../node.type").MergedProps<import("react").ExoticComponent<import("react").ActivityProps>, AdditionalProps>) => import("../node.type").NodeInstance<import("react").ExoticComponent<import("react").ActivityProps>>) & {
2
16
  element: import("react").ExoticComponent<import("react").ActivityProps>;
3
17
  };
18
+ /**
19
+ * Lets you display a fallback until its children have finished loading.
20
+ * @see {@link https://react.dev/reference/react/Suspense React Docs}
21
+ * @example
22
+ *
23
+ * ```typescript
24
+ * import { Suspense } from '@meonode/ui';
25
+ *
26
+ * Suspense({
27
+ * fallback: 'Loading...',
28
+ * children: Div(...),
29
+ * })
30
+ * ```
31
+ */
32
+ export declare const Suspense: (<AdditionalProps extends Record<string, any> = Record<string, any>>(props?: import("../node.type").MergedProps<import("react").ExoticComponent<import("react").SuspenseProps>, AdditionalProps> | undefined) => import("../node.type").NodeInstance<import("react").ExoticComponent<import("react").SuspenseProps>>) & {
33
+ element: import("react").ExoticComponent<import("react").SuspenseProps>;
34
+ };
4
35
  //# sourceMappingURL=react.node.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"react.node.d.ts","sourceRoot":"","sources":["../../src/components/react.node.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,QAAQ;;CAA2B,CAAA"}
1
+ {"version":3,"file":"react.node.d.ts","sourceRoot":"","sources":["../../src/components/react.node.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,QAAQ;;CAA2B,CAAA;AAEhD;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,QAAQ;;CAA2B,CAAA"}
@@ -1 +1,27 @@
1
- import{Activity as BaseActivity}from"react";import{createNode}from"../core.node.js";export var Activity=createNode(BaseActivity);
1
+ import{Activity as BaseActivity,Suspense as BaseSuspense}from"react";import{createNode}from"../core.node.js";/**
2
+ * Lets you hide and restore the UI and internal state of its children.
3
+ * @see {@link https://react.dev/reference/react/Activity React Docs}
4
+ * @example
5
+ *
6
+ * ```typescript
7
+ * import { Activity } from '@meonode/ui';
8
+ *
9
+ * Activity({
10
+ * mode: isShowingSidebar ? "visible" : "hidden",
11
+ * children: Div(...),
12
+ * })
13
+ * ```
14
+ */export var Activity=createNode(BaseActivity);/**
15
+ * Lets you display a fallback until its children have finished loading.
16
+ * @see {@link https://react.dev/reference/react/Suspense React Docs}
17
+ * @example
18
+ *
19
+ * ```typescript
20
+ * import { Suspense } from '@meonode/ui';
21
+ *
22
+ * Suspense({
23
+ * fallback: 'Loading...',
24
+ * children: Div(...),
25
+ * })
26
+ * ```
27
+ */export var Suspense=createNode(BaseSuspense);
@@ -1 +1 @@
1
- {"version":3,"file":"theme.helper.d.ts","sourceRoot":"","sources":["../../src/helper/theme.helper.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAe,MAAM,mBAAmB,CAAA;AA8G3D;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,mBAAmB;;SA+H/B,CAAA"}
1
+ {"version":3,"file":"theme.helper.d.ts","sourceRoot":"","sources":["../../src/helper/theme.helper.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAe,MAAM,mBAAmB,CAAA;AA8G3D;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,mBAAmB;;SAoI/B,CAAA"}
@@ -39,4 +39,5 @@ _defineProperty(ThemeResolverCache,"_instance",null);var themeCache=ThemeResolve
39
39
  var e=null===b||void 0===b?void 0:b.system;if(!e||"object"!==_typeof(e)||0===Object.keys(e).length)return a;// Check cache first (only on server-side for RSC optimization)
40
40
  if(themeCache.shouldCache()){// Note: Caching is based on the input object. If processFunctions changes behavior,
41
41
  // a more complex cache key may be needed in the future.
42
- var f=themeCache.getResolution(a,e);if(null!==f)return f}var g=function resolveRecursively(a,c){if(null===a||"object"!==_typeof(a))return a;if(c.has(a))return a;c.add(a);var f=function processThemeString(a){var b=a,c=!1,d=themeCache.getThemeRegex();return b=b.replace(d,function(a,b){var d=themeCache.getPathLookup(e,b);return null===d&&(d=getValueByPath(e,b),themeCache.setPathLookup(e,b,d)),void 0!==d&&null!==d?(c=!0,"object"===_typeof(d)&&!Array.isArray(d)&&"default"in d?d["default"]:d):a}),c?b:a};if(Array.isArray(a)){for(var h=a,j=!1,k=0;k<a.length;k++){var l=a[k],m=g(l,c);m===l?j&&(h[k]=l):(!j&&(h=[...a],j=!0),h[k]=m)}return h}var n=a,o=!1;for(var p in a){var q=a[p],r=q;if("function"!=typeof q)("object"!==_typeof(q)||null===q||Array.isArray(q)||Object.getPrototypeOf(q)===Object.prototype||null===Object.getPrototypeOf(q))&&("object"===_typeof(q)||"string"==typeof q)?"string"==typeof q&&q.includes("theme.")?r=f(q):"object"===_typeof(q)&&null!==q&&(r=g(q,c)):r=q;else if(void 0!==d&&d){var s=q(b);r=g(s,c)}else r=q;r===q?o&&(n[p]=q):(!o&&(n=_objectSpread({},a),o=!0),n[p]=r)}return n},h=g(a,new Set);return themeCache.shouldCache()&&themeCache.setResolution(a,e,h),h};
42
+ var f=themeCache.getResolution(a,e);if(null!==f)return f}var g=function resolveRecursively(a,c){if(null===a||"object"!==_typeof(a))return a;if(c.has(a))return a;c.add(a);var f=function processThemeString(a){var b=a,c=!1,d=themeCache.getThemeRegex();return b=b.replace(d,function(a,b){var d=themeCache.getPathLookup(e,b);return null===d&&(d=getValueByPath(e,b),themeCache.setPathLookup(e,b,d)),void 0!==d&&null!==d?(c=!0,"object"===_typeof(d)&&!Array.isArray(d)&&"default"in d?d["default"]:d):a}),c?b:a};if(Array.isArray(a)){for(var h=a,j=!1,k=0;k<a.length;k++){var l=a[k],m=g(l,c);m===l?j&&(h[k]=l):(!j&&(h=[...a],j=!0),h[k]=m)}return h}var n=a,o=!1;for(var p in a){var q=a[p],r=q;if("function"!=typeof q)("object"!==_typeof(q)||null===q||Array.isArray(q)||Object.getPrototypeOf(q)===Object.prototype||null===Object.getPrototypeOf(q))&&("object"===_typeof(q)||"string"==typeof q)?"string"==typeof q&&q.includes("theme.")?r=f(q):"object"===_typeof(q)&&null!==q&&(r=g(q,c)):r=q;else if(void 0!==d&&d){var s=q(b);// Process string results that contain theme references
43
+ r="string"==typeof s&&s.includes("theme.")?f(s):g(s,c)}else r=q;r===q?o&&(n[p]=q):(!o&&(n=_objectSpread({},a),o=!0),n[p]=r)}return n},h=g(a,new Set);return themeCache.shouldCache()&&themeCache.setResolution(a,e,h),h};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@meonode/ui",
3
3
  "description": "A structured approach to component composition, direct CSS-first prop styling, built-in theming, smart prop handling (including raw property pass-through), and dynamic children.",
4
- "version": "0.3.11",
4
+ "version": "0.3.13",
5
5
  "type": "module",
6
6
  "main": "./dist/main.js",
7
7
  "types": "./dist/main.d.ts",
@@ -23,7 +23,6 @@
23
23
  "dist",
24
24
  "package.json",
25
25
  "LICENSE",
26
- "CHANGELOG.md",
27
26
  "README.md"
28
27
  ],
29
28
  "scripts": {