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.
@@ -1,2 +1 @@
1
- import { a as e, c as t, d as n, f as r, g as i, h as a, i as o, l as s, m as c, n as l, o as u, p as d, r as f, s as p, u as m } from "./chunks/rendererCore-vR5RIa7d.js";
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` — the only way to reach {@link setAttribute}'s
69
- * counterpart style map. A key from {@link StyleProps} gets compile-time
70
- * checking on its value's shape; any other string key still forwards as a
71
- * raw {@link AttributeValue}, for style properties this package's types
72
- * haven't caught up with yet.
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 recognized by `setStyle`'s typed overload. A
27
- * deliberately incomplete, v1 layout/paint vocabulary — an unrecognized key
28
- * or a value shape that doesn't parse (e.g. a malformed enum string) is
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 {
@@ -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
  *
@@ -1,3 +1,2 @@
1
- import { withKeys as e, withModifiers as t } from "@vue/runtime-dom";
1
+ export { withKeys, withModifiers } from "@vue/runtime-dom";
2
2
  export * from "@vue/runtime-core";
3
- export { e as withKeys, t as withModifiers };
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
- for (let n of i.keys()) u(r[n]) || (e.removeStyle(t.id, n), i.delete(n));
96
- for (let [n, a] of Object.entries(r)) u(a) && i.get(n) !== a && (e.setStyle(t.id, n, a), i.set(n, a));
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
- d.handlers = s, d.instance = i;
170
- return;
171
- }
172
- u.slots.set(n, {
173
- attachedAt: e.latestEventId(),
174
- handlers: s,
175
- instance: i,
176
- once: o,
177
- fired: !1
178
- });
179
- try {
180
- g(e, t, a, u);
181
- } catch (e) {
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.12",
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.71.0",
57
- "oxlint": "^1.86.0"
56
+ "oxfmt": "^0.72.0",
57
+ "oxlint": "^1.87.0"
58
58
  },
59
59
  "peerDependencies": {
60
60
  "@vue/runtime-core": "^3.5.43",