incajs 0.0.12 → 0.0.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/dist/rendererCore.js +1 -2
- package/dist/tree.d.mts +13 -8
- package/dist/types.d.mts +4 -3
- package/dist/vue/patchProp.d.mts +6 -1
- package/dist/vue-runtime.js +1 -2
- package/dist/vue.js +17 -17
- package/package.json +3 -3
package/dist/rendererCore.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { l as appendChild, r as blur, f as createNode, o as destroyNode, d as focus, e as insertBefore, c as latestEventId, u as removeAttribute, p as removeChild, a as removeEventListener, t as removeStyle, s as rootNodeId, m as setAttribute, i as setEventListener, n as setStyle };
|
|
1
|
+
export { n as appendChild, f as blur, r as createNode, i as destroyNode, p as focus, a as insertBefore, m as latestEventId, o as removeAttribute, s as removeChild, h as removeEventListener, c as removeStyle, l as rootNodeId, u as setAttribute, g as setEventListener, d as setStyle } from "./chunks/rendererCore-vR5RIa7d.js";
|
package/dist/tree.d.mts
CHANGED
|
@@ -65,21 +65,26 @@ export declare function setAttribute(nodeId: NodeId, key: string, value: Attribu
|
|
|
65
65
|
*/
|
|
66
66
|
export declare function removeAttribute(nodeId: NodeId, key: string): void;
|
|
67
67
|
/**
|
|
68
|
-
* Sets a style property on `nodeId
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
* raw {@link AttributeValue}
|
|
72
|
-
*
|
|
68
|
+
* Sets a style property on `nodeId`. A snake_case key from {@link StyleProps}
|
|
69
|
+
* gets compile-time checking on its value's shape. Any other string key, such
|
|
70
|
+
* as a camelCase or kebab-case spelling or a property the types do not list,
|
|
71
|
+
* forwards as a raw {@link AttributeValue}.
|
|
72
|
+
*
|
|
73
|
+
* A key takes any of three spellings: kebab-case (`flex-direction`),
|
|
74
|
+
* camelCase (`flexDirection`) or snake_case (`flex_direction`). All three
|
|
75
|
+
* name the same property, and the value set most recently applies.
|
|
73
76
|
* @param nodeId - the node to update
|
|
74
|
-
* @param key - the style property name
|
|
77
|
+
* @param key - the style property name in any of the three spellings
|
|
75
78
|
* @param value - the style property value
|
|
76
79
|
*/
|
|
77
80
|
export declare function setStyle<K extends keyof StyleProps>(nodeId: NodeId, key: K, value: NonNullable<StyleProps[K]>): void;
|
|
78
81
|
export declare function setStyle(nodeId: NodeId, key: string, value: AttributeValue): void;
|
|
79
82
|
/**
|
|
80
83
|
* Removes a style property from `nodeId`, so it renders as if never set.
|
|
81
|
-
* Removing a property that isn't set does nothing.
|
|
84
|
+
* Removing a property that isn't set does nothing. The key takes any of the
|
|
85
|
+
* three spellings {@link setStyle} accepts, and removes the property whichever
|
|
86
|
+
* spelling set it.
|
|
82
87
|
* @param nodeId - the node to update
|
|
83
|
-
* @param key - the style property name
|
|
88
|
+
* @param key - the style property name in any of the three spellings
|
|
84
89
|
*/
|
|
85
90
|
export declare function removeStyle(nodeId: NodeId, key: string): void;
|
package/dist/types.d.mts
CHANGED
|
@@ -23,9 +23,10 @@ export type AttributeValue = string | number | boolean;
|
|
|
23
23
|
*/
|
|
24
24
|
export type TagName = "text" | (string & {});
|
|
25
25
|
/**
|
|
26
|
-
* Style properties
|
|
27
|
-
* deliberately incomplete, v1 layout/paint vocabulary
|
|
28
|
-
*
|
|
26
|
+
* Style properties, in their snake_case spelling, that `setStyle`'s typed
|
|
27
|
+
* overload checks. A deliberately incomplete, v1 layout/paint vocabulary. The
|
|
28
|
+
* renderer also reads the camelCase and kebab-case spellings. An unrecognized
|
|
29
|
+
* key or a value shape that doesn't parse (e.g. a malformed enum string) is
|
|
29
30
|
* ignored by the renderer rather than applied or thrown.
|
|
30
31
|
*/
|
|
31
32
|
export interface StyleProps {
|
package/dist/vue/patchProp.d.mts
CHANGED
|
@@ -11,8 +11,13 @@ import { IncaElement } from './nodeOps.mts';
|
|
|
11
11
|
* sent for this element.
|
|
12
12
|
* - `core.setStyle` runs for each entry that is new or changed.
|
|
13
13
|
* - `core.removeStyle` runs for each sent entry that is now absent, `null`,
|
|
14
|
-
* or not a string/number.
|
|
14
|
+
* or not a string/number. After a removal, `core.setStyle` runs again for
|
|
15
|
+
* every remaining string/number entry.
|
|
15
16
|
* - A string or `null` `style` removes every entry.
|
|
17
|
+
* - A key takes any of three spellings: kebab-case (`flex-direction`),
|
|
18
|
+
* camelCase (`flexDirection`) or snake_case (`flex_direction`). If an
|
|
19
|
+
* object names one property in two spellings, the value set most recently
|
|
20
|
+
* applies.
|
|
16
21
|
*
|
|
17
22
|
* ### `onXxx`
|
|
18
23
|
*
|
package/dist/vue-runtime.js
CHANGED
package/dist/vue.js
CHANGED
|
@@ -92,8 +92,9 @@ var u = (e) => typeof e == "string" || typeof e == "number", d = /* @__PURE__ */
|
|
|
92
92
|
function f(e, t, n) {
|
|
93
93
|
let r = typeof n == "object" && n ? n : {}, i = d.get(t);
|
|
94
94
|
i || d.set(t, i = /* @__PURE__ */ new Map());
|
|
95
|
-
|
|
96
|
-
for (let
|
|
95
|
+
let a = !1;
|
|
96
|
+
for (let n of i.keys()) u(r[n]) || (e.removeStyle(t.id, n), i.delete(n), a = !0);
|
|
97
|
+
for (let [n, o] of Object.entries(r)) u(o) && (a || i.get(n) !== o) && (e.setStyle(t.id, n, o), i.set(n, o));
|
|
97
98
|
}
|
|
98
99
|
function p(e) {
|
|
99
100
|
let t = (Array.isArray(e) ? e : [e]).filter((e) => typeof e == "function");
|
|
@@ -165,21 +166,20 @@ function y(e, t, n, r, i) {
|
|
|
165
166
|
let u = c.get(a);
|
|
166
167
|
u || c.set(a, u = _(e, t, a));
|
|
167
168
|
let d = u.slots.get(n);
|
|
168
|
-
if (d)
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
throw u.slots.delete(n), u.slots.size === 0 && c.delete(a), e;
|
|
169
|
+
if (d) d.handlers = s, d.instance = i;
|
|
170
|
+
else {
|
|
171
|
+
u.slots.set(n, {
|
|
172
|
+
attachedAt: e.latestEventId(),
|
|
173
|
+
handlers: s,
|
|
174
|
+
instance: i,
|
|
175
|
+
once: o,
|
|
176
|
+
fired: !1
|
|
177
|
+
});
|
|
178
|
+
try {
|
|
179
|
+
g(e, t, a, u);
|
|
180
|
+
} catch (e) {
|
|
181
|
+
throw u.slots.delete(n), u.slots.size === 0 && c.delete(a), e;
|
|
182
|
+
}
|
|
183
183
|
}
|
|
184
184
|
}
|
|
185
185
|
var b = /* @__PURE__ */ new Set([
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "incajs",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.13",
|
|
4
4
|
"description": "A GPU-native, Webview-free desktop app framework built on GPUI and QuickJS.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cross-platform",
|
|
@@ -53,8 +53,8 @@
|
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@vue/runtime-core": "^3.5.43",
|
|
55
55
|
"@vue/runtime-dom": "^3.5.43",
|
|
56
|
-
"oxfmt": "^0.
|
|
57
|
-
"oxlint": "^1.
|
|
56
|
+
"oxfmt": "^0.72.0",
|
|
57
|
+
"oxlint": "^1.87.0"
|
|
58
58
|
},
|
|
59
59
|
"peerDependencies": {
|
|
60
60
|
"@vue/runtime-core": "^3.5.43",
|