@flytedan/flytebot-design-system 0.48.0 → 0.49.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flytedan/flytebot-design-system",
3
- "version": "0.48.0",
3
+ "version": "0.49.0",
4
4
  "description": "flytedesk Design System — shared component library, tokens, and business-logic kits for flytedesk apps.",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",
@@ -56,6 +56,12 @@
56
56
  "react-dom": "^18.3.1"
57
57
  },
58
58
  "dependencies": {
59
+ "@codemirror/commands": "^6.11.1",
60
+ "@codemirror/lang-sql": "^6.10.0",
61
+ "@codemirror/language": "^6.12.4",
62
+ "@codemirror/state": "^6.7.6",
63
+ "@codemirror/view": "^6.43.13",
64
+ "@lezer/highlight": "^1.2.4",
59
65
  "@phosphor-icons/web": "2.1.1"
60
66
  },
61
67
  "devDependencies": {
@@ -859,6 +859,32 @@
859
859
  border-color: var(--border-strong);
860
860
  box-shadow: none;
861
861
  }
862
+ /* MP-271 review (comment 2920, finding 3): an interactive Card (href/onClick) can no longer
863
+ render `action`/`footer` INSIDE the `<a>`/`<button>` — that was the only way this component
864
+ could ever produce a real `<button>` (or a link) nested inside a real `<a>`, which is invalid
865
+ HTML5 and double-fires clicks. `.fd-card-shell` is the plain, non-interactive wrapper Card
866
+ renders around the `<a>`/`<button>` only when it's interactive; `action` and `footer` become
867
+ its ordinary siblings, never its descendants, so nesting is impossible regardless of what a
868
+ caller puts in either slot. `footer` needs nothing extra (it was already the last thing
869
+ painted, so a sibling after the `<a>` lands in the exact same visual spot); `action` sits
870
+ inside the header row visually, so it's positioned back into that corner over the `<a>`,
871
+ given a higher stacking order so it stays independently clickable/focusable (the "stretched
872
+ link" technique's own z-index rule, applied to a real sibling instead of a pseudo-element). */
873
+ .fd-card-shell {
874
+ position: relative;
875
+ display: flex;
876
+ flex-direction: column;
877
+ height: 100%;
878
+ }
879
+ .fd-card-shell > .fd-card-interactive {
880
+ flex: 1 1 auto;
881
+ }
882
+ .fd-card-shell-action {
883
+ position: absolute;
884
+ top: 16px;
885
+ right: 18px;
886
+ z-index: 1;
887
+ }
862
888
  /* The header degrades in two steps as the action slot needs more room than is left:
863
889
  first the title gives up ITS OWN spare width (ordinary flex-shrink) down to
864
890
  fd-card-head-title's min-width; once even that doesn't leave enough room for the
@@ -3430,6 +3456,21 @@
3430
3456
  grid-template-columns: repeat(auto-fill, minmax(var(--card-grid-min, 280px), 1fr));
3431
3457
  align-items: stretch;
3432
3458
  }
3459
+ /* MP-271 review (comment 2920, finding 2): CardGrid wraps every item in its own
3460
+ `<div role="listitem">` rather than cloning `role` onto the child (a clone silently drops
3461
+ an added prop on a Fragment child, and can't fix that). The wrapper is now the real grid
3462
+ item that `align-items: stretch` above stretches to the row's height, so it has to pass
3463
+ that height on to its own one real child the same way `.fd-card-body`'s `flex: 1 1 auto`
3464
+ passes extra height down to `.fd-card-foot` — otherwise a stretched wrapper with an
3465
+ un-stretched child inside it would look identical to no equal-height rows at all. */
3466
+ .fd-card-grid > [role="listitem"] {
3467
+ display: flex;
3468
+ min-width: 0;
3469
+ }
3470
+ .fd-card-grid > [role="listitem"] > * {
3471
+ flex: 1 1 auto;
3472
+ min-width: 0;
3473
+ }
3433
3474
  @media (max-width: 640px) {
3434
3475
  .fd-grid-stats {
3435
3476
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr));
@@ -4181,6 +4222,75 @@
4181
4222
  color: var(--code-pun);
4182
4223
  }
4183
4224
 
4225
+ /* ── MP-274: CodeEditor ──────────────────────────────────────────────────
4226
+ Shares .fd-input's chrome (border, radius, focus ring, disabled tint) with
4227
+ Input/Textarea, and .fd-code's border/background tokens, so it reads as a
4228
+ form field AND a code surface rather than inventing a third look. CodeMirror
4229
+ renders its own DOM into .fd-code-editor-host; every color it uses is a CSS
4230
+ variable set on that DOM by CodeEditor.tsx's EditorView.theme, and the
4231
+ .tok-* rules above (shared with CodeBlock) are the ones that actually paint
4232
+ its syntax highlighting, so both components' SQL always looks identical in
4233
+ light, dark and high-contrast. */
4234
+ .fd-code-editor {
4235
+ padding: 0;
4236
+ font-family: var(--font-mono);
4237
+ background: var(--chat-code-bg);
4238
+ overflow: hidden;
4239
+ }
4240
+ .fd-code-editor-host {
4241
+ height: 100%;
4242
+ }
4243
+ .fd-code-editor-host .cm-editor {
4244
+ height: 100%;
4245
+ }
4246
+ .fd-code-editor.fd-input-disabled .fd-code-editor-host {
4247
+ opacity: 0.6;
4248
+ }
4249
+ .fd-code-editor-diagnostics {
4250
+ list-style: none;
4251
+ margin: 6px 0 0;
4252
+ padding: 0;
4253
+ display: flex;
4254
+ flex-direction: column;
4255
+ gap: 4px;
4256
+ }
4257
+ .fd-code-editor-diag {
4258
+ display: flex;
4259
+ align-items: baseline;
4260
+ gap: 6px;
4261
+ font-size: var(--text-sm-size, 12.5px);
4262
+ color: var(--text-2);
4263
+ }
4264
+ .fd-code-editor-diag i {
4265
+ flex: none;
4266
+ }
4267
+ .fd-code-editor-diag.is-error {
4268
+ color: var(--danger-text);
4269
+ }
4270
+ .fd-code-editor-diag.is-error i {
4271
+ color: var(--danger-solid);
4272
+ }
4273
+ .fd-code-editor-diag.is-warning {
4274
+ color: var(--warn-text);
4275
+ }
4276
+ .fd-code-editor-diag.is-warning i {
4277
+ color: var(--warn-solid);
4278
+ }
4279
+ .fd-code-editor-diag.is-info {
4280
+ color: var(--info-text);
4281
+ }
4282
+ .fd-code-editor-diag.is-info i {
4283
+ color: var(--info-solid);
4284
+ }
4285
+ .fd-code-editor-diag-loc {
4286
+ font-family: var(--font-mono);
4287
+ font-weight: var(--w-semibold);
4288
+ flex: none;
4289
+ }
4290
+ .fd-code-editor-hint {
4291
+ color: var(--text-disabled);
4292
+ }
4293
+
4184
4294
  .fd-diff-body {
4185
4295
  font-family: var(--font-mono);
4186
4296
  font-size: 12.5px;