@pyreon/document-primitives 0.11.3 → 0.11.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pyreon/document-primitives",
3
- "version": "0.11.3",
3
+ "version": "0.11.5",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/pyreon/pyreon",
@@ -44,23 +44,23 @@
44
44
  "typecheck": "tsc --noEmit"
45
45
  },
46
46
  "peerDependencies": {
47
- "@pyreon/core": "^0.11.3",
48
- "@pyreon/document": "^0.11.3",
49
- "@pyreon/elements": "^0.11.3",
50
- "@pyreon/rocketstyle": "^0.11.3",
51
- "@pyreon/styler": "^0.11.3",
52
- "@pyreon/ui-core": "^0.11.3"
47
+ "@pyreon/core": "^0.11.5",
48
+ "@pyreon/document": "^0.11.5",
49
+ "@pyreon/elements": "^0.11.5",
50
+ "@pyreon/rocketstyle": "^0.11.5",
51
+ "@pyreon/styler": "^0.11.5",
52
+ "@pyreon/ui-core": "^0.11.5"
53
53
  },
54
54
  "dependencies": {
55
- "@pyreon/connector-document": "^0.11.3"
55
+ "@pyreon/connector-document": "^0.11.5"
56
56
  },
57
57
  "devDependencies": {
58
- "@pyreon/core": "^0.11.3",
59
- "@pyreon/elements": "^0.11.3",
60
- "@pyreon/rocketstyle": "^0.11.3",
61
- "@pyreon/styler": "^0.11.3",
62
- "@pyreon/ui-core": "^0.11.3",
58
+ "@pyreon/core": "^0.11.5",
59
+ "@pyreon/elements": "^0.11.5",
60
+ "@pyreon/rocketstyle": "^0.11.5",
61
+ "@pyreon/styler": "^0.11.5",
62
+ "@pyreon/ui-core": "^0.11.5",
63
63
  "@vitus-labs/tools-rolldown": "^1.15.4",
64
- "@pyreon/typescript": "^0.11.3"
64
+ "@pyreon/typescript": "^0.11.5"
65
65
  }
66
66
  }
@@ -50,10 +50,17 @@ const withThemeContext = (fn: () => any) => {
50
50
  }
51
51
  }
52
52
 
53
+ /** Unwrap reactive accessors (EnhancedComponent returns a function for mode switching). */
54
+ const unwrap = (val: any): any => {
55
+ let result = val
56
+ while (typeof result === "function" && !result.IS_ROCKETSTYLE) result = result()
57
+ return result
58
+ }
59
+
53
60
  /** Call a rocketstyle component and return its rendered VNode props. */
54
61
  const renderProps = (Component: any, props: Record<string, any> = {}) => {
55
62
  return withThemeContext(() => {
56
- const vnode = Component(props) as any
63
+ const vnode = unwrap(Component(props))
57
64
  return vnode?.props ?? vnode
58
65
  })
59
66
  }