@aparte/core 0.16.4 → 0.16.6

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.
@@ -15,12 +15,18 @@ export type * from '../generated/element-attributes.js';
15
15
  * One attribute as a TEMPLATE must write it.
16
16
  *
17
17
  * A presence attribute becomes `'' | undefined`, never `boolean`, and that is not
18
- * pedantry — it is the same trap in all three template languages. React, Vue and Svelte
19
- * all stringify what they set on a custom element, so `disabled={false}` renders
18
+ * pedantry — it is the same trap in all three template languages. React and Vue
19
+ * stringify what they set on a custom element, so `disabled={false}` renders
20
20
  * `disabled="false"`, and an element that tests `hasAttribute` reads that as ON. The
21
21
  * wrapper's own bubble rendering already used the right spelling
22
22
  * (`streaming={… ? '' : undefined}`); this makes it the only one that type-checks.
23
23
  *
24
+ * Svelte 5 is the caveat that shaped the SETTERS (#62): it assigns the PROPERTY
25
+ * whenever the element has a setter for it (`set_custom_element_data` checks
26
+ * `get_setters(node)`), so an accessor-backed presence attribute receives the `''`
27
+ * this union promises as a property value. Every presence setter therefore treats
28
+ * `''` as ON (`presenceOn` in utils/presence.ts) — one spelling, both paths.
29
+ *
24
30
  * `null` is in the union alongside `undefined` because all three treat it as REMOVE,
25
31
  * and Vue's own wrapper template writes exactly that (`:streaming="… ? '' : null"`).
26
32
  * Leaving it out made the wrapper's own code fail to type-check — the second time the
@@ -1 +1 @@
1
- {"version":3,"file":"element-attributes.d.ts","sourceRoot":"","sources":["../../src/types/element-attributes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,mBAAmB,oCAAoC,CAAC;AAExD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,MAAM,eAAe,CAAC,CAAC,IAAI,CAAC,SAAS,OAAO,GAAG,EAAE,GAAG,IAAI,GAAG,SAAS,GACpE,CAAC,SAAS,MAAM,GAAG,MAAM,GAAG,MAAM,GAClC,CAAC,CAAC;AAER,4FAA4F;AAC5F,MAAM,MAAM,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,eAAe,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAAE,CAAC"}
1
+ {"version":3,"file":"element-attributes.d.ts","sourceRoot":"","sources":["../../src/types/element-attributes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,mBAAmB,oCAAoC,CAAC;AAExD;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,MAAM,eAAe,CAAC,CAAC,IAAI,CAAC,SAAS,OAAO,GAAG,EAAE,GAAG,IAAI,GAAG,SAAS,GACpE,CAAC,SAAS,MAAM,GAAG,MAAM,GAAG,MAAM,GAClC,CAAC,CAAC;AAER,4FAA4F;AAC5F,MAAM,MAAM,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,eAAe,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAAE,CAAC"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * What a presence-attribute SETTER makes of what it was handed (#62).
3
+ *
4
+ * The generated attribute types map a presence attribute to `'' | null | undefined`,
5
+ * because React and Vue stringify what they set on a custom element — so `''` is the
6
+ * documented spelling for ON. Svelte 5 does not take the attribute path: it assigns
7
+ * the PROPERTY whenever the element has one, which handed these setters the `''` the
8
+ * types promised — and `toggleAttribute(name, '')` reads an empty string as falsy, so
9
+ * the attribute was REMOVED. The opposite of what the template asked for, silently.
10
+ *
11
+ * One rule fixes both paths without forking the spelling: on a presence property, an
12
+ * empty string means ON, exactly as an empty attribute does. Everything else keeps
13
+ * JavaScript's own truthiness (`false`, `null`, `undefined` → OFF).
14
+ */
15
+ export declare function presenceOn(value: unknown): boolean;
16
+ //# sourceMappingURL=presence.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"presence.d.ts","sourceRoot":"","sources":["../../src/utils/presence.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAElD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aparte/core",
3
- "version": "0.16.4",
3
+ "version": "0.16.6",
4
4
  "description": "AI chat in Web Components, with the agent loop inside — zero third-party dependencies",
5
5
  "type": "module",
6
6
  "//sideEffects": "The BROWSER entry defines the custom elements and imports CSS at module scope, so it must never be tree-shaken; the Node entry (`index.node`) and every other module are pure. Listing them explicitly is what lets a bundler drop the rest — the whole package was implicitly side-effectful before, the only one of the 14 without this field.",
@@ -52,7 +52,7 @@
52
52
  "node": ">=18"
53
53
  },
54
54
  "dependencies": {
55
- "@aparte/engine": "0.16.4"
55
+ "@aparte/engine": "0.16.6"
56
56
  },
57
57
  "devDependencies": {
58
58
  "@custom-elements-manifest/analyzer": "^0.11.0",
@@ -66,7 +66,21 @@
66
66
  "chat",
67
67
  "ai",
68
68
  "streaming",
69
- "llm"
69
+ "llm",
70
+ "chat-ui",
71
+ "ai-chat",
72
+ "chatbot",
73
+ "chat-component",
74
+ "custom-elements",
75
+ "framework-agnostic",
76
+ "react",
77
+ "vue",
78
+ "svelte",
79
+ "angular",
80
+ "agent",
81
+ "tool-calling",
82
+ "human-in-the-loop",
83
+ "openai"
70
84
  ],
71
85
  "license": "MIT",
72
86
  "repository": {