@nebutra/brand 2.0.0 → 3.0.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/dist/index.js CHANGED
@@ -20,7 +20,6 @@ var brand = {
20
20
  api: "api.nebutra.com",
21
21
  auth: "auth.nebutra.com",
22
22
  sso: "sso.nebutra.com",
23
- docs: "docs.nebutra.com",
24
23
  studio: "studio.nebutra.com",
25
24
  cdn: "cdn.nebutra.com",
26
25
  router: "router.nebutra.com",
@@ -71,17 +70,17 @@ var colors = {
71
70
  },
72
71
  neutral: {
73
72
  "0": "#ffffff",
74
- "50": "#f8fafc",
75
- "100": "#f1f5f9",
76
- "200": "#e2e8f0",
77
- "300": "#cbd5e1",
78
- "400": "#94a3b8",
79
- "500": "#64748b",
80
- "600": "#475569",
81
- "700": "#334155",
82
- "800": "#1e293b",
83
- "900": "#0f172a",
84
- "950": "#020617"
73
+ "50": "#f9fafb",
74
+ "100": "#f3f4f6",
75
+ "200": "#e4e5e8",
76
+ "300": "#d2d4d8",
77
+ "400": "#9fa1a5",
78
+ "500": "#717377",
79
+ "600": "#515357",
80
+ "700": "#3f4044",
81
+ "800": "#26272a",
82
+ "900": "#18191c",
83
+ "950": "#0b0c0d"
85
84
  },
86
85
  white: "#FFFFFF",
87
86
  black: "#000000",
@@ -102,18 +101,12 @@ var colors = {
102
101
  };
103
102
  var typography = {
104
103
  fontFamily: {
105
- en: '"Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif',
106
- cn: '"Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif',
107
- sans: '"Geist", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, system-ui, sans-serif',
104
+ en: '"Geist", -apple-system, BlinkMacSystemFont, system-ui, sans-serif',
105
+ cn: '"MiSans", "PingFang SC", "Microsoft YaHei", sans-serif',
106
+ sans: '"Geist", "MiSans", "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, system-ui, sans-serif',
108
107
  mono: '"Geist Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace',
109
- display: '"Geist", "Noto Sans SC", sans-serif',
110
- heading: '"Geist", "Noto Sans SC", sans-serif',
111
- brandPrint: '"Noto Sans SC", "PingFang SC", sans-serif'
112
- },
113
- cssVars: {
114
- sans: "var(--font-geist-sans)",
115
- mono: "var(--font-geist-mono)",
116
- cnSans: "var(--font-noto-sc)"
108
+ display: '"DM Sans", "MiSans", "PingFang SC", sans-serif',
109
+ heading: '"DM Sans", "MiSans", "PingFang SC", sans-serif'
117
110
  },
118
111
  fontWeight: {
119
112
  thin: 100,
@@ -227,6 +220,10 @@ function getBrandOrigin(service) {
227
220
  }
228
221
  return `https://${host.replace(/^https?:\/\//, "").replace(/\/+$/, "")}`;
229
222
  }
223
+ function getDocsUrl(service = "landing", path = "") {
224
+ const suffix = path.replace(/^\/+/, "");
225
+ return `${getBrandOrigin(service)}/docs${suffix ? `/${suffix}` : ""}`;
226
+ }
230
227
  function publicAssetUrl(key, base) {
231
228
  const origin = (base || process.env.NEXT_PUBLIC_R2_PUBLIC_URL || process.env.R2_PUBLIC_URL || getBrandOrigin("cdn")).replace(/\/+$/, "");
232
229
  const path = key.replace(/^\/+/, "");
@@ -267,7 +264,7 @@ function getBrandPublicUrls() {
267
264
  apiUrl: getBrandOrigin("api"),
268
265
  authUrl: getBrandOrigin("auth"),
269
266
  ssoUrl: getBrandOrigin("sso"),
270
- docsUrl: getBrandOrigin("docs"),
267
+ docsUrl: getDocsUrl(),
271
268
  routerUrl: getBrandOrigin("router"),
272
269
  forgeUrl: getBrandOrigin("forge"),
273
270
  designUrl: getBrandOrigin("design"),
@@ -537,6 +534,243 @@ function Wordmark({
537
534
  );
538
535
  }
539
536
 
537
+ // src/guidelines/color.ts
538
+ function rgbOf(hex) {
539
+ const n = Number.parseInt(hex.replace("#", ""), 16);
540
+ return { r: n >> 16 & 255, g: n >> 8 & 255, b: n & 255 };
541
+ }
542
+ function hslOf(hex) {
543
+ const { r, g, b } = rgbOf(hex);
544
+ const [rr, gg, bb] = [r / 255, g / 255, b / 255];
545
+ const max = Math.max(rr, gg, bb);
546
+ const min = Math.min(rr, gg, bb);
547
+ const l = (max + min) / 2;
548
+ const d = max - min;
549
+ let h = 0;
550
+ if (d !== 0) {
551
+ if (max === rr) h = (gg - bb) / d % 6;
552
+ else if (max === gg) h = (bb - rr) / d + 2;
553
+ else h = (rr - gg) / d + 4;
554
+ }
555
+ const s = d === 0 ? 0 : d / (1 - Math.abs(2 * l - 1));
556
+ return { h: Math.round((h * 60 + 360) % 360), s: Math.round(s * 100), l: Math.round(l * 100) };
557
+ }
558
+ function stopsOf(css) {
559
+ return [...css.matchAll(/(#[0-9a-fA-F]{6})\s+(\d+)%/g)].map(
560
+ ([, color, position]) => Number(position) === 50 ? { color, position: 50, note: "OKLab midpoint" } : { color, position: Number(position) }
561
+ );
562
+ }
563
+ var nebutraBlue = {
564
+ name: "\u4E91\u6BD3\u84DD",
565
+ nameEn: "Nebutra Blue",
566
+ /** Color values */
567
+ hex: colors.primary[500],
568
+ rgb: rgbOf(colors.primary[500]),
569
+ hsl: hslOf(colors.primary[500]),
570
+ /** Print color values (if needed) */
571
+ cmyk: { c: 100, m: 80, y: 0, k: 0 },
572
+ /** Semantic meaning */
573
+ meaning: "\u8C61\u5F81\u79D1\u6280\u4E0E\u4FE1\u4EFB\uFF0C\u4F53\u73B0\u521B\u65B0\u3001\u53EF\u9760\u4E0E\u65E0\u9650\u6F5C\u529B",
574
+ /** Usage */
575
+ usage: ["\u4E3B\u8981\u54C1\u724C\u8272", "\u6807\u5FD7\u4E3B\u8272", "\u91CD\u8981\u6309\u94AE/CTA", "\u6807\u9898\u5F3A\u8C03", "\u94FE\u63A5\u989C\u8272"]
576
+ };
577
+ var nebutraCyan = {
578
+ name: "\u4E91\u6BD3\u9752",
579
+ nameEn: "Nebutra Cyan",
580
+ /** Color values */
581
+ hex: colors.accent[500],
582
+ rgb: rgbOf(colors.accent[500]),
583
+ hsl: hslOf(colors.accent[500]),
584
+ /** Print color values (if needed) */
585
+ cmyk: { c: 55, m: 0, y: 35, k: 0 },
586
+ /** Semantic meaning */
587
+ meaning: "\u8C61\u5F81\u4FE1\u606F\u7684\u6E05\u6670\u4E0E\u7B97\u6CD5\u7684\u7075\u52A8\uFF0C\u4F53\u73B0\u4ECE\u539F\u59CB\u6570\u636E\u5230\u667A\u6167\u4EA7\u54C1\u7684\u8F6C\u5316\u8DEF\u5F84",
588
+ /** Usage */
589
+ usage: ["\u8F85\u52A9\u54C1\u724C\u8272", "\u6E10\u53D8\u7EC8\u6B62\u8272", "\u4EA4\u4E92\u53CD\u9988", "\u6210\u529F\u72B6\u6001", "\u6570\u636E\u53EF\u89C6\u5316"]
590
+ };
591
+ var brandGradient = {
592
+ /** Primary gradient (135°) - Logo标准渐变;中点为 OKLab 感知中点,控中段避免脏灰 */
593
+ primary: {
594
+ css: colors.gradient.primary,
595
+ angle: 135,
596
+ stops: stopsOf(colors.gradient.primary),
597
+ usage: "Logo\u3001Hero\u533A\u57DF\u3001VI \u54C1\u724C\u8D44\u4EA7\uFF08\u4EA7\u54C1 CTA \u7528 solid primary\uFF09"
598
+ },
599
+ /** Reverse gradient */
600
+ reverse: {
601
+ css: colors.gradient.primaryReverse,
602
+ angle: 135,
603
+ stops: stopsOf(colors.gradient.primaryReverse),
604
+ usage: "\u6B21\u8981\u5143\u7D20\u3001hover\u72B6\u6001"
605
+ },
606
+ /** Vertical gradient */
607
+ vertical: {
608
+ css: colors.gradient.primaryVertical,
609
+ angle: 180,
610
+ stops: stopsOf(colors.gradient.primaryVertical),
611
+ usage: "\u5782\u76F4\u5E03\u5C40\u5143\u7D20\u3001\u9875\u9762\u5206\u5272"
612
+ },
613
+ /** Radial gradient */
614
+ radial: {
615
+ css: colors.gradient.primaryRadial,
616
+ type: "radial",
617
+ stops: stopsOf(colors.gradient.primaryRadial),
618
+ usage: "\u80CC\u666F\u5149\u6655\u3001\u7126\u70B9\u6548\u679C"
619
+ }
620
+ };
621
+ var neutralColors = {
622
+ white: {
623
+ name: "\u767D",
624
+ nameEn: "White",
625
+ hex: "#FFFFFF",
626
+ rgb: { r: 255, g: 255, b: 255 },
627
+ usage: "\u80CC\u666F\u3001\u6587\u5B57\u53CD\u767D"
628
+ },
629
+ black: {
630
+ name: "\u9ED1",
631
+ nameEn: "Black",
632
+ hex: "#000000",
633
+ rgb: { r: 0, g: 0, b: 0 },
634
+ usage: "\u6B63\u6587\u6587\u5B57\u3001\u58A8\u7A3F\u6807\u5FD7"
635
+ }
636
+ };
637
+ var colorProhibitedUses = [
638
+ {
639
+ id: "high-saturation-overlay",
640
+ name: "\u9AD8\u9971\u548C\u5EA6\u80CC\u666F\u4E0E\u989C\u8272\u91CD\u53E0",
641
+ description: "\u7981\u7528\u9AD8\u9971\u548C\u5EA6\u80CC\u666F\u4E0E\u989C\u8272\u91CD\u53E0\uFF0C\u907F\u514D\u989C\u8272\u8FC7\u4E8E\u523A\u773C\uFF0C\u5F71\u54CD\u54C1\u724C\u5F62\u8C61",
642
+ example: "\u4E0D\u8981\u5728\u9AD8\u9971\u548C\u5EA6\u7684\u7EA2\u3001\u6A59\u3001\u9EC4\u7B49\u80CC\u666F\u4E0A\u4F7F\u7528\u54C1\u724C\u8272"
643
+ },
644
+ {
645
+ id: "high-brightness-overlay",
646
+ name: "\u660E\u5EA6\u8FC7\u9AD8\u7684\u91CD\u53E0\u989C\u8272",
647
+ description: "\u7981\u7528\u660E\u5EA6\u8FC7\u9AD8\u7684\u91CD\u53E0\u989C\u8272\uFF0C\u907F\u514D\u5F71\u54CD\u5185\u5BB9\u7684\u8BC6\u522B\u6027",
648
+ example: "\u4E0D\u8981\u5C06\u6D45\u8272\u54C1\u724C\u8272\u653E\u5728\u6D45\u8272\u80CC\u666F\u4E0A"
649
+ },
650
+ {
651
+ id: "modify-brand-colors",
652
+ name: "\u4FEE\u6539\u54C1\u724C\u6807\u51C6\u8272",
653
+ description: "\u7981\u6B62\u8C03\u6574\u54C1\u724C\u8272\u7684\u8272\u76F8\u3001\u9971\u548C\u5EA6\u6216\u660E\u5EA6",
654
+ example: "\u4E0D\u8981\u5C06\u4E91\u6BD3\u84DD\u8C03\u6210\u7D2B\u8272\u6216\u6D45\u84DD"
655
+ },
656
+ {
657
+ id: "non-brand-gradient",
658
+ name: "\u975E\u54C1\u724C\u6E10\u53D8",
659
+ description: "\u7981\u6B62\u4F7F\u7528\u975E\u54C1\u724C\u6807\u51C6\u7684\u6E10\u53D8\u7EC4\u5408",
660
+ example: "\u4E0D\u8981\u5C06\u4E91\u6BD3\u84DD\u4E0E\u5176\u4ED6\u975E\u54C1\u724C\u8272\u8FDB\u884C\u6E10\u53D8"
661
+ }
662
+ ];
663
+ var allowedColorCombinations = [
664
+ {
665
+ name: "\u54C1\u724C\u6E10\u53D8\u80CC\u666F + \u767D\u8272\u6587\u5B57",
666
+ background: brandGradient.primary.css,
667
+ foreground: "#FFFFFF",
668
+ contrast: "AAA"
669
+ },
670
+ {
671
+ name: "\u767D\u8272\u80CC\u666F + \u4E91\u6BD3\u84DD\u6587\u5B57",
672
+ background: "#FFFFFF",
673
+ foreground: "#0033FE",
674
+ contrast: "AAA"
675
+ },
676
+ {
677
+ name: "\u6DF1\u8272\u80CC\u666F + \u4E91\u6BD3\u9752\u5F3A\u8C03",
678
+ background: "#000000",
679
+ foreground: "#0BF1C3",
680
+ contrast: "AAA"
681
+ },
682
+ {
683
+ name: "\u4E91\u6BD3\u84DD\u80CC\u666F + \u767D\u8272\u6587\u5B57",
684
+ background: "#0033FE",
685
+ foreground: "#FFFFFF",
686
+ contrast: "AAA"
687
+ }
688
+ ];
689
+ var nebutraBlueScale = colors.primary;
690
+ var nebutraCyanScale = colors.accent;
691
+ var nebutraNeutralScale = {
692
+ 50: colors.neutral[50],
693
+ 100: colors.neutral[100],
694
+ 200: colors.neutral[200],
695
+ 300: colors.neutral[300],
696
+ 400: colors.neutral[400],
697
+ 500: colors.neutral[500],
698
+ 600: colors.neutral[600],
699
+ 700: colors.neutral[700],
700
+ 800: colors.neutral[800],
701
+ 900: colors.neutral[900],
702
+ 950: colors.neutral[950]
703
+ };
704
+ var semanticColors = {
705
+ // Surface colors
706
+ surface: {
707
+ light: {
708
+ default: nebutraNeutralScale[50],
709
+ subtle: nebutraNeutralScale[100],
710
+ muted: nebutraNeutralScale[200]
711
+ },
712
+ dark: {
713
+ default: nebutraNeutralScale[950],
714
+ subtle: nebutraNeutralScale[900],
715
+ muted: nebutraNeutralScale[800]
716
+ }
717
+ },
718
+ // Text colors
719
+ text: {
720
+ light: {
721
+ primary: nebutraNeutralScale[900],
722
+ secondary: nebutraNeutralScale[600],
723
+ muted: nebutraNeutralScale[400],
724
+ inverse: "#ffffff"
725
+ },
726
+ dark: {
727
+ primary: nebutraNeutralScale[50],
728
+ secondary: nebutraNeutralScale[300],
729
+ muted: nebutraNeutralScale[500],
730
+ inverse: nebutraNeutralScale[900]
731
+ }
732
+ },
733
+ // Border colors
734
+ border: {
735
+ light: {
736
+ default: nebutraNeutralScale[200],
737
+ subtle: nebutraNeutralScale[100],
738
+ strong: nebutraNeutralScale[300]
739
+ },
740
+ dark: {
741
+ default: nebutraNeutralScale[800],
742
+ subtle: nebutraNeutralScale[900],
743
+ strong: nebutraNeutralScale[700]
744
+ }
745
+ },
746
+ // Brand emphasis
747
+ brand: {
748
+ primary: nebutraBlueScale[500],
749
+ primaryHover: nebutraBlueScale[600],
750
+ primaryActive: nebutraBlueScale[700],
751
+ accent: nebutraCyanScale[500],
752
+ accentHover: nebutraCyanScale[600],
753
+ accentActive: nebutraCyanScale[700]
754
+ }
755
+ };
756
+ var generateColorScale = (baseHex) => {
757
+ if (baseHex === "#0033FE") return nebutraBlueScale;
758
+ if (baseHex === "#0BF1C3") return nebutraCyanScale;
759
+ return {
760
+ 50: baseHex,
761
+ 100: baseHex,
762
+ 200: baseHex,
763
+ 300: baseHex,
764
+ 400: baseHex,
765
+ 500: baseHex,
766
+ 600: baseHex,
767
+ 700: baseHex,
768
+ 800: baseHex,
769
+ 900: baseHex,
770
+ 950: baseHex
771
+ };
772
+ };
773
+
540
774
  // src/components/LogoSVG.tsx
541
775
  import { Fragment, jsx as jsx2, jsxs } from "react/jsx-runtime";
542
776
  var LOGO_MARK_CLASS = "text-brand-mark";
@@ -739,11 +973,7 @@ function LogoEnColorSVG({
739
973
  logoColorGradSeq += 1;
740
974
  const gradId = `nebutra-logo-en-color-grad-${logoColorGradSeq}`;
741
975
  const children = /* @__PURE__ */ jsxs(Fragment, { children: [
742
- /* @__PURE__ */ jsx2("defs", { children: /* @__PURE__ */ jsxs("linearGradient", { id: gradId, gradientUnits: "objectBoundingBox", x1: "0", y1: "0", x2: "1", y2: "1", children: [
743
- /* @__PURE__ */ jsx2("stop", { offset: "0", stopColor: "#0033FE" }),
744
- /* @__PURE__ */ jsx2("stop", { offset: "0.5", stopColor: "#00A2E9" }),
745
- /* @__PURE__ */ jsx2("stop", { offset: "1", stopColor: "#0BF1C3" })
746
- ] }) }),
976
+ /* @__PURE__ */ jsx2("defs", { children: /* @__PURE__ */ jsx2("linearGradient", { id: gradId, gradientUnits: "objectBoundingBox", x1: "0", y1: "0", x2: "1", y2: "1", children: brandGradient.primary.stops.map((stop) => /* @__PURE__ */ jsx2("stop", { offset: stop.position / 100, stopColor: stop.color }, stop.position)) }) }),
747
977
  /* @__PURE__ */ jsx2("g", { transform: `scale(${logomarkW / 535.71}, ${h / 500})`, children: /* @__PURE__ */ jsx2("path", { d: LOGOMARK_PATH, fill: `url(#${gradId})` }) }),
748
978
  /* @__PURE__ */ jsx2(
749
979
  "g",
@@ -784,234 +1014,6 @@ function LogoEnColorSVG({
784
1014
  );
785
1015
  }
786
1016
 
787
- // src/guidelines/color.ts
788
- var nebutraBlue = {
789
- name: "\u4E91\u6BD3\u84DD",
790
- nameEn: "Nebutra Blue",
791
- /** Color values */
792
- hex: "#0033FE",
793
- rgb: { r: 0, g: 51, b: 254 },
794
- hsl: { h: 228, s: 100, l: 50 },
795
- /** Print color values (if needed) */
796
- cmyk: { c: 100, m: 80, y: 0, k: 0 },
797
- /** Semantic meaning */
798
- meaning: "\u8C61\u5F81\u79D1\u6280\u4E0E\u4FE1\u4EFB\uFF0C\u4F53\u73B0\u521B\u65B0\u3001\u53EF\u9760\u4E0E\u65E0\u9650\u6F5C\u529B",
799
- /** Usage */
800
- usage: ["\u4E3B\u8981\u54C1\u724C\u8272", "\u6807\u5FD7\u4E3B\u8272", "\u91CD\u8981\u6309\u94AE/CTA", "\u6807\u9898\u5F3A\u8C03", "\u94FE\u63A5\u989C\u8272"]
801
- };
802
- var nebutraCyan = {
803
- name: "\u4E91\u6BD3\u9752",
804
- nameEn: "Nebutra Cyan",
805
- /** Color values */
806
- hex: "#0BF1C3",
807
- rgb: { r: 11, g: 241, b: 195 },
808
- hsl: { h: 168, s: 91, l: 49 },
809
- /** Print color values (if needed) */
810
- cmyk: { c: 55, m: 0, y: 35, k: 0 },
811
- /** Semantic meaning */
812
- meaning: "\u8C61\u5F81\u4FE1\u606F\u7684\u6E05\u6670\u4E0E\u7B97\u6CD5\u7684\u7075\u52A8\uFF0C\u4F53\u73B0\u4ECE\u539F\u59CB\u6570\u636E\u5230\u667A\u6167\u4EA7\u54C1\u7684\u8F6C\u5316\u8DEF\u5F84",
813
- /** Usage */
814
- usage: ["\u8F85\u52A9\u54C1\u724C\u8272", "\u6E10\u53D8\u7EC8\u6B62\u8272", "\u4EA4\u4E92\u53CD\u9988", "\u6210\u529F\u72B6\u6001", "\u6570\u636E\u53EF\u89C6\u5316"]
815
- };
816
- var brandGradient = {
817
- /** Primary gradient (135°) - Logo标准渐变;中点为 OKLab 感知中点,控中段避免脏灰 */
818
- primary: {
819
- css: "linear-gradient(135deg, #0033FE 0%, #00A2E9 50%, #0BF1C3 100%)",
820
- angle: 135,
821
- stops: [
822
- { color: "#0033FE", position: 0 },
823
- { color: "#00A2E9", position: 50, note: "OKLab midpoint" },
824
- { color: "#0BF1C3", position: 100 }
825
- ],
826
- usage: "Logo\u3001Hero\u533A\u57DF\u3001VI \u54C1\u724C\u8D44\u4EA7\uFF08\u4EA7\u54C1 CTA \u7528 solid primary\uFF09"
827
- },
828
- /** Reverse gradient */
829
- reverse: {
830
- css: "linear-gradient(135deg, #0BF1C3 0%, #00A2E9 50%, #0033FE 100%)",
831
- angle: 135,
832
- stops: [
833
- { color: "#0BF1C3", position: 0 },
834
- { color: "#00A2E9", position: 50, note: "OKLab midpoint" },
835
- { color: "#0033FE", position: 100 }
836
- ],
837
- usage: "\u6B21\u8981\u5143\u7D20\u3001hover\u72B6\u6001"
838
- },
839
- /** Vertical gradient */
840
- vertical: {
841
- css: "linear-gradient(180deg, #0033FE 0%, #00A2E9 50%, #0BF1C3 100%)",
842
- angle: 180,
843
- stops: [
844
- { color: "#0033FE", position: 0 },
845
- { color: "#00A2E9", position: 50, note: "OKLab midpoint" },
846
- { color: "#0BF1C3", position: 100 }
847
- ],
848
- usage: "\u5782\u76F4\u5E03\u5C40\u5143\u7D20\u3001\u9875\u9762\u5206\u5272"
849
- },
850
- /** Radial gradient */
851
- radial: {
852
- css: "radial-gradient(circle, #0BF1C3 0%, #00A2E9 50%, #0033FE 100%)",
853
- type: "radial",
854
- stops: [
855
- { color: "#0BF1C3", position: 0 },
856
- { color: "#00A2E9", position: 50, note: "OKLab midpoint" },
857
- { color: "#0033FE", position: 100 }
858
- ],
859
- usage: "\u80CC\u666F\u5149\u6655\u3001\u7126\u70B9\u6548\u679C"
860
- }
861
- };
862
- var neutralColors = {
863
- white: {
864
- name: "\u767D",
865
- nameEn: "White",
866
- hex: "#FFFFFF",
867
- rgb: { r: 255, g: 255, b: 255 },
868
- usage: "\u80CC\u666F\u3001\u6587\u5B57\u53CD\u767D"
869
- },
870
- black: {
871
- name: "\u9ED1",
872
- nameEn: "Black",
873
- hex: "#000000",
874
- rgb: { r: 0, g: 0, b: 0 },
875
- usage: "\u6B63\u6587\u6587\u5B57\u3001\u58A8\u7A3F\u6807\u5FD7"
876
- }
877
- };
878
- var colorProhibitedUses = [
879
- {
880
- id: "high-saturation-overlay",
881
- name: "\u9AD8\u9971\u548C\u5EA6\u80CC\u666F\u4E0E\u989C\u8272\u91CD\u53E0",
882
- description: "\u7981\u7528\u9AD8\u9971\u548C\u5EA6\u80CC\u666F\u4E0E\u989C\u8272\u91CD\u53E0\uFF0C\u907F\u514D\u989C\u8272\u8FC7\u4E8E\u523A\u773C\uFF0C\u5F71\u54CD\u54C1\u724C\u5F62\u8C61",
883
- example: "\u4E0D\u8981\u5728\u9AD8\u9971\u548C\u5EA6\u7684\u7EA2\u3001\u6A59\u3001\u9EC4\u7B49\u80CC\u666F\u4E0A\u4F7F\u7528\u54C1\u724C\u8272"
884
- },
885
- {
886
- id: "high-brightness-overlay",
887
- name: "\u660E\u5EA6\u8FC7\u9AD8\u7684\u91CD\u53E0\u989C\u8272",
888
- description: "\u7981\u7528\u660E\u5EA6\u8FC7\u9AD8\u7684\u91CD\u53E0\u989C\u8272\uFF0C\u907F\u514D\u5F71\u54CD\u5185\u5BB9\u7684\u8BC6\u522B\u6027",
889
- example: "\u4E0D\u8981\u5C06\u6D45\u8272\u54C1\u724C\u8272\u653E\u5728\u6D45\u8272\u80CC\u666F\u4E0A"
890
- },
891
- {
892
- id: "modify-brand-colors",
893
- name: "\u4FEE\u6539\u54C1\u724C\u6807\u51C6\u8272",
894
- description: "\u7981\u6B62\u8C03\u6574\u54C1\u724C\u8272\u7684\u8272\u76F8\u3001\u9971\u548C\u5EA6\u6216\u660E\u5EA6",
895
- example: "\u4E0D\u8981\u5C06\u4E91\u6BD3\u84DD\u8C03\u6210\u7D2B\u8272\u6216\u6D45\u84DD"
896
- },
897
- {
898
- id: "non-brand-gradient",
899
- name: "\u975E\u54C1\u724C\u6E10\u53D8",
900
- description: "\u7981\u6B62\u4F7F\u7528\u975E\u54C1\u724C\u6807\u51C6\u7684\u6E10\u53D8\u7EC4\u5408",
901
- example: "\u4E0D\u8981\u5C06\u4E91\u6BD3\u84DD\u4E0E\u5176\u4ED6\u975E\u54C1\u724C\u8272\u8FDB\u884C\u6E10\u53D8"
902
- }
903
- ];
904
- var allowedColorCombinations = [
905
- {
906
- name: "\u54C1\u724C\u6E10\u53D8\u80CC\u666F + \u767D\u8272\u6587\u5B57",
907
- background: brandGradient.primary.css,
908
- foreground: "#FFFFFF",
909
- contrast: "AAA"
910
- },
911
- {
912
- name: "\u767D\u8272\u80CC\u666F + \u4E91\u6BD3\u84DD\u6587\u5B57",
913
- background: "#FFFFFF",
914
- foreground: "#0033FE",
915
- contrast: "AAA"
916
- },
917
- {
918
- name: "\u6DF1\u8272\u80CC\u666F + \u4E91\u6BD3\u9752\u5F3A\u8C03",
919
- background: "#000000",
920
- foreground: "#0BF1C3",
921
- contrast: "AAA"
922
- },
923
- {
924
- name: "\u4E91\u6BD3\u84DD\u80CC\u666F + \u767D\u8272\u6587\u5B57",
925
- background: "#0033FE",
926
- foreground: "#FFFFFF",
927
- contrast: "AAA"
928
- }
929
- ];
930
- var nebutraBlueScale = colors.primary;
931
- var nebutraCyanScale = colors.accent;
932
- var nebutraNeutralScale = {
933
- 50: colors.neutral[50],
934
- 100: colors.neutral[100],
935
- 200: colors.neutral[200],
936
- 300: colors.neutral[300],
937
- 400: colors.neutral[400],
938
- 500: colors.neutral[500],
939
- 600: colors.neutral[600],
940
- 700: colors.neutral[700],
941
- 800: colors.neutral[800],
942
- 900: colors.neutral[900],
943
- 950: colors.neutral[950]
944
- };
945
- var semanticColors = {
946
- // Surface colors
947
- surface: {
948
- light: {
949
- default: nebutraNeutralScale[50],
950
- subtle: nebutraNeutralScale[100],
951
- muted: nebutraNeutralScale[200]
952
- },
953
- dark: {
954
- default: nebutraNeutralScale[950],
955
- subtle: nebutraNeutralScale[900],
956
- muted: nebutraNeutralScale[800]
957
- }
958
- },
959
- // Text colors
960
- text: {
961
- light: {
962
- primary: nebutraNeutralScale[900],
963
- secondary: nebutraNeutralScale[600],
964
- muted: nebutraNeutralScale[400],
965
- inverse: "#ffffff"
966
- },
967
- dark: {
968
- primary: nebutraNeutralScale[50],
969
- secondary: nebutraNeutralScale[300],
970
- muted: nebutraNeutralScale[500],
971
- inverse: nebutraNeutralScale[900]
972
- }
973
- },
974
- // Border colors
975
- border: {
976
- light: {
977
- default: nebutraNeutralScale[200],
978
- subtle: nebutraNeutralScale[100],
979
- strong: nebutraNeutralScale[300]
980
- },
981
- dark: {
982
- default: nebutraNeutralScale[800],
983
- subtle: nebutraNeutralScale[900],
984
- strong: nebutraNeutralScale[700]
985
- }
986
- },
987
- // Brand emphasis
988
- brand: {
989
- primary: nebutraBlueScale[500],
990
- primaryHover: nebutraBlueScale[600],
991
- primaryActive: nebutraBlueScale[700],
992
- accent: nebutraCyanScale[500],
993
- accentHover: nebutraCyanScale[600],
994
- accentActive: nebutraCyanScale[700]
995
- }
996
- };
997
- var generateColorScale = (baseHex) => {
998
- if (baseHex === "#0033FE") return nebutraBlueScale;
999
- if (baseHex === "#0BF1C3") return nebutraCyanScale;
1000
- return {
1001
- 50: baseHex,
1002
- 100: baseHex,
1003
- 200: baseHex,
1004
- 300: baseHex,
1005
- 400: baseHex,
1006
- 500: baseHex,
1007
- 600: baseHex,
1008
- 700: baseHex,
1009
- 800: baseHex,
1010
- 900: baseHex,
1011
- 950: baseHex
1012
- };
1013
- };
1014
-
1015
1017
  // src/guidelines/logo.ts
1016
1018
  var logoSafetyZone = {
1017
1019
  /** Safety zone ratio relative to logo height */
@@ -1209,6 +1211,9 @@ var logoSpecialVersions = {
1209
1211
  };
1210
1212
 
1211
1213
  // src/guidelines/index.ts
1214
+ function firstFamily(stack) {
1215
+ return (stack.split(",")[0] ?? "").trim().replace(/^["']|["']$/g, "");
1216
+ }
1212
1217
  var brandGuidelines = {
1213
1218
  // Logo
1214
1219
  logo: {
@@ -1225,18 +1230,20 @@ var brandGuidelines = {
1225
1230
  colors: {
1226
1231
  primary: {
1227
1232
  name: "\u4E91\u6BD3\u84DD",
1228
- hex: "#0033FE"
1233
+ hex: colors.primary["500"]
1229
1234
  },
1230
1235
  secondary: {
1231
1236
  name: "\u4E91\u6BD3\u9752",
1232
- hex: "#0BF1C3"
1237
+ hex: colors.accent["500"]
1233
1238
  },
1234
- gradient: "linear-gradient(135deg, #0033FE 0%, #00A2E9 50%, #0BF1C3 100%)"
1239
+ gradient: colors.gradient.primary
1235
1240
  },
1236
- // Typography
1241
+ // Typography — the faces the token source chose (metadata.ts reads them
1242
+ // from core.json:fontFamily).
1237
1243
  typography: {
1238
- cn: "Noto Sans SC",
1239
- en: "Geist",
1244
+ cn: firstFamily(typography.fontFamily.cn),
1245
+ en: firstFamily(typography.fontFamily.en),
1246
+ heading: firstFamily(typography.fontFamily.heading),
1240
1247
  weights: ["Regular", "Medium", "SemiBold", "Bold"]
1241
1248
  }
1242
1249
  };
@@ -1772,6 +1779,7 @@ export {
1772
1779
  getBrandMailFrom,
1773
1780
  getBrandOrigin,
1774
1781
  getBrandPublicUrls,
1782
+ getDocsUrl,
1775
1783
  getMarketingHomePath,
1776
1784
  getMarketingHomeUrl,
1777
1785
  getMilestoneCopy,