@salesql/sql_components_vue3 3.17.0 → 3.19.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 (38) hide show
  1. package/dist/composables/useViewportClamp.d.ts +9 -4
  2. package/dist/constants/contact-data.d.ts +31 -1
  3. package/dist/constants/events.d.ts +6 -0
  4. package/dist/icons/icons.types.d.ts +38 -0
  5. package/dist/icons/registry.d.ts +30 -0
  6. package/dist/icons/registry.generated.d.ts +4 -0
  7. package/dist/index.cjs +1 -1
  8. package/dist/index.cjs.map +1 -1
  9. package/dist/index.d.ts +13 -6
  10. package/dist/index.es.js +4005 -2668
  11. package/dist/index.es.js.map +1 -1
  12. package/dist/sql_components_vue3.css +1 -1
  13. package/dist/ui/DsActionMenu/DsActionMenu.vue.d.ts +1 -1
  14. package/dist/ui/DsCheckbox/DsCheckbox.vue.d.ts +1 -1
  15. package/dist/ui/DsContactCell/DsContactCell.types.d.ts +43 -1
  16. package/dist/ui/DsContactCell/DsContactCell.vue.d.ts +81 -4
  17. package/dist/ui/DsContactList/DsContactList.types.d.ts +11 -1
  18. package/dist/ui/DsContactList/DsContactList.vue.d.ts +36 -0
  19. package/dist/ui/DsDeliverabilityBadge/DsDeliverabilityBadge.types.d.ts +10 -2
  20. package/dist/ui/DsDeliverabilityBadge/DsDeliverabilityBadge.vue.d.ts +11 -1
  21. package/dist/ui/DsEmailEditor/DsEmailEditor.types.d.ts +42 -0
  22. package/dist/ui/DsEmailEditor/DsEmailEditor.vue.d.ts +40 -0
  23. package/dist/ui/DsEmailEditor/index.d.ts +2 -0
  24. package/dist/ui/DsIcon/DsIcon.story-weights.d.ts +2 -0
  25. package/dist/ui/DsIcon/DsIcon.types.d.ts +31 -0
  26. package/dist/ui/DsIcon/DsIcon.vue.d.ts +66 -0
  27. package/dist/ui/DsIcon/index.d.ts +2 -0
  28. package/dist/ui/DsInput/DsInput.types.d.ts +1 -0
  29. package/dist/ui/DsPopover/DsPopover.types.d.ts +12 -1
  30. package/dist/ui/DsPopover/DsPopover.vue.d.ts +10 -1
  31. package/dist/ui/DsSavedButton/DsSavedButton.vue.d.ts +1 -1
  32. package/llms-full.txt +367 -83
  33. package/llms.txt +3 -1
  34. package/package.json +10 -2
  35. package/scripts/generate-icons.mjs +107 -0
  36. package/scripts/icons-svg.mjs +185 -0
  37. package/src/icons/NOTICE +8 -0
  38. package/src/icons/manifest.json +138 -0
@@ -1,6 +1,8 @@
1
1
  import { type Ref } from 'vue';
2
2
  /** Custom property the placement CSS reads: `translateX(calc(-50% + var(...)))`. */
3
3
  export declare const VIEWPORT_SHIFT_VAR = "--ds-overlay-shift";
4
+ /** Custom property the panel CSS reads to cap its width to the space a boundary leaves. */
5
+ export declare const VIEWPORT_MAX_WIDTH_VAR = "--ds-overlay-max-width";
4
6
  /** Gap kept between the floating element and the viewport edge, in px. */
5
7
  export declare const VIEWPORT_MARGIN = 8;
6
8
  /** The side a floating element opens on. `over` (DsPopover) covers the trigger and aligns on X. */
@@ -24,11 +26,14 @@ export interface ClampFlipOptions {
24
26
  trigger: Ref<HTMLElement | null>;
25
27
  gap: number;
26
28
  }
27
- export declare function useViewportClamp(elRef: Ref<HTMLElement | null>, placement: () => ClampPlacement, flip?: ClampFlipOptions): {
29
+ /**
30
+ * A second box the floating element must stay inside, on top of the viewport: an element,
31
+ * or a getter for its rect (`null` = no boundary right now). Read on every measurement.
32
+ */
33
+ export type ClampBoundary = HTMLElement | (() => DOMRect | null) | null;
34
+ export declare function useViewportClamp(elRef: Ref<HTMLElement | null>, placement: () => ClampPlacement, flip?: ClampFlipOptions, boundary?: () => ClampBoundary | undefined): {
28
35
  shift: Ref<number, number>;
29
- shiftStyle: import("vue").ComputedRef<{
30
- "--ds-overlay-shift": string;
31
- } | null>;
36
+ shiftStyle: import("vue").ComputedRef<Record<string, string> | null>;
32
37
  resolvedPlacement: import("vue").ComputedRef<ClampPlacement>;
33
38
  measure: () => Promise<void>;
34
39
  activate: () => void;
@@ -28,6 +28,16 @@ export declare const DS_CONTACT_TYPE_ICONS: Readonly<Record<DsContactType, strin
28
28
  * on a phone: the map is email-first (the export's `TYPE_META`), so the list's kind decides.
29
29
  */
30
30
  export declare function contactTypeIcon(type: DsContactType, kind?: DsContactKind): string;
31
+ /**
32
+ * The verdicts that draw a mark on an email row: `valid` → the A+ glyph, `verifying` and
33
+ * `invalid` → a status pill. An unverifiable email has no verdict to show, so it has no value here.
34
+ */
35
+ export declare const DS_CONTACT_STATUSES: {
36
+ readonly VALID: "valid";
37
+ readonly VERIFYING: "verifying";
38
+ readonly INVALID: "invalid";
39
+ };
40
+ export type DsContactStatus = (typeof DS_CONTACT_STATUSES)[keyof typeof DS_CONTACT_STATUSES];
31
41
  /**
32
42
  * The one item shape every DsContact* component reads. Deliberately the five facts a
33
43
  * row needs and nothing else — the consuming app adapts its own view model to this
@@ -50,8 +60,14 @@ export interface DsContactItem {
50
60
  value: string;
51
61
  /** `true` when `value` is the server's masked preview. Reports; never hides. */
52
62
  masked: boolean;
53
- /** `true` only for a `valid` verdict — the sole state that renders the A+ badge. */
63
+ /** `true` only for a `valid` verdict — renders the A+ badge. `status` wins when it is set. */
54
64
  valid: boolean;
65
+ /**
66
+ * The verdict, when the consumer can tell more than valid / not: `verifying` and `invalid`
67
+ * draw a pill on the popover rows (never in the cell). Optional and it wins over `valid`;
68
+ * omitted, `valid` decides exactly as before.
69
+ */
70
+ status?: DsContactStatus;
55
71
  /** The group's primary. Rendered first; the cell shows it as the single value. */
56
72
  primary: boolean;
57
73
  /** The user's own rating of this item: correct / incorrect / unrated. */
@@ -61,7 +77,21 @@ export interface DsContactItem {
61
77
  * Sets the row glyph; a single-type list reads the list's `type` instead.
62
78
  */
63
79
  type?: DsContactType;
80
+ /**
81
+ * `false` hides this row's thumbs up / down (a value the user typed in is not theirs to
82
+ * rate); copy stays. Omitted = rateable. `showRate` stays the list-wide switch.
83
+ */
84
+ rateable?: boolean;
64
85
  }
86
+ /**
87
+ * The verdict an item draws, or `null` for no mark. `status` wins over `valid`, so `valid`
88
+ * keeps working untouched; a value the library does not know is ignored and falls back to it.
89
+ * Whether the mark renders at all (emails only, copy present) is the composer's rule.
90
+ */
91
+ export declare function contactItemStatus(item: {
92
+ valid: boolean;
93
+ status?: DsContactStatus;
94
+ }): DsContactStatus | null;
65
95
  /**
66
96
  * One typed band of a unified list (export `DataPopover` subgroups): «WORK (2)» above its
67
97
  * rows. The label is copy (the app's `TYPE_LABEL`); the type is the design key for the glyph.
@@ -22,6 +22,8 @@ export declare const SORT: "sort";
22
22
  export type SortEventName = typeof SORT;
23
23
  export declare const EDIT: "edit";
24
24
  export type EditEventName = typeof EDIT;
25
+ export declare const UPDATE_EDITING: "update:editing";
26
+ export type UpdateEditingEventName = typeof UPDATE_EDITING;
25
27
  export declare const SELECT_ALL: "select-all";
26
28
  export type SelectAllEventName = typeof SELECT_ALL;
27
29
  export declare const PAGE_CHANGE: "page-change";
@@ -70,3 +72,7 @@ export declare const UPDATE_COLOR: "update:color";
70
72
  export type UpdateColorEventName = typeof UPDATE_COLOR;
71
73
  export declare const FORM_CLOSE: "form-close";
72
74
  export type FormCloseEventName = typeof FORM_CLOSE;
75
+ export declare const CANCEL: "cancel";
76
+ export type CancelEventName = typeof CANCEL;
77
+ export declare const SAVE: "save";
78
+ export type SaveEventName = typeof SAVE;
@@ -0,0 +1,38 @@
1
+ import type { DsIconVariant, DsIconWeight } from '../ui/DsIcon/DsIcon.types';
2
+ /**
3
+ * The `d` of an SVG path. A bare string is drawn in the Material Symbols
4
+ * viewBox (`0 -960 960 960`); an object carries its own viewBox.
5
+ */
6
+ export type DsIconPath = string | {
7
+ d: string;
8
+ viewBox: string;
9
+ };
10
+ /**
11
+ * The four drawings of one icon in one family at one weight.
12
+ * `compact` is opsz 20 (sizes 16 and 20), `regular` is opsz 24 (size 24);
13
+ * the `Fill` ones are the FILL 1 versions.
14
+ */
15
+ export interface DsIconDrawings {
16
+ compact: DsIconPath;
17
+ compactFill: DsIconPath;
18
+ regular: DsIconPath;
19
+ regularFill: DsIconPath;
20
+ }
21
+ /** The drawings of one family, keyed by weight (`{ 500: drawings, 600: drawings }`). */
22
+ export type DsIconWeightedDrawings = Partial<Record<DsIconWeight, DsIconDrawings>>;
23
+ /**
24
+ * What registerIcons() accepts for a family: drawings keyed by weight, or the drawings alone,
25
+ * which count as the default weight (the shape written before weights existed).
26
+ */
27
+ export type DsIconFamilyInput = DsIconDrawings | DsIconWeightedDrawings;
28
+ export type DsIconDefinition = Partial<Record<DsIconVariant, DsIconFamilyInput>>;
29
+ export type DsIconMap = Record<string, DsIconDefinition>;
30
+ /** The stored shape: every family keyed by weight. */
31
+ export type DsIconRegistry = Record<string, Partial<Record<DsIconVariant, DsIconWeightedDrawings>>>;
32
+ export interface RegisterIconsOptions {
33
+ /**
34
+ * Replace a drawing that already exists for the same name, family and weight (built-in, alias
35
+ * or previously registered). Without it, only new families and weights are added.
36
+ */
37
+ override?: boolean;
38
+ }
@@ -0,0 +1,30 @@
1
+ import type { DsIconMap, RegisterIconsOptions } from './icons.types';
2
+ import { type DsIconSize, type DsIconVariant, type DsIconWeight } from '../ui/DsIcon/DsIcon.types';
3
+ export declare const DEFAULT_ICON_VIEWBOX = "0 -960 960 960";
4
+ export interface ResolvedIcon {
5
+ path: string;
6
+ viewBox: string;
7
+ }
8
+ export interface ResolveIconOptions {
9
+ variant: DsIconVariant;
10
+ size: DsIconSize;
11
+ fill: boolean;
12
+ /** Defaults to 500, the weight the library ships. */
13
+ weight?: DsIconWeight;
14
+ }
15
+ /**
16
+ * The drawing for a name at a size and weight. Sizes 16 and 20 use the compact drawing, 24 the
17
+ * regular one. An unknown name returns null and warns once per name; a weight that is not
18
+ * registered for the icon draws the default weight and warns once per name and weight.
19
+ */
20
+ export declare function resolveIcon(name: string, options: ResolveIconOptions): ResolvedIcon | null;
21
+ /**
22
+ * Adds icons to the registry. Each drawing is a name, a family and a weight: a new family or weight
23
+ * of an existing icon is added; one that already exists (built-in, alias or registered) is kept
24
+ * unless `override`. Drawings without a weight count as the default one.
25
+ */
26
+ export declare function registerIcons(icons: DsIconMap, options?: RegisterIconsOptions): void;
27
+ /** Canonical names (built-in and registered), sorted. Aliases are not listed. */
28
+ export declare function getIconNames(): string[];
29
+ /** Forgets what the app registered and the warnings already emitted. For tests. */
30
+ export declare function resetIconRegistry(): void;
@@ -0,0 +1,4 @@
1
+ import type { DsIconRegistry } from './icons.types';
2
+ export declare const ICON_SOURCE_SHA = "49d4db35df873165d6bd6ba09b063c7dafbac2f4";
3
+ export declare const ICON_ALIASES: Readonly<Record<string, string>>;
4
+ export declare const BUILT_IN_ICONS: DsIconRegistry;