@booki-aui/web 0.0.0-stage → 0.2.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 (232) hide show
  1. package/CHANGELOG.md +108 -0
  2. package/LICENSE +21 -0
  3. package/README.md +83 -2
  4. package/dist/account-picker.d.ts +7 -0
  5. package/dist/account-picker.js +7 -0
  6. package/dist/account-picker.js.map +1 -0
  7. package/dist/accounting-period-select.d.ts +7 -0
  8. package/dist/accounting-period-select.js +7 -0
  9. package/dist/accounting-period-select.js.map +1 -0
  10. package/dist/activity-timeline.d.ts +7 -0
  11. package/dist/activity-timeline.js +7 -0
  12. package/dist/activity-timeline.js.map +1 -0
  13. package/dist/aged-balances.d.ts +7 -0
  14. package/dist/aged-balances.js +7 -0
  15. package/dist/aged-balances.js.map +1 -0
  16. package/dist/agent-cursor.d.ts +31 -0
  17. package/dist/agent-cursor.js +9 -0
  18. package/dist/agent-cursor.js.map +1 -0
  19. package/dist/agent.d.ts +34 -0
  20. package/dist/agent.js +13 -0
  21. package/dist/agent.js.map +1 -0
  22. package/dist/aging-chart.d.ts +7 -0
  23. package/dist/aging-chart.js +7 -0
  24. package/dist/aging-chart.js.map +1 -0
  25. package/dist/amount-field.d.ts +7 -0
  26. package/dist/amount-field.js +7 -0
  27. package/dist/amount-field.js.map +1 -0
  28. package/dist/approval-chain.d.ts +7 -0
  29. package/dist/approval-chain.js +7 -0
  30. package/dist/approval-chain.js.map +1 -0
  31. package/dist/attestation-status.d.ts +7 -0
  32. package/dist/attestation-status.js +7 -0
  33. package/dist/attestation-status.js.map +1 -0
  34. package/dist/audit-findings.d.ts +7 -0
  35. package/dist/audit-findings.js +7 -0
  36. package/dist/audit-findings.js.map +1 -0
  37. package/dist/audit-workpaper.d.ts +7 -0
  38. package/dist/audit-workpaper.js +7 -0
  39. package/dist/audit-workpaper.js.map +1 -0
  40. package/dist/bank-account-input.d.ts +7 -0
  41. package/dist/bank-account-input.js +7 -0
  42. package/dist/bank-account-input.js.map +1 -0
  43. package/dist/bank-reconciliation.d.ts +7 -0
  44. package/dist/bank-reconciliation.js +7 -0
  45. package/dist/bank-reconciliation.js.map +1 -0
  46. package/dist/bar-chart.d.ts +7 -0
  47. package/dist/bar-chart.js +7 -0
  48. package/dist/bar-chart.js.map +1 -0
  49. package/dist/cashflow-waterfall.d.ts +7 -0
  50. package/dist/cashflow-waterfall.js +7 -0
  51. package/dist/cashflow-waterfall.js.map +1 -0
  52. package/dist/chunk-2V27DKHN.js +24 -0
  53. package/dist/chunk-2V27DKHN.js.map +1 -0
  54. package/dist/chunk-3HRLV6BA.js +14 -0
  55. package/dist/chunk-3HRLV6BA.js.map +1 -0
  56. package/dist/chunk-3W2FYPGK.js +15 -0
  57. package/dist/chunk-3W2FYPGK.js.map +1 -0
  58. package/dist/chunk-43QLLCKQ.js +14 -0
  59. package/dist/chunk-43QLLCKQ.js.map +1 -0
  60. package/dist/chunk-4WDVBBA2.js +12 -0
  61. package/dist/chunk-4WDVBBA2.js.map +1 -0
  62. package/dist/chunk-5UQRL337.js +19 -0
  63. package/dist/chunk-5UQRL337.js.map +1 -0
  64. package/dist/chunk-655MFTCW.js +12 -0
  65. package/dist/chunk-655MFTCW.js.map +1 -0
  66. package/dist/chunk-6CDPCDSP.js +16 -0
  67. package/dist/chunk-6CDPCDSP.js.map +1 -0
  68. package/dist/chunk-6T372TAW.js +12 -0
  69. package/dist/chunk-6T372TAW.js.map +1 -0
  70. package/dist/chunk-CD2BEPOY.js +14 -0
  71. package/dist/chunk-CD2BEPOY.js.map +1 -0
  72. package/dist/chunk-DUA5GKQZ.js +19 -0
  73. package/dist/chunk-DUA5GKQZ.js.map +1 -0
  74. package/dist/chunk-EAGQ76ZR.js +19 -0
  75. package/dist/chunk-EAGQ76ZR.js.map +1 -0
  76. package/dist/chunk-F5CSJRSA.js +21 -0
  77. package/dist/chunk-F5CSJRSA.js.map +1 -0
  78. package/dist/chunk-FSNFDKAI.js +12 -0
  79. package/dist/chunk-FSNFDKAI.js.map +1 -0
  80. package/dist/chunk-GG4Z5NUM.js +24 -0
  81. package/dist/chunk-GG4Z5NUM.js.map +1 -0
  82. package/dist/chunk-H2V5ENBF.js +101 -0
  83. package/dist/chunk-H2V5ENBF.js.map +1 -0
  84. package/dist/chunk-HACUHRXE.js +13 -0
  85. package/dist/chunk-HACUHRXE.js.map +1 -0
  86. package/dist/chunk-HUBMJI2D.js +13 -0
  87. package/dist/chunk-HUBMJI2D.js.map +1 -0
  88. package/dist/chunk-JTGQ2JPX.js +13 -0
  89. package/dist/chunk-JTGQ2JPX.js.map +1 -0
  90. package/dist/chunk-KZBVEWBS.js +11 -0
  91. package/dist/chunk-KZBVEWBS.js.map +1 -0
  92. package/dist/chunk-LFACUVZD.js +12 -0
  93. package/dist/chunk-LFACUVZD.js.map +1 -0
  94. package/dist/chunk-LOIL6UPN.js +16 -0
  95. package/dist/chunk-LOIL6UPN.js.map +1 -0
  96. package/dist/chunk-NAIZYOD2.js +15 -0
  97. package/dist/chunk-NAIZYOD2.js.map +1 -0
  98. package/dist/chunk-NQGSU6Y3.js +14 -0
  99. package/dist/chunk-NQGSU6Y3.js.map +1 -0
  100. package/dist/chunk-OKBWREXN.js +14 -0
  101. package/dist/chunk-OKBWREXN.js.map +1 -0
  102. package/dist/chunk-QRQQLQ52.js +13 -0
  103. package/dist/chunk-QRQQLQ52.js.map +1 -0
  104. package/dist/chunk-QVVFFGDT.js +19 -0
  105. package/dist/chunk-QVVFFGDT.js.map +1 -0
  106. package/dist/chunk-RK67ELRF.js +13 -0
  107. package/dist/chunk-RK67ELRF.js.map +1 -0
  108. package/dist/chunk-RYURKIYO.js +12 -0
  109. package/dist/chunk-RYURKIYO.js.map +1 -0
  110. package/dist/chunk-SDOWG4UB.js +12 -0
  111. package/dist/chunk-SDOWG4UB.js.map +1 -0
  112. package/dist/chunk-SWFF43JC.js +15 -0
  113. package/dist/chunk-SWFF43JC.js.map +1 -0
  114. package/dist/chunk-TH6M7EJB.js +14 -0
  115. package/dist/chunk-TH6M7EJB.js.map +1 -0
  116. package/dist/chunk-TOBKAA7W.js +12 -0
  117. package/dist/chunk-TOBKAA7W.js.map +1 -0
  118. package/dist/chunk-U4N3XQBW.js +22 -0
  119. package/dist/chunk-U4N3XQBW.js.map +1 -0
  120. package/dist/chunk-U7ZOXLVV.js +13 -0
  121. package/dist/chunk-U7ZOXLVV.js.map +1 -0
  122. package/dist/chunk-UUSESM7J.js +15 -0
  123. package/dist/chunk-UUSESM7J.js.map +1 -0
  124. package/dist/chunk-VP4ECGEH.js +18 -0
  125. package/dist/chunk-VP4ECGEH.js.map +1 -0
  126. package/dist/chunk-WB324I3X.js +16 -0
  127. package/dist/chunk-WB324I3X.js.map +1 -0
  128. package/dist/chunk-WBIKQPAC.js +14 -0
  129. package/dist/chunk-WBIKQPAC.js.map +1 -0
  130. package/dist/chunk-WJBFP6H7.js +15 -0
  131. package/dist/chunk-WJBFP6H7.js.map +1 -0
  132. package/dist/chunk-WY6BINGZ.js +13 -0
  133. package/dist/chunk-WY6BINGZ.js.map +1 -0
  134. package/dist/chunk-XC2PESHG.js +18 -0
  135. package/dist/chunk-XC2PESHG.js.map +1 -0
  136. package/dist/chunk-XKUFILUO.js +12 -0
  137. package/dist/chunk-XKUFILUO.js.map +1 -0
  138. package/dist/chunk-Y7IGCSR2.js +16 -0
  139. package/dist/chunk-Y7IGCSR2.js.map +1 -0
  140. package/dist/chunk-YJN3HJJX.js +15 -0
  141. package/dist/chunk-YJN3HJJX.js.map +1 -0
  142. package/dist/client-requests.d.ts +7 -0
  143. package/dist/client-requests.js +7 -0
  144. package/dist/client-requests.js.map +1 -0
  145. package/dist/close-checklist.d.ts +7 -0
  146. package/dist/close-checklist.js +7 -0
  147. package/dist/close-checklist.js.map +1 -0
  148. package/dist/currency-select.d.ts +7 -0
  149. package/dist/currency-select.js +7 -0
  150. package/dist/currency-select.js.map +1 -0
  151. package/dist/data-table.d.ts +7 -0
  152. package/dist/data-table.js +7 -0
  153. package/dist/data-table.js.map +1 -0
  154. package/dist/deal-pipeline.d.ts +7 -0
  155. package/dist/deal-pipeline.js +7 -0
  156. package/dist/deal-pipeline.js.map +1 -0
  157. package/dist/document-signoff.d.ts +7 -0
  158. package/dist/document-signoff.js +7 -0
  159. package/dist/document-signoff.js.map +1 -0
  160. package/dist/evidence-list.d.ts +7 -0
  161. package/dist/evidence-list.js +7 -0
  162. package/dist/evidence-list.js.map +1 -0
  163. package/dist/expense-claim.d.ts +7 -0
  164. package/dist/expense-claim.js +7 -0
  165. package/dist/expense-claim.js.map +1 -0
  166. package/dist/financial-date-field.d.ts +7 -0
  167. package/dist/financial-date-field.js +7 -0
  168. package/dist/financial-date-field.js.map +1 -0
  169. package/dist/fixed-asset-register.d.ts +7 -0
  170. package/dist/fixed-asset-register.js +7 -0
  171. package/dist/fixed-asset-register.js.map +1 -0
  172. package/dist/forecast-chart.d.ts +7 -0
  173. package/dist/forecast-chart.js +7 -0
  174. package/dist/forecast-chart.js.map +1 -0
  175. package/dist/funnel-chart.d.ts +7 -0
  176. package/dist/funnel-chart.js +7 -0
  177. package/dist/funnel-chart.js.map +1 -0
  178. package/dist/iban-input.d.ts +7 -0
  179. package/dist/iban-input.js +7 -0
  180. package/dist/iban-input.js.map +1 -0
  181. package/dist/index.d.ts +48 -0
  182. package/dist/index.js +191 -0
  183. package/dist/index.js.map +1 -0
  184. package/dist/invoice-editor.d.ts +7 -0
  185. package/dist/invoice-editor.js +7 -0
  186. package/dist/invoice-editor.js.map +1 -0
  187. package/dist/invoice-number-input.d.ts +7 -0
  188. package/dist/invoice-number-input.js +7 -0
  189. package/dist/invoice-number-input.js.map +1 -0
  190. package/dist/kpi-stat.d.ts +7 -0
  191. package/dist/kpi-stat.js +7 -0
  192. package/dist/kpi-stat.js.map +1 -0
  193. package/dist/ledger-table.d.ts +7 -0
  194. package/dist/ledger-table.js +7 -0
  195. package/dist/ledger-table.js.map +1 -0
  196. package/dist/organization-number-input.d.ts +7 -0
  197. package/dist/organization-number-input.js +7 -0
  198. package/dist/organization-number-input.js.map +1 -0
  199. package/dist/payment-batch.d.ts +7 -0
  200. package/dist/payment-batch.js +7 -0
  201. package/dist/payment-batch.js.map +1 -0
  202. package/dist/payment-reference-input.d.ts +7 -0
  203. package/dist/payment-reference-input.js +7 -0
  204. package/dist/payment-reference-input.js.map +1 -0
  205. package/dist/period-lock.d.ts +7 -0
  206. package/dist/period-lock.js +7 -0
  207. package/dist/period-lock.js.map +1 -0
  208. package/dist/recurring-revenue.d.ts +7 -0
  209. package/dist/recurring-revenue.js +7 -0
  210. package/dist/recurring-revenue.js.map +1 -0
  211. package/dist/sheet-stack.d.ts +7 -0
  212. package/dist/sheet-stack.js +7 -0
  213. package/dist/sheet-stack.js.map +1 -0
  214. package/dist/stage-duration.d.ts +7 -0
  215. package/dist/stage-duration.js +7 -0
  216. package/dist/stage-duration.js.map +1 -0
  217. package/dist/supplier-invoice-inbox.d.ts +7 -0
  218. package/dist/supplier-invoice-inbox.js +7 -0
  219. package/dist/supplier-invoice-inbox.js.map +1 -0
  220. package/dist/tax-code-select.d.ts +7 -0
  221. package/dist/tax-code-select.js +7 -0
  222. package/dist/tax-code-select.js.map +1 -0
  223. package/dist/trend-chart.d.ts +7 -0
  224. package/dist/trend-chart.js +7 -0
  225. package/dist/trend-chart.js.map +1 -0
  226. package/dist/vat-return.d.ts +7 -0
  227. package/dist/vat-return.js +7 -0
  228. package/dist/vat-return.js.map +1 -0
  229. package/dist/voucher-composer.d.ts +7 -0
  230. package/dist/voucher-composer.js +7 -0
  231. package/dist/voucher-composer.js.map +1 -0
  232. package/package.json +71 -3
package/CHANGELOG.md ADDED
@@ -0,0 +1,108 @@
1
+ # @booki/web
2
+
3
+ ## 0.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#93](https://github.com/Walgermo/booki/pull/93) [`ec89785`](https://github.com/Walgermo/booki/commit/ec8978566d2a81ee14eb94cc5163a2490ea824a9) Thanks [@Walgermo](https://github.com/Walgermo)! - The packages are now named `@booki-aui/*` and are published to npm (the `@booki` scope on npm belongs to someone else). Install with `pnpm add @booki-aui/core @booki-aui/react @booki-aui/styles`, and replace `@booki/` with `@booki-aui/` in your imports, for example `import { createBookiAgent } from "@booki-aui/react"` and `import "@booki-aui/styles"`. Nothing else changed.
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [[`ec89785`](https://github.com/Walgermo/booki/commit/ec8978566d2a81ee14eb94cc5163a2490ea824a9)]:
12
+ - @booki-aui/core@0.2.0
13
+ - @booki-aui/primitives@0.2.0
14
+
15
+ ## 0.1.7
16
+
17
+ ### Patch Changes
18
+
19
+ - Updated dependencies [[`3fe7338`](https://github.com/Walgermo/booki/commit/3fe7338a650bbc8a6c900693bc8f93abba937a0a)]:
20
+ - @booki/core@0.1.7
21
+ - @booki/primitives@0.1.7
22
+
23
+ ## 0.1.6
24
+
25
+ ### Patch Changes
26
+
27
+ - Updated dependencies [[`1054c6e`](https://github.com/Walgermo/booki/commit/1054c6e79f3418e1fb9560beea50b7b027f82bff)]:
28
+ - @booki/core@0.1.6
29
+ - @booki/primitives@0.1.6
30
+
31
+ ## 0.1.5
32
+
33
+ ### Patch Changes
34
+
35
+ - [#78](https://github.com/Walgermo/booki/pull/78) [`326ce38`](https://github.com/Walgermo/booki/commit/326ce386d087c74fb359a3508ccf4a416a41adea) Thanks [@Walgermo](https://github.com/Walgermo)! - Built on `@ui-sdk/*` 0.1.0-beta.17 (was beta.16), and the peer dependencies ask for it exactly, so move your `@ui-sdk` packages with Booki.
36
+
37
+ What changes for an agent, from ui-sdk: `act` checks the shape of the whole call before it runs, so a step with an unknown key or `args` that is not a list fails with a message instead of being half-read; a `setX` action that leaves `x` unchanged, or sets a different value, now fails and says what the value is; a number outside a control's min and max is refused, not clamped; `agentTools` lists `act` first. New in the bridge: an `expect` step, `closed` and `from` on `query`, and `more` and `section` in long snapshots.
38
+
39
+ What changes in Booki:
40
+
41
+ - `LedgerTable`'s `page` state is 1-based, the same as `table.page` and `setPage`. It was 0-based, so `setPage(3)` left `page: 2`, which ui-sdk now reports as a failed step.
42
+ - `@booki/svelte` no longer needs `ssr: { noExternal: [...] }`: `@ui-sdk/svelte` imports its own files with extensions now. Load it through Vite with the Svelte plugin as before.
43
+ - `@booki/primitives` and `@booki/react` no longer copy ui-sdk declaration files into `dist`, since `@ui-sdk/core` exports `SlotProps` now.
44
+
45
+ beta.17 was published on 2026-11-24; under a release-age rule (pnpm 11 waits one day by default) it installs from 2026-11-25.
46
+ - Updated dependencies [[`326ce38`](https://github.com/Walgermo/booki/commit/326ce386d087c74fb359a3508ccf4a416a41adea)]:
47
+ - @booki/primitives@0.1.5
48
+ - @booki/core@0.1.5
49
+
50
+ ## 0.1.4
51
+
52
+ ### Patch Changes
53
+
54
+ - Updated dependencies [[`520026a`](https://github.com/Walgermo/booki/commit/520026a6eea792c8186387a7dbc285b97628de36)]:
55
+ - @booki/primitives@0.1.4
56
+ - @booki/core@0.1.4
57
+
58
+ ## 0.1.3
59
+
60
+ ### Patch Changes
61
+
62
+ - [#69](https://github.com/Walgermo/booki/pull/69) [`85bde56`](https://github.com/Walgermo/booki/commit/85bde56ab298f00f1b08e326bb26610457d416f8) Thanks [@Walgermo](https://github.com/Walgermo)! - Four sales reports. `FunnelChart`: how many records reached each step, the conversion from the step before and from the first, the drop-off and the biggest drop; a step that rises is reported. `ForecastChart`: won, committed, best case and weighted revenue per month or quarter, from the same deals and stages as `DealPipeline`, naming the deals it leaves out (no close date, no amount or one without a source, another currency). `RecurringRevenue`: opening, new, expansion, contraction, churn and closing between two dates, as MRR or ARR; agreements billed per month, quarter or year are summed exactly per year, and the monthly view says what rounding moved. `StageDurationChart`: median and longest days per stage, a target per stage, and the deals over it. Rules in `@booki/core/funnel`, `@booki/core/recurring` and `forecastByPeriod` / `timeInStage` in `@booki/core/pipeline`. The catalog has recipes for win rate, a leaderboard, MRR over time, and working without stage history.
63
+ - Updated dependencies [[`85bde56`](https://github.com/Walgermo/booki/commit/85bde56ab298f00f1b08e326bb26610457d416f8)]:
64
+ - @booki/core@0.1.3
65
+ - @booki/primitives@0.1.3
66
+
67
+ ## 0.1.2
68
+
69
+ ### Patch Changes
70
+
71
+ - Updated dependencies [[`d7816ae`](https://github.com/Walgermo/booki/commit/d7816ae204780a08b4b1097699e57aaf47002626)]:
72
+ - @booki/core@0.1.2
73
+ - @booki/primitives@0.1.2
74
+
75
+ ## 0.1.1
76
+
77
+ ### Patch Changes
78
+
79
+ - [#65](https://github.com/Walgermo/booki/pull/65) [`201f7c9`](https://github.com/Walgermo/booki/commit/201f7c9d1aa843ab3a7c75ebbeb87df831110c08) Thanks [@Walgermo](https://github.com/Walgermo)! - Two controls for sales and customer work. `DealPipeline` is a board of deals in stages with each stage's totals per currency and a weighted forecast: an agent moves open deals, records a value with its source (`setValue`), and sets the expected close date and the owner; a value without a source is shown and never summed; marking a deal won or lost, and reopening it, are a person's buttons. `ActivityTimeline` is a customer's history and next steps: an agent logs calls, emails, meetings and notes, and schedules, reschedules and completes tasks, each recorded as the agent's; removing an entry is a person's. Rules in `@booki/core/pipeline` and `@booki/core/activity`, the `deal.close` and `activity.remove` permissions, a `sales` starter role, and `guardCloseDeal` for the server. `deal.close` is a person's decision: `PERSON_ONLY` and the readiness check now list it.
80
+ - Updated dependencies [[`201f7c9`](https://github.com/Walgermo/booki/commit/201f7c9d1aa843ab3a7c75ebbeb87df831110c08)]:
81
+ - @booki/core@0.1.1
82
+ - @booki/primitives@0.1.1
83
+
84
+ ## 0.1.0
85
+
86
+ The first release. It is not on npm: Booki is published once v1 has run in a real
87
+ product. Install it from a clone with `pnpm pack:local` (the install guide in
88
+ `skills/booki/SKILL.md` has the steps), with `@ui-sdk/core` and `@ui-sdk/react` at
89
+ exactly `0.1.0-beta.16`.
90
+
91
+ - **Supported:** React 19 (`@booki/react` with `@booki/core`, `@booki/primitives` and
92
+ `@booki/styles`), and the Norway (NO) and United States (US) country profiles.
93
+ - **Experimental:** Vue, Svelte, Solid and Web Components (`@booki/vue`,
94
+ `@booki/svelte`, `@booki/solid`, `@booki/web`), generated from the same primitives,
95
+ and the SE, DK, GB and DE starter profiles.
96
+ - Accounting and audit controls an agent operates by name through the ui-sdk bridge:
97
+ amounts in minor units, vouchers that must balance, bank account, IBAN and KID
98
+ redacted from the snapshot, periods, VAT, invoices, payment batches, reconciliation,
99
+ approvals, close, findings and workpapers. `useBookiField` gives a field you keep
100
+ Booki's agent action and rules.
101
+ - Approving, signing off, finalizing and releasing are a person's: never an agent
102
+ action, refused by `createBookiAgent` whatever the app allows, and by the server
103
+ guards in `@booki/core/server` (`PERSON_ONLY`). `data-agent-confirm` steps wait for
104
+ the person; `attachAudit` and `actAndRecord` record what the agent did, what it was
105
+ refused and who decided.
106
+ - Refusals, the bridge's own sentences and the agent cursor in English and Norwegian
107
+ (`createBookiAgent({ language: "nb" })`).
108
+ - Fixed in seven rounds of a product pilot in a real app, from the install guide.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Stian Walgermo
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,84 @@
1
- # Temporary Holding Version
1
+ # @booki-aui/web
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Experimental. This package is less tested than `@booki-aui/react`, and its API may
4
+ change between releases. See the
5
+ [Support section](https://github.com/Walgermo/booki#support) of the README.
6
+
7
+ Agent-first accounting controls as custom elements: the same rules, state and
8
+ agent actions as `@booki-aui/react`, for any framework or none. Use it in Angular,
9
+ in pages rendered on the server, or in plain HTML.
10
+
11
+ ```bash
12
+ pnpm add @booki-aui/web @booki-aui/styles
13
+ ```
14
+
15
+ ```html
16
+ <script type="module">
17
+ import "@booki-aui/web/amount-field"
18
+ import { createBookiAgent, registerTools } from "@booki-aui/web"
19
+
20
+ const allow = (step) => !step.confirm // marked steps (post, pay) go to a person
21
+ const agent = createBookiAgent({ agentId: "bookkeeper", allow })
22
+ registerTools(agent, { allow })
23
+ </script>
24
+
25
+ <booki-amount-field aria-label="Beløp" currency="NOK" locale="nb-NO">
26
+ <booki-amount-field-currency>NOK</booki-amount-field-currency>
27
+ <booki-amount-field-input><input /></booki-amount-field-input>
28
+ </booki-amount-field>
29
+ ```
30
+
31
+ `agent.snapshot()` now lists the field with its actions (`setMinor`, `clear`),
32
+ and `agent.act` sets it in integer minor units, refusing decimals and text the
33
+ same way the React control does. Changes fire events on the root, such as
34
+ `valuechange`; rich options (a chart of accounts, voucher lines) are
35
+ properties: `element.accounts = [...]`.
36
+
37
+ ## Angular
38
+
39
+ Custom elements need one schema entry:
40
+
41
+ ```ts
42
+ import { CUSTOM_ELEMENTS_SCHEMA, Component } from "@angular/core"
43
+ import "@booki-aui/web/amount-field"
44
+
45
+ @Component({
46
+ selector: "app-voucher",
47
+ standalone: true,
48
+ schemas: [CUSTOM_ELEMENTS_SCHEMA],
49
+ template: `
50
+ <booki-amount-field aria-label="Beløp" currency="NOK" (valuechange)="amount = $event.detail.value">
51
+ <booki-amount-field-input><input /></booki-amount-field-input>
52
+ </booki-amount-field>
53
+ `,
54
+ })
55
+ export class VoucherComponent {
56
+ amount = 0
57
+ }
58
+ ```
59
+
60
+ ## The agent's cursor
61
+
62
+ ```html
63
+ <booki-agent-cursor label="Agent"></booki-agent-cursor>
64
+ <script type="module">
65
+ import { createAgentCursor, createBookiAgent } from "@booki-aui/web"
66
+ const cursor = createAgentCursor()
67
+ const agent = createBookiAgent({ allow: cursor.wrap(allow) })
68
+ document.querySelector("booki-agent-cursor").cursor = cursor
69
+ </script>
70
+ ```
71
+
72
+ Before each step the pointer goes to the control and presses, then your
73
+ `allow` decides; `@booki-aui/styles` draws it. Set `element.narrate = (state) =>
74
+ "…"` to say the step in your language. It works the same from Vue, Svelte or
75
+ Solid.
76
+
77
+ ## Tags
78
+
79
+ Every control is `booki-<control>` with one tag per part, such as
80
+ `booki-voucher-composer-debit`. Parts that are fields or buttons wrap a native
81
+ `<input>`, `<select>` or `<button>` you write inside them. `entries.json` lists
82
+ the controls; each has its own entry, so a page loads only what it uses.
83
+
84
+ Peer dependencies: `@ui-sdk/core` and `@ui-sdk/web` 0.1.0-beta.17.
@@ -0,0 +1,7 @@
1
+ /**
2
+ * <booki-account-picker> and its parts. Importing this module registers the tags. Same
3
+ * state, actions and agent bridge as the React control.
4
+ */
5
+ declare const AccountPickerElements: Record<string, CustomElementConstructor | undefined>;
6
+
7
+ export { AccountPickerElements };
@@ -0,0 +1,7 @@
1
+ import {
2
+ AccountPickerElements
3
+ } from "./chunk-Y7IGCSR2.js";
4
+ export {
5
+ AccountPickerElements
6
+ };
7
+ //# sourceMappingURL=account-picker.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * <booki-accounting-period-select> and its parts. Importing this module registers the tags. Same
3
+ * state, actions and agent bridge as the React control.
4
+ */
5
+ declare const AccountingPeriodSelectElements: Record<string, CustomElementConstructor | undefined>;
6
+
7
+ export { AccountingPeriodSelectElements };
@@ -0,0 +1,7 @@
1
+ import {
2
+ AccountingPeriodSelectElements
3
+ } from "./chunk-WJBFP6H7.js";
4
+ export {
5
+ AccountingPeriodSelectElements
6
+ };
7
+ //# sourceMappingURL=accounting-period-select.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * <booki-activity-timeline> and its parts. Importing this module registers the tags. Same
3
+ * state, actions and agent bridge as the React control.
4
+ */
5
+ declare const ActivityTimelineElements: Record<string, CustomElementConstructor | undefined>;
6
+
7
+ export { ActivityTimelineElements };
@@ -0,0 +1,7 @@
1
+ import {
2
+ ActivityTimelineElements
3
+ } from "./chunk-WY6BINGZ.js";
4
+ export {
5
+ ActivityTimelineElements
6
+ };
7
+ //# sourceMappingURL=activity-timeline.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * <booki-aged-balances> and its parts. Importing this module registers the tags. Same
3
+ * state, actions and agent bridge as the React control.
4
+ */
5
+ declare const AgedBalancesElements: Record<string, CustomElementConstructor | undefined>;
6
+
7
+ export { AgedBalancesElements };
@@ -0,0 +1,7 @@
1
+ import {
2
+ AgedBalancesElements
3
+ } from "./chunk-5UQRL337.js";
4
+ export {
5
+ AgedBalancesElements
6
+ };
7
+ //# sourceMappingURL=aged-balances.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,31 @@
1
+ import { AgentCursorState, AgentCursorController } from '@booki-aui/primitives/agent-cursor';
2
+ export { AgentCursorController, AgentCursorState, createAgentCursor } from '@booki-aui/primitives/agent-cursor';
3
+
4
+ /**
5
+ * `<booki-agent-cursor>`: the agent's visible pointer for pages without React.
6
+ * Give it a cursor and wrap your allow with the same cursor:
7
+ *
8
+ * ```ts
9
+ * const cursor = createAgentCursor()
10
+ * const agent = createBookiAgent({ allow: cursor.wrap(allow) })
11
+ * document.querySelector("booki-agent-cursor").cursor = cursor
12
+ * ```
13
+ *
14
+ * The markup and `data-slot` names match @booki-aui/react's `AgentCursor`, so
15
+ * @booki-aui/styles draws both. `label` sets the name on it; `narrate` (a
16
+ * property) may turn the step into words in your language.
17
+ */
18
+ declare const ElementBase: typeof HTMLElement;
19
+ declare class BookiAgentCursorElement extends ElementBase {
20
+ #private;
21
+ narrate: ((state: AgentCursorState) => string) | null;
22
+ constructor();
23
+ static get observedAttributes(): string[];
24
+ connectedCallback(): void;
25
+ disconnectedCallback(): void;
26
+ attributeChangedCallback(): void;
27
+ get cursor(): AgentCursorController | null;
28
+ set cursor(next: AgentCursorController | null);
29
+ }
30
+
31
+ export { BookiAgentCursorElement };
@@ -0,0 +1,9 @@
1
+ import {
2
+ BookiAgentCursorElement,
3
+ createAgentCursor
4
+ } from "./chunk-H2V5ENBF.js";
5
+ export {
6
+ BookiAgentCursorElement,
7
+ createAgentCursor
8
+ };
9
+ //# sourceMappingURL=agent-cursor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,34 @@
1
+ import { AgentPolicyOptions } from '@booki-aui/primitives/agent-policy';
2
+ export { AgentDecision, actAndRecord, withRecordedAct } from '@booki-aui/primitives/agent-policy';
3
+ import { createAgent } from '@ui-sdk/web/agent';
4
+
5
+ /**
6
+ * The agent bridge for Booki's custom elements: the same snapshot, act, query
7
+ * and subscribe as in @booki-aui/react, with the same rule for marked steps.
8
+ *
9
+ * ```ts
10
+ * import "@booki-aui/web"
11
+ * import { createBookiAgent, registerTools } from "@booki-aui/web"
12
+ *
13
+ * const agent = createBookiAgent({ agentId: "bookkeeper", allow })
14
+ * registerTools(agent, { allow })
15
+ * ```
16
+ */
17
+ type BookiAgent = ReturnType<typeof createAgent>;
18
+ type CreateBookiAgentOptions = AgentPolicyOptions & {
19
+ /** How long a step waits for `allow`, in ms. Default five minutes. */
20
+ timeout?: number;
21
+ };
22
+ /**
23
+ * A step marked `data-agent-confirm` (posting, paying) runs only on a yes from
24
+ * `allow`; without `allow` it is refused with "Needs a person", which tells
25
+ * the agent what to do next. A person's decision (approve, sign, release) is
26
+ * refused whatever `allow` says.
27
+ */
28
+ declare function createBookiAgent(options?: CreateBookiAgentOptions): BookiAgent;
29
+ /** Registers the agent's tools with the browser's own agent (WebMCP), with the same rules. */
30
+ declare const registerTools: (agent: BookiAgent, options: AgentPolicyOptions & {
31
+ allow: NonNullable<AgentPolicyOptions["allow"]>;
32
+ }) => () => void;
33
+
34
+ export { type BookiAgent, type CreateBookiAgentOptions, createBookiAgent, registerTools };
package/dist/agent.js ADDED
@@ -0,0 +1,13 @@
1
+ import {
2
+ actAndRecord,
3
+ createBookiAgent,
4
+ registerTools,
5
+ withRecordedAct
6
+ } from "./chunk-XC2PESHG.js";
7
+ export {
8
+ actAndRecord,
9
+ createBookiAgent,
10
+ registerTools,
11
+ withRecordedAct
12
+ };
13
+ //# sourceMappingURL=agent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * <booki-aging-chart> and its parts. Importing this module registers the tags. Same
3
+ * state, actions and agent bridge as the React control.
4
+ */
5
+ declare const AgingChartElements: Record<string, CustomElementConstructor | undefined>;
6
+
7
+ export { AgingChartElements };
@@ -0,0 +1,7 @@
1
+ import {
2
+ AgingChartElements
3
+ } from "./chunk-HUBMJI2D.js";
4
+ export {
5
+ AgingChartElements
6
+ };
7
+ //# sourceMappingURL=aging-chart.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * <booki-amount-field> and its parts. Importing this module registers the tags. Same
3
+ * state, actions and agent bridge as the React control.
4
+ */
5
+ declare const AmountFieldElements: Record<string, CustomElementConstructor | undefined>;
6
+
7
+ export { AmountFieldElements };
@@ -0,0 +1,7 @@
1
+ import {
2
+ AmountFieldElements
3
+ } from "./chunk-RK67ELRF.js";
4
+ export {
5
+ AmountFieldElements
6
+ };
7
+ //# sourceMappingURL=amount-field.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * <booki-approval-chain> and its parts. Importing this module registers the tags. Same
3
+ * state, actions and agent bridge as the React control.
4
+ */
5
+ declare const ApprovalChainElements: Record<string, CustomElementConstructor | undefined>;
6
+
7
+ export { ApprovalChainElements };
@@ -0,0 +1,7 @@
1
+ import {
2
+ ApprovalChainElements
3
+ } from "./chunk-43QLLCKQ.js";
4
+ export {
5
+ ApprovalChainElements
6
+ };
7
+ //# sourceMappingURL=approval-chain.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * <booki-attestation-status> and its parts. Importing this module registers the tags. Same
3
+ * state, actions and agent bridge as the React control.
4
+ */
5
+ declare const AttestationStatusElements: Record<string, CustomElementConstructor | undefined>;
6
+
7
+ export { AttestationStatusElements };
@@ -0,0 +1,7 @@
1
+ import {
2
+ AttestationStatusElements
3
+ } from "./chunk-3W2FYPGK.js";
4
+ export {
5
+ AttestationStatusElements
6
+ };
7
+ //# sourceMappingURL=attestation-status.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * <booki-audit-findings> and its parts. Importing this module registers the tags. Same
3
+ * state, actions and agent bridge as the React control.
4
+ */
5
+ declare const AuditFindingsElements: Record<string, CustomElementConstructor | undefined>;
6
+
7
+ export { AuditFindingsElements };
@@ -0,0 +1,7 @@
1
+ import {
2
+ AuditFindingsElements
3
+ } from "./chunk-YJN3HJJX.js";
4
+ export {
5
+ AuditFindingsElements
6
+ };
7
+ //# sourceMappingURL=audit-findings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * <booki-audit-workpaper> and its parts. Importing this module registers the tags. Same
3
+ * state, actions and agent bridge as the React control.
4
+ */
5
+ declare const AuditWorkpaperElements: Record<string, CustomElementConstructor | undefined>;
6
+
7
+ export { AuditWorkpaperElements };
@@ -0,0 +1,7 @@
1
+ import {
2
+ AuditWorkpaperElements
3
+ } from "./chunk-F5CSJRSA.js";
4
+ export {
5
+ AuditWorkpaperElements
6
+ };
7
+ //# sourceMappingURL=audit-workpaper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * <booki-bank-account-input> and its parts. Importing this module registers the tags. Same
3
+ * state, actions and agent bridge as the React control.
4
+ */
5
+ declare const BankAccountInputElements: Record<string, CustomElementConstructor | undefined>;
6
+
7
+ export { BankAccountInputElements };
@@ -0,0 +1,7 @@
1
+ import {
2
+ BankAccountInputElements
3
+ } from "./chunk-WBIKQPAC.js";
4
+ export {
5
+ BankAccountInputElements
6
+ };
7
+ //# sourceMappingURL=bank-account-input.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * <booki-bank-reconciliation> and its parts. Importing this module registers the tags. Same
3
+ * state, actions and agent bridge as the React control.
4
+ */
5
+ declare const BankReconciliationElements: Record<string, CustomElementConstructor | undefined>;
6
+
7
+ export { BankReconciliationElements };
@@ -0,0 +1,7 @@
1
+ import {
2
+ BankReconciliationElements
3
+ } from "./chunk-OKBWREXN.js";
4
+ export {
5
+ BankReconciliationElements
6
+ };
7
+ //# sourceMappingURL=bank-reconciliation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * <booki-bar-chart> and its parts. Importing this module registers the tags. Same
3
+ * state, actions and agent bridge as the React control.
4
+ */
5
+ declare const BarChartElements: Record<string, CustomElementConstructor | undefined>;
6
+
7
+ export { BarChartElements };
@@ -0,0 +1,7 @@
1
+ import {
2
+ BarChartElements
3
+ } from "./chunk-JTGQ2JPX.js";
4
+ export {
5
+ BarChartElements
6
+ };
7
+ //# sourceMappingURL=bar-chart.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * <booki-cashflow-waterfall> and its parts. Importing this module registers the tags. Same
3
+ * state, actions and agent bridge as the React control.
4
+ */
5
+ declare const CashflowWaterfallElements: Record<string, CustomElementConstructor | undefined>;
6
+
7
+ export { CashflowWaterfallElements };
@@ -0,0 +1,7 @@
1
+ import {
2
+ CashflowWaterfallElements
3
+ } from "./chunk-LFACUVZD.js";
4
+ export {
5
+ CashflowWaterfallElements
6
+ };
7
+ //# sourceMappingURL=cashflow-waterfall.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}