@voidable/ui-hotwire 0.8.0 → 0.9.0

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.
Files changed (3) hide show
  1. package/README.md +4 -0
  2. package/llms.txt +26 -0
  3. package/package.json +7 -5
package/README.md CHANGED
@@ -47,6 +47,10 @@ your controllers with `data-action`:
47
47
  </void-select>
48
48
  ```
49
49
 
50
+ ## For AI agents
51
+
52
+ `@voidable/ui-hotwire/llms.txt` (in the package root) summarises this adapter's API. Every element's parts, attributes and events are in `@voidable/ui/reference.md` (`node_modules/@voidable/ui/dist/reference.md`).
53
+
50
54
  ## Documentation
51
55
 
52
56
  - [Storybook](https://voidable.dev/storybook/)
package/llms.txt ADDED
@@ -0,0 +1,26 @@
1
+ # @voidable/ui-hotwire
2
+
3
+ > Turbo morph protection for Voidable UI web components. Stimulus handles Voidable's custom events natively, so there is no controller to import.
4
+
5
+ ## Install and use
6
+
7
+ ```sh
8
+ npm install @voidable/ui @voidable/theme @voidable/ui-hotwire
9
+ ```
10
+
11
+ ```js
12
+ import '@voidable/theme';
13
+ import '@voidable/ui'; // or '@voidable/ui/autoloader'
14
+ import { VoidTurbo } from '@voidable/ui-hotwire';
15
+
16
+ VoidTurbo.start(); // idempotent; returns a function that detaches the listener
17
+ ```
18
+
19
+ ## API
20
+
21
+ - `VoidTurbo`: `start()` hooks Turbo morphs so reflected state (`open`, `checked`, `value`, ...) and the component's own `role` / `tabindex` / `aria-*` survive while the server renders the same value; the server wins when it renders a different one.
22
+ - Events: wire them with Stimulus `data-action`: `<void-button data-action="void-click->form#submit">`. The Rails gem's `void_attrs("void-click", "form#submit")` builds the attribute.
23
+
24
+ ## Full reference
25
+
26
+ Every `<void-*>` element (parts, attributes with allowed values, events with `detail`, examples) is in the core package: `@voidable/ui/reference.md` (`node_modules/@voidable/ui/dist/reference.md`), summarised in `@voidable/ui/llms.txt`. Online: https://voidable.dev/llms.txt. Offline per element: `voidable ref <tag>`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voidable/ui-hotwire",
3
- "version": "0.8.0",
3
+ "version": "0.9.0",
4
4
  "description": "Hotwire (Turbo and Stimulus) integration for Voidable UI web components",
5
5
  "keywords": [
6
6
  "hotwire",
@@ -22,14 +22,16 @@
22
22
  ".": {
23
23
  "types": "./dist/index.d.ts",
24
24
  "default": "./dist/index.js"
25
- }
25
+ },
26
+ "./llms.txt": "./llms.txt"
26
27
  },
27
28
  "files": [
28
- "dist"
29
+ "dist",
30
+ "llms.txt"
29
31
  ],
30
32
  "peerDependencies": {
31
33
  "@hotwired/turbo": "^8.0.0",
32
- "@voidable/ui": "0.8.0"
34
+ "@voidable/ui": "0.9.0"
33
35
  },
34
36
  "devDependencies": {
35
37
  "@hotwired/turbo": "^8.0.0",
@@ -39,7 +41,7 @@
39
41
  "vitest": "^3.1.0",
40
42
  "@vitest/coverage-v8": "3.2.4",
41
43
  "happy-dom": "^17.0.0",
42
- "@voidable/ui": "0.8.0"
44
+ "@voidable/ui": "0.9.0"
43
45
  },
44
46
  "repository": {
45
47
  "type": "git",