@luzmo/lucero 2.3.0-beta.0 → 2.4.1

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 (111) hide show
  1. package/components/action-menu/index.cjs +1 -1
  2. package/components/action-menu/index.js +1 -1
  3. package/components/{action-menu-De9S9nlo.js → action-menu-C0sHNsjG.js} +2 -2
  4. package/components/{action-menu-D3L0k49M.cjs → action-menu-CwzRbF61.cjs} +1 -1
  5. package/components/chat-message/index.cjs +1 -1
  6. package/components/chat-message/index.js +1 -1
  7. package/components/chat-message-Dgo6h0rD.cjs +148 -0
  8. package/components/{chat-message-D6U-sprD.js → chat-message-T6QIK2Bl.js} +526 -562
  9. package/components/color-picker/index.cjs +1 -1
  10. package/components/color-picker/index.js +1 -1
  11. package/components/{color-picker-CRokyPy-.cjs → color-picker-BAikpqUT.cjs} +1 -1
  12. package/components/{color-picker-C2kni9Zo.js → color-picker-CSuAPo5X.js} +1 -1
  13. package/components/date-range-picker/index.cjs +1 -1
  14. package/components/date-range-picker/index.js +1 -1
  15. package/components/{date-range-picker-Dfn3MnfA.cjs → date-range-picker-D149LIGC.cjs} +1 -1
  16. package/components/{date-range-picker-CVRHT56i.js → date-range-picker-DKVmGpUC.js} +1 -1
  17. package/components/date-time-picker/index.cjs +1 -1
  18. package/components/date-time-picker/index.js +1 -1
  19. package/components/{date-time-picker-C4oIN9Of.js → date-time-picker-6c19YzwF.js} +1 -1
  20. package/components/{date-time-picker-DYT04Zyv.cjs → date-time-picker-CRpvRk9T.cjs} +1 -1
  21. package/components/index.cjs +1 -1
  22. package/components/index.js +24 -24
  23. package/components/overlay/index.cjs +1 -1
  24. package/components/overlay/index.js +1 -1
  25. package/components/overlay/placement-controller.d.ts +2 -1
  26. package/components/{overlay-4YVoQOyd.cjs → overlay-Dn7EbA_W.cjs} +1 -1
  27. package/components/{overlay-BvMcppFH.js → overlay-DpHIYJtd.js} +2 -2
  28. package/components/picker/index.cjs +1 -1
  29. package/components/picker/index.js +1 -1
  30. package/components/{picker-DKFG8i-B.cjs → picker-BliQJlY_.cjs} +1 -1
  31. package/components/{picker-DKAbXYoQ.js → picker-D0fMBZLb.js} +1 -1
  32. package/components/progress-steps/index.cjs +1 -1
  33. package/components/progress-steps/index.d.ts +2 -1
  34. package/components/progress-steps/index.js +2 -2
  35. package/components/progress-steps/progress-steps-model.d.ts +23 -0
  36. package/components/progress-steps/progress-steps.d.ts +95 -109
  37. package/components/progress-steps/types.d.ts +18 -3
  38. package/components/progress-steps-BIbj8x8S.js +383 -0
  39. package/components/progress-steps-upJp8wl3.cjs +98 -0
  40. package/components/prompt-box/index.cjs +1 -1
  41. package/components/prompt-box/index.js +1 -1
  42. package/components/{prompt-box-CAEo3tqw.js → prompt-box-Cz_m2wso.js} +1 -1
  43. package/components/{prompt-box-DfWfrlF6.cjs → prompt-box-sp9_-Hnx.cjs} +1 -1
  44. package/components/select/index.cjs +1 -1
  45. package/components/select/index.js +1 -1
  46. package/components/{select-CAst7yfM.js → select-BUgHi69P.js} +1 -1
  47. package/components/{select-DkvHL37E.cjs → select-DsGVB01K.cjs} +1 -1
  48. package/custom-elements.json +1 -1
  49. package/package.json +1 -1
  50. package/standalone/accordion.js +1 -1
  51. package/standalone/action-bar.js +1 -1
  52. package/standalone/action-button.js +1 -1
  53. package/standalone/action-menu.js +1 -1
  54. package/standalone/avatar.js +1 -1
  55. package/standalone/calendar.js +1 -1
  56. package/standalone/chat-message.js +27 -27
  57. package/standalone/checkbox.js +1 -1
  58. package/standalone/chunks/{action-button-DCt8NsDy.js → action-button-BzzPBqt5.js} +1 -1
  59. package/standalone/chunks/{button-UUPI5TRz.js → button-Dykw3TSO.js} +1 -1
  60. package/standalone/chunks/{calendar-rx4pQ28E.js → calendar-ZwUYkzVq.js} +1 -1
  61. package/standalone/chunks/{checkbox-Dz-0cBEf.js → checkbox-OQtakoP8.js} +1 -1
  62. package/standalone/chunks/{clear-button-DAHm73iN.js → clear-button-pVGfwye8.js} +1 -1
  63. package/standalone/chunks/{close-button-DB1Q3IfL.js → close-button-RpPiwBdf.js} +1 -1
  64. package/standalone/chunks/{color-field-BQ4y3biw.js → color-field-CrCF4kqZ.js} +1 -1
  65. package/standalone/chunks/{color-menu-DRO2lf0w.js → color-menu-B5UOMYmX.js} +1 -1
  66. package/standalone/chunks/{icon-Csu47YgC.js → icon-Dy6J1QeX.js} +1 -1
  67. package/standalone/chunks/keyed-CNWmQd2J.js +2 -0
  68. package/standalone/chunks/{luzmo-icons-BKu82bUU.js → luzmo-icons-CJa-aByT.js} +2 -2
  69. package/standalone/chunks/{menu-CVdQKzxC.js → menu-nolJetlp.js} +1 -1
  70. package/standalone/chunks/{number-field-BWvsvU01.js → number-field-C3DYfl1s.js} +1 -1
  71. package/standalone/chunks/{options-DzlW2-9n.js → options-BjRSj630.js} +5 -5
  72. package/standalone/chunks/{overlay-I_DOZNsB.js → overlay-C4ir0iyC.js} +1 -1
  73. package/standalone/chunks/{overlay-COmLsmL3.js → overlay-C_XW8yry.js} +1 -1
  74. package/standalone/chunks/{picker-button-D22V8uCk.js → picker-button-BeXTIgUt.js} +1 -1
  75. package/standalone/chunks/{picker-DGOvxfUV.js → picker-hbMQOkUX.js} +1 -1
  76. package/standalone/chunks/{segments-factory-Bj8uOVOG.js → segments-factory-Ch3AAizU.js} +1 -1
  77. package/standalone/chunks/{swatch-B-lwyWNi.js → swatch-m_4GcO2_.js} +1 -1
  78. package/standalone/chunks/{text-field-DgyP9fxu.js → text-field-BnZtyodU.js} +1 -1
  79. package/standalone/chunks/{text-field-BWZK7Km7.js → text-field-BrlDeJsx.js} +1 -1
  80. package/standalone/clear-button.js +1 -1
  81. package/standalone/close-button.js +1 -1
  82. package/standalone/color-field.js +1 -1
  83. package/standalone/color-menu.js +1 -1
  84. package/standalone/color-picker.js +1 -1
  85. package/standalone/date-range-picker.js +1 -1
  86. package/standalone/date-time-picker.js +1 -1
  87. package/standalone/icon.js +1 -1
  88. package/standalone/lit.js +1 -1
  89. package/standalone/manifest.json +22 -21
  90. package/standalone/menu.js +1 -1
  91. package/standalone/multi-language-field.js +1 -1
  92. package/standalone/notice.js +1 -1
  93. package/standalone/number-field.js +1 -1
  94. package/standalone/options.js +1 -1
  95. package/standalone/overlay.js +1 -1
  96. package/standalone/picker-button.js +1 -1
  97. package/standalone/picker.js +1 -1
  98. package/standalone/progress-steps.js +79 -77
  99. package/standalone/prompt-box.js +9 -9
  100. package/standalone/question-box.js +1 -1
  101. package/standalone/search.js +1 -1
  102. package/standalone/select.js +1 -1
  103. package/standalone/slider.js +1 -1
  104. package/standalone/swatch.js +1 -1
  105. package/standalone/tabs.js +1 -1
  106. package/standalone/tags.js +1 -1
  107. package/standalone/text-field.js +1 -1
  108. package/standalone/toast.js +1 -1
  109. package/components/chat-message-BDfomRm-.cjs +0 -148
  110. package/components/progress-steps-9tRZ0dxp.cjs +0 -96
  111. package/components/progress-steps-CX9mnyHH.js +0 -263
@@ -1,148 +1,134 @@
1
- import { TemplateResult } from 'lit';
1
+ import { CSSResultArray, nothing, PropertyValues, TemplateResult } from 'lit';
2
2
  import { LuzmoElement } from '../../utils/base';
3
- import type { ProgressStepsDisplayMode, ProgressStepsLabels, ProgressTreeNode } from './types';
3
+ import { type ProgressStepsDisplayMode, type ProgressStepsLabels, type ProgressTreeNode } from './types';
4
4
  declare const LuzmoProgressSteps_base: typeof LuzmoElement & {
5
5
  new (...args: any[]): import("../..").SizedElementInterface;
6
6
  prototype: import("../..").SizedElementInterface;
7
7
  };
8
8
  /**
9
9
  * @element luzmo-progress-steps
10
- * @summary A component for displaying real-time Progress status steps with substeps
10
+ * @summary Shows the progress of a multi-step process, such as an AI response,
11
+ * as a single line that expands into the full step history.
12
+ *
13
+ * While a run is in progress, the line shows the newest running step and its
14
+ * newest running substep. Once the run finishes, it shows how many steps ran.
15
+ * Activating the line opens the history.
11
16
  *
12
17
  * @attr size - The size of the component: s, m, l or xl
13
18
  * @attr locale - Locale for resolving localized strings (default: 'en')
14
- * @attr collapsed - When true, collapses all auto-expanded steps
15
- * @attr condensed - When true, hides all steps behind a single "{n} steps completed" toggle line
16
- * @attr display-mode - Display mode: 'detailed' (default) shows substeps and descriptions, 'compact' shows only step names
19
+ * @attr collapsed - Signals the run has finished, so the line settles into its summary as soon as no step runs
20
+ * @attr condensed - Deprecated, no effect: every state is condensed into one line
21
+ * @attr display-mode - 'detailed' (default) lists substeps in the history, 'compact' lists main steps only
22
+ * @attr no-animate - Disables the shimmer and transitions
23
+ * @attr open - Whether the step history is shown
24
+ *
25
+ * @fires luzmo-step-expanded - The user opened the step history. `detail.nodeId` is the progress root id.
26
+ * @fires luzmo-step-collapsed - The user closed the step history. `detail.nodeId` is the progress root id.
17
27
  *
18
- * @fires luzmo-step-expanded - Fired when a step is expanded
19
- * @fires luzmo-step-collapsed - Fired when a step is collapsed
28
+ * @cssprop --luzmo-progress-steps-font-size - Font size of the summary line
29
+ * @cssprop --luzmo-progress-steps-font-size-small - Font size of the step history
30
+ * @cssprop --luzmo-progress-steps-font-color - Color of emphasized text
31
+ * @cssprop --luzmo-progress-steps-font-color-dimmed - Color of the summary line and substeps
32
+ * @cssprop --luzmo-progress-steps-error-color - Color of failed steps
33
+ * @cssprop --luzmo-progress-steps-warning-color - Color of the failure icon in the summary line
34
+ * @cssprop --luzmo-progress-steps-success-color - Color of the checkmark in the summary line once a run finishes without failures
35
+ * @cssprop --luzmo-progress-steps-substep-connector-color - Color of the timeline rail in the history and the spinner track
20
36
  */
21
37
  export declare class LuzmoProgressSteps extends LuzmoProgressSteps_base {
22
- static styles: import("lit").CSSResult[];
38
+ static get styles(): CSSResultArray;
23
39
  /**
24
- * The progress tree from the backend.
25
- * The root node's children are rendered as main steps.
40
+ * The progress tree. The root's children are the main steps.
41
+ * Replace the whole tree on every update; keep the root `id` for the same run.
26
42
  */
27
43
  progress: ProgressTreeNode | null;
28
44
  /**
29
45
  * Locale for resolving localized strings in description metadata.
30
- * Defaults to 'en'.
31
46
  */
32
47
  locale: string;
33
48
  /**
34
- * When true, collapses all auto-expanded steps.
35
- * Manually expanded steps remain open.
49
+ * Signals that the run has finished. The summary line then settles as soon
50
+ * as no step is running, instead of after a short quiet period.
36
51
  */
37
52
  collapsed: boolean;
38
53
  /**
39
- * Display mode for the progress steps.
40
- * - 'detailed' (default): Shows full descriptions and substeps with expand/collapse
41
- * - 'compact': Shows only step names without substeps or expand/collapse
54
+ * - 'detailed' (default): the history lists main steps with their substeps
55
+ * - 'compact': the history lists main steps only
42
56
  */
43
57
  displayMode: ProgressStepsDisplayMode;
44
58
  /**
45
- * When true, hides all steps behind a single "{n} steps completed" toggle line.
46
- * Clicking the toggle expands/collapses the full step list.
59
+ * @deprecated Has no effect. Every state is condensed into one line.
47
60
  */
48
61
  condensed: boolean;
49
62
  /**
50
- * Labels used for visible text and screen readers.
51
- * The default values are in English and can be overridden to localize the content.
52
- * Use `{{count}}` in `stepCompleted` / `stepsCompleted` as a placeholder for the step count.
63
+ * Visible and announced copy. Partial overrides are merged over the
64
+ * English defaults. `{{count}}` is replaced in the count labels.
53
65
  */
54
- labels: ProgressStepsLabels;
66
+ labels: Partial<ProgressStepsLabels>;
55
67
  /**
56
- * When true, disables all entry animations (stepFadeIn, substepFadeIn).
57
- * @default false
68
+ * Disables the shimmer and transitions.
58
69
  */
59
70
  noAnimate: boolean;
60
71
  /**
61
- * Whether the condensed toggle has been expanded by the user.
62
- * @internal
63
- */
64
- private _condensedExpanded;
65
- /**
66
- * Set of node IDs that are manually expanded by the user
67
- * @internal
68
- */
69
- private _expandedNodes;
70
- /**
71
- * Nodes that were auto-expanded because they were in-progress.
72
- * @internal
73
- */
74
- private _autoExpandedNodes;
75
- /**
76
- * Nodes explicitly expanded by the user.
77
- * @internal
78
- */
79
- private _manuallyExpandedNodes;
80
- willUpdate(changedProperties: Map<string, unknown>): void;
81
- /**
82
- * Handles progress changes, clearing state when progress is reset or root changes
83
- * @internal
84
- */
85
- private _handleProgressChange;
86
- /**
87
- * Clears all expansion state for a fresh progress tree
88
- * @internal
89
- */
90
- private _clearExpansionState;
91
- /**
92
- * Handle auto-expand for in-progress nodes
93
- * @internal
94
- */
95
- private _handleAutoExpandCollapse;
96
- /**
97
- * Collapse all auto-expanded nodes that weren't manually expanded
98
- * @internal
99
- */
100
- private _collapseAutoExpandedNodes;
101
- /**
102
- * Re-expand in-progress nodes when collapsed changes to false
103
- * @internal
104
- */
105
- private _reExpandInProgressNodes;
106
- /** @internal */
107
- private _reExpandInProgressNodesRecursive;
108
- /**
109
- * Map backend status to CSS-friendly status
110
- * @internal
111
- */
112
- private _mapStatus;
113
- /**
114
- * Resolve a localized string to the current locale
115
- * @internal
116
- */
117
- private _resolveLocalizedString;
118
- /**
119
- * Interpolate description with metadata values
120
- * Replaces {{key}} placeholders with values from descriptionMetadata
121
- * @internal
122
- */
123
- private _interpolateDescription;
124
- /** @internal */
125
- private _toggleNodeExpansion;
126
- /** @internal */
127
- private _isNodeExpanded;
128
- /** @internal */
129
- private _renderStepIcon;
130
- /** @internal */
131
- private _renderChevron;
132
- /** @internal */
133
- private _renderSubsteps;
134
- /** @internal */
72
+ * Whether the step history is shown. Closes when a run with another root
73
+ * `id` starts.
74
+ */
75
+ open: boolean;
76
+ private _phase;
77
+ private _current;
78
+ private _leaving;
79
+ private _subStepTransition;
80
+ private _announcement;
81
+ private _languageResolver;
82
+ private _numberFormatter?;
83
+ private _pending;
84
+ private _shownAt;
85
+ private _dwellTimer?;
86
+ private _settleTimer?;
87
+ private _leaveTimer?;
88
+ private _announceTimer?;
89
+ private _resizeObserver?;
90
+ /** Whether the shown line shows its substep alone. */
91
+ private _subStepOnly;
92
+ /** Whether the leaving line showed its substep alone. */
93
+ private _leavingSubStepOnly;
94
+ connectedCallback(): void;
95
+ disconnectedCallback(): void;
96
+ protected willUpdate(changes: PropertyValues): void;
97
+ protected updated(changes: PropertyValues): void;
98
+ /**
99
+ * Shows the substep alone when the main step and substep don't both fit
100
+ * whole. The main step stays in the accessible name. Runs before paint, so
101
+ * the measuring layout is never shown.
102
+ */
103
+ private _fitLine;
104
+ private get _labels();
105
+ /** Moves between running and finished based on the latest tree. */
106
+ private _syncPhase;
107
+ private _queue;
108
+ private _showPending;
109
+ private _finish;
110
+ private _show;
111
+ private _announce;
112
+ private _resetRun;
113
+ private _clearDwellTimer;
114
+ private _clearSettleTimer;
115
+ private _clearTimers;
116
+ private _formatCount;
117
+ /** Formats counts for the resolved page language; cached until it changes. */
118
+ private get _numberFormat();
119
+ private _summaryText;
120
+ private _setOpen;
121
+ private handleToggle;
122
+ private handleKeydown;
123
+ private _statusLabel;
124
+ private _renderStatusIcon;
125
+ private _renderContent;
126
+ /** A dot on the timeline rail; only a failed step gets an icon. */
127
+ private _renderStepMarker;
135
128
  private _renderSubstep;
136
- /** @internal */
129
+ private _renderSubsteps;
137
130
  private _renderStep;
138
- /** @internal */
139
- private _toggleCondensed;
140
- /** @internal */
141
- private _handleCondensedKeydown;
142
- /** @internal */
143
- private _renderCondensed;
144
- /** @internal */
145
- private _renderSteps;
146
- render(): TemplateResult;
131
+ private _renderDetails;
132
+ render(): TemplateResult | typeof nothing;
147
133
  }
148
134
  export {};
@@ -1,16 +1,26 @@
1
+ /**
2
+ * Visible and announced copy. `{{count}}` is replaced in the count labels.
3
+ */
1
4
  export interface ProgressStepsLabels {
5
+ /** Summary once a run with one main step has finished. */
2
6
  condensedSingular: string;
7
+ /** Summary once a run with several main steps has finished. */
3
8
  condensedPlural: string;
9
+ /** Failure count when exactly one step failed. */
10
+ failedSingular: string;
11
+ /** Failure count when several steps failed. */
12
+ failedPlural: string;
4
13
  stepInProgress: string;
5
14
  stepPending: string;
6
15
  stepCompleted: string;
7
16
  stepFailed: string;
8
17
  }
18
+ export declare const DEFAULT_PROGRESS_STEPS_LABELS: ProgressStepsLabels;
9
19
  export type ProgressStepsStatuses = 'pending' | 'inProgress' | 'success' | 'error';
10
20
  /**
11
- * Display mode for progress steps
12
- * - 'detailed': Shows full descriptions and substeps with expand/collapse
13
- * - 'compact': Shows only step names without substeps
21
+ * Display mode for the step history
22
+ * - 'detailed': Lists main steps with their substeps
23
+ * - 'compact': Lists main steps only
14
24
  */
15
25
  export type ProgressStepsDisplayMode = 'detailed' | 'compact';
16
26
  export type LocalizedString = Record<string, string>;
@@ -30,3 +40,8 @@ export type ProgressTreeNode = {
30
40
  description?: string;
31
41
  descriptionMetadata?: ProgressTreeNodeDescriptionMetadata;
32
42
  };
43
+ /** Detail of `luzmo-step-expanded` and `luzmo-step-collapsed`. */
44
+ export type ProgressStepsToggleDetail = {
45
+ /** Id of the progress tree root. */
46
+ nodeId: string;
47
+ };