@happyvertical/smrt-ui 0.34.5 → 0.34.7
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/AGENTS.md +15 -5
- package/dist/components/chat/MessageBubble.svelte +123 -33
- package/dist/components/chat/MessageBubble.svelte.d.ts +33 -10
- package/dist/components/chat/MessageBubble.svelte.d.ts.map +1 -1
- package/dist/components/chat/ReactionPicker.svelte +50 -18
- package/dist/components/chat/ReactionPicker.svelte.d.ts +8 -8
- package/dist/components/chat/ReactionPicker.svelte.d.ts.map +1 -1
- package/dist/components/chat/TypingIndicator.svelte +42 -25
- package/dist/components/chat/TypingIndicator.svelte.d.ts +12 -5
- package/dist/components/chat/TypingIndicator.svelte.d.ts.map +1 -1
- package/dist/components/chat/__tests__/chat-primitives.test.js +52 -1
- package/dist/components/forms/Form.svelte +53 -0
- package/dist/components/forms/Form.svelte.d.ts +29 -0
- package/dist/components/forms/Form.svelte.d.ts.map +1 -0
- package/dist/components/forms/FormGroup.svelte +86 -0
- package/dist/components/forms/FormGroup.svelte.d.ts +13 -0
- package/dist/components/forms/FormGroup.svelte.d.ts.map +1 -0
- package/dist/components/forms/Input.svelte +89 -0
- package/dist/components/forms/Input.svelte.d.ts +9 -0
- package/dist/components/forms/Input.svelte.d.ts.map +1 -0
- package/dist/components/forms/Select.svelte +89 -0
- package/dist/components/forms/Select.svelte.d.ts +11 -0
- package/dist/components/forms/Select.svelte.d.ts.map +1 -0
- package/dist/components/forms/Textarea.svelte +91 -0
- package/dist/components/forms/Textarea.svelte.d.ts +10 -0
- package/dist/components/forms/Textarea.svelte.d.ts.map +1 -0
- package/dist/components/forms/Toggle.svelte +224 -0
- package/dist/components/forms/Toggle.svelte.d.ts +37 -0
- package/dist/components/forms/Toggle.svelte.d.ts.map +1 -0
- package/dist/components/forms/__tests__/Form.test.js +49 -0
- package/dist/components/forms/__tests__/FormGroup.test.js +48 -0
- package/dist/components/forms/__tests__/Input.test.js +49 -0
- package/dist/components/forms/__tests__/Select.test.js +37 -0
- package/dist/components/forms/__tests__/Textarea.test.js +39 -0
- package/dist/components/forms/__tests__/Toggle.test.js +87 -0
- package/dist/components/forms/__tests__/form-group-input.fixture.svelte +16 -0
- package/dist/components/forms/__tests__/form-group-input.fixture.svelte.d.ts +9 -0
- package/dist/components/forms/__tests__/form-group-input.fixture.svelte.d.ts.map +1 -0
- package/dist/components/forms/form-group-context.d.ts +13 -0
- package/dist/components/forms/form-group-context.d.ts.map +1 -0
- package/dist/components/forms/form-group-context.js +28 -0
- package/dist/components/forms/index.d.ts +21 -0
- package/dist/components/forms/index.d.ts.map +1 -0
- package/dist/components/forms/index.js +20 -0
- package/dist/components/ui/Button.svelte +16 -0
- package/dist/i18n/strings.ui.d.ts +2 -0
- package/dist/i18n/strings.ui.d.ts.map +1 -1
- package/dist/i18n/strings.ui.js +3 -0
- package/package.json +8 -2
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Form primitives — subpath `@happyvertical/smrt-ui/forms`.
|
|
3
|
+
*
|
|
4
|
+
* The Provider-FREE base form primitives, relocated here from
|
|
5
|
+
* `@happyvertical/smrt-svelte/forms` (issue #1589 deferred-forms phase) so domain
|
|
6
|
+
* packages can adopt them without pulling in the smrt-svelte Provider or closing
|
|
7
|
+
* a build-graph cycle. smrt-ui is the leaf everyone may depend on.
|
|
8
|
+
*
|
|
9
|
+
* `Form`, `Input`, `Select`, `Textarea`, `Toggle`, `FormGroup` are generic,
|
|
10
|
+
* tokenised, a11y-checked building blocks with no Provider/i18n/spoken-input
|
|
11
|
+
* dependency. The Provider-REQUIRED inputs (`CheckboxInput`, `TextInput`,
|
|
12
|
+
* `MoneyInput`, the rich `Form`, …) stay in `@happyvertical/smrt-svelte/forms`.
|
|
13
|
+
*/
|
|
14
|
+
export { default as Form } from './Form.svelte';
|
|
15
|
+
export { default as FormGroup } from './FormGroup.svelte';
|
|
16
|
+
export { default as Input } from './Input.svelte';
|
|
17
|
+
export { default as Select } from './Select.svelte';
|
|
18
|
+
export { default as Textarea } from './Textarea.svelte';
|
|
19
|
+
export { default as Toggle } from './Toggle.svelte';
|
|
20
|
+
export { type FormGroupContextValue, nextFieldId, setFormGroupContext, tryGetFormGroupContext, } from './form-group-context.js';
|
|
21
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/forms/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEpD,OAAO,EACL,KAAK,qBAAqB,EAC1B,WAAW,EACX,mBAAmB,EACnB,sBAAsB,GACvB,MAAM,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Form primitives — subpath `@happyvertical/smrt-ui/forms`.
|
|
3
|
+
*
|
|
4
|
+
* The Provider-FREE base form primitives, relocated here from
|
|
5
|
+
* `@happyvertical/smrt-svelte/forms` (issue #1589 deferred-forms phase) so domain
|
|
6
|
+
* packages can adopt them without pulling in the smrt-svelte Provider or closing
|
|
7
|
+
* a build-graph cycle. smrt-ui is the leaf everyone may depend on.
|
|
8
|
+
*
|
|
9
|
+
* `Form`, `Input`, `Select`, `Textarea`, `Toggle`, `FormGroup` are generic,
|
|
10
|
+
* tokenised, a11y-checked building blocks with no Provider/i18n/spoken-input
|
|
11
|
+
* dependency. The Provider-REQUIRED inputs (`CheckboxInput`, `TextInput`,
|
|
12
|
+
* `MoneyInput`, the rich `Form`, …) stay in `@happyvertical/smrt-svelte/forms`.
|
|
13
|
+
*/
|
|
14
|
+
export { default as Form } from './Form.svelte';
|
|
15
|
+
export { default as FormGroup } from './FormGroup.svelte';
|
|
16
|
+
export { default as Input } from './Input.svelte';
|
|
17
|
+
export { default as Select } from './Select.svelte';
|
|
18
|
+
export { default as Textarea } from './Textarea.svelte';
|
|
19
|
+
export { default as Toggle } from './Toggle.svelte';
|
|
20
|
+
export { nextFieldId, setFormGroupContext, tryGetFormGroupContext, } from './form-group-context.js';
|
|
@@ -247,6 +247,22 @@ const linkProps = $derived(() => {
|
|
|
247
247
|
to { transform: translate(-50%, -50%) rotate(360deg); }
|
|
248
248
|
}
|
|
249
249
|
|
|
250
|
+
/* Lay out the button's own children. The children render inside this wrapper
|
|
251
|
+
span, so the button-level `gap` never reaches them — without making the
|
|
252
|
+
wrapper itself a flex row, an icon + label (`<Button><svg/>Save</Button>`)
|
|
253
|
+
would render with no gap. Making `.content` a centered flex row lays out
|
|
254
|
+
multi-child buttons (icon+text, label+count) correctly after the #1589
|
|
255
|
+
migration, instead of needing per-button CSS to reach into `.content`. The
|
|
256
|
+
wrapper is shrink-to-fit, so a caller wanting a spread layout must also give
|
|
257
|
+
it width — e.g. a full-width button with
|
|
258
|
+
`.x :global(.content) { width: 100%; justify-content: space-between }`. */
|
|
259
|
+
.content {
|
|
260
|
+
display: inline-flex;
|
|
261
|
+
align-items: center;
|
|
262
|
+
justify-content: center;
|
|
263
|
+
gap: var(--smrt-spacing-2);
|
|
264
|
+
}
|
|
265
|
+
|
|
250
266
|
.content.loading {
|
|
251
267
|
opacity: 0;
|
|
252
268
|
}
|
|
@@ -30,5 +30,7 @@ export declare const M: {
|
|
|
30
30
|
readonly 'ui.pagination.go_to_page': "ui.pagination.go_to_page";
|
|
31
31
|
readonly 'ui.pagination.next_page': "ui.pagination.next_page";
|
|
32
32
|
readonly 'ui.pagination.last_page': "ui.pagination.last_page";
|
|
33
|
+
readonly 'ui.reaction_picker.label': "ui.reaction_picker.label";
|
|
34
|
+
readonly 'ui.reaction_picker.react_with': "ui.reaction_picker.react_with";
|
|
33
35
|
};
|
|
34
36
|
//# sourceMappingURL=strings.ui.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"strings.ui.d.ts","sourceRoot":"","sources":["../../src/i18n/strings.ui.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,eAAO,MAAM,CAAC
|
|
1
|
+
{"version":3,"file":"strings.ui.d.ts","sourceRoot":"","sources":["../../src/i18n/strings.ui.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,eAAO,MAAM,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;CAgDZ,CAAC"}
|
package/dist/i18n/strings.ui.js
CHANGED
|
@@ -41,4 +41,7 @@ export const M = defineMessages({
|
|
|
41
41
|
'ui.pagination.go_to_page': 'Go to page {page}',
|
|
42
42
|
'ui.pagination.next_page': 'Next page',
|
|
43
43
|
'ui.pagination.last_page': 'Last page ({totalPages})',
|
|
44
|
+
// chat/ReactionPicker.svelte
|
|
45
|
+
'ui.reaction_picker.label': 'Add reaction',
|
|
46
|
+
'ui.reaction_picker.react_with': 'React with {emoji}',
|
|
44
47
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@happyvertical/smrt-ui",
|
|
3
|
-
"version": "0.34.
|
|
3
|
+
"version": "0.34.7",
|
|
4
4
|
"description": "Domain-agnostic Svelte 5 UI runtime for SMRT: primitives, i18n client, theme system, and module UI registry",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -43,6 +43,12 @@
|
|
|
43
43
|
"import": "./dist/components/chat/index.js",
|
|
44
44
|
"default": "./dist/components/chat/index.js"
|
|
45
45
|
},
|
|
46
|
+
"./forms": {
|
|
47
|
+
"types": "./dist/components/forms/index.d.ts",
|
|
48
|
+
"svelte": "./dist/components/forms/index.js",
|
|
49
|
+
"import": "./dist/components/forms/index.js",
|
|
50
|
+
"default": "./dist/components/forms/index.js"
|
|
51
|
+
},
|
|
46
52
|
"./i18n": {
|
|
47
53
|
"types": "./dist/i18n/index.d.ts",
|
|
48
54
|
"svelte": "./dist/i18n/index.js",
|
|
@@ -108,7 +114,7 @@
|
|
|
108
114
|
},
|
|
109
115
|
"dependencies": {
|
|
110
116
|
"esm-env": "^1.2.2",
|
|
111
|
-
"@happyvertical/smrt-types": "0.34.
|
|
117
|
+
"@happyvertical/smrt-types": "0.34.7"
|
|
112
118
|
},
|
|
113
119
|
"peerDependencies": {
|
|
114
120
|
"svelte": "^5.18.2"
|