@getdom/studio 0.2.1 → 0.2.3

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 (30) hide show
  1. package/CHANGELOG.md +93 -0
  2. package/LICENSE.md +23 -9
  3. package/package.json +1 -1
  4. package/src/pages/_layout/componentCatalog.generated.js +115 -13
  5. package/src/pages/components/command-palette/DomCommandPalette.vue +6 -1
  6. package/src/pages/data/agent-chat/DomAgentChatShell.vue +52 -53
  7. package/src/pages/data/agent-chat/DomAgentConversation.vue +163 -154
  8. package/src/pages/data/agent-chat/DomAgentConversationList.vue +53 -57
  9. package/src/pages/data/month-calendar/DomMonthCalendar.vue +8 -9
  10. package/src/pages/forms/_shared/DomOptionStatus.vue +18 -0
  11. package/src/pages/forms/_shared/useOptionMenu.js +18 -2
  12. package/src/pages/forms/_shared/useOptionPaging.js +42 -0
  13. package/src/pages/forms/_shared/useSelectedOptions.js +25 -0
  14. package/src/pages/forms/autocomplete/DomAutocomplete.vue +36 -8
  15. package/src/pages/forms/combobox/DomCombobox.vue +44 -7
  16. package/src/pages/forms/font-picker/DomFontPicker.vue +416 -0
  17. package/src/pages/forms/font-picker/FontPreview.vue +39 -0
  18. package/src/pages/forms/font-picker/fontPicker.js +102 -0
  19. package/src/pages/forms/font-picker/googleFonts.js +1951 -0
  20. package/src/pages/forms/select/DomSelect.vue +118 -29
  21. package/src/pages/forms/tag-combobox/DomTagCombobox.vue +67 -15
  22. package/src/pages/lib/headless/autocomplete.js +5 -0
  23. package/src/pages/lib/headless/combobox.js +129 -25
  24. package/src/pages/lib/headless/dropdown.js +3 -2
  25. package/src/pages/lib/headless/listbox.d.ts +1 -0
  26. package/src/pages/lib/headless/listbox.js +41 -5
  27. package/src/pages/lib/vue/index.d.ts +136 -6
  28. package/src/pages/lib/vue/index.js +1 -0
  29. package/src/tailwind.css +5 -1
  30. package/src/theme.css +4 -0
@@ -248,6 +248,14 @@ export interface IconSelectorItem {
248
248
  component?: DomVueComponent;
249
249
  [key: string]: unknown;
250
250
  }
251
+ export interface FontPickerItem {
252
+ family: string;
253
+ value?: string;
254
+ label?: string;
255
+ category?: 'sans-serif' | 'serif' | 'display' | 'handwriting' | 'monospace' | string;
256
+ keywords?: string | Array<string>;
257
+ [key: string]: unknown;
258
+ }
251
259
  /** A contained menu page, route link, or application-owned action. */
252
260
  export interface MenuStackItem {
253
261
  id: string;
@@ -2644,11 +2652,11 @@ export interface DomMonthCalendarProps {
2644
2652
  */
2645
2653
  showDayNames?: boolean;
2646
2654
  /**
2647
- * Highlight today with a cell outline, a coloured circle behind the date, or no visual indicator.
2655
+ * Highlight today with a cell outline, a coloured circle behind the date, both, or no visual indicator.
2648
2656
  */
2649
- todayIndicator?: "cell" | "circle" | "none";
2657
+ todayIndicator?: "cell" | "circle" | "both" | "none";
2650
2658
  /**
2651
- * Classes for today’s date circle. Replaces the default primary background and foreground colours when todayIndicator is circle.
2659
+ * Classes for today’s date circle. Replaces the default primary background and foreground colours when todayIndicator is circle or both.
2652
2660
  */
2653
2661
  todayDateClass?: string | Array<unknown> | Record<string, unknown> | ((...args: Array<unknown>) => unknown);
2654
2662
  /**
@@ -3331,7 +3339,7 @@ export interface DomAgentConversationProps {
3331
3339
  */
3332
3340
  toolComponents?: AgentChatToolComponentMap;
3333
3341
  /**
3334
- * CSS max-width applied to message bubbles.
3342
+ * CSS max-width applied to the centered message column and composer.
3335
3343
  */
3336
3344
  maxMessageWidth?: string;
3337
3345
  }
@@ -4285,7 +4293,7 @@ export interface DomSelectProps {
4285
4293
  /**
4286
4294
  * Selected option value.
4287
4295
  */
4288
- modelValue?: string | number;
4296
+ modelValue?: string | number | Array<string | number>;
4289
4297
  /**
4290
4298
  * Optional ID override. By default parent forms derive the input ID from the field path using underscores.
4291
4299
  */
@@ -4374,6 +4382,21 @@ export interface DomSelectProps {
4374
4382
  * Placeholder shown inside the panel search input.
4375
4383
  */
4376
4384
  searchPlaceholder?: string;
4385
+ /**
4386
+ * Toggle multiple values without closing the panel. Use an array v-model.
4387
+ */
4388
+ multiple?: boolean | string;
4389
+ /**
4390
+ * Disable local filtering for server-ranked options.
4391
+ */
4392
+ filterOptions?: boolean | string;
4393
+ loading?: boolean | string;
4394
+ hasMore?: boolean | string;
4395
+ /**
4396
+ * Resolved records for initial values outside the currently loaded server page.
4397
+ */
4398
+ selectedOptions?: Array<DomOption>;
4399
+ clearable?: boolean | string;
4377
4400
  }
4378
4401
  export declare const DomSelect: DomComponent<DomSelectProps>;
4379
4402
 
@@ -4458,6 +4481,9 @@ export interface DomComboboxProps {
4458
4481
  * Show an inline spinner while async options are being fetched.
4459
4482
  */
4460
4483
  loading?: boolean | string;
4484
+ filterOptions?: boolean | string;
4485
+ hasMore?: boolean | string;
4486
+ selectedOptions?: Array<DomOption>;
4461
4487
  }
4462
4488
  export declare const DomCombobox: DomComponent<DomComboboxProps>;
4463
4489
 
@@ -4538,6 +4564,8 @@ export interface DomAutocompleteProps {
4538
4564
  * Show an inline spinner while async suggestions are being fetched.
4539
4565
  */
4540
4566
  loading?: boolean | string;
4567
+ filterOptions?: boolean | string;
4568
+ hasMore?: boolean | string;
4541
4569
  }
4542
4570
  export declare const DomAutocomplete: DomComponent<DomAutocompleteProps>;
4543
4571
 
@@ -4545,7 +4573,7 @@ export interface DomTagComboboxProps {
4545
4573
  /**
4546
4574
  * Selected tag values.
4547
4575
  */
4548
- modelValue?: Array<string>;
4576
+ modelValue?: Array<string | number>;
4549
4577
  /**
4550
4578
  * Optional ID override. By default parent forms derive the input ID from the field path using underscores.
4551
4579
  */
@@ -4634,6 +4662,8 @@ export interface DomTagComboboxProps {
4634
4662
  * Show a clear-all button when tags are selected.
4635
4663
  */
4636
4664
  clearable?: boolean | string;
4665
+ hasMore?: boolean | string;
4666
+ selectedOptions?: Array<DomOption>;
4637
4667
  }
4638
4668
  export declare const DomTagCombobox: DomComponent<DomTagComboboxProps>;
4639
4669
 
@@ -4733,6 +4763,106 @@ export interface DomIconSelectorProps {
4733
4763
  }
4734
4764
  export declare const DomIconSelector: DomComponent<DomIconSelectorProps>;
4735
4765
 
4766
+ export interface DomFontPickerProps {
4767
+ /**
4768
+ * Selected font family or application-defined font value.
4769
+ */
4770
+ modelValue?: string;
4771
+ /**
4772
+ * Optional ID override. By default parent forms derive the input ID from the field path using underscores.
4773
+ */
4774
+ id?: string;
4775
+ /**
4776
+ * Local field name. Parent forms derive the full field path and native HTML name from the form hierarchy.
4777
+ */
4778
+ name?: string;
4779
+ /**
4780
+ * Visible field label.
4781
+ */
4782
+ label?: string;
4783
+ /**
4784
+ * Optional helper copy below the field.
4785
+ */
4786
+ description?: string;
4787
+ /**
4788
+ * Placeholder shown when the control is empty.
4789
+ */
4790
+ placeholder?: string;
4791
+ /**
4792
+ * Mark the field as required.
4793
+ */
4794
+ required?: boolean;
4795
+ /**
4796
+ * Disable field interaction.
4797
+ */
4798
+ disabled?: boolean;
4799
+ /**
4800
+ * Show the value but prevent editing.
4801
+ */
4802
+ readOnly?: boolean;
4803
+ /**
4804
+ * Mark the field invalid.
4805
+ */
4806
+ invalid?: boolean;
4807
+ /**
4808
+ * Validation errors for this field.
4809
+ */
4810
+ errors?: Array<unknown> | Record<string, unknown> | string;
4811
+ /**
4812
+ * Show or hide the field.
4813
+ */
4814
+ visible?: boolean;
4815
+ /**
4816
+ * Validators attached to this field. Use functions in Vue code, or serializable records such as { name: "minLength", props: { min: 2 } } in generated schemas.
4817
+ */
4818
+ validators?: Array<unknown>;
4819
+ /**
4820
+ * Run validators when the field loses focus.
4821
+ */
4822
+ validateOnBlur?: boolean;
4823
+ /**
4824
+ * Render default field chrome, or hide chrome while keeping form state wiring.
4825
+ */
4826
+ chrome?: "field" | "none" | false;
4827
+ /**
4828
+ * Lightweight family metadata. Font files are never bundled in this array.
4829
+ */
4830
+ fonts?: Array<FontPickerItem | string>;
4831
+ /**
4832
+ * Optionally restrict results to one Google Fonts category.
4833
+ */
4834
+ category?: "" | "sans-serif" | "serif" | "display" | "handwriting" | "monospace";
4835
+ /**
4836
+ * Number of metadata rows appended near the end. Preview fonts load only near the viewport.
4837
+ */
4838
+ pageSize?: number;
4839
+ /**
4840
+ * Optional shared sample. Empty uses each family name as its own preview.
4841
+ */
4842
+ previewText?: string;
4843
+ /**
4844
+ * Load the mounted selected label and visible previews from Google Fonts.
4845
+ */
4846
+ loadFonts?: boolean;
4847
+ /**
4848
+ * Google Fonts CSS v2 endpoint or an application-controlled compatible proxy.
4849
+ */
4850
+ stylesheetUrl?: string;
4851
+ /**
4852
+ * Show a clear button after a font is selected.
4853
+ */
4854
+ clearable?: boolean;
4855
+ /**
4856
+ * Preferred side before collision handling.
4857
+ */
4858
+ placement?: "bottom" | "top" | "right" | "left";
4859
+ /**
4860
+ * viewport keeps the list inside the browser; anchor keeps it attached while scrolling.
4861
+ */
4862
+ floatingMode?: "viewport" | "anchor";
4863
+ }
4864
+ export declare const DomFontPicker: DomComponent<DomFontPickerProps>;
4865
+
4736
4866
  export interface DomClassToggleInputProps {
4737
4867
  /**
4738
4868
  * Enabled class names as a space-separated string.
@@ -130,6 +130,7 @@ export { default as DomCombobox } from '../../forms/combobox/DomCombobox.vue';
130
130
  export { default as DomAutocomplete } from '../../forms/autocomplete/DomAutocomplete.vue';
131
131
  export { default as DomTagCombobox } from '../../forms/tag-combobox/DomTagCombobox.vue';
132
132
  export { default as DomIconSelector } from '../../forms/icon-selector/DomIconSelector.vue';
133
+ export { default as DomFontPicker } from '../../forms/font-picker/DomFontPicker.vue';
133
134
  export { default as DomClassToggleInput } from '../../forms/class-toggle-input/DomClassToggleInput.vue';
134
135
  export { default as DomField } from '../../forms/field/DomField.vue';
135
136
  export { default as DomGridFieldLayout } from '../../forms/field/layouts/DomGridFieldLayout.vue';
package/src/tailwind.css CHANGED
@@ -14,6 +14,8 @@
14
14
  --dom-month-calendar-row-rail-direction: row;
15
15
  --dom-month-calendar-row-rail-justify: space-between;
16
16
  --dom-month-calendar-row-rail-min-height: 2.5rem;
17
+ --dom-month-calendar-row-rail-padding: 0.5rem;
18
+ --dom-month-calendar-week-number-order: 0;
17
19
  --dom-month-calendar-week-columns: minmax(0, 1fr);
18
20
  }
19
21
 
@@ -33,6 +35,8 @@
33
35
  --dom-month-calendar-row-rail-direction: column;
34
36
  --dom-month-calendar-row-rail-justify: flex-start;
35
37
  --dom-month-calendar-row-rail-min-height: 11rem;
38
+ --dom-month-calendar-row-rail-padding: 0.75rem;
39
+ --dom-month-calendar-week-number-order: -1;
36
40
  --dom-month-calendar-week-columns: var(--dom-month-calendar-wide-week-columns);
37
41
  --dom-month-calendar-wide-border-left-width: 1px;
38
42
  --dom-month-calendar-wide-border-top-width: 0;
@@ -109,7 +113,7 @@
109
113
  }
110
114
 
111
115
  .skin-control {
112
- background-color: var(--skin-control-bg, var(--secondary));
116
+ background-color: var(--skin-control-bg, var(--canvas));
113
117
  background-image: var(--skin-control-bg-image, none);
114
118
  border-color: var(--skin-control-border, var(--border));
115
119
  border-style: var(--skin-control-border-style, solid);
package/src/theme.css CHANGED
@@ -11,6 +11,8 @@
11
11
  --shadow-lg: 0 8px 20px -6px rgb(15 23 42 / 0.16), 0 2px 6px -2px rgb(15 23 42 / 0.08);
12
12
  --shadow-xl: 0 18px 44px -18px rgb(15 23 42 / 0.24), 0 8px 18px -12px rgb(15 23 42 / 0.16);
13
13
  --shadow-2xl: 0 24px 60px -18px rgb(15 23 42 / 0.24), 0 8px 20px -10px rgb(15 23 42 / 0.14);
14
+ --dom-command-palette-background: color-mix(in oklch, var(--canvas) 68%, transparent);
15
+ --dom-command-palette-shadow: 0 40px 100px -24px rgb(15 23 42 / 0.3), 0 16px 40px -20px rgb(15 23 42 / 0.2);
14
16
  --chart-1: oklch(0.55 0.19 257);
15
17
  --chart-2: oklch(0.58 0.13 175);
16
18
  --chart-3: oklch(0.65 0.16 65);
@@ -45,6 +47,8 @@
45
47
  --shadow-lg: 0 1px 0 0 rgb(255 255 255 / 0.05) inset, 0 16px 34px -18px rgb(0 0 0 / 0.58), 0 5px 12px -8px rgb(0 0 0 / 0.5);
46
48
  --shadow-xl: 0 1px 0 0 rgb(255 255 255 / 0.05) inset, 0 24px 52px -24px rgb(0 0 0 / 0.68), 0 10px 22px -14px rgb(0 0 0 / 0.56);
47
49
  --shadow-2xl: 0 1px 0 0 rgb(255 255 255 / 0.06) inset, 0 34px 76px -30px rgb(0 0 0 / 0.72), 0 16px 34px -20px rgb(0 0 0 / 0.58);
50
+ --dom-command-palette-background: color-mix(in oklch, var(--canvas) 68%, transparent);
51
+ --dom-command-palette-shadow: 0 40px 100px -24px rgb(0 0 0 / 0.78), 0 16px 40px -20px rgb(0 0 0 / 0.62);
48
52
  --chart-1: oklch(0.72 0.15 257);
49
53
  --chart-2: oklch(0.75 0.13 175);
50
54
  --chart-3: oklch(0.8 0.15 75);