@designa8/vibedesign-v6 1.14.0 → 1.15.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.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @plasma/vibedesign-v6
2
2
 
3
- Generated design system, version **1.14.0**.
3
+ Generated design system, version **1.15.1**.
4
4
 
5
5
  ## Local install (npm link)
6
6
 
package/dist/index.cjs CHANGED
@@ -3597,7 +3597,12 @@ var ICON_REGISTRY = {
3597
3597
  "close": { viewBox: "0 0 24 24", paths: ["M18 6 6 18", "M6 6l12 12"] },
3598
3598
  "chevron-down": { viewBox: "0 0 24 24", paths: ["M6 9l6 6 6-6"] },
3599
3599
  "copy-clipboard": { viewBox: "0 0 24 24", paths: ["M9 9h10v10H9z", "M5 15V5h10"] },
3600
- "check-checkmark": { viewBox: "0 0 24 24", paths: ["M5 13l4 4L19 7"] }
3600
+ "check-checkmark": { viewBox: "0 0 24 24", paths: ["M5 13l4 4L19 7"] },
3601
+ "grid": { viewBox: "0 0 24 24", paths: ["M4 4h6v6H4z", "M14 4h6v6h-6z", "M4 14h6v6H4z", "M14 14h6v6h-6z"] },
3602
+ "atom": { viewBox: "0 0 24 24", paths: ["M12 12m-1.5 0a1.5 1.5 0 1 0 3 0a1.5 1.5 0 1 0 -3 0", "M12 3.5c4 0 8 3.6 8 8.5s-4 8.5-8 8.5", "M12 3.5c-4 1.8-8 5.6-8 8.5s4 6.7 8 8.5", "M4 8.5c1.8-4 5.6-5 8-5s6.2 1 8 5"] },
3603
+ "layers": { viewBox: "0 0 24 24", paths: ["M12 3l8 4.5-8 4.5-8-4.5 8-4.5z", "M4 12l8 4.5 8-4.5", "M4 16.5l8 4.5 8-4.5"] },
3604
+ "star": { viewBox: "0 0 24 24", paths: ["M12 3l2.6 5.6 6.1.7-4.5 4.2 1.2 6-5.4-3-5.4 3 1.2-6-4.5-4.2 6.1-.7L12 3z"] },
3605
+ "archive": { viewBox: "0 0 24 24", paths: ["M3 4h18v4H3z", "M4.5 8v11a1 1 0 0 0 1 1h13a1 1 0 0 0 1-1V8", "M10 12.5h4"] }
3601
3606
  };
3602
3607
 
3603
3608
  // virtual-pkg:src/atoms/Icon/Icon.tsx
@@ -3640,6 +3645,200 @@ var LANG_LABEL = {
3640
3645
  function LangBadge({ language }) {
3641
3646
  return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "inline-flex h-lg min-w-[1.6rem] items-center justify-center rounded-xs bg-surface-strong px-xxs text-caption text-muted", children: LANG_LABEL[language] });
3642
3647
  }
3648
+ var SYNTAX_CLASS = {
3649
+ plain: "text-ink",
3650
+ comment: "text-syntax-comment italic",
3651
+ string: "text-syntax-string",
3652
+ number: "text-syntax-number",
3653
+ keyword: "text-syntax-keyword",
3654
+ function: "text-syntax-function",
3655
+ type: "text-syntax-type",
3656
+ tag: "text-syntax-tag",
3657
+ property: "text-syntax-property",
3658
+ punctuation: "text-muted"
3659
+ };
3660
+ var JS_KEYWORDS = /* @__PURE__ */ new Set([
3661
+ "import",
3662
+ "export",
3663
+ "default",
3664
+ "from",
3665
+ "const",
3666
+ "let",
3667
+ "var",
3668
+ "function",
3669
+ "return",
3670
+ "interface",
3671
+ "type",
3672
+ "extends",
3673
+ "implements",
3674
+ "class",
3675
+ "new",
3676
+ "this",
3677
+ "if",
3678
+ "else",
3679
+ "for",
3680
+ "while",
3681
+ "switch",
3682
+ "case",
3683
+ "break",
3684
+ "continue",
3685
+ "true",
3686
+ "false",
3687
+ "null",
3688
+ "undefined",
3689
+ "void",
3690
+ "async",
3691
+ "await",
3692
+ "of",
3693
+ "in",
3694
+ "as",
3695
+ "public",
3696
+ "private",
3697
+ "protected",
3698
+ "readonly",
3699
+ "static",
3700
+ "enum",
3701
+ "namespace",
3702
+ "declare",
3703
+ "try",
3704
+ "catch",
3705
+ "finally",
3706
+ "throw",
3707
+ "yield",
3708
+ "typeof",
3709
+ "instanceof",
3710
+ "super"
3711
+ ]);
3712
+ var TS_TYPES = /* @__PURE__ */ new Set([
3713
+ "string",
3714
+ "number",
3715
+ "boolean",
3716
+ "any",
3717
+ "unknown",
3718
+ "never",
3719
+ "object",
3720
+ "React",
3721
+ "Record",
3722
+ "Partial",
3723
+ "Readonly",
3724
+ "Promise",
3725
+ "HTMLDivElement",
3726
+ "HTMLButtonElement"
3727
+ ]);
3728
+ var JS_TOKEN_RE = /(\/\/.*)|('(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|`(?:\\.|[^`\\])*`)|(\b\d+(?:\.\d+)?\b)|(<\/?[A-Za-z][\w.]*)|([A-Za-z_$][\w$]*)/g;
3729
+ function tokenizeJs(line) {
3730
+ const tokens = [];
3731
+ let lastIndex = 0;
3732
+ let match;
3733
+ JS_TOKEN_RE.lastIndex = 0;
3734
+ while ((match = JS_TOKEN_RE.exec(line)) !== null) {
3735
+ if (match.index > lastIndex) {
3736
+ tokens.push({ text: line.slice(lastIndex, match.index), type: "plain" });
3737
+ }
3738
+ if (match[1] !== void 0) {
3739
+ tokens.push({ text: match[1], type: "comment" });
3740
+ } else if (match[2] !== void 0) {
3741
+ tokens.push({ text: match[2], type: "string" });
3742
+ } else if (match[3] !== void 0) {
3743
+ tokens.push({ text: match[3], type: "number" });
3744
+ } else if (match[4] !== void 0) {
3745
+ tokens.push({ text: match[4], type: "tag" });
3746
+ } else if (match[5] !== void 0) {
3747
+ const word = match[5];
3748
+ const after = line.slice(JS_TOKEN_RE.lastIndex).match(/^\s*\(/);
3749
+ if (JS_KEYWORDS.has(word)) {
3750
+ tokens.push({ text: word, type: "keyword" });
3751
+ } else if (TS_TYPES.has(word)) {
3752
+ tokens.push({ text: word, type: "type" });
3753
+ } else if (after) {
3754
+ tokens.push({ text: word, type: "function" });
3755
+ } else {
3756
+ tokens.push({ text: word, type: "plain" });
3757
+ }
3758
+ }
3759
+ lastIndex = JS_TOKEN_RE.lastIndex;
3760
+ }
3761
+ if (lastIndex < line.length) tokens.push({ text: line.slice(lastIndex), type: "plain" });
3762
+ return tokens;
3763
+ }
3764
+ var CSS_TOKEN_RE = /(\/\*[\s\S]*?\*\/)|('(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*")|(@[a-zA-Z-]+)|(#[0-9a-fA-F]{3,8}\b)|(-?\d+\.?\d*(?:px|em|rem|%|deg|s|ms|vh|vw)?\b)|([a-zA-Z-]+)(?=\s*:)/g;
3765
+ function tokenizeCss(line) {
3766
+ const tokens = [];
3767
+ let lastIndex = 0;
3768
+ let match;
3769
+ CSS_TOKEN_RE.lastIndex = 0;
3770
+ while ((match = CSS_TOKEN_RE.exec(line)) !== null) {
3771
+ if (match.index > lastIndex) {
3772
+ tokens.push({ text: line.slice(lastIndex, match.index), type: "plain" });
3773
+ }
3774
+ if (match[1] !== void 0) tokens.push({ text: match[1], type: "comment" });
3775
+ else if (match[2] !== void 0) tokens.push({ text: match[2], type: "string" });
3776
+ else if (match[3] !== void 0) tokens.push({ text: match[3], type: "keyword" });
3777
+ else if (match[4] !== void 0) tokens.push({ text: match[4], type: "number" });
3778
+ else if (match[5] !== void 0) tokens.push({ text: match[5], type: "number" });
3779
+ else if (match[6] !== void 0) tokens.push({ text: match[6], type: "property" });
3780
+ lastIndex = CSS_TOKEN_RE.lastIndex;
3781
+ }
3782
+ if (lastIndex < line.length) tokens.push({ text: line.slice(lastIndex), type: "plain" });
3783
+ return tokens;
3784
+ }
3785
+ var JSON_TOKEN_RE = /("(?:\\.|[^"\\])*")(\s*:)?|(-?\d+(?:\.\d+)?)|\b(true|false|null)\b/g;
3786
+ function tokenizeJson(line) {
3787
+ const tokens = [];
3788
+ let lastIndex = 0;
3789
+ let match;
3790
+ JSON_TOKEN_RE.lastIndex = 0;
3791
+ while ((match = JSON_TOKEN_RE.exec(line)) !== null) {
3792
+ if (match.index > lastIndex) {
3793
+ tokens.push({ text: line.slice(lastIndex, match.index), type: "plain" });
3794
+ }
3795
+ if (match[1] !== void 0) {
3796
+ const hasColon = match[2] !== void 0;
3797
+ tokens.push({ text: match[1], type: hasColon ? "property" : "string" });
3798
+ if (hasColon) tokens.push({ text: match[2], type: "punctuation" });
3799
+ } else if (match[3] !== void 0) {
3800
+ tokens.push({ text: match[3], type: "number" });
3801
+ } else if (match[4] !== void 0) {
3802
+ tokens.push({ text: match[4], type: "keyword" });
3803
+ }
3804
+ lastIndex = JSON_TOKEN_RE.lastIndex;
3805
+ }
3806
+ if (lastIndex < line.length) tokens.push({ text: line.slice(lastIndex), type: "plain" });
3807
+ return tokens;
3808
+ }
3809
+ var MD_TOKEN_RE = /(^#{1,6}\s.*)|(`[^`]*`)/g;
3810
+ function tokenizeMd(line) {
3811
+ const tokens = [];
3812
+ let lastIndex = 0;
3813
+ let match;
3814
+ MD_TOKEN_RE.lastIndex = 0;
3815
+ while ((match = MD_TOKEN_RE.exec(line)) !== null) {
3816
+ if (match.index > lastIndex) {
3817
+ tokens.push({ text: line.slice(lastIndex, match.index), type: "plain" });
3818
+ }
3819
+ if (match[1] !== void 0) tokens.push({ text: match[1], type: "keyword" });
3820
+ else if (match[2] !== void 0) tokens.push({ text: match[2], type: "string" });
3821
+ lastIndex = MD_TOKEN_RE.lastIndex;
3822
+ }
3823
+ if (lastIndex < line.length) tokens.push({ text: line.slice(lastIndex), type: "plain" });
3824
+ return tokens;
3825
+ }
3826
+ function tokenizeLine(line, language) {
3827
+ if (line.length === 0) return [{ text: " ", type: "plain" }];
3828
+ switch (language) {
3829
+ case "tsx":
3830
+ case "ts":
3831
+ return tokenizeJs(line);
3832
+ case "css":
3833
+ return tokenizeCss(line);
3834
+ case "json":
3835
+ return tokenizeJson(line);
3836
+ case "md":
3837
+ return tokenizeMd(line);
3838
+ default:
3839
+ return [{ text: line, type: "plain" }];
3840
+ }
3841
+ }
3643
3842
  var CodeEditor = import_react14.default.forwardRef(
3644
3843
  ({
3645
3844
  files,
@@ -3746,7 +3945,7 @@ var CodeEditor = import_react14.default.forwardRef(
3746
3945
  ] }),
3747
3946
  /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "flex-1 overflow-auto bg-canvas", children: readOnly || streaming ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("pre", { className: "m-0 p-0 text-body-sm leading-[1.55] text-ink", children: lines.map((line, i) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex", children: [
3748
3947
  /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "select-none px-md text-right text-caption text-muted-soft", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "inline-block min-w-[2ch]", children: i + 1 }) }),
3749
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "flex-1 whitespace-pre pr-xl font-mono", children: line || " " })
3948
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "flex-1 whitespace-pre pr-xl font-mono", children: current ? tokenizeLine(line, current.language).map((tok, ti) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: SYNTAX_CLASS[tok.type], children: tok.text }, ti)) : line || " " })
3750
3949
  ] }, i)) }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex min-h-full", children: [
3751
3950
  /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "select-none px-md py-sm text-right text-caption text-muted-soft", children: lines.map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { children: i + 1 }, i)) }),
3752
3951
  /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
@@ -4372,6 +4571,7 @@ var FilterTabBar = import_react19.default.forwardRef(
4372
4571
  ...rest,
4373
4572
  children: tabs.map((tab) => {
4374
4573
  const isActive = tab.value === value;
4574
+ const isIconOnly = Boolean(tab.icon) && !tab.label;
4375
4575
  return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
4376
4576
  Button,
4377
4577
  {
@@ -4381,7 +4581,7 @@ var FilterTabBar = import_react19.default.forwardRef(
4381
4581
  variant: isActive ? "primary" : "ghost",
4382
4582
  size: "sm",
4383
4583
  onClick: () => onChange(tab.value),
4384
- className: "gap-xs",
4584
+ className: isIconOnly ? "gap-xs p-xs aspect-square leading-none" : "gap-xs",
4385
4585
  children: [
4386
4586
  tab.icon && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "inline-flex items-center justify-center shrink-0", "aria-hidden": "true", children: tab.icon }),
4387
4587
  tab.label && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { children: tab.label }),
package/dist/index.js CHANGED
@@ -3540,7 +3540,12 @@ var ICON_REGISTRY = {
3540
3540
  "close": { viewBox: "0 0 24 24", paths: ["M18 6 6 18", "M6 6l12 12"] },
3541
3541
  "chevron-down": { viewBox: "0 0 24 24", paths: ["M6 9l6 6 6-6"] },
3542
3542
  "copy-clipboard": { viewBox: "0 0 24 24", paths: ["M9 9h10v10H9z", "M5 15V5h10"] },
3543
- "check-checkmark": { viewBox: "0 0 24 24", paths: ["M5 13l4 4L19 7"] }
3543
+ "check-checkmark": { viewBox: "0 0 24 24", paths: ["M5 13l4 4L19 7"] },
3544
+ "grid": { viewBox: "0 0 24 24", paths: ["M4 4h6v6H4z", "M14 4h6v6h-6z", "M4 14h6v6H4z", "M14 14h6v6h-6z"] },
3545
+ "atom": { viewBox: "0 0 24 24", paths: ["M12 12m-1.5 0a1.5 1.5 0 1 0 3 0a1.5 1.5 0 1 0 -3 0", "M12 3.5c4 0 8 3.6 8 8.5s-4 8.5-8 8.5", "M12 3.5c-4 1.8-8 5.6-8 8.5s4 6.7 8 8.5", "M4 8.5c1.8-4 5.6-5 8-5s6.2 1 8 5"] },
3546
+ "layers": { viewBox: "0 0 24 24", paths: ["M12 3l8 4.5-8 4.5-8-4.5 8-4.5z", "M4 12l8 4.5 8-4.5", "M4 16.5l8 4.5 8-4.5"] },
3547
+ "star": { viewBox: "0 0 24 24", paths: ["M12 3l2.6 5.6 6.1.7-4.5 4.2 1.2 6-5.4-3-5.4 3 1.2-6-4.5-4.2 6.1-.7L12 3z"] },
3548
+ "archive": { viewBox: "0 0 24 24", paths: ["M3 4h18v4H3z", "M4.5 8v11a1 1 0 0 0 1 1h13a1 1 0 0 0 1-1V8", "M10 12.5h4"] }
3544
3549
  };
3545
3550
 
3546
3551
  // virtual-pkg:src/atoms/Icon/Icon.tsx
@@ -3583,6 +3588,200 @@ var LANG_LABEL = {
3583
3588
  function LangBadge({ language }) {
3584
3589
  return /* @__PURE__ */ jsx15("span", { className: "inline-flex h-lg min-w-[1.6rem] items-center justify-center rounded-xs bg-surface-strong px-xxs text-caption text-muted", children: LANG_LABEL[language] });
3585
3590
  }
3591
+ var SYNTAX_CLASS = {
3592
+ plain: "text-ink",
3593
+ comment: "text-syntax-comment italic",
3594
+ string: "text-syntax-string",
3595
+ number: "text-syntax-number",
3596
+ keyword: "text-syntax-keyword",
3597
+ function: "text-syntax-function",
3598
+ type: "text-syntax-type",
3599
+ tag: "text-syntax-tag",
3600
+ property: "text-syntax-property",
3601
+ punctuation: "text-muted"
3602
+ };
3603
+ var JS_KEYWORDS = /* @__PURE__ */ new Set([
3604
+ "import",
3605
+ "export",
3606
+ "default",
3607
+ "from",
3608
+ "const",
3609
+ "let",
3610
+ "var",
3611
+ "function",
3612
+ "return",
3613
+ "interface",
3614
+ "type",
3615
+ "extends",
3616
+ "implements",
3617
+ "class",
3618
+ "new",
3619
+ "this",
3620
+ "if",
3621
+ "else",
3622
+ "for",
3623
+ "while",
3624
+ "switch",
3625
+ "case",
3626
+ "break",
3627
+ "continue",
3628
+ "true",
3629
+ "false",
3630
+ "null",
3631
+ "undefined",
3632
+ "void",
3633
+ "async",
3634
+ "await",
3635
+ "of",
3636
+ "in",
3637
+ "as",
3638
+ "public",
3639
+ "private",
3640
+ "protected",
3641
+ "readonly",
3642
+ "static",
3643
+ "enum",
3644
+ "namespace",
3645
+ "declare",
3646
+ "try",
3647
+ "catch",
3648
+ "finally",
3649
+ "throw",
3650
+ "yield",
3651
+ "typeof",
3652
+ "instanceof",
3653
+ "super"
3654
+ ]);
3655
+ var TS_TYPES = /* @__PURE__ */ new Set([
3656
+ "string",
3657
+ "number",
3658
+ "boolean",
3659
+ "any",
3660
+ "unknown",
3661
+ "never",
3662
+ "object",
3663
+ "React",
3664
+ "Record",
3665
+ "Partial",
3666
+ "Readonly",
3667
+ "Promise",
3668
+ "HTMLDivElement",
3669
+ "HTMLButtonElement"
3670
+ ]);
3671
+ var JS_TOKEN_RE = /(\/\/.*)|('(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|`(?:\\.|[^`\\])*`)|(\b\d+(?:\.\d+)?\b)|(<\/?[A-Za-z][\w.]*)|([A-Za-z_$][\w$]*)/g;
3672
+ function tokenizeJs(line) {
3673
+ const tokens = [];
3674
+ let lastIndex = 0;
3675
+ let match;
3676
+ JS_TOKEN_RE.lastIndex = 0;
3677
+ while ((match = JS_TOKEN_RE.exec(line)) !== null) {
3678
+ if (match.index > lastIndex) {
3679
+ tokens.push({ text: line.slice(lastIndex, match.index), type: "plain" });
3680
+ }
3681
+ if (match[1] !== void 0) {
3682
+ tokens.push({ text: match[1], type: "comment" });
3683
+ } else if (match[2] !== void 0) {
3684
+ tokens.push({ text: match[2], type: "string" });
3685
+ } else if (match[3] !== void 0) {
3686
+ tokens.push({ text: match[3], type: "number" });
3687
+ } else if (match[4] !== void 0) {
3688
+ tokens.push({ text: match[4], type: "tag" });
3689
+ } else if (match[5] !== void 0) {
3690
+ const word = match[5];
3691
+ const after = line.slice(JS_TOKEN_RE.lastIndex).match(/^\s*\(/);
3692
+ if (JS_KEYWORDS.has(word)) {
3693
+ tokens.push({ text: word, type: "keyword" });
3694
+ } else if (TS_TYPES.has(word)) {
3695
+ tokens.push({ text: word, type: "type" });
3696
+ } else if (after) {
3697
+ tokens.push({ text: word, type: "function" });
3698
+ } else {
3699
+ tokens.push({ text: word, type: "plain" });
3700
+ }
3701
+ }
3702
+ lastIndex = JS_TOKEN_RE.lastIndex;
3703
+ }
3704
+ if (lastIndex < line.length) tokens.push({ text: line.slice(lastIndex), type: "plain" });
3705
+ return tokens;
3706
+ }
3707
+ var CSS_TOKEN_RE = /(\/\*[\s\S]*?\*\/)|('(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*")|(@[a-zA-Z-]+)|(#[0-9a-fA-F]{3,8}\b)|(-?\d+\.?\d*(?:px|em|rem|%|deg|s|ms|vh|vw)?\b)|([a-zA-Z-]+)(?=\s*:)/g;
3708
+ function tokenizeCss(line) {
3709
+ const tokens = [];
3710
+ let lastIndex = 0;
3711
+ let match;
3712
+ CSS_TOKEN_RE.lastIndex = 0;
3713
+ while ((match = CSS_TOKEN_RE.exec(line)) !== null) {
3714
+ if (match.index > lastIndex) {
3715
+ tokens.push({ text: line.slice(lastIndex, match.index), type: "plain" });
3716
+ }
3717
+ if (match[1] !== void 0) tokens.push({ text: match[1], type: "comment" });
3718
+ else if (match[2] !== void 0) tokens.push({ text: match[2], type: "string" });
3719
+ else if (match[3] !== void 0) tokens.push({ text: match[3], type: "keyword" });
3720
+ else if (match[4] !== void 0) tokens.push({ text: match[4], type: "number" });
3721
+ else if (match[5] !== void 0) tokens.push({ text: match[5], type: "number" });
3722
+ else if (match[6] !== void 0) tokens.push({ text: match[6], type: "property" });
3723
+ lastIndex = CSS_TOKEN_RE.lastIndex;
3724
+ }
3725
+ if (lastIndex < line.length) tokens.push({ text: line.slice(lastIndex), type: "plain" });
3726
+ return tokens;
3727
+ }
3728
+ var JSON_TOKEN_RE = /("(?:\\.|[^"\\])*")(\s*:)?|(-?\d+(?:\.\d+)?)|\b(true|false|null)\b/g;
3729
+ function tokenizeJson(line) {
3730
+ const tokens = [];
3731
+ let lastIndex = 0;
3732
+ let match;
3733
+ JSON_TOKEN_RE.lastIndex = 0;
3734
+ while ((match = JSON_TOKEN_RE.exec(line)) !== null) {
3735
+ if (match.index > lastIndex) {
3736
+ tokens.push({ text: line.slice(lastIndex, match.index), type: "plain" });
3737
+ }
3738
+ if (match[1] !== void 0) {
3739
+ const hasColon = match[2] !== void 0;
3740
+ tokens.push({ text: match[1], type: hasColon ? "property" : "string" });
3741
+ if (hasColon) tokens.push({ text: match[2], type: "punctuation" });
3742
+ } else if (match[3] !== void 0) {
3743
+ tokens.push({ text: match[3], type: "number" });
3744
+ } else if (match[4] !== void 0) {
3745
+ tokens.push({ text: match[4], type: "keyword" });
3746
+ }
3747
+ lastIndex = JSON_TOKEN_RE.lastIndex;
3748
+ }
3749
+ if (lastIndex < line.length) tokens.push({ text: line.slice(lastIndex), type: "plain" });
3750
+ return tokens;
3751
+ }
3752
+ var MD_TOKEN_RE = /(^#{1,6}\s.*)|(`[^`]*`)/g;
3753
+ function tokenizeMd(line) {
3754
+ const tokens = [];
3755
+ let lastIndex = 0;
3756
+ let match;
3757
+ MD_TOKEN_RE.lastIndex = 0;
3758
+ while ((match = MD_TOKEN_RE.exec(line)) !== null) {
3759
+ if (match.index > lastIndex) {
3760
+ tokens.push({ text: line.slice(lastIndex, match.index), type: "plain" });
3761
+ }
3762
+ if (match[1] !== void 0) tokens.push({ text: match[1], type: "keyword" });
3763
+ else if (match[2] !== void 0) tokens.push({ text: match[2], type: "string" });
3764
+ lastIndex = MD_TOKEN_RE.lastIndex;
3765
+ }
3766
+ if (lastIndex < line.length) tokens.push({ text: line.slice(lastIndex), type: "plain" });
3767
+ return tokens;
3768
+ }
3769
+ function tokenizeLine(line, language) {
3770
+ if (line.length === 0) return [{ text: " ", type: "plain" }];
3771
+ switch (language) {
3772
+ case "tsx":
3773
+ case "ts":
3774
+ return tokenizeJs(line);
3775
+ case "css":
3776
+ return tokenizeCss(line);
3777
+ case "json":
3778
+ return tokenizeJson(line);
3779
+ case "md":
3780
+ return tokenizeMd(line);
3781
+ default:
3782
+ return [{ text: line, type: "plain" }];
3783
+ }
3784
+ }
3586
3785
  var CodeEditor = React15.forwardRef(
3587
3786
  ({
3588
3787
  files,
@@ -3689,7 +3888,7 @@ var CodeEditor = React15.forwardRef(
3689
3888
  ] }),
3690
3889
  /* @__PURE__ */ jsx15("div", { className: "flex-1 overflow-auto bg-canvas", children: readOnly || streaming ? /* @__PURE__ */ jsx15("pre", { className: "m-0 p-0 text-body-sm leading-[1.55] text-ink", children: lines.map((line, i) => /* @__PURE__ */ jsxs14("div", { className: "flex", children: [
3691
3890
  /* @__PURE__ */ jsx15("span", { className: "select-none px-md text-right text-caption text-muted-soft", children: /* @__PURE__ */ jsx15("span", { className: "inline-block min-w-[2ch]", children: i + 1 }) }),
3692
- /* @__PURE__ */ jsx15("span", { className: "flex-1 whitespace-pre pr-xl font-mono", children: line || " " })
3891
+ /* @__PURE__ */ jsx15("span", { className: "flex-1 whitespace-pre pr-xl font-mono", children: current ? tokenizeLine(line, current.language).map((tok, ti) => /* @__PURE__ */ jsx15("span", { className: SYNTAX_CLASS[tok.type], children: tok.text }, ti)) : line || " " })
3693
3892
  ] }, i)) }) : /* @__PURE__ */ jsxs14("div", { className: "flex min-h-full", children: [
3694
3893
  /* @__PURE__ */ jsx15("div", { className: "select-none px-md py-sm text-right text-caption text-muted-soft", children: lines.map((_, i) => /* @__PURE__ */ jsx15("div", { children: i + 1 }, i)) }),
3695
3894
  /* @__PURE__ */ jsx15(
@@ -4315,6 +4514,7 @@ var FilterTabBar = React20.forwardRef(
4315
4514
  ...rest,
4316
4515
  children: tabs.map((tab) => {
4317
4516
  const isActive = tab.value === value;
4517
+ const isIconOnly = Boolean(tab.icon) && !tab.label;
4318
4518
  return /* @__PURE__ */ jsxs18(
4319
4519
  Button,
4320
4520
  {
@@ -4324,7 +4524,7 @@ var FilterTabBar = React20.forwardRef(
4324
4524
  variant: isActive ? "primary" : "ghost",
4325
4525
  size: "sm",
4326
4526
  onClick: () => onChange(tab.value),
4327
- className: "gap-xs",
4527
+ className: isIconOnly ? "gap-xs p-xs aspect-square leading-none" : "gap-xs",
4328
4528
  children: [
4329
4529
  tab.icon && /* @__PURE__ */ jsx20("span", { className: "inline-flex items-center justify-center shrink-0", "aria-hidden": "true", children: tab.icon }),
4330
4530
  tab.label && /* @__PURE__ */ jsx20("span", { children: tab.label }),
package/dist/styles.css CHANGED
@@ -94,6 +94,14 @@
94
94
  --color-kind-template-text: #B45309;
95
95
  --color-kind-template-border: #FBD98A;
96
96
  --color-semantic-info-soft: #EAE8FB;
97
+ --color-syntax-keyword: #0000FF;
98
+ --color-syntax-string: #A31515;
99
+ --color-syntax-number: #098658;
100
+ --color-syntax-comment: #008000;
101
+ --color-syntax-function: #795E26;
102
+ --color-syntax-type: #267F99;
103
+ --color-syntax-tag: #800000;
104
+ --color-syntax-property: #001080;
97
105
  --font-body: Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
98
106
  --text-display-lg: 48px;
99
107
  --text-display-lg--font-weight: 700;
@@ -480,6 +488,9 @@
480
488
  .inline-flex {
481
489
  display: inline-flex;
482
490
  }
491
+ .aspect-square {
492
+ aspect-ratio: 1 / 1;
493
+ }
483
494
  .size-3 {
484
495
  width: calc(var(--spacing) * 3);
485
496
  height: calc(var(--spacing) * 3);
@@ -1428,6 +1439,30 @@
1428
1439
  .text-semantic-warning {
1429
1440
  color: var(--color-semantic-warning);
1430
1441
  }
1442
+ .text-syntax-comment {
1443
+ color: var(--color-syntax-comment);
1444
+ }
1445
+ .text-syntax-function {
1446
+ color: var(--color-syntax-function);
1447
+ }
1448
+ .text-syntax-keyword {
1449
+ color: var(--color-syntax-keyword);
1450
+ }
1451
+ .text-syntax-number {
1452
+ color: var(--color-syntax-number);
1453
+ }
1454
+ .text-syntax-property {
1455
+ color: var(--color-syntax-property);
1456
+ }
1457
+ .text-syntax-string {
1458
+ color: var(--color-syntax-string);
1459
+ }
1460
+ .text-syntax-tag {
1461
+ color: var(--color-syntax-tag);
1462
+ }
1463
+ .text-syntax-type {
1464
+ color: var(--color-syntax-type);
1465
+ }
1431
1466
  .capitalize {
1432
1467
  text-transform: capitalize;
1433
1468
  }
@@ -1897,6 +1932,14 @@
1897
1932
  --color-semantic-warning-soft: #3A2A0A;
1898
1933
  --color-semantic-error-soft: #3A1414;
1899
1934
  --color-semantic-info-soft: #28234F;
1935
+ --color-syntax-keyword: #569CD6;
1936
+ --color-syntax-string: #CE9178;
1937
+ --color-syntax-number: #B5CEA8;
1938
+ --color-syntax-comment: #6A9955;
1939
+ --color-syntax-function: #DCDCAA;
1940
+ --color-syntax-type: #4EC9B0;
1941
+ --color-syntax-tag: #569CD6;
1942
+ --color-syntax-property: #9CDCFE;
1900
1943
  }
1901
1944
  @property --tw-translate-x {
1902
1945
  syntax: "*";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@designa8/vibedesign-v6",
3
- "version": "1.14.0",
3
+ "version": "1.15.1",
4
4
  "description": "Design system \"Plasma Design System\" generated by atom-server.",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",
@@ -41,6 +41,179 @@ function LangBadge({ language }: { language: CodeEditorLanguage }) {
41
41
  );
42
42
  }
43
43
 
44
+ /* ---------------------------------------------------------------------- */
45
+ /* Syntax highlighting — vivid, VS Code-style token coloring. */
46
+ /* Presentational only: a small line-scoped regex tokenizer per language. */
47
+ /* ---------------------------------------------------------------------- */
48
+
49
+ type SyntaxTokenType =
50
+ | "plain"
51
+ | "comment"
52
+ | "string"
53
+ | "number"
54
+ | "keyword"
55
+ | "function"
56
+ | "type"
57
+ | "tag"
58
+ | "property"
59
+ | "punctuation";
60
+
61
+ const SYNTAX_CLASS: Record<SyntaxTokenType, string> = {
62
+ plain: "text-ink",
63
+ comment: "text-syntax-comment italic",
64
+ string: "text-syntax-string",
65
+ number: "text-syntax-number",
66
+ keyword: "text-syntax-keyword",
67
+ function: "text-syntax-function",
68
+ type: "text-syntax-type",
69
+ tag: "text-syntax-tag",
70
+ property: "text-syntax-property",
71
+ punctuation: "text-muted",
72
+ };
73
+
74
+ type SyntaxToken = { text: string; type: SyntaxTokenType };
75
+
76
+ const JS_KEYWORDS = new Set([
77
+ "import", "export", "default", "from", "const", "let", "var", "function",
78
+ "return", "interface", "type", "extends", "implements", "class", "new",
79
+ "this", "if", "else", "for", "while", "switch", "case", "break", "continue",
80
+ "true", "false", "null", "undefined", "void", "async", "await", "of", "in",
81
+ "as", "public", "private", "protected", "readonly", "static", "enum",
82
+ "namespace", "declare", "try", "catch", "finally", "throw", "yield",
83
+ "typeof", "instanceof", "super",
84
+ ]);
85
+
86
+ const TS_TYPES = new Set([
87
+ "string", "number", "boolean", "any", "unknown", "never", "object",
88
+ "React", "Record", "Partial", "Readonly", "Promise", "HTMLDivElement",
89
+ "HTMLButtonElement",
90
+ ]);
91
+
92
+ const JS_TOKEN_RE =
93
+ /(\/\/.*)|('(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|`(?:\\.|[^`\\])*`)|(\b\d+(?:\.\d+)?\b)|(<\/?[A-Za-z][\w.]*)|([A-Za-z_$][\w$]*)/g;
94
+
95
+ function tokenizeJs(line: string): SyntaxToken[] {
96
+ const tokens: SyntaxToken[] = [];
97
+ let lastIndex = 0;
98
+ let match: RegExpExecArray | null;
99
+ JS_TOKEN_RE.lastIndex = 0;
100
+ while ((match = JS_TOKEN_RE.exec(line)) !== null) {
101
+ if (match.index > lastIndex) {
102
+ tokens.push({ text: line.slice(lastIndex, match.index), type: "plain" });
103
+ }
104
+ if (match[1] !== undefined) {
105
+ tokens.push({ text: match[1], type: "comment" });
106
+ } else if (match[2] !== undefined) {
107
+ tokens.push({ text: match[2], type: "string" });
108
+ } else if (match[3] !== undefined) {
109
+ tokens.push({ text: match[3], type: "number" });
110
+ } else if (match[4] !== undefined) {
111
+ tokens.push({ text: match[4], type: "tag" });
112
+ } else if (match[5] !== undefined) {
113
+ const word = match[5];
114
+ const after = line.slice(JS_TOKEN_RE.lastIndex).match(/^\s*\(/);
115
+ if (JS_KEYWORDS.has(word)) {
116
+ tokens.push({ text: word, type: "keyword" });
117
+ } else if (TS_TYPES.has(word)) {
118
+ tokens.push({ text: word, type: "type" });
119
+ } else if (after) {
120
+ tokens.push({ text: word, type: "function" });
121
+ } else {
122
+ tokens.push({ text: word, type: "plain" });
123
+ }
124
+ }
125
+ lastIndex = JS_TOKEN_RE.lastIndex;
126
+ }
127
+ if (lastIndex < line.length) tokens.push({ text: line.slice(lastIndex), type: "plain" });
128
+ return tokens;
129
+ }
130
+
131
+ const CSS_TOKEN_RE =
132
+ /(\/\*[\s\S]*?\*\/)|('(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*")|(@[a-zA-Z-]+)|(#[0-9a-fA-F]{3,8}\b)|(-?\d+\.?\d*(?:px|em|rem|%|deg|s|ms|vh|vw)?\b)|([a-zA-Z-]+)(?=\s*:)/g;
133
+
134
+ function tokenizeCss(line: string): SyntaxToken[] {
135
+ const tokens: SyntaxToken[] = [];
136
+ let lastIndex = 0;
137
+ let match: RegExpExecArray | null;
138
+ CSS_TOKEN_RE.lastIndex = 0;
139
+ while ((match = CSS_TOKEN_RE.exec(line)) !== null) {
140
+ if (match.index > lastIndex) {
141
+ tokens.push({ text: line.slice(lastIndex, match.index), type: "plain" });
142
+ }
143
+ if (match[1] !== undefined) tokens.push({ text: match[1], type: "comment" });
144
+ else if (match[2] !== undefined) tokens.push({ text: match[2], type: "string" });
145
+ else if (match[3] !== undefined) tokens.push({ text: match[3], type: "keyword" });
146
+ else if (match[4] !== undefined) tokens.push({ text: match[4], type: "number" });
147
+ else if (match[5] !== undefined) tokens.push({ text: match[5], type: "number" });
148
+ else if (match[6] !== undefined) tokens.push({ text: match[6], type: "property" });
149
+ lastIndex = CSS_TOKEN_RE.lastIndex;
150
+ }
151
+ if (lastIndex < line.length) tokens.push({ text: line.slice(lastIndex), type: "plain" });
152
+ return tokens;
153
+ }
154
+
155
+ const JSON_TOKEN_RE = /("(?:\\.|[^"\\])*")(\s*:)?|(-?\d+(?:\.\d+)?)|\b(true|false|null)\b/g;
156
+
157
+ function tokenizeJson(line: string): SyntaxToken[] {
158
+ const tokens: SyntaxToken[] = [];
159
+ let lastIndex = 0;
160
+ let match: RegExpExecArray | null;
161
+ JSON_TOKEN_RE.lastIndex = 0;
162
+ while ((match = JSON_TOKEN_RE.exec(line)) !== null) {
163
+ if (match.index > lastIndex) {
164
+ tokens.push({ text: line.slice(lastIndex, match.index), type: "plain" });
165
+ }
166
+ if (match[1] !== undefined) {
167
+ const hasColon = match[2] !== undefined;
168
+ tokens.push({ text: match[1], type: hasColon ? "property" : "string" });
169
+ if (hasColon) tokens.push({ text: match[2] as string, type: "punctuation" });
170
+ } else if (match[3] !== undefined) {
171
+ tokens.push({ text: match[3], type: "number" });
172
+ } else if (match[4] !== undefined) {
173
+ tokens.push({ text: match[4], type: "keyword" });
174
+ }
175
+ lastIndex = JSON_TOKEN_RE.lastIndex;
176
+ }
177
+ if (lastIndex < line.length) tokens.push({ text: line.slice(lastIndex), type: "plain" });
178
+ return tokens;
179
+ }
180
+
181
+ const MD_TOKEN_RE = /(^#{1,6}\s.*)|(`[^`]*`)/g;
182
+
183
+ function tokenizeMd(line: string): SyntaxToken[] {
184
+ const tokens: SyntaxToken[] = [];
185
+ let lastIndex = 0;
186
+ let match: RegExpExecArray | null;
187
+ MD_TOKEN_RE.lastIndex = 0;
188
+ while ((match = MD_TOKEN_RE.exec(line)) !== null) {
189
+ if (match.index > lastIndex) {
190
+ tokens.push({ text: line.slice(lastIndex, match.index), type: "plain" });
191
+ }
192
+ if (match[1] !== undefined) tokens.push({ text: match[1], type: "keyword" });
193
+ else if (match[2] !== undefined) tokens.push({ text: match[2], type: "string" });
194
+ lastIndex = MD_TOKEN_RE.lastIndex;
195
+ }
196
+ if (lastIndex < line.length) tokens.push({ text: line.slice(lastIndex), type: "plain" });
197
+ return tokens;
198
+ }
199
+
200
+ function tokenizeLine(line: string, language: CodeEditorLanguage): SyntaxToken[] {
201
+ if (line.length === 0) return [{ text: " ", type: "plain" }];
202
+ switch (language) {
203
+ case "tsx":
204
+ case "ts":
205
+ return tokenizeJs(line);
206
+ case "css":
207
+ return tokenizeCss(line);
208
+ case "json":
209
+ return tokenizeJson(line);
210
+ case "md":
211
+ return tokenizeMd(line);
212
+ default:
213
+ return [{ text: line, type: "plain" }];
214
+ }
215
+ }
216
+
44
217
  export const CodeEditor = React.forwardRef<HTMLDivElement, CodeEditorProps>(
45
218
  (
46
219
  {
@@ -155,7 +328,15 @@ export const CodeEditor = React.forwardRef<HTMLDivElement, CodeEditorProps>(
155
328
  <span className="select-none px-md text-right text-caption text-muted-soft">
156
329
  <span className="inline-block min-w-[2ch]">{i + 1}</span>
157
330
  </span>
158
- <span className="flex-1 whitespace-pre pr-xl font-mono">{line || " "}</span>
331
+ <span className="flex-1 whitespace-pre pr-xl font-mono">
332
+ {current
333
+ ? tokenizeLine(line, current.language).map((tok, ti) => (
334
+ <span key={ti} className={SYNTAX_CLASS[tok.type]}>
335
+ {tok.text}
336
+ </span>
337
+ ))
338
+ : line || " "}
339
+ </span>
159
340
  </div>
160
341
  ))}
161
342
  </pre>
@@ -38,6 +38,7 @@ export const FilterTabBar = React.forwardRef<HTMLDivElement, FilterTabBarProps>(
38
38
  >
39
39
  {tabs.map((tab) => {
40
40
  const isActive = tab.value === value;
41
+ const isIconOnly = Boolean(tab.icon) && !tab.label;
41
42
 
42
43
  return (
43
44
  <Button
@@ -48,7 +49,11 @@ export const FilterTabBar = React.forwardRef<HTMLDivElement, FilterTabBarProps>(
48
49
  variant={isActive ? "primary" : "ghost"}
49
50
  size="sm"
50
51
  onClick={() => onChange(tab.value)}
51
- className="gap-xs"
52
+ className={
53
+ isIconOnly
54
+ ? "gap-xs p-xs aspect-square leading-none"
55
+ : "gap-xs"
56
+ }
52
57
  >
53
58
  {tab.icon && (
54
59
  <span className="inline-flex items-center justify-center shrink-0" aria-hidden="true">
@@ -1,46 +1,6 @@
1
1
  import React, { useState } from "react";
2
2
  import { FilterTabBar } from "./FilterTabBar";
3
-
4
- /* Minimal inline SVG icons — no external deps */
5
- const IconGrid = () => (
6
- <svg width="14" height="14" viewBox="0 0 16 16" fill="none" aria-hidden="true">
7
- <rect x="1" y="1" width="6" height="6" rx="1.5" fill="currentColor" />
8
- <rect x="9" y="1" width="6" height="6" rx="1.5" fill="currentColor" />
9
- <rect x="1" y="9" width="6" height="6" rx="1.5" fill="currentColor" />
10
- <rect x="9" y="9" width="6" height="6" rx="1.5" fill="currentColor" />
11
- </svg>
12
- );
13
-
14
- const IconAtom = () => (
15
- <svg width="14" height="14" viewBox="0 0 16 16" fill="none" aria-hidden="true">
16
- <circle cx="8" cy="8" r="2" fill="currentColor" />
17
- <ellipse cx="8" cy="8" rx="7" ry="3" stroke="currentColor" strokeWidth="1.25" fill="none" />
18
- <ellipse cx="8" cy="8" rx="7" ry="3" stroke="currentColor" strokeWidth="1.25" fill="none" transform="rotate(60 8 8)" />
19
- <ellipse cx="8" cy="8" rx="7" ry="3" stroke="currentColor" strokeWidth="1.25" fill="none" transform="rotate(120 8 8)" />
20
- </svg>
21
- );
22
-
23
- const IconLayers = () => (
24
- <svg width="14" height="14" viewBox="0 0 16 16" fill="none" aria-hidden="true">
25
- <path d="M8 1L15 5L8 9L1 5L8 1Z" fill="currentColor" opacity="0.4" />
26
- <path d="M1 8L8 12L15 8" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" fill="none" />
27
- <path d="M1 11L8 15L15 11" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" fill="none" />
28
- </svg>
29
- );
30
-
31
- const IconStar = () => (
32
- <svg width="14" height="14" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true">
33
- <path d="M8 1l1.854 4.146H14l-3.427 2.708 1.31 4.146L8 9.764l-3.883 2.236 1.31-4.146L2 5.146h4.146L8 1z" />
34
- </svg>
35
- );
36
-
37
- const IconArchive = () => (
38
- <svg width="14" height="14" viewBox="0 0 16 16" fill="none" aria-hidden="true">
39
- <rect x="1" y="1" width="14" height="3" rx="1" fill="currentColor" opacity="0.5" />
40
- <path d="M2 5h12v8a1 1 0 01-1 1H3a1 1 0 01-1-1V5z" fill="currentColor" opacity="0.3" />
41
- <path d="M6 8h4" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" />
42
- </svg>
43
- );
3
+ import { Icon } from "../Icon";
44
4
 
45
5
  const tabsWithCounts = [
46
6
  { value: "all", label: "All", count: 15 },
@@ -50,15 +10,9 @@ const tabsWithCounts = [
50
10
  ];
51
11
 
52
12
  const tabsWithIcons = [
53
- { value: "all", label: "All", icon: <IconGrid /> },
54
- { value: "atoms", label: "Atoms", icon: <IconAtom />, count: 8 },
55
- { value: "molecules", label: "Molecules", icon: <IconLayers />, count: 2 },
56
- ];
57
-
58
- const tabsIconOnly = [
59
- { value: "all", icon: <IconGrid />, label: "All" },
60
- { value: "starred", icon: <IconStar />, label: "Starred" },
61
- { value: "archived", icon: <IconArchive />, label: "Archived" },
13
+ { value: "all", label: "All", icon: <Icon name="grid" size={14} /> },
14
+ { value: "atoms", label: "Atoms", icon: <Icon name="atom" size={14} />, count: 8 },
15
+ { value: "molecules", label: "Molecules", icon: <Icon name="layers" size={14} />, count: 2 },
62
16
  ];
63
17
 
64
18
  export default function FilterTabBarPreview() {
@@ -66,6 +20,7 @@ export default function FilterTabBarPreview() {
66
20
  const [active2, setActive2] = useState("all");
67
21
  const [active3, setActive3] = useState("all");
68
22
  const [active4, setActive4] = useState("all");
23
+ const [active5, setActive5] = useState("all");
69
24
 
70
25
  return (
71
26
  <div className="w-full max-w-3xl mx-auto p-xl flex flex-col items-start gap-xl bg-canvas py-xxl">
@@ -86,9 +41,9 @@ export default function FilterTabBarPreview() {
86
41
  <p className="text-caption text-muted uppercase tracking-wide">Icon + label + count</p>
87
42
  <FilterTabBar
88
43
  tabs={[
89
- { value: "all", label: "All", icon: <IconGrid />, count: 15 },
90
- { value: "atoms", label: "Atoms", icon: <IconAtom />, count: 8 },
91
- { value: "molecules", label: "Molecules", icon: <IconLayers />, count: 2 },
44
+ { value: "all", label: "All", icon: <Icon name="grid" size={14} />, count: 15 },
45
+ { value: "atoms", label: "Atoms", icon: <Icon name="atom" size={14} />, count: 8 },
46
+ { value: "molecules", label: "Molecules", icon: <Icon name="layers" size={14} />, count: 2 },
92
47
  ]}
93
48
  value={active3}
94
49
  onChange={setActive3}
@@ -108,6 +63,20 @@ export default function FilterTabBarPreview() {
108
63
  onChange={setActive4}
109
64
  />
110
65
  </div>
66
+
67
+ {/* Icon only, no label (compact square tabs — matches labeled tab height) */}
68
+ <div className="flex flex-col gap-sm w-full">
69
+ <p className="text-caption text-muted uppercase tracking-wide">Icon only (compact)</p>
70
+ <FilterTabBar
71
+ tabs={[
72
+ { value: "all", icon: <Icon name="grid" size={14} /> },
73
+ { value: "starred", icon: <Icon name="star" size={14} /> },
74
+ { value: "archived", icon: <Icon name="archive" size={14} /> },
75
+ ]}
76
+ value={active5}
77
+ onChange={setActive5}
78
+ />
79
+ </div>
111
80
  </div>
112
81
  );
113
82
  }
@@ -3,6 +3,11 @@ export const ICON_REGISTRY = {
3
3
  "chevron-down": { viewBox: "0 0 24 24", paths: ["M6 9l6 6 6-6"] },
4
4
  "copy-clipboard": { viewBox: "0 0 24 24", paths: ["M9 9h10v10H9z", "M5 15V5h10"] },
5
5
  "check-checkmark": { viewBox: "0 0 24 24", paths: ["M5 13l4 4L19 7"] },
6
+ "grid": { viewBox: "0 0 24 24", paths: ["M4 4h6v6H4z", "M14 4h6v6h-6z", "M4 14h6v6H4z", "M14 14h6v6h-6z"] },
7
+ "atom": { viewBox: "0 0 24 24", paths: ["M12 12m-1.5 0a1.5 1.5 0 1 0 3 0a1.5 1.5 0 1 0 -3 0", "M12 3.5c4 0 8 3.6 8 8.5s-4 8.5-8 8.5", "M12 3.5c-4 1.8-8 5.6-8 8.5s4 6.7 8 8.5", "M4 8.5c1.8-4 5.6-5 8-5s6.2 1 8 5"] },
8
+ "layers": { viewBox: "0 0 24 24", paths: ["M12 3l8 4.5-8 4.5-8-4.5 8-4.5z", "M4 12l8 4.5 8-4.5", "M4 16.5l8 4.5 8-4.5"] },
9
+ "star": { viewBox: "0 0 24 24", paths: ["M12 3l2.6 5.6 6.1.7-4.5 4.2 1.2 6-5.4-3-5.4 3 1.2-6-4.5-4.2 6.1-.7L12 3z"] },
10
+ "archive": { viewBox: "0 0 24 24", paths: ["M3 4h18v4H3z", "M4.5 8v11a1 1 0 0 0 1 1h13a1 1 0 0 0 1-1V8", "M10 12.5h4"] },
6
11
  } as const;
7
12
 
8
13
  export type IconName = keyof typeof ICON_REGISTRY;
package/src/tokens.css CHANGED
@@ -49,6 +49,14 @@
49
49
  --color-kind-template-text: #B45309;
50
50
  --color-kind-template-border: #FBD98A;
51
51
  --color-semantic-info-soft: #EAE8FB;
52
+ --color-syntax-keyword: #0000FF;
53
+ --color-syntax-string: #A31515;
54
+ --color-syntax-number: #098658;
55
+ --color-syntax-comment: #008000;
56
+ --color-syntax-function: #795E26;
57
+ --color-syntax-type: #267F99;
58
+ --color-syntax-tag: #800000;
59
+ --color-syntax-property: #001080;
52
60
  --font-body: Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
53
61
  --font-heading: var(--font-body);
54
62
  --font-display-lg: var(--font-body);
@@ -179,4 +187,12 @@
179
187
  --color-semantic-warning-soft: #3A2A0A;
180
188
  --color-semantic-error-soft: #3A1414;
181
189
  --color-semantic-info-soft: #28234F;
190
+ --color-syntax-keyword: #569CD6;
191
+ --color-syntax-string: #CE9178;
192
+ --color-syntax-number: #B5CEA8;
193
+ --color-syntax-comment: #6A9955;
194
+ --color-syntax-function: #DCDCAA;
195
+ --color-syntax-type: #4EC9B0;
196
+ --color-syntax-tag: #569CD6;
197
+ --color-syntax-property: #9CDCFE;
182
198
  }