@pyreon/document-primitives 0.11.2 → 0.11.4
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
|
+
"version": "0.11.4",
|
|
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.
|
|
48
|
-
"@pyreon/document": "^0.11.
|
|
49
|
-
"@pyreon/elements": "^0.11.
|
|
50
|
-
"@pyreon/rocketstyle": "^0.11.
|
|
51
|
-
"@pyreon/styler": "^0.11.
|
|
52
|
-
"@pyreon/ui-core": "^0.11.
|
|
47
|
+
"@pyreon/core": "^0.11.4",
|
|
48
|
+
"@pyreon/document": "^0.11.4",
|
|
49
|
+
"@pyreon/elements": "^0.11.4",
|
|
50
|
+
"@pyreon/rocketstyle": "^0.11.4",
|
|
51
|
+
"@pyreon/styler": "^0.11.4",
|
|
52
|
+
"@pyreon/ui-core": "^0.11.4"
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@pyreon/connector-document": "^0.11.
|
|
55
|
+
"@pyreon/connector-document": "^0.11.4"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
|
-
"@pyreon/core": "^0.11.
|
|
59
|
-
"@pyreon/elements": "^0.11.
|
|
60
|
-
"@pyreon/rocketstyle": "^0.11.
|
|
61
|
-
"@pyreon/styler": "^0.11.
|
|
62
|
-
"@pyreon/ui-core": "^0.11.
|
|
58
|
+
"@pyreon/core": "^0.11.4",
|
|
59
|
+
"@pyreon/elements": "^0.11.4",
|
|
60
|
+
"@pyreon/rocketstyle": "^0.11.4",
|
|
61
|
+
"@pyreon/styler": "^0.11.4",
|
|
62
|
+
"@pyreon/ui-core": "^0.11.4",
|
|
63
63
|
"@vitus-labs/tools-rolldown": "^1.15.4",
|
|
64
|
-
"@pyreon/typescript": "^0.11.
|
|
64
|
+
"@pyreon/typescript": "^0.11.4"
|
|
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)
|
|
63
|
+
const vnode = unwrap(Component(props))
|
|
57
64
|
return vnode?.props ?? vnode
|
|
58
65
|
})
|
|
59
66
|
}
|