@flytedan/flytebot-design-system 0.93.3 → 0.95.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.93.3",
3
+ "version": "0.95.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",
@@ -76,6 +76,7 @@
76
76
  "@codemirror/language": "^6.12.4",
77
77
  "@codemirror/state": "^6.7.6",
78
78
  "@codemirror/view": "^6.43.13",
79
+ "@flytedan/markdown-editor": "^0.1.0",
79
80
  "@lezer/highlight": "^1.2.4",
80
81
  "@phosphor-icons/web": "2.1.1"
81
82
  },
@@ -1,3 +1,8 @@
1
+ /* DS-68: the markdown editor (MarkdownEditor, InlineMarkdownEdit, the composer's editor) is the
2
+ package @flytedan/markdown-editor, a dependency of this one; its stylesheet comes with this
3
+ file, so an app imports nothing extra. tokens.css maps its --mde-* theme onto this system. */
4
+ @import "@flytedan/markdown-editor/styles.css";
5
+
1
6
  /* Vendored verbatim from the flytedesk Design System (Claude Design project "flytedesk Design System"), foundations/components.css. */
2
7
  /* flytedesk components — class-based so hover/focus/press states are real CSS.
3
8
  Every value below traces to tokens/. Control heights are deliberately larger
@@ -6869,115 +6874,6 @@ button.fd-erow-metric:focus-visible {
6869
6874
  cursor: not-allowed;
6870
6875
  }
6871
6876
 
6872
- /* --- rich markdown composer --------------------------------------------- */
6873
- .fd-rme-wrap {
6874
- position: relative;
6875
- font-size: var(--body-size);
6876
- line-height: 1.55;
6877
- min-width: 0;
6878
- }
6879
- .fd-rme {
6880
- outline: none;
6881
- overflow-y: auto;
6882
- overflow-x: hidden;
6883
- white-space: pre-wrap;
6884
- word-break: break-word;
6885
- color: var(--chat-text);
6886
- caret-color: var(--chat-accent);
6887
- tab-size: 2;
6888
- }
6889
- .fd-rme-wrap.is-disabled {
6890
- opacity: 0.6;
6891
- }
6892
- .fd-rme-line {
6893
- min-height: 1.55em;
6894
- }
6895
- .fd-rme-line.is-h1 {
6896
- font-size: 1.22em;
6897
- font-weight: var(--w-bold);
6898
- line-height: 1.35;
6899
- }
6900
- .fd-rme-line.is-h2 {
6901
- font-size: 1.14em;
6902
- font-weight: var(--w-bold);
6903
- line-height: 1.38;
6904
- }
6905
- .fd-rme-line.is-h3 {
6906
- font-size: 1.06em;
6907
- font-weight: var(--w-semibold);
6908
- }
6909
- .fd-rme-line.is-h4,
6910
- .fd-rme-line.is-h5,
6911
- .fd-rme-line.is-h6 {
6912
- font-weight: var(--w-semibold);
6913
- }
6914
- .fd-rme-line.is-quote {
6915
- border-left: 2px solid var(--border-strong);
6916
- padding-left: 8px;
6917
- color: var(--chat-text-2);
6918
- font-style: italic;
6919
- }
6920
- .fd-rme-line.is-code {
6921
- font-family: var(--font-mono);
6922
- font-size: 0.9em;
6923
- background: var(--chat-code-bg);
6924
- border-left: 2px solid var(--border);
6925
- padding-left: 8px;
6926
- }
6927
- .fd-rme-line.is-table {
6928
- font-family: var(--font-mono);
6929
- font-size: 0.9em;
6930
- color: var(--chat-text-2);
6931
- }
6932
- .fd-rme-line.is-rule {
6933
- color: var(--text-disabled);
6934
- }
6935
- .fd-rme-ph {
6936
- position: absolute;
6937
- left: 0;
6938
- top: 0;
6939
- pointer-events: none;
6940
- color: var(--text-disabled);
6941
- }
6942
- .rme-mk {
6943
- opacity: 0.36;
6944
- }
6945
- .rme-b {
6946
- font-weight: var(--w-bold);
6947
- }
6948
- .rme-i {
6949
- font-style: italic;
6950
- }
6951
- .rme-s {
6952
- text-decoration: line-through;
6953
- opacity: 0.68;
6954
- }
6955
- .rme-c {
6956
- font-family: var(--font-mono);
6957
- font-size: 0.9em;
6958
- background: var(--surface-2);
6959
- border-radius: var(--r-xs);
6960
- padding: 0 2px;
6961
- }
6962
- .rme-lk {
6963
- color: var(--link);
6964
- text-decoration: underline;
6965
- text-underline-offset: 2px;
6966
- }
6967
- .rme-bullet {
6968
- color: var(--brand);
6969
- font-weight: var(--w-bold);
6970
- }
6971
- .rme-task {
6972
- color: var(--brand);
6973
- }
6974
- .rme-task.is-done {
6975
- opacity: 0.6;
6976
- }
6977
- .rme-lang {
6978
- color: var(--text-muted);
6979
- }
6980
-
6981
6877
  /* ==========================================================================
6982
6878
  2 · the chat panel
6983
6879
  ========================================================================== */
@@ -7785,6 +7681,8 @@ button.fd-erow-metric:focus-visible {
7785
7681
  flex-direction: column;
7786
7682
  gap: 6px;
7787
7683
  padding: 10px 10px 8px 12px;
7684
+ /* inherited by the editor's bare surface (DS-68), whose text and font come from here too */
7685
+ caret-color: var(--chat-accent);
7788
7686
  }
7789
7687
  .fdc-staged {
7790
7688
  margin-bottom: 2px;
package/styles/tokens.css CHANGED
@@ -479,3 +479,117 @@ body{zoom:var(--text-scale-zoom);}
479
479
  --control-h-md:44px;/* @kind spacing */
480
480
  --control-h-lg:52px;/* @kind spacing */
481
481
  }
482
+
483
+ /* ============ the markdown editor's theme (DS-68) ============ */
484
+ /* @flytedan/markdown-editor (MarkdownEditor, InlineMarkdownEdit) draws with its own
485
+ --mde-* custom properties (listed with what each one styles in the package's
486
+ src/styles/00-theme.css). Its defaults are a neutral theme of its own, declared inside
487
+ :where(), so these rules win over them without !important. Here every one is mapped to
488
+ this system's tokens, so the editor follows the Flytedesk type, colours, radii,
489
+ elevation and the [data-theme] light/dark switch rather than the operating system's.
490
+
491
+ Every mapping is declared on [data-theme] as well as :root: a custom property holding
492
+ var() resolves where it is declared, so an element that sets its own theme (a nested
493
+ [data-theme="dark"]) needs the mappings re-resolved there, exactly as the chat aliases
494
+ above are re-declared. Only the editor's two literal theme values differ by theme. */
495
+ :root,
496
+ [data-theme]{
497
+ --mde-font-sans:var(--font-sans);
498
+ --mde-font-mono:var(--font-mono);
499
+ --mde-text-xs:var(--label-size);
500
+ --mde-text-sm:var(--body-sm-size);
501
+ --mde-text-base:var(--body-size);
502
+ --mde-text-lg:var(--h3-size);
503
+ --mde-text-xl:var(--h2-size);
504
+ --mde-leading:var(--body-lh);
505
+
506
+ --mde-radius-sm:var(--r-sm);
507
+ --mde-radius-md:var(--r-md);
508
+ --mde-radius-lg:var(--r-lg);
509
+ --mde-control-sm:var(--hit-product);
510
+ --mde-control-md:var(--hit-touch);
511
+ /* Icons: this system sizes its icon glyphs in px, most often 14/16/18, with no token of
512
+ their own; the spacing scale holds the same steps. */
513
+ --mde-icon-xs:calc(var(--s-12) + var(--s-2));
514
+ --mde-icon-sm:var(--s-16);
515
+ --mde-icon-md:var(--s-20);
516
+ --mde-icon-lg:var(--s-24);
517
+ --mde-icon-xl:var(--s-32);
518
+ /* The editor's tooltips and menus portal to <body>. The overlay stack
519
+ (kits/layerStack.tsx) gives a root layer (index + 1) * ROOT_STEP (100), so 1000 keeps
520
+ an editor's popups above the Drawer or Modal it sits in. */
521
+ --mde-z-popup:1000;
522
+ --mde-shadow-sm:var(--e-1);
523
+ --mde-shadow-md:var(--e-2);
524
+ --mde-shadow-lg:var(--e-3);
525
+
526
+ --mde-color-scheme:light;
527
+ --mde-surface:var(--surface);
528
+ --mde-surface-overlay:var(--surface);
529
+ --mde-surface-inset:var(--surface-2);
530
+ --mde-surface-hover:var(--surface-3);
531
+ --mde-overlay-hover:var(--surface-3);
532
+ --mde-surface-selected:var(--brand-soft);
533
+ --mde-text:var(--text);
534
+ --mde-text-secondary:var(--text-2);
535
+ --mde-text-tertiary:var(--text-muted);
536
+ --mde-placeholder:var(--text-disabled);
537
+ --mde-border-subtle:var(--border);
538
+ --mde-border:var(--border);
539
+ --mde-border-strong:var(--border-strong);
540
+ --mde-accent:var(--brand);
541
+ --mde-accent-text:var(--text-on-surface-brand);
542
+ --mde-accent-subtle:var(--surface-brand);
543
+ --mde-danger:var(--danger-solid);
544
+ --mde-danger-text:var(--danger-text);
545
+ --mde-danger-subtle:var(--danger-fill);
546
+ --mde-danger-border:var(--danger-border);
547
+ --mde-warning:var(--warn-solid);
548
+ --mde-warning-text:var(--warn-text);
549
+ --mde-warning-subtle:var(--warn-fill);
550
+ --mde-warning-border:var(--warn-border);
551
+ --mde-focus-ring:var(--blue-500);
552
+
553
+ /* fenced code: the same --code-* palette the system's own highlighter (.tok-*) uses */
554
+ --mde-syntax-text:var(--text);
555
+ --mde-syntax-comment:var(--code-com);
556
+ --mde-syntax-punctuation:var(--code-pun);
557
+ --mde-syntax-operator:var(--code-pun);
558
+ --mde-syntax-string:var(--code-str);
559
+ --mde-syntax-escape:var(--code-lit);
560
+ --mde-syntax-number:var(--code-num);
561
+ --mde-syntax-boolean:var(--code-lit);
562
+ --mde-syntax-null:var(--code-lit);
563
+ --mde-syntax-regex:var(--code-str);
564
+ --mde-syntax-keyword:var(--code-kw);
565
+ --mde-syntax-property:var(--code-prop);
566
+ --mde-syntax-variable:var(--text);
567
+ --mde-syntax-function:var(--code-fn);
568
+ --mde-syntax-type:var(--code-type);
569
+ --mde-syntax-constant:var(--code-lit);
570
+ --mde-syntax-tag:var(--code-kw);
571
+ --mde-syntax-attribute:var(--code-prop);
572
+ --mde-syntax-selector:var(--code-fn);
573
+ --mde-syntax-atrule:var(--code-kw);
574
+ --mde-syntax-heading:var(--code-type);
575
+ --mde-syntax-emphasis:var(--text-2);
576
+ --mde-syntax-strong:var(--text);
577
+ --mde-syntax-strike:var(--text-muted);
578
+ --mde-syntax-link:var(--link);
579
+ --mde-syntax-url:var(--code-prop);
580
+ --mde-syntax-marker:var(--code-pun);
581
+ --mde-syntax-quote:var(--text-2);
582
+ --mde-syntax-invalid:var(--danger-text);
583
+ --mde-syntax-invalid-bg:var(--danger-fill);
584
+ }
585
+ [data-theme="dark"]{
586
+ --mde-color-scheme:dark;
587
+ }
588
+ /* A finger gets the system's touch target, as the package's own default does. */
589
+ @media (pointer:coarse){
590
+ :root,
591
+ [data-theme]{
592
+ --mde-control-sm:var(--hit-touch);
593
+ --mde-control-md:var(--control-h-lg);
594
+ }
595
+ }