@crewlethq/ui 0.34.1 → 0.35.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 (113) hide show
  1. package/README.md +51 -0
  2. package/dist/AppShell/index.js +2 -2
  3. package/dist/ArtifactBar/ArtifactBar.d.ts +7 -1
  4. package/dist/ArtifactBar/index.d.ts +1 -0
  5. package/dist/ArtifactBar/index.js +4 -14
  6. package/dist/{ArtifactBar-C462VD4C.css → ArtifactBar-HV5AT4RG.css} +39 -2
  7. package/dist/ArtifactCard/ArtifactCard.d.ts +1 -10
  8. package/dist/ArtifactCard/index.d.ts +5 -2
  9. package/dist/ArtifactCard/index.js +3 -2
  10. package/dist/{ArtifactCard-XHRLAL7C.css → ArtifactCard-OGTMO2KI.css} +15 -16
  11. package/dist/ArtifactCover/index.js +2 -14
  12. package/dist/ArtifactIcon/ArtifactIcon.d.ts +1 -1
  13. package/dist/ArtifactIcon/index.js +2 -15
  14. package/dist/ArtifactKindGlyph/ArtifactKindGlyph.d.ts +10 -0
  15. package/dist/ArtifactKindGlyph/index.d.ts +2 -0
  16. package/dist/ArtifactKindGlyph/index.js +1 -0
  17. package/dist/ArtifactKindIllustration/ArtifactKindIllustration.d.ts +15 -2
  18. package/dist/ArtifactKindIllustration/index.d.ts +1 -0
  19. package/dist/ArtifactKindIllustration/index.js +1 -1
  20. package/dist/{ArtifactKindIllustration-4NG6IE3C.css → ArtifactKindIllustration-5FPRJQ3P.css} +32 -26
  21. package/dist/ArtifactKinds-CVD3FCYO.css +15 -0
  22. package/dist/AvatarPicker/index.js +3 -3
  23. package/dist/CanvasBoard/CanvasBoard.d.ts +30 -12
  24. package/dist/CanvasBoard/index.js +1 -1
  25. package/dist/ChangeMark/index.js +2 -2
  26. package/dist/ChoiceList/ChoiceList.d.ts +7 -1
  27. package/dist/ChoiceList/index.js +1 -1
  28. package/dist/{ChoiceList-2PQJS4DX.css → ChoiceList-RBL7FNQL.css} +39 -0
  29. package/dist/CommentThread/index.js +2 -2
  30. package/dist/DataTable/index.js +2 -2
  31. package/dist/DataView/index.js +5 -5
  32. package/dist/DateTimePicker/index.js +2 -2
  33. package/dist/DocTabsEditor/index.js +2 -2
  34. package/dist/{Editor-UUZ7XKCU.js → Editor-BVQHBF7L.js} +4 -4
  35. package/dist/FileDrop/FileDrop.d.ts +64 -0
  36. package/dist/FileDrop/index.d.ts +3 -0
  37. package/dist/FileDrop/index.js +4 -0
  38. package/dist/FileDrop-WE7BNZGV.css +80 -0
  39. package/dist/FindingList/FindingList.d.ts +35 -0
  40. package/dist/FindingList/index.d.ts +3 -0
  41. package/dist/FindingList/index.js +3 -0
  42. package/dist/FindingList-PMYA2R6Q.css +71 -0
  43. package/dist/HuePicker/HuePicker.d.ts +9 -0
  44. package/dist/HuePicker/index.d.ts +1 -1
  45. package/dist/HuePicker/index.js +1 -1
  46. package/dist/Markdown/index.js +1 -1
  47. package/dist/Menu/Menu.d.ts +6 -1
  48. package/dist/Menu/index.js +1 -1
  49. package/dist/OrgTable/index.js +1 -1
  50. package/dist/RichEditor/index.js +3 -3
  51. package/dist/RichEditorMarkdown/index.js +3 -3
  52. package/dist/SheetColumnEditor/SheetColumnEditor.d.ts +94 -0
  53. package/dist/SheetColumnEditor/index.d.ts +3 -0
  54. package/dist/SheetColumnEditor/index.js +23 -0
  55. package/dist/SheetColumnEditor-BO2HKFRB.css +73 -0
  56. package/dist/SheetGrid/SheetGrid.d.ts +19 -1
  57. package/dist/SheetGrid/index.js +5 -4
  58. package/dist/{SheetGrid-GDPCCZ4V.css → SheetGrid-YRDXTIIZ.css} +48 -0
  59. package/dist/SheetModel/index.js +1 -1
  60. package/dist/SheetModel/labels.d.ts +6 -0
  61. package/dist/SlideFilmstrip/SlideFilmstrip.d.ts +30 -1
  62. package/dist/SlideFilmstrip/index.js +5 -1
  63. package/dist/{SlideFilmstrip-5U6Z55GS.css → SlideFilmstrip-4ITZLMO4.css} +49 -0
  64. package/dist/SourceEditor/SourceEditor.d.ts +62 -0
  65. package/dist/SourceEditor/index.d.ts +3 -0
  66. package/dist/SourceEditor/index.js +3 -0
  67. package/dist/SourceEditor-G2C3STPX.css +160 -0
  68. package/dist/ThemeGallery/ThemeGallery.d.ts +10 -3
  69. package/dist/ThemeGallery/index.js +1 -1
  70. package/dist/{ThemeGallery-NITASULQ.css → ThemeGallery-HSUKBDWY.css} +9 -0
  71. package/dist/TimeWindowPicker/index.js +2 -2
  72. package/dist/{chunk-UXXJDIYE.js → chunk-22CQQDFW.js} +1 -1
  73. package/dist/{chunk-E4NNGC6X.js → chunk-3VD3G3IL.js} +2 -2
  74. package/dist/{chunk-EWAFN2IU.js → chunk-5VCG26CV.js} +281 -234
  75. package/dist/{chunk-XTOVADJU.js → chunk-7UYONN6K.js} +7 -18
  76. package/dist/{chunk-CFAJP777.js → chunk-AXBRWRGV.js} +1 -1
  77. package/dist/{chunk-KK5OYNAF.js → chunk-BAKPMH3S.js} +8 -4
  78. package/dist/{chunk-3EB2AV3H.js → chunk-BUVCV3WI.js} +1 -1
  79. package/dist/chunk-CE2THTQR.js +19 -0
  80. package/dist/{chunk-4B6LSFDS.js → chunk-CSQTDGTS.js} +1 -1
  81. package/dist/{chunk-WPX6A5BV.js → chunk-E35CMI5D.js} +22 -6
  82. package/dist/{chunk-EBCHVFCS.js → chunk-FJJHD73S.js} +2 -2
  83. package/dist/{chunk-SGHIAGPR.js → chunk-HAKTRTRP.js} +1 -1
  84. package/dist/{chunk-PLDUNXAO.js → chunk-ILDNJHRU.js} +1 -1
  85. package/dist/chunk-MAD6WPER.js +342 -0
  86. package/dist/{chunk-IUD5VA2Z.js → chunk-NKZCJRKO.js} +10 -5
  87. package/dist/chunk-NTB5LRRD.js +52 -0
  88. package/dist/{chunk-VI5FWDZW.js → chunk-OOMXLJ3S.js} +4 -1
  89. package/dist/{chunk-UOR7TOAU.js → chunk-OSFA5ROT.js} +86 -1
  90. package/dist/{chunk-T46NR3WP.js → chunk-PGZ2R3ON.js} +1 -1
  91. package/dist/chunk-PI7HKLIT.js +245 -0
  92. package/dist/{chunk-YZFLH463.js → chunk-QEFHYUCY.js} +1 -1
  93. package/dist/{chunk-7Q7WDXHG.js → chunk-QFNWMWWY.js} +3 -3
  94. package/dist/{chunk-C7DKX453.js → chunk-QH6VYJ3X.js} +1 -1
  95. package/dist/{chunk-XV32RKQZ.js → chunk-QIXMNOBD.js} +67 -6
  96. package/dist/{chunk-GPHWCK7M.js → chunk-SUXP4OBT.js} +6 -3
  97. package/dist/{chunk-TRQCHF2F.js → chunk-SWD4QBL6.js} +1 -1
  98. package/dist/chunk-THDGBD6Y.js +154 -0
  99. package/dist/{chunk-C2FRTWKO.js → chunk-W3UVOZKL.js} +3 -2
  100. package/dist/{chunk-UDQW6UK7.js → chunk-W7QBBKUE.js} +34 -7
  101. package/dist/{chunk-QBXZLGK2.js → chunk-ZU3DUXD2.js} +3 -2
  102. package/dist/generated/index.d.ts +5 -0
  103. package/dist/generated/index.js +73 -68
  104. package/dist/index.js +73 -68
  105. package/dist/styles.css +652 -51
  106. package/dist/utils/csv.d.ts +35 -0
  107. package/dist/utils/index.d.ts +2 -1
  108. package/dist/utils/index.js +1 -1
  109. package/package.json +3 -3
  110. package/dist/{chunk-YCARLYI6.js → chunk-3WCNHYXE.js} +0 -0
  111. package/dist/{chunk-IYO2N5ZH.js → chunk-6JVRY5DQ.js} +1 -1
  112. package/dist/{chunk-BY4N65PM.js → chunk-73A7D5CE.js} +1 -1
  113. package/dist/{chunk-AORVEG5V.js → chunk-F2KY4RLI.js} +1 -1
@@ -0,0 +1,160 @@
1
+ /*
2
+ * Source text written in place: a gutter of line numbers beside a real
3
+ * textarea, and the marks a checker placed drawn behind the text. The gutter,
4
+ * the marks and the field share one font, one line height and one top inset,
5
+ * so a number and a mark always sit on the line they name; the layers follow
6
+ * the field's scroll by a transform.
7
+ *
8
+ * The BOX takes the focus ring, as the Composer's does.
9
+ */
10
+ .crewlet-source-editor {
11
+ --crewlet-source-inset: var(--spacing-2);
12
+
13
+ position: relative;
14
+ display: grid;
15
+ grid-template-columns: auto minmax(0, 1fr);
16
+ min-width: 0;
17
+ overflow: hidden;
18
+ border: 1px solid var(--color-border-strong);
19
+ border-radius: var(--radius-md);
20
+ background: var(--color-surface-background);
21
+ font-family: var(--font-family-mono);
22
+ font-size: var(--font-size-xs);
23
+ line-height: var(--font-line-height-normal);
24
+ transition:
25
+ border-color var(--motion-duration-fast) var(--motion-easing-default),
26
+ box-shadow var(--motion-duration-fast) var(--motion-easing-default);
27
+ }
28
+
29
+ .crewlet-source-editor:hover {
30
+ border-color: var(--color-border-strong-hover);
31
+ }
32
+
33
+ .crewlet-source-editor:focus-within {
34
+ border-color: var(--color-brand-accent);
35
+ box-shadow: 0 0 0 2px var(--color-brand-accent-soft);
36
+ }
37
+
38
+ .crewlet-source-editor.is-fill {
39
+ height: 100%;
40
+ }
41
+
42
+ .crewlet-source-editor__gutter {
43
+ position: relative;
44
+ overflow: hidden;
45
+ border-right: 1px solid var(--color-border-default);
46
+ background: var(--color-surface-subtle);
47
+ user-select: none;
48
+ }
49
+
50
+ .crewlet-source-editor__numbers {
51
+ display: grid;
52
+ padding: var(--crewlet-source-inset) 0;
53
+ will-change: transform;
54
+ }
55
+
56
+ .crewlet-source-editor__number {
57
+ /* Wide enough for the longest number, so the text never shifts as lines are added. */
58
+ min-width: calc(var(--crewlet-source-digits, 2) * 1ch + var(--spacing-2) * 2);
59
+ padding: 0 var(--spacing-2);
60
+ text-align: right;
61
+ font-variant-numeric: tabular-nums;
62
+ color: var(--color-text-tertiary);
63
+ }
64
+
65
+ .crewlet-source-editor__number.is-danger {
66
+ color: var(--color-feedback-danger-ink);
67
+ font-weight: var(--font-weight-semibold);
68
+ box-shadow: inset 2px 0 0 var(--color-feedback-danger-ink);
69
+ }
70
+
71
+ .crewlet-source-editor__number.is-warning {
72
+ color: var(--color-feedback-warning-ink);
73
+ font-weight: var(--font-weight-semibold);
74
+ box-shadow: inset 2px 0 0 var(--color-feedback-warning-ink);
75
+ }
76
+
77
+ .crewlet-source-editor__body {
78
+ position: relative;
79
+ display: grid;
80
+ min-width: 0;
81
+ }
82
+
83
+ .crewlet-source-editor__marks {
84
+ position: absolute;
85
+ inset: 0;
86
+ overflow: hidden;
87
+ pointer-events: none;
88
+ }
89
+
90
+ .crewlet-source-editor__marks > div {
91
+ position: relative;
92
+ will-change: transform;
93
+ }
94
+
95
+ .crewlet-source-editor__mark {
96
+ position: absolute;
97
+ top: calc(var(--crewlet-source-inset) + var(--crewlet-source-line) * 1lh);
98
+ left: 0;
99
+ right: 0;
100
+ height: 1lh;
101
+ }
102
+
103
+ .crewlet-source-editor__mark.is-danger {
104
+ background: var(--color-feedback-danger-soft);
105
+ }
106
+
107
+ .crewlet-source-editor__mark.is-warning {
108
+ background: var(--color-feedback-warning-soft);
109
+ }
110
+
111
+ .crewlet-source-editor .crewlet-source-editor__field {
112
+ position: relative;
113
+ display: block;
114
+ width: 100%;
115
+ min-height: 0;
116
+ margin: 0;
117
+ padding: var(--crewlet-source-inset) var(--spacing-3);
118
+ border: 0;
119
+ border-radius: 0;
120
+ background: transparent;
121
+ color: var(--color-text-primary);
122
+ font: inherit;
123
+ white-space: pre;
124
+ overflow: auto;
125
+ resize: none;
126
+ tab-size: 2;
127
+ caret-color: var(--color-brand-accent);
128
+ }
129
+
130
+ .crewlet-source-editor.is-fill .crewlet-source-editor__field {
131
+ height: 100%;
132
+ }
133
+
134
+ .crewlet-source-editor .crewlet-source-editor__field::placeholder {
135
+ color: var(--color-text-tertiary);
136
+ }
137
+
138
+ /* The ring is the box's, above. A transparent outline stays, because forced
139
+ colors drops the box's shadow and paints an outline in its place. */
140
+ .crewlet-source-editor .crewlet-source-editor__field:focus-visible {
141
+ outline: 2px solid transparent;
142
+ outline-offset: -2px;
143
+ }
144
+
145
+ .crewlet-source-editor .crewlet-source-editor__field[readonly] {
146
+ color: var(--color-text-secondary);
147
+ }
148
+
149
+ @media (forced-colors: active) {
150
+ .crewlet-source-editor__mark {
151
+ background: Highlight;
152
+ opacity: 0.25;
153
+ }
154
+ }
155
+
156
+ @media (prefers-reduced-motion: reduce) {
157
+ .crewlet-source-editor {
158
+ transition: none;
159
+ }
160
+ }
@@ -1,4 +1,4 @@
1
- import { type HTMLAttributes } from 'react';
1
+ import { type HTMLAttributes, type ReactNode } from 'react';
2
2
  import { type ThemeId } from '@crewlethq/tokens';
3
3
  import { type ThemeSwatchPair } from '../ThemeSwatch/index.js';
4
4
  /** A theme as the gallery offers it: the fields of a `themeRegistry` entry it reads. */
@@ -9,7 +9,8 @@ export interface ThemeGalleryTheme<T extends string = string> {
9
9
  tag: string;
10
10
  /** The id of the group it is listed under. */
11
11
  group: string;
12
- swatch: ThemeSwatchPair;
12
+ /** Its two palettes, drawn as the card's thumbnail unless `renderPreview` draws one. */
13
+ swatch?: ThemeSwatchPair | undefined;
13
14
  }
14
15
  /** A heading the themes are listed under, as `themeGroups` carries it. */
15
16
  export interface ThemeGalleryGroup {
@@ -38,6 +39,12 @@ export interface ThemeGalleryProps<T extends string = ThemeId> extends Omit<HTML
38
39
  columns?: number | undefined;
39
40
  /** Nothing can be chosen, and the gallery says so. */
40
41
  disabled?: boolean | undefined;
42
+ /**
43
+ * Draws a card's thumbnail in place of its swatch: a theme of something
44
+ * other than the product's chrome, such as a slide deck's, shown as what it
45
+ * themes. Decoration, as the swatch is: the card is named by its theme.
46
+ */
47
+ renderPreview?: ((theme: ThemeGalleryTheme<T>) => ReactNode) | undefined;
41
48
  }
42
49
  /**
43
50
  * The choice of a theme: every theme, each drawn as its two palettes, listed
@@ -62,4 +69,4 @@ export interface ThemeGalleryProps<T extends string = ThemeId> extends Omit<HTML
62
69
  * and described by its group's heading; the drawing is decoration, because
63
70
  * the name is printed under it.
64
71
  */
65
- export declare function ThemeGallery<T extends string = ThemeId>({ label, value, onValueChange, onPreview, themes, groups, columns, disabled, className, style, ...rest }: ThemeGalleryProps<T>): import("react").JSX.Element;
72
+ export declare function ThemeGallery<T extends string = ThemeId>({ label, value, onValueChange, onPreview, themes, groups, columns, disabled, renderPreview, className, style, ...rest }: ThemeGalleryProps<T>): import("react").JSX.Element;
@@ -1,4 +1,4 @@
1
- export { ThemeGallery } from '../chunk-C2FRTWKO.js';
1
+ export { ThemeGallery } from '../chunk-W3UVOZKL.js';
2
2
  import '../chunk-MNFU2RNT.js';
3
3
  import '../chunk-F73MC7EZ.js';
4
4
  import '../chunk-RKKO7QHH.js';
@@ -91,3 +91,12 @@
91
91
  border-width: 2px;
92
92
  }
93
93
  }
94
+
95
+ /* A THUMBNAIL THE CALLER DRAWS (`renderPreview`) fills the card's width, as
96
+ the swatch does, and is clipped to the card's inner corner. */
97
+ .crewlet-theme-gallery__preview {
98
+ display: block;
99
+ overflow: hidden;
100
+ border-radius: var(--radius-sm);
101
+ pointer-events: none;
102
+ }
@@ -1,8 +1,8 @@
1
- export { DEFAULT_TIME_WINDOW_LABELS, TIME_WINDOW_SPANS, TimeWindowPicker, describeTimeWindow, isTimeWindowSet, parseTimeWindowDuration, resolveTimeWindow, timeWindowMatchesPreset } from '../chunk-AORVEG5V.js';
1
+ export { DEFAULT_TIME_WINDOW_LABELS, TIME_WINDOW_SPANS, TimeWindowPicker, describeTimeWindow, isTimeWindowSet, parseTimeWindowDuration, resolveTimeWindow, timeWindowMatchesPreset } from '../chunk-F2KY4RLI.js';
2
2
  import '../chunk-BQ7AKL2N.js';
3
3
  import '../chunk-F73MC7EZ.js';
4
- import '../chunk-K3IJQNB7.js';
5
4
  import '../chunk-GXQ3B46I.js';
5
+ import '../chunk-K3IJQNB7.js';
6
6
  import '../chunk-6QFAK2WV.js';
7
7
  import '../chunk-PQADV6P6.js';
8
8
  import '../chunk-OMV5W53A.js';
@@ -3,7 +3,7 @@ import { Modal } from './chunk-XEGZHHRH.js';
3
3
  import { Checkbox } from './chunk-CPEPST4S.js';
4
4
  import { EmptyValue } from './chunk-EUCC37WY.js';
5
5
  import { useCardHeaderSlot } from './chunk-AV2DXAEL.js';
6
- import { Menu } from './chunk-3EB2AV3H.js';
6
+ import { Menu } from './chunk-BUVCV3WI.js';
7
7
  import { Button } from './chunk-OG6CL3EB.js';
8
8
  import { IconButton } from './chunk-4FQT6ZAY.js';
9
9
  import { VisuallyHidden } from './chunk-BZFWDIV6.js';
@@ -1,4 +1,4 @@
1
- import { richEditorLabels } from './chunk-4B6LSFDS.js';
1
+ import { richEditorLabels } from './chunk-CSQTDGTS.js';
2
2
  import { Callout } from './chunk-SZZRIHGT.js';
3
3
  import { Skeleton } from './chunk-TEUQWOWZ.js';
4
4
  import { Button } from './chunk-OG6CL3EB.js';
@@ -9,7 +9,7 @@ import { jsx } from 'react/jsx-runtime';
9
9
  var engine = null;
10
10
  var loading = null;
11
11
  function loadEngine() {
12
- loading ??= import('./Editor-UUZ7XKCU.js').then(
12
+ loading ??= import('./Editor-BVQHBF7L.js').then(
13
13
  (module) => {
14
14
  engine = module.Editor;
15
15
  return engine;