@expcat/tigercat-core 2.1.0 → 2.1.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.
Files changed (38) hide show
  1. package/dist/{data-export-CJUETRjV.d.ts → data-export-BtjseC7G.d.ts} +1 -1
  2. package/dist/index.d.ts +459 -101
  3. package/dist/index.js +1128 -250
  4. package/dist/{locale-CEDXoKX7.d.ts → locale-CGl5S1-B.d.ts} +48 -1
  5. package/dist/locales/ar-SA.d.ts +1 -1
  6. package/dist/locales/ar-SA.js +82 -0
  7. package/dist/locales/de-DE.d.ts +1 -1
  8. package/dist/locales/de-DE.js +82 -0
  9. package/dist/locales/en-US.d.ts +1 -1
  10. package/dist/locales/en-US.js +41 -0
  11. package/dist/locales/es-ES.d.ts +1 -1
  12. package/dist/locales/es-ES.js +82 -0
  13. package/dist/locales/fr-FR.d.ts +1 -1
  14. package/dist/locales/fr-FR.js +82 -0
  15. package/dist/locales/id-ID.d.ts +1 -1
  16. package/dist/locales/id-ID.js +82 -0
  17. package/dist/locales/ja-JP.d.ts +1 -1
  18. package/dist/locales/ja-JP.js +82 -0
  19. package/dist/locales/ko-KR.d.ts +1 -1
  20. package/dist/locales/ko-KR.js +82 -0
  21. package/dist/locales/pt-BR.d.ts +1 -1
  22. package/dist/locales/pt-BR.js +82 -0
  23. package/dist/locales/th-TH.d.ts +1 -1
  24. package/dist/locales/th-TH.js +82 -0
  25. package/dist/locales/vi-VN.d.ts +1 -1
  26. package/dist/locales/vi-VN.js +82 -0
  27. package/dist/locales/zh-CN.d.ts +1 -1
  28. package/dist/locales/zh-CN.js +41 -0
  29. package/dist/locales/zh-TW.d.ts +1 -1
  30. package/dist/locales/zh-TW.js +82 -0
  31. package/dist/{table-CbPOY5bp.d.ts → table-D_1D4Euk.d.ts} +1 -1
  32. package/dist/tailwind/modern.js +25 -14
  33. package/dist/{tailwind-entry-CNBAH7iv.d.ts → tailwind-entry-nnuviNxx.d.ts} +1 -1
  34. package/dist/tailwind.d.ts +1 -1
  35. package/dist/tailwind.js +23 -12
  36. package/dist/utils/data-export.d.ts +3 -3
  37. package/dist/utils/table-export.d.ts +2 -2
  38. package/package.json +1 -1
@@ -41,6 +41,10 @@ var THEME_CSS_VARS = {
41
41
  chart4: "--tiger-chart-4",
42
42
  chart5: "--tiger-chart-5",
43
43
  chart6: "--tiger-chart-6",
44
+ // Aliases of existing semantic tokens (not a third color system)
45
+ textMuted: "--tiger-text-muted",
46
+ fill: "--tiger-fill",
47
+ bg: "--tiger-bg",
44
48
  // Breakpoints
45
49
  breakpointXs: "--tiger-breakpoint-xs",
46
50
  breakpointSm: "--tiger-breakpoint-sm",
@@ -48,6 +52,23 @@ var THEME_CSS_VARS = {
48
52
  breakpointLg: "--tiger-breakpoint-lg",
49
53
  breakpointXl: "--tiger-breakpoint-xl"
50
54
  };
55
+ var THEME_CSS_VAR_ALIAS_SOURCES = {
56
+ textMuted: "textSecondary",
57
+ fill: "surfaceMuted",
58
+ bg: "surface"
59
+ };
60
+ function semanticColorsToCssVars(colors = {}) {
61
+ const vars = {};
62
+ for (const [key, value] of Object.entries(colors)) {
63
+ const varName = THEME_CSS_VARS[key];
64
+ if (varName && value) vars[varName] = value;
65
+ }
66
+ for (const aliasKey of Object.keys(THEME_CSS_VAR_ALIAS_SOURCES)) {
67
+ const sourceKey = THEME_CSS_VAR_ALIAS_SOURCES[aliasKey];
68
+ vars[THEME_CSS_VARS[aliasKey]] = `var(${THEME_CSS_VARS[sourceKey]})`;
69
+ }
70
+ return vars;
71
+ }
51
72
 
52
73
  // src/themes/modern/tokens.ts
53
74
  var MODERN_BASE_TOKENS_LIGHT = {
@@ -249,18 +270,8 @@ var defaultThemeDarkColors = {
249
270
  };
250
271
 
251
272
  // src/tailwind-plugin.ts
252
- function presetToVars(colors) {
253
- const vars = {};
254
- for (const [key, value] of Object.entries(colors)) {
255
- const varName = THEME_CSS_VARS[key];
256
- if (varName && value) {
257
- vars[varName] = value;
258
- }
259
- }
260
- return vars;
261
- }
262
- var tigercatTheme = presetToVars(defaultThemeLightColors);
263
- var tigercatDarkTheme = presetToVars(defaultThemeDarkColors);
273
+ var tigercatTheme = semanticColorsToCssVars(defaultThemeLightColors);
274
+ var tigercatDarkTheme = semanticColorsToCssVars(defaultThemeDarkColors);
264
275
  var tigercatDirectionBase = {
265
276
  '[dir="rtl"] .tiger-rtl-mirror, [data-tiger-dir="rtl"] .tiger-rtl-mirror': {
266
277
  transform: "scaleX(-1)"
@@ -302,8 +313,8 @@ var tigercatPlugin = plugin(function({ addBase }) {
302
313
  function createTigercatPlugin(options = {}) {
303
314
  return plugin(function({ addBase }) {
304
315
  const preset = options.preset;
305
- const lightVars = preset?.light?.colors ? presetToVars(preset.light.colors) : tigercatTheme;
306
- const darkVars = preset?.dark?.colors ? presetToVars(preset.dark.colors) : tigercatDarkTheme;
316
+ const lightVars = preset?.light?.colors ? semanticColorsToCssVars(preset.light.colors) : tigercatTheme;
317
+ const darkVars = preset?.dark?.colors ? semanticColorsToCssVars(preset.dark.colors) : tigercatDarkTheme;
307
318
  addBase({
308
319
  ":root": { ...lightVars, ...MODERN_BASE_TOKENS_LIGHT },
309
320
  ".dark": { ...darkVars, ...MODERN_BASE_TOKENS_DARK },
@@ -181,4 +181,4 @@ interface TigercatPluginOptions {
181
181
  */
182
182
  declare function createTigercatPlugin(options?: TigercatPluginOptions): tailwindcss_plugin.PluginWithConfig;
183
183
 
184
- export { type ColorScheme as C, type ThemePreset as T, type ThemeConfig as a, type ThemeColorScale as b, type ThemeMotion as c, type ThemePresetName as d, type ThemeRadius as e, type ThemeSemanticColors as f, type ThemeShadows as g, type ThemeSpacing as h, type ThemeTypography as i, type TigercatPluginOptions as j, createTigercatPlugin as k, tigercatPlugin as l, tigercatTheme as m, tigercatDarkTheme as t };
184
+ export { type ColorScheme as C, type ThemeSemanticColors as T, type ThemePreset as a, type ThemeConfig as b, type ThemeColorScale as c, type ThemeMotion as d, type ThemePresetName as e, type ThemeRadius as f, type ThemeShadows as g, type ThemeSpacing as h, type ThemeTypography as i, type TigercatPluginOptions as j, createTigercatPlugin as k, tigercatPlugin as l, tigercatTheme as m, tigercatDarkTheme as t };
@@ -1,2 +1,2 @@
1
- export { l as default } from './tailwind-entry-CNBAH7iv.js';
1
+ export { l as default } from './tailwind-entry-nnuviNxx.js';
2
2
  import 'tailwindcss/plugin';
package/dist/tailwind.js CHANGED
@@ -41,6 +41,10 @@ var THEME_CSS_VARS = {
41
41
  chart4: "--tiger-chart-4",
42
42
  chart5: "--tiger-chart-5",
43
43
  chart6: "--tiger-chart-6",
44
+ // Aliases of existing semantic tokens (not a third color system)
45
+ textMuted: "--tiger-text-muted",
46
+ fill: "--tiger-fill",
47
+ bg: "--tiger-bg",
44
48
  // Breakpoints
45
49
  breakpointXs: "--tiger-breakpoint-xs",
46
50
  breakpointSm: "--tiger-breakpoint-sm",
@@ -48,6 +52,23 @@ var THEME_CSS_VARS = {
48
52
  breakpointLg: "--tiger-breakpoint-lg",
49
53
  breakpointXl: "--tiger-breakpoint-xl"
50
54
  };
55
+ var THEME_CSS_VAR_ALIAS_SOURCES = {
56
+ textMuted: "textSecondary",
57
+ fill: "surfaceMuted",
58
+ bg: "surface"
59
+ };
60
+ function semanticColorsToCssVars(colors = {}) {
61
+ const vars = {};
62
+ for (const [key, value] of Object.entries(colors)) {
63
+ const varName = THEME_CSS_VARS[key];
64
+ if (varName && value) vars[varName] = value;
65
+ }
66
+ for (const aliasKey of Object.keys(THEME_CSS_VAR_ALIAS_SOURCES)) {
67
+ const sourceKey = THEME_CSS_VAR_ALIAS_SOURCES[aliasKey];
68
+ vars[THEME_CSS_VARS[aliasKey]] = `var(${THEME_CSS_VARS[sourceKey]})`;
69
+ }
70
+ return vars;
71
+ }
51
72
 
52
73
  // src/themes/modern/tokens.ts
53
74
  var MODERN_BASE_TOKENS_LIGHT = {
@@ -186,18 +207,8 @@ var defaultThemeDarkColors = {
186
207
  };
187
208
 
188
209
  // src/tailwind-plugin.ts
189
- function presetToVars(colors) {
190
- const vars = {};
191
- for (const [key, value] of Object.entries(colors)) {
192
- const varName = THEME_CSS_VARS[key];
193
- if (varName && value) {
194
- vars[varName] = value;
195
- }
196
- }
197
- return vars;
198
- }
199
- var tigercatTheme = presetToVars(defaultThemeLightColors);
200
- var tigercatDarkTheme = presetToVars(defaultThemeDarkColors);
210
+ var tigercatTheme = semanticColorsToCssVars(defaultThemeLightColors);
211
+ var tigercatDarkTheme = semanticColorsToCssVars(defaultThemeDarkColors);
201
212
  var tigercatDirectionBase = {
202
213
  '[dir="rtl"] .tiger-rtl-mirror, [data-tiger-dir="rtl"] .tiger-rtl-mirror': {
203
214
  transform: "scaleX(-1)"
@@ -1,6 +1,6 @@
1
- import { T as TableColumn } from '../table-CbPOY5bp.js';
2
- import { D as DataExportFormat, a as DataExportOptions } from '../data-export-CJUETRjV.js';
3
- import '../locale-CEDXoKX7.js';
1
+ import { T as TableColumn } from '../table-D_1D4Euk.js';
2
+ import { D as DataExportFormat, a as DataExportOptions } from '../data-export-BtjseC7G.js';
3
+ import '../locale-CGl5S1-B.js';
4
4
  import '../datepicker-Digy7Stt.js';
5
5
 
6
6
  /**
@@ -1,5 +1,5 @@
1
- import { x as TableExportFormat, T as TableColumn } from '../table-CbPOY5bp.js';
2
- import '../locale-CEDXoKX7.js';
1
+ import { x as TableExportFormat, T as TableColumn } from '../table-D_1D4Euk.js';
2
+ import '../locale-CGl5S1-B.js';
3
3
  import '../datepicker-Digy7Stt.js';
4
4
 
5
5
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@expcat/tigercat-core",
3
- "version": "2.1.0",
3
+ "version": "2.1.1",
4
4
  "type": "module",
5
5
  "description": "Core utilities for Tigercat UI library",
6
6
  "license": "MIT",