@nexus-cross/crossx-design-system 1.3.7-beta.4 → 1.3.7

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.d.ts CHANGED
@@ -141,6 +141,12 @@ interface DesignSystemEffects {
141
141
  };
142
142
  /** Background blur (Figma `BG_blur7`, 7px radius). */
143
143
  bgBlur7: string;
144
+ /**
145
+ * Brand CTA gradient (pink → orange). Used as the `background` of primary
146
+ * confirm buttons across features. Mode-independent — the gradient reads on
147
+ * both light and dark surfaces.
148
+ */
149
+ accentGradient: string;
144
150
  }
145
151
  interface DesignSystem {
146
152
  /** Identifier (e.g. `'crossx'`). Surfaced for debugging / theme switching. */
@@ -260,6 +266,53 @@ interface SdkColorOverrides {
260
266
  }
261
267
  declare function toSdkColorOverrides(ds: DesignSystem, mode: ThemeMode): SdkColorOverrides;
262
268
 
269
+ /**
270
+ * Brand tokens — single source of truth for the user-facing wallet & chain
271
+ * display names surfaced through the connect-kit SDK.
272
+ *
273
+ * Phase 1 (display strings only): change the values here to rebrand every
274
+ * presentable-layer label across dapp-ui / wagmi / react in one place.
275
+ *
276
+ * NOTE: this covers DISPLAY occurrences only. The on-chain ticker / external
277
+ * API code `"CROSS"` (AlchemyPay onramp mappings, token-list / pool symbol
278
+ * comparisons) is a functional identifier — NOT a display token — and is
279
+ * intentionally left untouched here. Renaming those requires external
280
+ * coordination and belongs to a separate effort.
281
+ */
282
+ /** Primary wallet brand name shown to end users. */
283
+ declare const WALLET_BRAND_NAME = "ONEwallet";
284
+ /** Composed wallet labels used across connect modals, buttons and connectors. */
285
+ declare const WALLET_LABELS: {
286
+ /** Bare brand name / title (was 'CROSSx' / 'CROSS Wallet'). No '+'. */
287
+ readonly default: "ONEwallet";
288
+ /** Embedded / social-login wallet (was 'CROSSx with Social'). */
289
+ readonly social: "ONEwallet with Social";
290
+ /** Native app wallet — carries the '+' suffix (was 'CROSSx App'). */
291
+ readonly app: "ONEwallet+";
292
+ /** Browser extension — '+' suffix (was 'CROSSx Extension'). */
293
+ readonly extension: "ONEwallet+ Extension";
294
+ };
295
+ /**
296
+ * Chain display names — hardcoded FALLBACK. The rebranded 'One Mainnet' /
297
+ * 'One Testnet' now comes from the S3 remote-config (chains.json), so the
298
+ * built-in default stays on the previous 'CROSS' notation. If S3 is absent
299
+ * the UI shows these CROSS names.
300
+ */
301
+ declare const CHAIN_DISPLAY: {
302
+ readonly mainnet: "CROSS Mainnet";
303
+ readonly testnet: "ONEchain Testnet";
304
+ };
305
+ /**
306
+ * Native currency display symbol — hardcoded FALLBACK. Rebranded 'ONE' / 'tONE'
307
+ * is served via S3 remote-config; the default keeps the previous 'CROSS' /
308
+ * 'tCROSS' notation (also matches the on-chain ticker). DISPLAY metadata only —
309
+ * do not reuse for on-chain / external-API matching.
310
+ */
311
+ declare const NATIVE_SYMBOL: {
312
+ readonly mainnet: "CROSS";
313
+ readonly testnet: "tONE";
314
+ };
315
+
263
316
  /**
264
317
  * `@nexus-cross/crossx-design-system`
265
318
  *
@@ -270,4 +323,4 @@ declare function toSdkColorOverrides(ds: DesignSystem, mode: ThemeMode): SdkColo
270
323
  /** Convenience: the default design system's full stylesheet. */
271
324
  declare function getDefaultDesignSystemCss(): string;
272
325
 
273
- export { type BuildCssOptions, type ColorRamp, type ColorScale, type DesignSystem, type DesignSystemEffects, type DesignSystemLayout, type DesignSystemTypography, type DisplaySize, type HeadingSize, type LabelSemiboldSize, type LabelSize, type SdkColorOverrides, type TextSemiboldSize, type TextSize, type ThemeMode, type TypeStyle, buildColorVars, buildDesignSystemCss, buildLayoutVars, buildTypographyClasses, darkColors, defaultDesignSystem, effects, getDefaultDesignSystemCss, layout, lightColors, toSdkColorOverrides, typography };
326
+ export { type BuildCssOptions, CHAIN_DISPLAY, type ColorRamp, type ColorScale, type DesignSystem, type DesignSystemEffects, type DesignSystemLayout, type DesignSystemTypography, type DisplaySize, type HeadingSize, type LabelSemiboldSize, type LabelSize, NATIVE_SYMBOL, type SdkColorOverrides, type TextSemiboldSize, type TextSize, type ThemeMode, type TypeStyle, WALLET_BRAND_NAME, WALLET_LABELS, buildColorVars, buildDesignSystemCss, buildLayoutVars, buildTypographyClasses, darkColors, defaultDesignSystem, effects, getDefaultDesignSystemCss, layout, lightColors, toSdkColorOverrides, typography };
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
- var a={bg:{default:"#FFFFFF",dim:"#F5F7FA"},surface:{default:"#FFFFFF",medium:"#F5F7FA",high:"#EDF1F2",dim:"#F9FAFB",inverted:"#1E232E"},content:{highest:"#000000",high:"#000000D9",medium:"#000000A6",low:"#00000066",lowest:"#00000040",inverted:"#FFFFFF"},border:{default:"#00000012",medium:"#0000002E",high:"#000000A6"},accent:{primary:{on:"#FFFFFF",default:"#00B4B7",high:"#00A0A2",low:"#E7F9F8",lowest:"#F0FAF9",onInverted:"#00E8C9"}},system:{red:{on:"#FFFFFF",default:"#DA0B2E",high:"#D20609",low:"#FFEEEE",lowest:"#FFF6F6",onInverted:"#FF0F47"},blue:{on:"#FFFFFF",default:"#0888DE",high:"#008DCA",low:"#ECF8FC",lowest:"#F5FBFE",onInverted:"#0FC7FF"},orange:{on:"#FFFFFF",default:"#FC8B01",high:"#E56F00",low:"#FCF5E9",lowest:"#FFF9F2",onInverted:"#FF9F21"},purple:{on:"#FFFFFF",default:"#7E54F4",high:"#7346F3",low:"#F5F3FF",lowest:"#F9F8FF",onInverted:"#9B78FF"},green:{on:"#FFFFFF",default:"#00B4B7",high:"#00A0A2",low:"#E7F9F8",lowest:"#F0FAF9",onInverted:"#00E8C9"}},overlay:{dim:"#00000080",subtle:"#00000005"},static:{white:"#FFFFFF",black:"#000000"}},g={bg:{default:"#1E232E",dim:"#191D27"},surface:{default:"#1E232E",medium:"#252B39",high:"#363B4C",dim:"#161B26",inverted:"#FFFFFF"},content:{highest:"#FFFFFF",high:"#FFFFFFD9",medium:"#FFFFFFA6",low:"#FFFFFF66",lowest:"#FFFFFF40",inverted:"#000000"},border:{default:"#FFFFFF12",medium:"#FFFFFF2E",high:"#FFFFFFA6"},accent:{primary:{on:"#000000",default:"#00CEB2",high:"#00E8C9",low:"#123235",lowest:"#102E31",onInverted:"#00A0A2"}},system:{red:{on:"#FFFFFF",default:"#CD0C40",high:"#FF0F47",low:"#461420",lowest:"#39151E",onInverted:"#D20609"},blue:{on:"#FFFFFF",default:"#0888DE",high:"#0FC7FF",low:"#143446",lowest:"#162B3B",onInverted:"#008DCA"},orange:{on:"#000000",default:"#FF9F21",high:"#FF9F21",low:"#342B1E",lowest:"#2E2820",onInverted:"#E56F00"},purple:{on:"#FFFFFF",default:"#744FDC",high:"#9B78FF",low:"#2E2854",lowest:"#2A2740",onInverted:"#7346F3"},green:{on:"#000000",default:"#00CEB2",high:"#00E8C9",low:"#123235",lowest:"#102E31",onInverted:"#00A0A2"}},overlay:{dim:"#000000B3",subtle:"#00000026"},static:{white:"#FFFFFF",black:"#000000"}};var x="Inter, sans-serif",e=(t,o,r,n)=>({fontFamily:x,fontSize:t,fontWeight:o,lineHeight:r,letterSpacing:n}),d={text:{"2xs":e(10,400,1.5,-1),xs:e(12,400,1.5,-1),sm:e(14,400,1.5,-1),base:e(16,400,1.5,-1),lg:e(18,400,1.5,-1),xl:e(20,400,1.5,-1)},textMedium:{"2xs":e(10,500,1.5,-1),xs:e(12,500,1.5,-1),sm:e(14,500,1.5,-1),base:e(16,500,1.5,-1),lg:e(18,500,1.5,-1),xl:e(20,500,1.5,-1)},textSemibold:{xs:e(12,600,1.5,-1),sm:e(14,600,1.5,-1),base:e(16,600,1.5,-1),lg:e(18,600,1.5,-1),xl:e(20,600,1.5,-1)},label:{xs:e(10,500,1,0),sm:e(12,500,1,0),md:e(14,500,1,0),lg:e(16,500,1,0)},labelSemibold:{sm:e(12,600,1,0),md:e(14,600,1,0),lg:e(16,600,1,0)},heading:{h7:e(14,600,1.25,0),h6:e(16,600,1.25,0),h5:e(18,600,1.25,0),h4:e(20,600,1.25,0),h3:e(24,600,1.25,0),h2:e(30,700,1.25,0),h1:e(36,700,1.25,0)},display:{sm:e(36,700,1.25,0),md:e(48,700,1.25,0),lg:e(60,700,1.25,0)}};var m={responsivePadding:{sm:16,md:24,lg:32}};var c={shadowModal:{light:"0px 4px 30px -1px rgba(0, 0, 0, 0.15)",dark:"0px 4px 30px -1px rgba(0, 0, 0, 0.7)"},bgBlur7:"blur(3.5px)"};var u={name:"crossx",colors:{light:a,dark:g},typography:d,layout:m,effects:c};var y="--ds";function F(t){return t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function h(t,o,r){for(let[n,s]of Object.entries(t)){let i=[...o,F(n)];typeof s=="string"?r.push(` ${y}-${i.join("-")}: ${s};`):s&&typeof s=="object"&&h(s,i,r)}}function p(t){let o=[];return h(t,[],o),o.join(`
2
- `)}function b(t){let o=[];for(let[r,n]of Object.entries(t)){let s=F(r);for(let[i,l]of Object.entries(n))o.push(` ${y}-${s}-${F(i)}: ${l}px;`)}return o.join(`
3
- `)}function C(t){return t===0?"0":`${t/100}em`}function D(t,o){return[`.${t} {`,` font-family: ${o.fontFamily};`,` font-size: ${o.fontSize}px;`,` font-weight: ${o.fontWeight};`,` line-height: ${o.lineHeight};`,` letter-spacing: ${C(o.letterSpacing)};`,"}"].join(`
4
- `)}function S(t){let o=[];for(let[r,n]of Object.entries(t)){let s=F(r);for(let[i,l]of Object.entries(n))o.push(D(`ds-${s}-${i}`,l))}return o.join(`
1
+ var d={bg:{default:"#FFFFFF",dim:"#F5F7FA"},surface:{default:"#FFFFFF",medium:"#F5F7FA",high:"#EDF1F2",dim:"#F9FAFB",inverted:"#1E232E"},content:{highest:"#000000",high:"#000000D9",medium:"#000000A6",low:"#00000066",lowest:"#00000040",inverted:"#FFFFFF"},border:{default:"#00000012",medium:"#0000002E",high:"#000000A6"},accent:{primary:{on:"#FFFFFF",default:"#00B4B7",high:"#00A0A2",low:"#E7F9F8",lowest:"#F0FAF9",onInverted:"#00E8C9"}},system:{red:{on:"#FFFFFF",default:"#DA0B2E",high:"#D20609",low:"#FFEEEE",lowest:"#FFF6F6",onInverted:"#FF0F47"},blue:{on:"#FFFFFF",default:"#0888DE",high:"#008DCA",low:"#ECF8FC",lowest:"#F5FBFE",onInverted:"#0FC7FF"},orange:{on:"#FFFFFF",default:"#F0640D",high:"#F0640D",low:"#FFF5EE",lowest:"#FFF9F2",onInverted:"#FF9F21"},purple:{on:"#FFFFFF",default:"#7E54F4",high:"#7346F3",low:"#F5F3FF",lowest:"#F9F8FF",onInverted:"#9B78FF"},green:{on:"#FFFFFF",default:"#00B4B7",high:"#00A0A2",low:"#E7F9F8",lowest:"#F0FAF9",onInverted:"#00E8C9"}},overlay:{dim:"#00000080",subtle:"#00000005"},static:{white:"#FFFFFF",black:"#000000"}},c={bg:{default:"#1E232E",dim:"#191D27"},surface:{default:"#1E232E",medium:"#252B39",high:"#363B4C",dim:"#161B26",inverted:"#FFFFFF"},content:{highest:"#FFFFFF",high:"#FFFFFFD9",medium:"#FFFFFFA6",low:"#FFFFFF66",lowest:"#FFFFFF40",inverted:"#000000"},border:{default:"#FFFFFF12",medium:"#FFFFFF2E",high:"#FFFFFFA6"},accent:{primary:{on:"#000000",default:"#00CEB2",high:"#00E8C9",low:"#123235",lowest:"#102E31",onInverted:"#00A0A2"}},system:{red:{on:"#FFFFFF",default:"#CD0C40",high:"#FF0F47",low:"#461420",lowest:"#39151E",onInverted:"#D20609"},blue:{on:"#FFFFFF",default:"#0888DE",high:"#0FC7FF",low:"#143446",lowest:"#162B3B",onInverted:"#008DCA"},orange:{on:"#000000",default:"#FF7A3D",high:"#FF7A3D",low:"#3A2318",lowest:"#2E2820",onInverted:"#F0640D"},purple:{on:"#FFFFFF",default:"#744FDC",high:"#9B78FF",low:"#2E2854",lowest:"#2A2740",onInverted:"#7346F3"},green:{on:"#000000",default:"#00CEB2",high:"#00E8C9",low:"#123235",lowest:"#102E31",onInverted:"#00A0A2"}},overlay:{dim:"#000000B3",subtle:"#00000026"},static:{white:"#FFFFFF",black:"#000000"}};var D="Inter, sans-serif",e=(t,o,r,n)=>({fontFamily:D,fontSize:t,fontWeight:o,lineHeight:r,letterSpacing:n}),g={text:{"2xs":e(10,400,1.5,-1),xs:e(12,400,1.5,-1),sm:e(14,400,1.5,-1),base:e(16,400,1.5,-1),lg:e(18,400,1.5,-1),xl:e(20,400,1.5,-1)},textMedium:{"2xs":e(10,500,1.5,-1),xs:e(12,500,1.5,-1),sm:e(14,500,1.5,-1),base:e(16,500,1.5,-1),lg:e(18,500,1.5,-1),xl:e(20,500,1.5,-1)},textSemibold:{xs:e(12,600,1.5,-1),sm:e(14,600,1.5,-1),base:e(16,600,1.5,-1),lg:e(18,600,1.5,-1),xl:e(20,600,1.5,-1)},label:{xs:e(10,500,1,0),sm:e(12,500,1,0),md:e(14,500,1,0),lg:e(16,500,1,0)},labelSemibold:{sm:e(12,600,1,0),md:e(14,600,1,0),lg:e(16,600,1,0)},heading:{h7:e(14,600,1.25,0),h6:e(16,600,1.25,0),h5:e(18,600,1.25,0),h4:e(20,600,1.25,0),h3:e(24,600,1.25,0),h2:e(30,700,1.25,0),h1:e(36,700,1.25,0)},display:{sm:e(36,700,1.25,0),md:e(48,700,1.25,0),lg:e(60,700,1.25,0)}};var m={responsivePadding:{sm:16,md:24,lg:32}};var u={shadowModal:{light:"0px 4px 30px -1px rgba(0, 0, 0, 0.15)",dark:"0px 4px 30px -1px rgba(0, 0, 0, 0.7)"},bgBlur7:"blur(3.5px)",accentGradient:"linear-gradient(196deg, #ff2589 16%, #ff823d 84%)"};var p={name:"crossx",colors:{light:d,dark:c},typography:g,layout:m,effects:u};var h="--ds";function a(t){return t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function S(t,o,r){for(let[n,s]of Object.entries(t)){let i=[...o,a(n)];typeof s=="string"?r.push(` ${h}-${i.join("-")}: ${s};`):s&&typeof s=="object"&&S(s,i,r)}}function f(t){let o=[];return S(t,[],o),o.join(`
2
+ `)}function b(t){let o=[];for(let[r,n]of Object.entries(t)){let s=a(r);for(let[i,l]of Object.entries(n))o.push(` ${h}-${s}-${a(i)}: ${l}px;`)}return o.join(`
3
+ `)}function C(t){return t===0?"0":`${t/100}em`}function E(t,o){return[`.${t} {`,` font-family: ${o.fontFamily};`,` font-size: ${o.fontSize}px;`,` font-weight: ${o.fontWeight};`,` line-height: ${o.lineHeight};`,` letter-spacing: ${C(o.letterSpacing)};`,"}"].join(`
4
+ `)}function x(t){let o=[];for(let[r,n]of Object.entries(t)){let s=a(r);for(let[i,l]of Object.entries(n))o.push(E(`ds-${s}-${i}`,l))}return o.join(`
5
5
 
6
- `)}function f(t,o={}){return[`${o.scope??":root"}, [data-ds-theme="dark"] {`,p(t.colors.dark),b(t.layout),` --ds-shadow-modal: ${t.effects.shadowModal.dark};`,` --ds-bg-blur-7: ${t.effects.bgBlur7};`,"}","",'[data-ds-theme="light"] {',p(t.colors.light),` --ds-shadow-modal: ${t.effects.shadowModal.light};`,"}","",S(t.typography),""].join(`
7
- `)}function w(t,o){let r=t.colors[o];return{primary:r.accent.primary.default,secondary:r.system.red.default,onPrimary:r.accent.primary.on,error:r.system.red.default,bg:r.bg.default,surfaceDefault:r.surface.medium,surfaceSubtle:r.surface.high,borderDefault:r.border.default,borderSubtle:r.border.medium,textIconPrimary:r.content.highest,textIconSecondary:r.content.medium,textIconTertiary:r.content.low}}function R(){return f(u)}export{p as buildColorVars,f as buildDesignSystemCss,b as buildLayoutVars,S as buildTypographyClasses,g as darkColors,u as defaultDesignSystem,c as effects,R as getDefaultDesignSystemCss,m as layout,a as lightColors,w as toSdkColorOverrides,d as typography};
6
+ `)}function y(t,o={}){return[`${o.scope??":root"}, [data-ds-theme="dark"] {`,f(t.colors.dark),b(t.layout),` --ds-shadow-modal: ${t.effects.shadowModal.dark};`,` --ds-bg-blur-7: ${t.effects.bgBlur7};`,` --ds-accent-gradient: ${t.effects.accentGradient};`,"}","",'[data-ds-theme="light"] {',f(t.colors.light),` --ds-shadow-modal: ${t.effects.shadowModal.light};`,"}","",x(t.typography),""].join(`
7
+ `)}function w(t,o){let r=t.colors[o];return{primary:r.accent.primary.default,secondary:r.system.red.default,onPrimary:r.accent.primary.on,error:r.system.red.default,bg:r.bg.default,surfaceDefault:r.surface.medium,surfaceSubtle:r.surface.high,borderDefault:r.border.default,borderSubtle:r.border.medium,textIconPrimary:r.content.highest,textIconSecondary:r.content.medium,textIconTertiary:r.content.low}}var F="ONEwallet",A={default:F,social:`${F} with Social`,app:`${F}+`,extension:`${F}+ Extension`},T={mainnet:"CROSS Mainnet",testnet:"ONEchain Testnet"},B={mainnet:"CROSS",testnet:"tONE"};function W(){return y(p)}export{T as CHAIN_DISPLAY,B as NATIVE_SYMBOL,F as WALLET_BRAND_NAME,A as WALLET_LABELS,f as buildColorVars,y as buildDesignSystemCss,b as buildLayoutVars,x as buildTypographyClasses,c as darkColors,p as defaultDesignSystem,u as effects,W as getDefaultDesignSystemCss,m as layout,d as lightColors,w as toSdkColorOverrides,g as typography};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nexus-cross/crossx-design-system",
3
- "version": "1.3.7-beta.4",
3
+ "version": "1.3.7",
4
4
  "description": "CROSSx design system — color, typography and layout tokens with a swappable DesignSystem contract",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",