@redvars/peacock 3.5.1 → 3.6.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 (225) hide show
  1. package/dist/{BaseButton-DuASuVth.js → BaseButton-BNFAYn-S.js} +2 -2
  2. package/dist/{BaseButton-DuASuVth.js.map → BaseButton-BNFAYn-S.js.map} +1 -1
  3. package/dist/BaseInput-14YmcfK7.js +27 -0
  4. package/dist/BaseInput-14YmcfK7.js.map +1 -0
  5. package/dist/banner.js +2 -3
  6. package/dist/banner.js.map +1 -1
  7. package/dist/{button-DouvOfEU.js → button-colors-Ccys3hvS.js} +5 -294
  8. package/dist/button-colors-Ccys3hvS.js.map +1 -0
  9. package/dist/button-group.js +226 -6
  10. package/dist/button-group.js.map +1 -1
  11. package/dist/button.js +294 -8
  12. package/dist/button.js.map +1 -1
  13. package/dist/calendar-column-view.js +634 -0
  14. package/dist/calendar-column-view.js.map +1 -0
  15. package/dist/calendar-event-BrQ_SEKD.js +199 -0
  16. package/dist/calendar-event-BrQ_SEKD.js.map +1 -0
  17. package/dist/calendar-month-view.js +376 -0
  18. package/dist/calendar-month-view.js.map +1 -0
  19. package/dist/calendar.js +339 -0
  20. package/dist/calendar.js.map +1 -0
  21. package/dist/canvas.js +361 -0
  22. package/dist/canvas.js.map +1 -0
  23. package/dist/cb-compound-expression.js +125 -0
  24. package/dist/cb-compound-expression.js.map +1 -0
  25. package/dist/cb-divider.js +150 -0
  26. package/dist/cb-divider.js.map +1 -0
  27. package/dist/cb-expression.js +75 -0
  28. package/dist/cb-expression.js.map +1 -0
  29. package/dist/cb-predicate.js +137 -0
  30. package/dist/cb-predicate.js.map +1 -0
  31. package/dist/code-editor.js +2 -1
  32. package/dist/code-editor.js.map +1 -1
  33. package/dist/code-highlighter.js +1 -1
  34. package/dist/code-highlighter.js.map +1 -1
  35. package/dist/condition-builder.js +58 -0
  36. package/dist/condition-builder.js.map +1 -0
  37. package/dist/custom-elements-jsdocs.json +8479 -3965
  38. package/dist/custom-elements.json +15228 -7544
  39. package/dist/dropdown-button.js +216 -0
  40. package/dist/dropdown-button.js.map +1 -0
  41. package/dist/event-manager-D-QCmUgR.js +113 -0
  42. package/dist/event-manager-D-QCmUgR.js.map +1 -0
  43. package/dist/fab.js +1 -1
  44. package/dist/flow-designer-DvTUrDp5.js +1656 -0
  45. package/dist/flow-designer-DvTUrDp5.js.map +1 -0
  46. package/dist/flow-designer-node-BWrPuxAR.js +548 -0
  47. package/dist/flow-designer-node-BWrPuxAR.js.map +1 -0
  48. package/dist/flow-designer-node.js +4 -0
  49. package/dist/flow-designer-node.js.map +1 -0
  50. package/dist/flow-designer.js +16 -0
  51. package/dist/flow-designer.js.map +1 -0
  52. package/dist/html-editor.js +27516 -0
  53. package/dist/html-editor.js.map +1 -0
  54. package/dist/icon-button-CK1ZuE-2.js +247 -0
  55. package/dist/icon-button-CK1ZuE-2.js.map +1 -0
  56. package/dist/index.js +29 -6
  57. package/dist/index.js.map +1 -1
  58. package/dist/{is-dark-mode-DicqGkCJ.js → is-dark-mode-DOcaw4Yq.js} +2 -27
  59. package/dist/is-dark-mode-DOcaw4Yq.js.map +1 -0
  60. package/dist/modal.js +412 -0
  61. package/dist/modal.js.map +1 -0
  62. package/dist/{navigation-rail-Lxetd5-Z.js → navigation-rail-DTTkqohi.js} +1049 -2391
  63. package/dist/navigation-rail-DTTkqohi.js.map +1 -0
  64. package/dist/notification-manager.js +268 -0
  65. package/dist/notification-manager.js.map +1 -0
  66. package/dist/peacock-loader.js +93 -8
  67. package/dist/peacock-loader.js.map +1 -1
  68. package/dist/popover-NC7b1lTq.js +1971 -0
  69. package/dist/popover-NC7b1lTq.js.map +1 -0
  70. package/dist/popover-content.js +125 -0
  71. package/dist/popover-content.js.map +1 -0
  72. package/dist/popover.js +4 -0
  73. package/dist/popover.js.map +1 -0
  74. package/dist/split-button.js +388 -0
  75. package/dist/split-button.js.map +1 -0
  76. package/dist/src/__controllers/floating-controller.d.ts +35 -0
  77. package/dist/src/calendar/base-event.d.ts +10 -0
  78. package/dist/src/calendar/calendar-column-view.d.ts +41 -0
  79. package/dist/src/calendar/calendar-event.d.ts +7 -0
  80. package/dist/src/calendar/calendar-month-view.d.ts +31 -0
  81. package/dist/src/calendar/calendar.d.ts +65 -0
  82. package/dist/src/calendar/event-manager.d.ts +17 -0
  83. package/dist/src/calendar/index.d.ts +4 -0
  84. package/dist/src/calendar/types.d.ts +13 -0
  85. package/dist/src/calendar/utils.d.ts +31 -0
  86. package/dist/src/canvas/canvas.d.ts +92 -0
  87. package/dist/src/canvas/index.d.ts +2 -0
  88. package/dist/src/condition-builder/cb-compound-expression.d.ts +31 -0
  89. package/dist/src/condition-builder/cb-divider.d.ts +26 -0
  90. package/dist/src/condition-builder/cb-expression.d.ts +31 -0
  91. package/dist/src/condition-builder/cb-predicate.d.ts +30 -0
  92. package/dist/src/condition-builder/condition-builder.d.ts +27 -0
  93. package/dist/src/condition-builder/index.d.ts +5 -0
  94. package/dist/src/dropdown-button/dropdown-button.d.ts +68 -0
  95. package/dist/src/dropdown-button/index.d.ts +1 -0
  96. package/dist/src/flow-designer/commands.d.ts +66 -0
  97. package/dist/src/flow-designer/flow-designer-node.d.ts +46 -0
  98. package/dist/src/flow-designer/flow-designer.d.ts +133 -0
  99. package/dist/src/flow-designer/index.d.ts +7 -0
  100. package/dist/src/flow-designer/layout.d.ts +30 -0
  101. package/dist/src/flow-designer/types.d.ts +142 -0
  102. package/dist/src/flow-designer/validation.d.ts +43 -0
  103. package/dist/src/flow-designer/workflow-utils.d.ts +40 -0
  104. package/dist/src/html-editor/html-editor.d.ts +89 -0
  105. package/dist/src/html-editor/index.d.ts +2 -0
  106. package/dist/src/index.d.ts +15 -0
  107. package/dist/src/list/index.d.ts +2 -0
  108. package/dist/src/list/list-item.d.ts +35 -0
  109. package/dist/src/list/list.d.ts +28 -0
  110. package/dist/src/menu/menu/menu.d.ts +5 -7
  111. package/dist/src/menu/menu-item/menu-item.d.ts +14 -13
  112. package/dist/src/modal/index.d.ts +1 -0
  113. package/dist/src/modal/modal.d.ts +57 -0
  114. package/dist/src/navigation-rail/navigation-rail.d.ts +3 -7
  115. package/dist/src/notification-manager/index.d.ts +1 -0
  116. package/dist/src/notification-manager/notification-manager.d.ts +44 -0
  117. package/dist/src/number-field/number-field.d.ts +2 -2
  118. package/dist/src/popover/index.d.ts +2 -0
  119. package/dist/src/popover/popover-content.d.ts +29 -0
  120. package/dist/src/popover/popover.d.ts +62 -0
  121. package/dist/src/split-button/index.d.ts +1 -0
  122. package/dist/src/split-button/split-button.d.ts +72 -0
  123. package/dist/src/svg/index.d.ts +1 -0
  124. package/dist/src/svg/svg.d.ts +38 -0
  125. package/dist/src/toolbar/toolbar.d.ts +3 -3
  126. package/dist/src/tooltip/tooltip.d.ts +2 -15
  127. package/dist/test/flow-designer.test.d.ts +1 -0
  128. package/dist/toolbar.js +3 -3
  129. package/dist/toolbar.js.map +1 -1
  130. package/dist/tsconfig.tsbuildinfo +1 -1
  131. package/package.json +10 -2
  132. package/readme.md +3 -3
  133. package/src/__controllers/floating-controller.ts +237 -0
  134. package/src/banner/banner.scss +2 -3
  135. package/src/button/button/button.ts +1 -0
  136. package/src/calendar/base-event.ts +49 -0
  137. package/src/calendar/calendar-column-view.scss +326 -0
  138. package/src/calendar/calendar-column-view.ts +392 -0
  139. package/src/calendar/calendar-event.ts +20 -0
  140. package/src/calendar/calendar-month-view.scss +192 -0
  141. package/src/calendar/calendar-month-view.ts +244 -0
  142. package/src/calendar/calendar.scss +71 -0
  143. package/src/calendar/calendar.ts +298 -0
  144. package/src/calendar/event-manager.ts +117 -0
  145. package/src/calendar/index.ts +4 -0
  146. package/src/calendar/types.ts +14 -0
  147. package/src/calendar/utils.ts +180 -0
  148. package/src/canvas/canvas.scss +60 -0
  149. package/src/canvas/canvas.ts +391 -0
  150. package/src/canvas/index.ts +2 -0
  151. package/src/code-highlighter/code-highlighter.ts +1 -1
  152. package/src/condition-builder/cb-compound-expression.scss +37 -0
  153. package/src/condition-builder/cb-compound-expression.ts +80 -0
  154. package/src/condition-builder/cb-divider.scss +93 -0
  155. package/src/condition-builder/cb-divider.ts +56 -0
  156. package/src/condition-builder/cb-expression.scss +14 -0
  157. package/src/condition-builder/cb-expression.ts +49 -0
  158. package/src/condition-builder/cb-predicate.scss +35 -0
  159. package/src/condition-builder/cb-predicate.ts +102 -0
  160. package/src/condition-builder/condition-builder.scss +13 -0
  161. package/src/condition-builder/condition-builder.ts +38 -0
  162. package/src/condition-builder/index.ts +5 -0
  163. package/src/dropdown-button/demo/index.html +110 -0
  164. package/src/dropdown-button/dropdown-button.scss +22 -0
  165. package/src/dropdown-button/dropdown-button.ts +206 -0
  166. package/src/dropdown-button/index.ts +1 -0
  167. package/src/flow-designer/DEMO.md +239 -0
  168. package/src/flow-designer/commands.ts +278 -0
  169. package/src/flow-designer/flow-designer-node.ts +172 -0
  170. package/src/flow-designer/flow-designer.scss +457 -0
  171. package/src/flow-designer/flow-designer.ts +611 -0
  172. package/src/flow-designer/index.ts +41 -0
  173. package/src/flow-designer/layout.ts +357 -0
  174. package/src/flow-designer/types.ts +166 -0
  175. package/src/flow-designer/validation.ts +284 -0
  176. package/src/flow-designer/workflow-utils.ts +282 -0
  177. package/src/html-editor/html-editor.scss +188 -0
  178. package/src/html-editor/html-editor.ts +491 -0
  179. package/src/html-editor/index.ts +3 -0
  180. package/src/index.ts +27 -1
  181. package/src/list/index.ts +2 -0
  182. package/src/list/list-item.scss +111 -0
  183. package/src/list/list-item.ts +175 -0
  184. package/src/list/list.scss +24 -0
  185. package/src/list/list.ts +51 -0
  186. package/src/menu/menu/menu.scss +2 -2
  187. package/src/menu/menu/menu.ts +91 -101
  188. package/src/menu/menu-item/menu-item.scss +4 -0
  189. package/src/menu/menu-item/menu-item.ts +82 -78
  190. package/src/modal/index.ts +1 -0
  191. package/src/modal/modal.scss +206 -0
  192. package/src/modal/modal.ts +195 -0
  193. package/src/navigation-rail/navigation-rail-item.scss +7 -38
  194. package/src/navigation-rail/navigation-rail-item.ts +1 -2
  195. package/src/navigation-rail/navigation-rail.scss +17 -21
  196. package/src/navigation-rail/navigation-rail.ts +6 -9
  197. package/src/notification-manager/index.ts +1 -0
  198. package/src/notification-manager/notification-manager.scss +113 -0
  199. package/src/notification-manager/notification-manager.ts +199 -0
  200. package/src/number-field/number-field.ts +2 -2
  201. package/src/peacock-loader.ts +83 -0
  202. package/src/popover/index.ts +2 -0
  203. package/src/popover/popover-content.scss +69 -0
  204. package/src/popover/popover-content.ts +51 -0
  205. package/src/popover/popover.scss +7 -0
  206. package/src/popover/popover.ts +170 -0
  207. package/src/split-button/index.ts +1 -0
  208. package/src/split-button/split-button-colors.scss +56 -0
  209. package/src/split-button/split-button-sizes.scss +28 -0
  210. package/src/split-button/split-button.scss +79 -0
  211. package/src/split-button/split-button.ts +236 -0
  212. package/src/svg/index.ts +1 -0
  213. package/src/svg/svg.scss +91 -0
  214. package/src/svg/svg.ts +160 -0
  215. package/src/table/table.ts +2 -2
  216. package/src/toolbar/toolbar.ts +3 -3
  217. package/src/tooltip/tooltip.scss +4 -3
  218. package/src/tooltip/tooltip.ts +46 -104
  219. package/dist/button-DouvOfEU.js.map +0 -1
  220. package/dist/button-group-CEdMwvJJ.js +0 -464
  221. package/dist/button-group-CEdMwvJJ.js.map +0 -1
  222. package/dist/is-dark-mode-DicqGkCJ.js.map +0 -1
  223. package/dist/navigation-rail-Lxetd5-Z.js.map +0 -1
  224. package/dist/src/menu/menu/MenuSurfaceController.d.ts +0 -18
  225. package/src/menu/menu/MenuSurfaceController.ts +0 -61
@@ -0,0 +1,92 @@
1
+ import { LitElement } from 'lit';
2
+ export type CanvasDirection = 'up' | 'down' | 'left' | 'right';
3
+ export type CanvasStrokeVariant = 'solid' | 'dashed' | 'animated-dashed';
4
+ export interface CanvasPoint {
5
+ x: number;
6
+ y: number;
7
+ }
8
+ export interface CanvasPathSegment {
9
+ direction: CanvasDirection;
10
+ length: number;
11
+ }
12
+ interface BaseCanvasShape {
13
+ color?: string;
14
+ }
15
+ interface BaseCanvasStrokeShape extends BaseCanvasShape {
16
+ variant?: CanvasStrokeVariant;
17
+ showArrow?: boolean;
18
+ clickable?: boolean;
19
+ }
20
+ export interface CanvasCircleShape extends BaseCanvasShape {
21
+ type: 'circle';
22
+ x?: number;
23
+ y?: number;
24
+ radius?: number;
25
+ }
26
+ export interface CanvasRectShape extends BaseCanvasShape {
27
+ type: 'rect';
28
+ x?: number;
29
+ y?: number;
30
+ width?: number;
31
+ height?: number;
32
+ }
33
+ export interface CanvasLineShape extends BaseCanvasStrokeShape {
34
+ type: 'line';
35
+ start?: CanvasPoint;
36
+ end?: CanvasPoint;
37
+ }
38
+ export interface CanvasConnectorShape extends BaseCanvasStrokeShape {
39
+ type: 'connector';
40
+ start?: CanvasPoint;
41
+ path?: CanvasPathSegment[];
42
+ }
43
+ export type CanvasShape = CanvasCircleShape | CanvasRectShape | CanvasLineShape | CanvasConnectorShape;
44
+ /**
45
+ * @label Canvas
46
+ * @tag wc-canvas
47
+ * @rawTag canvas
48
+ * @summary A Material 3 inspired SVG canvas for drawing shapes, lines, and connectors on a dotted grid.
49
+ *
50
+ * @cssprop --canvas-background - Background color for the canvas wrapper. Defaults to surface-container-low.
51
+ * @cssprop --canvas-dot-color - Color of the background grid dots. Defaults to outline-variant.
52
+ * @cssprop --canvas-line-color - Default stroke color for lines and connectors. Defaults to on-surface.
53
+ * @cssprop --canvas-hover-color - Stroke color on hover for clickable shapes. Defaults to primary.
54
+ * @cssprop --canvas-arrow-color - Stroke color for arrow markers. Defaults to on-surface.
55
+ *
56
+ * @example
57
+ * ```html
58
+ * <wc-canvas id="my-canvas"></wc-canvas>
59
+ * <script>
60
+ * document.querySelector('#my-canvas').shapes = [
61
+ * { type: 'circle', x: 0, y: 0, radius: 0.25, color: 'red' },
62
+ * ];
63
+ * </script>
64
+ * ```
65
+ */
66
+ export declare class Canvas extends LitElement {
67
+ static styles: import("lit").CSSResultGroup[];
68
+ /**
69
+ * Array of shape objects to render on the canvas.
70
+ */
71
+ shapes: CanvasShape[];
72
+ /**
73
+ * Padding around the computed viewbox (in grid units).
74
+ */
75
+ padding: number;
76
+ /**
77
+ * Zoom multiplier for the canvas dimensions.
78
+ */
79
+ zoom: number;
80
+ /**
81
+ * Optional viewbox override string (e.g. "0 0 100 100").
82
+ */
83
+ viewbox?: string;
84
+ private unitSize;
85
+ private gap;
86
+ private static getNextPoint;
87
+ private static updateComputationArea;
88
+ private static getStrokeVariantClasses;
89
+ private computeShapes;
90
+ protected render(): import("lit-html").TemplateResult<1>;
91
+ }
92
+ export {};
@@ -0,0 +1,2 @@
1
+ export { Canvas } from './canvas.js';
2
+ export type { CanvasShape } from './canvas.js';
@@ -0,0 +1,31 @@
1
+ import { LitElement } from 'lit';
2
+ /**
3
+ * @label CB Compound Expression
4
+ * @tag wc-cb-compound-expression
5
+ * @rawTag cb-compound-expression
6
+ * @summary A compound expression group in a condition builder that displays a field label, an optional condition operator divider, and slots for child expressions.
7
+ * @tags condition-builder
8
+ * @parentRawTag compound-builder
9
+ *
10
+ * @example
11
+ * ```html
12
+ * <wc-cb-compound-expression field-label="Age" condition-operator="or">
13
+ * <wc-cb-expression>
14
+ * <wc-input placeholder="Enter value"></wc-input>
15
+ * </wc-cb-expression>
16
+ * </wc-cb-compound-expression>
17
+ * ```
18
+ */
19
+ export declare class CbCompoundExpression extends LitElement {
20
+ static styles: import("lit").CSSResultGroup[];
21
+ /** The logical operator joining conditions in this group ('and' or 'or'). */
22
+ conditionOperator?: 'and' | 'or';
23
+ /** The field name for the compound expression. */
24
+ fieldName: string;
25
+ /** The display label for the field. */
26
+ fieldLabel: string;
27
+ updated(): void;
28
+ private __adjustSlotEndPadding;
29
+ private __renderOperatorDivider;
30
+ render(): import("lit-html").TemplateResult<1>;
31
+ }
@@ -0,0 +1,26 @@
1
+ import { LitElement } from 'lit';
2
+ /**
3
+ * @label CB Divider
4
+ * @tag wc-cb-divider
5
+ * @rawTag cb-divider
6
+ * @summary A divider line used within a condition builder to visually connect expressions with operator tags.
7
+ * @tags condition-builder
8
+ * @parentRawTag compound-builder
9
+ *
10
+ * @example
11
+ * ```html
12
+ * <wc-cb-divider>
13
+ * <wc-tag color="green">and</wc-tag>
14
+ * </wc-cb-divider>
15
+ * ```
16
+ */
17
+ export declare class CbDivider extends LitElement {
18
+ static styles: import("lit").CSSResultGroup[];
19
+ /** Whether to render the divider vertically instead of horizontally. */
20
+ vertical: boolean;
21
+ /** Whether to render a connecting line at the start. */
22
+ connectStart: boolean;
23
+ /** Whether to render a connecting line at the end. */
24
+ connectEnd: boolean;
25
+ render(): import("lit-html").TemplateResult<1>;
26
+ }
@@ -0,0 +1,31 @@
1
+ import { LitElement } from 'lit';
2
+ /**
3
+ * @label CB Expression
4
+ * @tag wc-cb-expression
5
+ * @rawTag cb-expression
6
+ * @summary An expression row within a condition builder, containing an operator select and a slot for value inputs.
7
+ * @tags condition-builder
8
+ * @parentRawTag compound-builder
9
+ *
10
+ * @example
11
+ * ```html
12
+ * <wc-cb-expression>
13
+ * <wc-input placeholder="Enter value"></wc-input>
14
+ * </wc-cb-expression>
15
+ * ```
16
+ */
17
+ export declare class CbExpression extends LitElement {
18
+ static styles: import("lit").CSSResultGroup[];
19
+ /**
20
+ * The list of operator options to display in the operator select.
21
+ * Each item should have at least `label` and `value` properties.
22
+ */
23
+ operators: {
24
+ label: string;
25
+ value: string;
26
+ icon?: string;
27
+ }[];
28
+ /** The currently selected operator value. */
29
+ operatorValue: string;
30
+ render(): import("lit-html").TemplateResult<1>;
31
+ }
@@ -0,0 +1,30 @@
1
+ import { LitElement } from 'lit';
2
+ /**
3
+ * @label CB Predicate
4
+ * @tag wc-cb-predicate
5
+ * @rawTag cb-predicate
6
+ * @summary A predicate container in a condition builder that can display conditions in horizontal or vertical layout with an optional logical operator divider.
7
+ * @tags condition-builder
8
+ * @parentRawTag compound-expression
9
+ *
10
+ * @example
11
+ * ```html
12
+ * <wc-cb-predicate condition-operator="and" vertical>
13
+ * <wc-cb-compound-expression field-label="Age">
14
+ * <wc-cb-expression></wc-cb-expression>
15
+ * </wc-cb-compound-expression>
16
+ * </wc-cb-predicate>
17
+ * ```
18
+ */
19
+ export declare class CbPredicate extends LitElement {
20
+ static styles: import("lit").CSSResultGroup[];
21
+ /** The logical operator shown between predicates ('and' or 'or'). */
22
+ conditionOperator?: 'and' | 'or';
23
+ /** Whether to render the predicate in vertical layout. */
24
+ vertical: boolean;
25
+ updated(): void;
26
+ private __adjustSlotEndPadding;
27
+ private __renderHorizontalOperator;
28
+ private __renderVerticalOperator;
29
+ render(): import("lit-html").TemplateResult<1>;
30
+ }
@@ -0,0 +1,27 @@
1
+ import { LitElement } from 'lit';
2
+ /**
3
+ * @label Condition Builder
4
+ * @tag wc-condition-builder
5
+ * @rawTag condition-builder
6
+ * @summary A condition builder component that allows users to construct complex filter conditions using a visual rule-based interface with predicates, compound expressions, and logical operators.
7
+ * @tags condition-builder
8
+ *
9
+ * @example
10
+ * ```html
11
+ * <wc-condition-builder>
12
+ * <wc-cb-predicate condition-operator="or">
13
+ * <wc-cb-predicate vertical condition-operator="and">
14
+ * <wc-cb-compound-expression field-label="Age" condition-operator="or">
15
+ * <wc-cb-expression>
16
+ * <wc-input inline placeholder="Enter value"></wc-input>
17
+ * </wc-cb-expression>
18
+ * </wc-cb-compound-expression>
19
+ * </wc-cb-predicate>
20
+ * </wc-cb-predicate>
21
+ * </wc-condition-builder>
22
+ * ```
23
+ */
24
+ export declare class ConditionBuilder extends LitElement {
25
+ static styles: import("lit").CSSResultGroup[];
26
+ render(): import("lit-html").TemplateResult<1>;
27
+ }
@@ -0,0 +1,5 @@
1
+ export { ConditionBuilder } from './condition-builder.js';
2
+ export { CbPredicate } from './cb-predicate.js';
3
+ export { CbCompoundExpression } from './cb-compound-expression.js';
4
+ export { CbExpression } from './cb-expression.js';
5
+ export { CbDivider } from './cb-divider.js';
@@ -0,0 +1,68 @@
1
+ import { LitElement } from 'lit';
2
+ /**
3
+ * @label Dropdown Button
4
+ * @tag wc-dropdown-button
5
+ * @rawTag dropdown-button
6
+ *
7
+ * @summary A button that opens a dropdown menu when clicked.
8
+ * @overview
9
+ * <p>The dropdown button combines a single button with a dropdown menu. Clicking the button toggles a menu of actions or options. It follows M3 Material Design, keeping a compact control while exposing related actions on demand.</p>
10
+ *
11
+ * @cssprop --dropdown-button-container-shape: Defines the border radius of the dropdown button container shape.
12
+ *
13
+ * @fires {CustomEvent} toggle-menu - Dispatched when the dropdown menu is opened or closed.
14
+ *
15
+ * @example
16
+ * ```html
17
+ * <wc-dropdown-button>
18
+ * Actions
19
+ * <wc-menu-item slot="menu">Edit</wc-menu-item>
20
+ * <wc-menu-item slot="menu">Delete</wc-menu-item>
21
+ * </wc-dropdown-button>
22
+ * ```
23
+ * @tags controls
24
+ */
25
+ export declare class DropdownButton extends LitElement {
26
+ static styles: import("lit").CSSResultGroup[];
27
+ /**
28
+ * Button size.
29
+ * Possible values are `"xs"`, `"sm"`, `"md"`, `"lg"`, `"xl"`. Defaults to `"sm"`.
30
+ */
31
+ size: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
32
+ /**
33
+ * The visual style of the dropdown button.
34
+ *
35
+ * Possible variant values:
36
+ * `"filled"` is a filled button.
37
+ * `"outlined"` is an outlined button.
38
+ * `"text"` is a transparent button.
39
+ * `"tonal"` is a light color button.
40
+ * `"elevated"` is an elevated button.
41
+ */
42
+ variant: 'elevated' | 'filled' | 'tonal' | 'outlined' | 'text';
43
+ /**
44
+ * Defines the primary color of the dropdown button.
45
+ */
46
+ color: 'primary' | 'secondary' | 'tertiary' | 'success' | 'danger' | 'warning' | 'surface' | 'on-surface';
47
+ /**
48
+ * Whether the dropdown button is disabled.
49
+ */
50
+ disabled: boolean;
51
+ /**
52
+ * Menu placement relative to the button.
53
+ * Possible values are `"bottom-start"`, `"bottom-end"`, `"top-start"`, `"top-end"`. Defaults to `"bottom-start"`.
54
+ */
55
+ placement: 'bottom-start' | 'bottom-end' | 'top-start' | 'top-end';
56
+ private _menuOpen;
57
+ private readonly _triggerButton;
58
+ private readonly _menu;
59
+ private _menuId;
60
+ focus(): void;
61
+ private _onButtonClick;
62
+ private _onMenuOpened;
63
+ private _onMenuClosed;
64
+ private _onKeyDown;
65
+ connectedCallback(): void;
66
+ disconnectedCallback(): void;
67
+ render(): import("lit-html").TemplateResult<1>;
68
+ }
@@ -0,0 +1 @@
1
+ export { DropdownButton } from './dropdown-button.js';
@@ -0,0 +1,66 @@
1
+ import type { Workflow, WorkflowNode, WorkflowCommand } from './types.js';
2
+ /**
3
+ * Add Node Command
4
+ */
5
+ export declare class AddNodeCommand implements WorkflowCommand {
6
+ private nodeToAdd;
7
+ private parentNodeId;
8
+ private connectionType;
9
+ private branchKey?;
10
+ description: string;
11
+ constructor(nodeToAdd: WorkflowNode, parentNodeId: string, connectionType?: 'child' | 'branch' | 'task', branchKey?: string | undefined);
12
+ execute(workflow: Workflow): Workflow;
13
+ undo(workflow: Workflow): Workflow;
14
+ }
15
+ /**
16
+ * Delete Node Command
17
+ */
18
+ export declare class DeleteNodeCommand implements WorkflowCommand {
19
+ private nodeId;
20
+ description: string;
21
+ private deletedNode;
22
+ private parentReference;
23
+ constructor(nodeId: string, workflow?: Workflow);
24
+ private captureNodeContext;
25
+ private findParentReference;
26
+ execute(workflow: Workflow): Workflow;
27
+ undo(workflow: Workflow): Workflow;
28
+ }
29
+ /**
30
+ * Edit Node Command
31
+ */
32
+ export declare class EditNodeCommand implements WorkflowCommand {
33
+ private nodeId;
34
+ private updates;
35
+ description: string;
36
+ private previousState;
37
+ constructor(nodeId: string, updates: Partial<WorkflowNode>, workflow?: Workflow);
38
+ execute(workflow: Workflow): Workflow;
39
+ undo(workflow: Workflow): Workflow;
40
+ }
41
+ /**
42
+ * Move Node Command - reorder in array or change parent
43
+ */
44
+ export declare class MoveNodeCommand implements WorkflowCommand {
45
+ private nodeId;
46
+ private newParentId;
47
+ private newIndex;
48
+ private newConnectionType;
49
+ private newBranchKey?;
50
+ description: string;
51
+ private previousState;
52
+ constructor(nodeId: string, newParentId: string, newIndex: number, newConnectionType?: 'child' | 'branch' | 'task', newBranchKey?: string | undefined, workflow?: Workflow);
53
+ private captureCurrentPosition;
54
+ execute(workflow: Workflow): Workflow;
55
+ undo(workflow: Workflow): Workflow;
56
+ }
57
+ /**
58
+ * Batch Command - combine multiple commands into one undo/redo step
59
+ */
60
+ export declare class BatchCommand implements WorkflowCommand {
61
+ private commands;
62
+ description: string;
63
+ constructor(commands: WorkflowCommand[], description?: string);
64
+ execute(workflow: Workflow): Workflow;
65
+ undo(workflow: Workflow): Workflow;
66
+ }
@@ -0,0 +1,46 @@
1
+ import { LitElement } from 'lit';
2
+ import type { WorkflowNode } from './types.js';
3
+ /**
4
+ * Individual node component for flow designer
5
+ * Renders a single workflow node with customizable slot templates
6
+ *
7
+ * @tag wc-flow-designer-node
8
+ * @rawTag flow-designer-node
9
+ * @wip true
10
+ */
11
+ export declare class FlowDesignerNode extends LitElement {
12
+ static styles: import("lit").CSSResultGroup[];
13
+ /**
14
+ * The workflow node to render
15
+ */
16
+ node: WorkflowNode;
17
+ /**
18
+ * Whether this node is currently selected
19
+ */
20
+ isSelected: boolean;
21
+ /**
22
+ * Whether this node is in edit mode
23
+ */
24
+ isEditing: boolean;
25
+ /**
26
+ * Whether this node is disabled
27
+ */
28
+ disabled: boolean;
29
+ /**
30
+ * Whether to show the delete button
31
+ */
32
+ showDelete: boolean;
33
+ private _handleClick;
34
+ private _handleDoubleClick;
35
+ private _handleDelete;
36
+ private _handleMouseEnter;
37
+ private _handleMouseLeave;
38
+ render(): import("lit-html").TemplateResult<1>;
39
+ private _renderDefaultHeader;
40
+ private _renderDefaultBody;
41
+ }
42
+ declare global {
43
+ interface HTMLElementTagNameMap {
44
+ 'wc-flow-designer-node': FlowDesignerNode;
45
+ }
46
+ }
@@ -0,0 +1,133 @@
1
+ import { LitElement } from 'lit';
2
+ import '../toolbar/toolbar.js';
3
+ import '../button/icon-button/icon-button.js';
4
+ import '../icon/icon.js';
5
+ import './flow-designer-node.js';
6
+ import type { Workflow, WorkflowNode } from './types.js';
7
+ /**
8
+ * @label Flow Designer
9
+ * @tag wc-flow-designer
10
+ * @rawTag flow-designer
11
+ * @summary Low-code business process flow designer with swimlane layout, undo/redo, and interactive editing.
12
+ *
13
+ * @cssprop --flow-designer-height - Height of the flow designer container. Defaults to 400px.
14
+ * @cssprop --flow-designer-border-color - Border color of the flow designer. Defaults to outline-variant.
15
+ * @cssprop --flow-designer-background - Background color of the designer. Defaults to surface.
16
+ * @cssprop --flow-designer-border-radius - Corner radius. Defaults to medium shape.
17
+ * @cssprop --flow-designer-action-bar-bg - Background color of the action bar. Defaults to surface-container.
18
+ *
19
+ * @example
20
+ * ```html
21
+ * <wc-flow-designer id="editor"></wc-flow-designer>
22
+ * <script>
23
+ * const workflow = {
24
+ * workflow_id: "demo",
25
+ * nodes: {
26
+ * id: "node_1",
27
+ * type: "trigger",
28
+ * label: "Start"
29
+ * }
30
+ * };
31
+ * document.querySelector('#editor').workflow = workflow;
32
+ * </script>
33
+ * ```
34
+ */
35
+ export declare class FlowDesigner extends LitElement {
36
+ static styles: import("lit").CSSResultGroup[];
37
+ /**
38
+ * The workflow definition to display and edit
39
+ */
40
+ workflow: Workflow;
41
+ /**
42
+ * Whether the flow designer is in read-only mode
43
+ */
44
+ readonly: boolean;
45
+ /**
46
+ * Whether the flow designer is disabled
47
+ */
48
+ disabled: boolean;
49
+ /**
50
+ * Show validation errors/warnings
51
+ */
52
+ showValidation: boolean;
53
+ private _editor;
54
+ private _positionedNodes;
55
+ private _history;
56
+ private _historyIndex;
57
+ private scrollElm?;
58
+ private _isDragScrolling;
59
+ private _dragStartX;
60
+ private _dragStartY;
61
+ private _scrollStartX;
62
+ private _scrollStartY;
63
+ connectedCallback(): void;
64
+ disconnectedCallback(): void;
65
+ protected willUpdate(): void;
66
+ /**
67
+ * Recalculate layout when workflow changes
68
+ */
69
+ private _recalculateLayout;
70
+ /**
71
+ * Add a new node
72
+ */
73
+ addNode(newNode: WorkflowNode, parentNodeId: string, connectionType?: 'child' | 'branch' | 'task', branchKey?: string): void;
74
+ /**
75
+ * Delete a node by ID
76
+ */
77
+ deleteNode(nodeId: string): void;
78
+ /**
79
+ * Edit a node
80
+ */
81
+ editNode(nodeId: string, updates: Partial<WorkflowNode>): void;
82
+ /**
83
+ * Move a node to a different parent/position
84
+ */
85
+ moveNode(nodeId: string, newParentId: string, newIndex: number, connectionType?: 'child' | 'branch' | 'task', branchKey?: string): void;
86
+ /**
87
+ * Execute a command and add to history
88
+ */
89
+ private _executeCommand;
90
+ /**
91
+ * Undo last operation
92
+ */
93
+ undo(): void;
94
+ /**
95
+ * Redo last undone operation
96
+ */
97
+ redo(): void;
98
+ /**
99
+ * Check if undo is available
100
+ */
101
+ canUndo(): boolean;
102
+ /**
103
+ * Check if redo is available
104
+ */
105
+ canRedo(): boolean;
106
+ /**
107
+ * Export current workflow as JSON
108
+ */
109
+ exportWorkflow(): string;
110
+ /**
111
+ * Validate workflow
112
+ */
113
+ validate(): void;
114
+ private _emitWorkflowChange;
115
+ private _handleKeyDown;
116
+ private _handleMouseUp;
117
+ private _handleCanvasMouseDown;
118
+ private _handleCanvasMouseMove;
119
+ private _handleNodeClick;
120
+ private _handleNodeDelete;
121
+ private _handleNodeEdit;
122
+ private _handleZoomIn;
123
+ private _handleZoomOut;
124
+ protected render(): import("lit-html").TemplateResult<1>;
125
+ private _renderConnectors;
126
+ private _renderSwimlanes;
127
+ private _renderNodes;
128
+ }
129
+ declare global {
130
+ interface HTMLElementTagNameMap {
131
+ 'wc-flow-designer': FlowDesigner;
132
+ }
133
+ }
@@ -0,0 +1,7 @@
1
+ export { FlowDesigner } from './flow-designer.js';
2
+ export { FlowDesignerNode } from './flow-designer-node.js';
3
+ export type { Workflow, WorkflowNode, WorkflowCommand, PositionedNode, ValidationError, HistoryEntry, EditorState, NodeType, WorkflowChangeEvent, SwimlaneConfig, NodeTemplate, } from './types.js';
4
+ export { SwimlaneLayout } from './layout.js';
5
+ export { WorkflowValidator } from './validation.js';
6
+ export { cloneWorkflow, cloneNode, findNodeById, removeNodeById, insertNodeIntoWorkflow, getAllNodes, getNodePath, isDescendant, replaceNode, } from './workflow-utils.js';
7
+ export { AddNodeCommand, DeleteNodeCommand, EditNodeCommand, MoveNodeCommand, BatchCommand, } from './commands.js';
@@ -0,0 +1,30 @@
1
+ import type { WorkflowNode, PositionedNode, SwimlaneConfig } from './types.js';
2
+ export declare class SwimlaneLayout {
3
+ /**
4
+ * Calculate layout positions for all nodes in a workflow
5
+ */
6
+ static calculateLayout(rootNode: WorkflowNode): PositionedNode[];
7
+ /**
8
+ * Traverse workflow tree and assign lane/depth to each node
9
+ */
10
+ private static _traverseAndAssignLanes;
11
+ /**
12
+ * Calculate SVG connector points between nodes
13
+ */
14
+ private static _calculateConnectors;
15
+ /**
16
+ * Get swimlane configurations for rendering
17
+ */
18
+ static getSwimlanes(positionedNodes: PositionedNode[]): SwimlaneConfig[];
19
+ /**
20
+ * Generate human-readable swimlane name
21
+ */
22
+ private static _getSwimlaneName;
23
+ /**
24
+ * Calculate canvas bounds for sizing
25
+ */
26
+ static getCanvasBounds(positionedNodes: PositionedNode[]): {
27
+ width: number;
28
+ height: number;
29
+ };
30
+ }