@kirana-ui/angular 0.3.0 → 0.4.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.
- package/CHANGELOG.md +140 -0
- package/fesm2022/kirana-ui-angular.mjs +7905 -937
- package/fesm2022/kirana-ui-angular.mjs.map +1 -1
- package/llms.txt +1536 -145
- package/package.json +4 -3
- package/skills/kirana-ui-primitives/SKILL.md +24 -4
- package/types/kirana-ui-angular-agent.d.ts +3 -0
- package/types/kirana-ui-angular-testing.d.ts +3 -0
- package/types/kirana-ui-angular.d.ts +2255 -124
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kirana-ui/angular",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Kirana UI Primitives for Angular",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "The Kirana authors",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"./package.json": "./package.json"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@kirana-ui/core": "0.
|
|
25
|
+
"@kirana-ui/core": "0.4.0",
|
|
26
26
|
"tslib": "^2.8.1"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
@@ -47,7 +47,8 @@
|
|
|
47
47
|
"REFERENCE.md",
|
|
48
48
|
"llms.txt",
|
|
49
49
|
"skills",
|
|
50
|
-
"LICENSE"
|
|
50
|
+
"LICENSE",
|
|
51
|
+
"CHANGELOG.md"
|
|
51
52
|
],
|
|
52
53
|
"module": "fesm2022/kirana-ui-angular.mjs",
|
|
53
54
|
"typings": "types/kirana-ui-angular.d.ts"
|
|
@@ -52,15 +52,17 @@ from one core. The package for a framework is all a project installs.
|
|
|
52
52
|
4. A value is controlled when given (`value` + `onValueChange`) and the component's own
|
|
53
53
|
otherwise (`defaultValue`). A callback beside a value the component holds is
|
|
54
54
|
`(value, details)`, and `details.cancel()` keeps the value as it was. A callback that
|
|
55
|
-
reports something that happened (`
|
|
56
|
-
|
|
55
|
+
reports something that happened (`onClearErrors`, `onMonthChange`) takes only that. The
|
|
56
|
+
names are Base UI's: `loopFocus`, `disablePointerDismissal`, a multiple Select's or
|
|
57
|
+
Combobox's list in `value`, One-Time Code's `validationType` and `onValueComplete`, a
|
|
58
|
+
toast's `timeout`; the older names still work and are marked deprecated.
|
|
57
59
|
5. A control with a `name` is submitted with its form and follows the form's reset. Wrap it
|
|
58
60
|
in `Field` for a label, a description and validation. `readOnly` and `keepMounted` are
|
|
59
61
|
props of the parts `llms.txt` lists them for, and of no others.
|
|
60
62
|
|
|
61
63
|
Per framework: React takes `render` for another element; Vue takes `as` / `as-child`, binds
|
|
62
64
|
with `v-model:value` and names props in kebab case; Svelte takes a `child` snippet and
|
|
63
|
-
`bind:value`; Solid takes `as` and `render`; Angular's parts are directives on your own
|
|
65
|
+
`bind:value`; Solid (2, with `@solidjs/web`) takes `as` and `render`; Angular's parts are directives on your own
|
|
64
66
|
elements (`<button kpDialogTrigger>`), bound with `[(value)]`, with `[kpId]` for an id, and
|
|
65
67
|
a part that comes and goes is structural (`*kpDialogPortal`, `*kpTabsPanel`: the list is in
|
|
66
68
|
`llms.txt`); custom elements name each part with `kui-part` inside `<kui-dialog>`.
|
|
@@ -136,7 +138,25 @@ component's ref, kind, label, state and actions), `act({ steps: [{ ref, action,
|
|
|
136
138
|
through the component's own handlers: its callback runs with `details.source === "agent"`
|
|
137
139
|
and may cancel. Give every control an accessible name (a `<label>`, `aria-label`): it is how
|
|
138
140
|
an agent finds it. Mark a destructive control `data-agent-confirm="what it does"`, private
|
|
139
|
-
regions `data-agent-hidden`, secrets `data-agent-secret
|
|
141
|
+
regions `data-agent-hidden`, secrets `data-agent-secret` (whatever is inside is listed with its
|
|
142
|
+
name and its actions, never its value, its choices or whether it is checked). A bridge given a
|
|
143
|
+
`root` also reads what was opened from inside it (a dialog, a menu, a select's list), by the
|
|
144
|
+
`aria-controls` of what opened it. A step names its control by ref, by its label, by words of
|
|
145
|
+
the label, by the text of its row or by one of its choices; a name two controls answer to
|
|
146
|
+
fails with both. `subscribe((changed, changes) => …)` says of each change its `key`, `value`,
|
|
147
|
+
`previous`, `source` and `reason`; `record()` keeps a person's changes in `history()` beside
|
|
148
|
+
the agent's, each with its `source` and a sentence (`text`), and `undoSource("agent")` takes
|
|
149
|
+
back only the agent's. `stage({ steps })` shows a suggestion in the controls and gives
|
|
150
|
+
`revert()` and `keep()`. `act` takes a `signal`; `timeout` bounds a wait for `allow` or
|
|
151
|
+
`confirm`. A component of your own is read through `kinds` (`AgentKind`: a selector, `read`,
|
|
152
|
+
`perform`). A slider's `setValue` fails with what the slider holds when
|
|
153
|
+
its range or step does not hold the value asked for, and so does a spin button's (a Date or
|
|
154
|
+
Time Field's part, typed as a person types it). The thumbs of a range named by their group
|
|
155
|
+
are told apart by their place (`"Price, 1 of 2"`). A list of several values (a listbox, a
|
|
156
|
+
select with `multiple`, a tree) says `values` and takes a list in `setValue`; a closed
|
|
157
|
+
select's are known once its list has been read. A tree is one component: its shown nodes
|
|
158
|
+
are its `items` (with `level` below the top and `open` for a branch), and `setValue`,
|
|
159
|
+
`open` and `close` take a node's name. `allow(action)` is the policy,
|
|
140
160
|
asked for every step; `confirm(action)` is a person's answer, asked for a step on something
|
|
141
161
|
marked `data-agent-confirm`, and without it such a step fails with "Needs a person" whatever
|
|
142
162
|
`allow` says. Never write `confirm: () => true`: open a dialog and resolve with what the
|