@windrun-huaiin/base-ui 13.0.0 → 14.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.
Files changed (44) hide show
  1. package/dist/assets/bitcoin.js +3 -1
  2. package/dist/assets/clerk.js +3 -1
  3. package/dist/assets/css.js +3 -1
  4. package/dist/assets/csv.js +3 -1
  5. package/dist/assets/d8.js +3 -1
  6. package/dist/assets/diff.js +3 -1
  7. package/dist/assets/dpa.js +3 -1
  8. package/dist/assets/faq.js +3 -1
  9. package/dist/assets/faqb.js +3 -1
  10. package/dist/assets/faqs.js +3 -1
  11. package/dist/assets/github.js +3 -1
  12. package/dist/assets/html.js +3 -1
  13. package/dist/assets/http.js +3 -1
  14. package/dist/assets/index.js +31 -31
  15. package/dist/assets/iterm.js +3 -1
  16. package/dist/assets/java.js +3 -1
  17. package/dist/assets/json.js +3 -1
  18. package/dist/assets/last-updated.js +3 -1
  19. package/dist/assets/log.js +3 -1
  20. package/dist/assets/mac.js +3 -1
  21. package/dist/assets/markdown.js +3 -1
  22. package/dist/assets/mdx.js +3 -1
  23. package/dist/assets/mermaid.js +3 -1
  24. package/dist/assets/scheme.js +3 -1
  25. package/dist/assets/snippets.js +3 -1
  26. package/dist/assets/sql.js +3 -1
  27. package/dist/assets/subp.js +3 -1
  28. package/dist/assets/t3p.js +3 -1
  29. package/dist/assets/test.js +3 -1
  30. package/dist/assets/txt.js +3 -1
  31. package/dist/assets/xml.js +3 -1
  32. package/dist/assets/yaml.js +3 -1
  33. package/dist/lib/index.d.ts +1 -0
  34. package/dist/lib/index.js +22 -0
  35. package/dist/lib/index.mjs +1 -0
  36. package/dist/lib/theme-util.d.ts +67 -2
  37. package/dist/lib/theme-util.js +110 -4
  38. package/dist/lib/theme-util.mjs +98 -5
  39. package/dist/ui/copyable-text.js +3 -8
  40. package/dist/ui/copyable-text.mjs +3 -8
  41. package/package.json +7 -2
  42. package/src/lib/index.ts +1 -0
  43. package/src/lib/theme-util.ts +118 -5
  44. package/src/ui/copyable-text.tsx +3 -6
@@ -1,5 +1,7 @@
1
1
  'use strict';
2
2
 
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
3
5
  var tslib_es6 = require('../node_modules/.pnpm/@rollup_plugin-typescript@12.1.4_rollup@4.46.2_tslib@2.8.1_typescript@5.9.3/node_modules/tslib/tslib.es6.js');
4
6
  var jsxRuntime = require('react/jsx-runtime');
5
7
  var React = require('react');
@@ -11,4 +13,4 @@ const BitcoinIcon = React.forwardRef((_a, ref) => {
11
13
  });
12
14
  BitcoinIcon.displayName = "BTC";
13
15
 
14
- module.exports = BitcoinIcon;
16
+ exports.default = BitcoinIcon;
@@ -1,5 +1,7 @@
1
1
  'use strict';
2
2
 
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
3
5
  var tslib_es6 = require('../node_modules/.pnpm/@rollup_plugin-typescript@12.1.4_rollup@4.46.2_tslib@2.8.1_typescript@5.9.3/node_modules/tslib/tslib.es6.js');
4
6
  var jsxRuntime = require('react/jsx-runtime');
5
7
  var React = require('react');
@@ -11,4 +13,4 @@ const ClerkIcon = React.forwardRef((_a, ref) => {
11
13
  });
12
14
  ClerkIcon.displayName = "Clerk";
13
15
 
14
- module.exports = ClerkIcon;
16
+ exports.default = ClerkIcon;
@@ -1,5 +1,7 @@
1
1
  'use strict';
2
2
 
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
3
5
  var tslib_es6 = require('../node_modules/.pnpm/@rollup_plugin-typescript@12.1.4_rollup@4.46.2_tslib@2.8.1_typescript@5.9.3/node_modules/tslib/tslib.es6.js');
4
6
  var jsxRuntime = require('react/jsx-runtime');
5
7
  var React = require('react');
@@ -11,4 +13,4 @@ const CSSIcon = React.forwardRef((_a, ref) => {
11
13
  });
12
14
  CSSIcon.displayName = "CSS";
13
15
 
14
- module.exports = CSSIcon;
16
+ exports.default = CSSIcon;
@@ -1,5 +1,7 @@
1
1
  'use strict';
2
2
 
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
3
5
  var tslib_es6 = require('../node_modules/.pnpm/@rollup_plugin-typescript@12.1.4_rollup@4.46.2_tslib@2.8.1_typescript@5.9.3/node_modules/tslib/tslib.es6.js');
4
6
  var jsxRuntime = require('react/jsx-runtime');
5
7
  var React = require('react');
@@ -11,4 +13,4 @@ const CSVIcon = React.forwardRef((_a, ref) => {
11
13
  });
12
14
  CSVIcon.displayName = "CSV";
13
15
 
14
- module.exports = CSVIcon;
16
+ exports.default = CSVIcon;
package/dist/assets/d8.js CHANGED
@@ -1,5 +1,7 @@
1
1
  'use strict';
2
2
 
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
3
5
  var tslib_es6 = require('../node_modules/.pnpm/@rollup_plugin-typescript@12.1.4_rollup@4.46.2_tslib@2.8.1_typescript@5.9.3/node_modules/tslib/tslib.es6.js');
4
6
  var jsxRuntime = require('react/jsx-runtime');
5
7
  var React = require('react');
@@ -11,4 +13,4 @@ const D8Icon = React.forwardRef((_a, ref) => {
11
13
  });
12
14
  D8Icon.displayName = "D8";
13
15
 
14
- module.exports = D8Icon;
16
+ exports.default = D8Icon;
@@ -1,5 +1,7 @@
1
1
  'use strict';
2
2
 
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
3
5
  var tslib_es6 = require('../node_modules/.pnpm/@rollup_plugin-typescript@12.1.4_rollup@4.46.2_tslib@2.8.1_typescript@5.9.3/node_modules/tslib/tslib.es6.js');
4
6
  var jsxRuntime = require('react/jsx-runtime');
5
7
  var React = require('react');
@@ -11,4 +13,4 @@ const DiffIcon = React.forwardRef((_a, ref) => {
11
13
  });
12
14
  DiffIcon.displayName = "Diff";
13
15
 
14
- module.exports = DiffIcon;
16
+ exports.default = DiffIcon;
@@ -1,5 +1,7 @@
1
1
  'use strict';
2
2
 
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
3
5
  var tslib_es6 = require('../node_modules/.pnpm/@rollup_plugin-typescript@12.1.4_rollup@4.46.2_tslib@2.8.1_typescript@5.9.3/node_modules/tslib/tslib.es6.js');
4
6
  var jsxRuntime = require('react/jsx-runtime');
5
7
  var React = require('react');
@@ -11,4 +13,4 @@ const DPAIcon = React.forwardRef((_a, ref) => {
11
13
  });
12
14
  DPAIcon.displayName = "DPA";
13
15
 
14
- module.exports = DPAIcon;
16
+ exports.default = DPAIcon;
@@ -1,5 +1,7 @@
1
1
  'use strict';
2
2
 
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
3
5
  var tslib_es6 = require('../node_modules/.pnpm/@rollup_plugin-typescript@12.1.4_rollup@4.46.2_tslib@2.8.1_typescript@5.9.3/node_modules/tslib/tslib.es6.js');
4
6
  var jsxRuntime = require('react/jsx-runtime');
5
7
  var React = require('react');
@@ -11,4 +13,4 @@ const FAQIcon = React.forwardRef((_a, ref) => {
11
13
  });
12
14
  FAQIcon.displayName = "FAQ";
13
15
 
14
- module.exports = FAQIcon;
16
+ exports.default = FAQIcon;
@@ -1,5 +1,7 @@
1
1
  'use strict';
2
2
 
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
3
5
  var tslib_es6 = require('../node_modules/.pnpm/@rollup_plugin-typescript@12.1.4_rollup@4.46.2_tslib@2.8.1_typescript@5.9.3/node_modules/tslib/tslib.es6.js');
4
6
  var jsxRuntime = require('react/jsx-runtime');
5
7
  var React = require('react');
@@ -11,4 +13,4 @@ const FAQBIcon = React.forwardRef((_a, ref) => {
11
13
  });
12
14
  FAQBIcon.displayName = "FAQB";
13
15
 
14
- module.exports = FAQBIcon;
16
+ exports.default = FAQBIcon;
@@ -1,5 +1,7 @@
1
1
  'use strict';
2
2
 
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
3
5
  var tslib_es6 = require('../node_modules/.pnpm/@rollup_plugin-typescript@12.1.4_rollup@4.46.2_tslib@2.8.1_typescript@5.9.3/node_modules/tslib/tslib.es6.js');
4
6
  var jsxRuntime = require('react/jsx-runtime');
5
7
  var React = require('react');
@@ -11,4 +13,4 @@ const FAQSIcon = React.forwardRef((_a, ref) => {
11
13
  });
12
14
  FAQSIcon.displayName = "FAQS";
13
15
 
14
- module.exports = FAQSIcon;
16
+ exports.default = FAQSIcon;
@@ -1,5 +1,7 @@
1
1
  'use strict';
2
2
 
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
3
5
  var tslib_es6 = require('../node_modules/.pnpm/@rollup_plugin-typescript@12.1.4_rollup@4.46.2_tslib@2.8.1_typescript@5.9.3/node_modules/tslib/tslib.es6.js');
4
6
  var jsxRuntime = require('react/jsx-runtime');
5
7
  var React = require('react');
@@ -11,4 +13,4 @@ const GitHubIcon = React.forwardRef((_a, ref) => {
11
13
  });
12
14
  GitHubIcon.displayName = "GitHub";
13
15
 
14
- module.exports = GitHubIcon;
16
+ exports.default = GitHubIcon;
@@ -1,5 +1,7 @@
1
1
  'use strict';
2
2
 
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
3
5
  var tslib_es6 = require('../node_modules/.pnpm/@rollup_plugin-typescript@12.1.4_rollup@4.46.2_tslib@2.8.1_typescript@5.9.3/node_modules/tslib/tslib.es6.js');
4
6
  var jsxRuntime = require('react/jsx-runtime');
5
7
  var React = require('react');
@@ -11,4 +13,4 @@ const HtmlIcon = React.forwardRef((_a, ref) => {
11
13
  });
12
14
  HtmlIcon.displayName = "Html";
13
15
 
14
- module.exports = HtmlIcon;
16
+ exports.default = HtmlIcon;
@@ -1,5 +1,7 @@
1
1
  'use strict';
2
2
 
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
3
5
  var tslib_es6 = require('../node_modules/.pnpm/@rollup_plugin-typescript@12.1.4_rollup@4.46.2_tslib@2.8.1_typescript@5.9.3/node_modules/tslib/tslib.es6.js');
4
6
  var jsxRuntime = require('react/jsx-runtime');
5
7
  var React = require('react');
@@ -11,4 +13,4 @@ const HttpIcon = React.forwardRef((_a, ref) => {
11
13
  });
12
14
  HttpIcon.displayName = "Http";
13
15
 
14
- module.exports = HttpIcon;
16
+ exports.default = HttpIcon;
@@ -35,37 +35,37 @@ var faqs = require('./faqs.js');
35
35
  // Import all built-in icon components
36
36
  // Built-in icon components mapped by display name - internal use only
37
37
  const BUILTIN_ICON_COMPONENTS = {
38
- GitHub: github,
39
- D8: d8,
40
- Clerk: clerk,
41
- Iterm: iterm,
42
- Markdown: markdown,
43
- MDX: mdx,
44
- Html: html,
45
- Json: json,
46
- XML: xml,
47
- Yaml: yaml,
48
- CSV: csv,
49
- Txt: txt,
50
- Java: java,
51
- SQL: sql,
52
- Log: log,
53
- MAC: mac,
54
- BTC: bitcoin,
55
- CSS: css,
56
- Mmd: mermaid,
57
- LastUpdated: lastUpdated,
58
- Snippets: snippets,
59
- Test: test,
60
- Diff: diff,
61
- DPA: dpa,
62
- SubP: subp,
63
- T3P: t3p,
64
- Http: http,
65
- Scheme: scheme,
66
- FAQ: faq,
67
- FAQB: faqb,
68
- FAQS: faqs,
38
+ GitHub: github.default,
39
+ D8: d8.default,
40
+ Clerk: clerk.default,
41
+ Iterm: iterm.default,
42
+ Markdown: markdown.default,
43
+ MDX: mdx.default,
44
+ Html: html.default,
45
+ Json: json.default,
46
+ XML: xml.default,
47
+ Yaml: yaml.default,
48
+ CSV: csv.default,
49
+ Txt: txt.default,
50
+ Java: java.default,
51
+ SQL: sql.default,
52
+ Log: log.default,
53
+ MAC: mac.default,
54
+ BTC: bitcoin.default,
55
+ CSS: css.default,
56
+ Mmd: mermaid.default,
57
+ LastUpdated: lastUpdated.default,
58
+ Snippets: snippets.default,
59
+ Test: test.default,
60
+ Diff: diff.default,
61
+ DPA: dpa.default,
62
+ SubP: subp.default,
63
+ T3P: t3p.default,
64
+ Http: http.default,
65
+ Scheme: scheme.default,
66
+ FAQ: faq.default,
67
+ FAQB: faqb.default,
68
+ FAQS: faqs.default,
69
69
  };
70
70
 
71
71
  exports.BUILTIN_ICON_COMPONENTS = BUILTIN_ICON_COMPONENTS;
@@ -1,5 +1,7 @@
1
1
  'use strict';
2
2
 
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
3
5
  var tslib_es6 = require('../node_modules/.pnpm/@rollup_plugin-typescript@12.1.4_rollup@4.46.2_tslib@2.8.1_typescript@5.9.3/node_modules/tslib/tslib.es6.js');
4
6
  var jsxRuntime = require('react/jsx-runtime');
5
7
  var React = require('react');
@@ -11,4 +13,4 @@ const ItermIcon = React.forwardRef((_a, ref) => {
11
13
  });
12
14
  ItermIcon.displayName = "Iterm";
13
15
 
14
- module.exports = ItermIcon;
16
+ exports.default = ItermIcon;
@@ -1,5 +1,7 @@
1
1
  'use strict';
2
2
 
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
3
5
  var tslib_es6 = require('../node_modules/.pnpm/@rollup_plugin-typescript@12.1.4_rollup@4.46.2_tslib@2.8.1_typescript@5.9.3/node_modules/tslib/tslib.es6.js');
4
6
  var jsxRuntime = require('react/jsx-runtime');
5
7
  var React = require('react');
@@ -11,4 +13,4 @@ const JavaIcon = React.forwardRef((_a, ref) => {
11
13
  });
12
14
  JavaIcon.displayName = "Java";
13
15
 
14
- module.exports = JavaIcon;
16
+ exports.default = JavaIcon;
@@ -1,5 +1,7 @@
1
1
  'use strict';
2
2
 
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
3
5
  var tslib_es6 = require('../node_modules/.pnpm/@rollup_plugin-typescript@12.1.4_rollup@4.46.2_tslib@2.8.1_typescript@5.9.3/node_modules/tslib/tslib.es6.js');
4
6
  var jsxRuntime = require('react/jsx-runtime');
5
7
  var React = require('react');
@@ -11,4 +13,4 @@ const JsonIcon = React.forwardRef((_a, ref) => {
11
13
  });
12
14
  JsonIcon.displayName = "Json";
13
15
 
14
- module.exports = JsonIcon;
16
+ exports.default = JsonIcon;
@@ -1,5 +1,7 @@
1
1
  'use strict';
2
2
 
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
3
5
  var tslib_es6 = require('../node_modules/.pnpm/@rollup_plugin-typescript@12.1.4_rollup@4.46.2_tslib@2.8.1_typescript@5.9.3/node_modules/tslib/tslib.es6.js');
4
6
  var jsxRuntime = require('react/jsx-runtime');
5
7
  var React = require('react');
@@ -11,4 +13,4 @@ const LastUpdatedIcon = React.forwardRef((_a, ref) => {
11
13
  });
12
14
  LastUpdatedIcon.displayName = "LastUpdated";
13
15
 
14
- module.exports = LastUpdatedIcon;
16
+ exports.default = LastUpdatedIcon;
@@ -1,5 +1,7 @@
1
1
  'use strict';
2
2
 
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
3
5
  var tslib_es6 = require('../node_modules/.pnpm/@rollup_plugin-typescript@12.1.4_rollup@4.46.2_tslib@2.8.1_typescript@5.9.3/node_modules/tslib/tslib.es6.js');
4
6
  var jsxRuntime = require('react/jsx-runtime');
5
7
  var React = require('react');
@@ -11,4 +13,4 @@ const LogIcon = React.forwardRef((_a, ref) => {
11
13
  });
12
14
  LogIcon.displayName = "Log";
13
15
 
14
- module.exports = LogIcon;
16
+ exports.default = LogIcon;
@@ -1,5 +1,7 @@
1
1
  'use strict';
2
2
 
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
3
5
  var tslib_es6 = require('../node_modules/.pnpm/@rollup_plugin-typescript@12.1.4_rollup@4.46.2_tslib@2.8.1_typescript@5.9.3/node_modules/tslib/tslib.es6.js');
4
6
  var jsxRuntime = require('react/jsx-runtime');
5
7
  var React = require('react');
@@ -11,4 +13,4 @@ const MACIcon = React.forwardRef((_a, ref) => {
11
13
  });
12
14
  MACIcon.displayName = "MAC";
13
15
 
14
- module.exports = MACIcon;
16
+ exports.default = MACIcon;
@@ -1,5 +1,7 @@
1
1
  'use strict';
2
2
 
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
3
5
  var tslib_es6 = require('../node_modules/.pnpm/@rollup_plugin-typescript@12.1.4_rollup@4.46.2_tslib@2.8.1_typescript@5.9.3/node_modules/tslib/tslib.es6.js');
4
6
  var jsxRuntime = require('react/jsx-runtime');
5
7
  var React = require('react');
@@ -11,4 +13,4 @@ const MarkdownIcon = React.forwardRef((_a, ref) => {
11
13
  });
12
14
  MarkdownIcon.displayName = "Markdown";
13
15
 
14
- module.exports = MarkdownIcon;
16
+ exports.default = MarkdownIcon;
@@ -1,5 +1,7 @@
1
1
  'use strict';
2
2
 
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
3
5
  var tslib_es6 = require('../node_modules/.pnpm/@rollup_plugin-typescript@12.1.4_rollup@4.46.2_tslib@2.8.1_typescript@5.9.3/node_modules/tslib/tslib.es6.js');
4
6
  var jsxRuntime = require('react/jsx-runtime');
5
7
  var React = require('react');
@@ -54,4 +56,4 @@ const MDXIcon = React.forwardRef((_a, ref) => {
54
56
  });
55
57
  MDXIcon.displayName = "MDX";
56
58
 
57
- module.exports = MDXIcon;
59
+ exports.default = MDXIcon;
@@ -1,5 +1,7 @@
1
1
  'use strict';
2
2
 
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
3
5
  var tslib_es6 = require('../node_modules/.pnpm/@rollup_plugin-typescript@12.1.4_rollup@4.46.2_tslib@2.8.1_typescript@5.9.3/node_modules/tslib/tslib.es6.js');
4
6
  var jsxRuntime = require('react/jsx-runtime');
5
7
  var React = require('react');
@@ -13,4 +15,4 @@ const MermaidIcon = React.forwardRef(
13
15
  });
14
16
  MermaidIcon.displayName = "Mmd";
15
17
 
16
- module.exports = MermaidIcon;
18
+ exports.default = MermaidIcon;
@@ -1,5 +1,7 @@
1
1
  'use strict';
2
2
 
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
3
5
  var tslib_es6 = require('../node_modules/.pnpm/@rollup_plugin-typescript@12.1.4_rollup@4.46.2_tslib@2.8.1_typescript@5.9.3/node_modules/tslib/tslib.es6.js');
4
6
  var jsxRuntime = require('react/jsx-runtime');
5
7
  var React = require('react');
@@ -11,4 +13,4 @@ const SchemeIcon = React.forwardRef((_a, ref) => {
11
13
  });
12
14
  SchemeIcon.displayName = "Scheme";
13
15
 
14
- module.exports = SchemeIcon;
16
+ exports.default = SchemeIcon;
@@ -1,5 +1,7 @@
1
1
  'use strict';
2
2
 
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
3
5
  var tslib_es6 = require('../node_modules/.pnpm/@rollup_plugin-typescript@12.1.4_rollup@4.46.2_tslib@2.8.1_typescript@5.9.3/node_modules/tslib/tslib.es6.js');
4
6
  var jsxRuntime = require('react/jsx-runtime');
5
7
  var React = require('react');
@@ -11,4 +13,4 @@ const SnippetsIcon = React.forwardRef((_a, ref) => {
11
13
  });
12
14
  SnippetsIcon.displayName = "Snippets";
13
15
 
14
- module.exports = SnippetsIcon;
16
+ exports.default = SnippetsIcon;
@@ -1,5 +1,7 @@
1
1
  'use strict';
2
2
 
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
3
5
  var tslib_es6 = require('../node_modules/.pnpm/@rollup_plugin-typescript@12.1.4_rollup@4.46.2_tslib@2.8.1_typescript@5.9.3/node_modules/tslib/tslib.es6.js');
4
6
  var jsxRuntime = require('react/jsx-runtime');
5
7
  var React = require('react');
@@ -11,4 +13,4 @@ const SQLIcon = React.forwardRef((_a, ref) => {
11
13
  });
12
14
  SQLIcon.displayName = "SQL";
13
15
 
14
- module.exports = SQLIcon;
16
+ exports.default = SQLIcon;
@@ -1,5 +1,7 @@
1
1
  'use strict';
2
2
 
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
3
5
  var tslib_es6 = require('../node_modules/.pnpm/@rollup_plugin-typescript@12.1.4_rollup@4.46.2_tslib@2.8.1_typescript@5.9.3/node_modules/tslib/tslib.es6.js');
4
6
  var jsxRuntime = require('react/jsx-runtime');
5
7
  var React = require('react');
@@ -11,4 +13,4 @@ const SubPIcon = React.forwardRef((_a, ref) => {
11
13
  });
12
14
  SubPIcon.displayName = "SubP";
13
15
 
14
- module.exports = SubPIcon;
16
+ exports.default = SubPIcon;
@@ -1,5 +1,7 @@
1
1
  'use strict';
2
2
 
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
3
5
  var tslib_es6 = require('../node_modules/.pnpm/@rollup_plugin-typescript@12.1.4_rollup@4.46.2_tslib@2.8.1_typescript@5.9.3/node_modules/tslib/tslib.es6.js');
4
6
  var jsxRuntime = require('react/jsx-runtime');
5
7
  var React = require('react');
@@ -11,4 +13,4 @@ const T3PIcon = React.forwardRef((_a, ref) => {
11
13
  });
12
14
  T3PIcon.displayName = "T3P";
13
15
 
14
- module.exports = T3PIcon;
16
+ exports.default = T3PIcon;
@@ -1,5 +1,7 @@
1
1
  'use strict';
2
2
 
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
3
5
  var tslib_es6 = require('../node_modules/.pnpm/@rollup_plugin-typescript@12.1.4_rollup@4.46.2_tslib@2.8.1_typescript@5.9.3/node_modules/tslib/tslib.es6.js');
4
6
  var jsxRuntime = require('react/jsx-runtime');
5
7
  var React = require('react');
@@ -11,4 +13,4 @@ const TestIcon = React.forwardRef((_a, ref) => {
11
13
  });
12
14
  TestIcon.displayName = "Test";
13
15
 
14
- module.exports = TestIcon;
16
+ exports.default = TestIcon;
@@ -1,5 +1,7 @@
1
1
  'use strict';
2
2
 
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
3
5
  var tslib_es6 = require('../node_modules/.pnpm/@rollup_plugin-typescript@12.1.4_rollup@4.46.2_tslib@2.8.1_typescript@5.9.3/node_modules/tslib/tslib.es6.js');
4
6
  var jsxRuntime = require('react/jsx-runtime');
5
7
  var React = require('react');
@@ -11,4 +13,4 @@ const TxtIcon = React.forwardRef((_a, ref) => {
11
13
  });
12
14
  TxtIcon.displayName = "Txt";
13
15
 
14
- module.exports = TxtIcon;
16
+ exports.default = TxtIcon;
@@ -1,5 +1,7 @@
1
1
  'use strict';
2
2
 
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
3
5
  var tslib_es6 = require('../node_modules/.pnpm/@rollup_plugin-typescript@12.1.4_rollup@4.46.2_tslib@2.8.1_typescript@5.9.3/node_modules/tslib/tslib.es6.js');
4
6
  var jsxRuntime = require('react/jsx-runtime');
5
7
  var React = require('react');
@@ -11,4 +13,4 @@ const XMLIcon = React.forwardRef((_a, ref) => {
11
13
  });
12
14
  XMLIcon.displayName = "XML";
13
15
 
14
- module.exports = XMLIcon;
16
+ exports.default = XMLIcon;
@@ -1,5 +1,7 @@
1
1
  'use strict';
2
2
 
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
3
5
  var tslib_es6 = require('../node_modules/.pnpm/@rollup_plugin-typescript@12.1.4_rollup@4.46.2_tslib@2.8.1_typescript@5.9.3/node_modules/tslib/tslib.es6.js');
4
6
  var jsxRuntime = require('react/jsx-runtime');
5
7
  var React = require('react');
@@ -11,4 +13,4 @@ const YamlIcon = React.forwardRef((_a, ref) => {
11
13
  });
12
14
  YamlIcon.displayName = "Yaml";
13
15
 
14
- module.exports = YamlIcon;
16
+ exports.default = YamlIcon;
@@ -0,0 +1 @@
1
+ export * from './theme-util';
@@ -0,0 +1,22 @@
1
+ 'use strict';
2
+
3
+ var themeUtil = require('./theme-util.js');
4
+
5
+
6
+
7
+ exports.THEME_BUTTON_GRADIENT_CLASS_MAP = themeUtil.THEME_BUTTON_GRADIENT_CLASS_MAP;
8
+ exports.THEME_BUTTON_GRADIENT_HOVER_CLASS_MAP = themeUtil.THEME_BUTTON_GRADIENT_HOVER_CLASS_MAP;
9
+ exports.THEME_COLOR_HEX_MAP = themeUtil.THEME_COLOR_HEX_MAP;
10
+ exports.THEME_COLOR_NAME_TO_CLASS_MAP = themeUtil.THEME_COLOR_NAME_TO_CLASS_MAP;
11
+ exports.THEME_HERO_EYES_ON_CLASS_MAP = themeUtil.THEME_HERO_EYES_ON_CLASS_MAP;
12
+ exports.THEME_RICH_TEXT_MARK_CLASS_MAP = themeUtil.THEME_RICH_TEXT_MARK_CLASS_MAP;
13
+ exports.__SUPPORTED_THEME_COLORS = themeUtil.__SUPPORTED_THEME_COLORS;
14
+ exports.themeButtonGradientClass = themeUtil.themeButtonGradientClass;
15
+ exports.themeButtonGradientHoverClass = themeUtil.themeButtonGradientHoverClass;
16
+ exports.themeHeroEyesOnClass = themeUtil.themeHeroEyesOnClass;
17
+ exports.themeIconColor = themeUtil.themeIconColor;
18
+ exports.themeRichTextMarkClass = themeUtil.themeRichTextMarkClass;
19
+ exports.themeSvgIconColor = themeUtil.themeSvgIconColor;
20
+ exports.themeSvgIconSize = themeUtil.themeSvgIconSize;
21
+ exports.validateThemeColor = themeUtil.validateThemeColor;
22
+ exports.validateThemeName = themeUtil.validateThemeName;
@@ -0,0 +1 @@
1
+ export { THEME_BUTTON_GRADIENT_CLASS_MAP, THEME_BUTTON_GRADIENT_HOVER_CLASS_MAP, THEME_COLOR_HEX_MAP, THEME_COLOR_NAME_TO_CLASS_MAP, THEME_HERO_EYES_ON_CLASS_MAP, THEME_RICH_TEXT_MARK_CLASS_MAP, __SUPPORTED_THEME_COLORS, themeButtonGradientClass, themeButtonGradientHoverClass, themeHeroEyesOnClass, themeIconColor, themeRichTextMarkClass, themeSvgIconColor, themeSvgIconSize, validateThemeColor, validateThemeName } from './theme-util.mjs';
@@ -1,3 +1,68 @@
1
- export declare const themeIconColor: string;
2
- export declare const themeSvgIconColor: string;
1
+ /**
2
+ * Theme style utility (TypeScript)
3
+ * Maintainer: xxx
4
+ * Note:
5
+ * 1. Static color classes for Tailwind CSS 4.x scanning
6
+ * 2. Single config: NEXT_PUBLIC_STYLE_ICON_COLOR (Tailwind class only)
7
+ * 3. Premium/elegant color system (uppercase hex values)
8
+ */
9
+ export type SupportedThemeColor = keyof typeof THEME_COLOR_HEX_MAP;
10
+ export type SupportedThemeName = keyof typeof THEME_COLOR_NAME_TO_CLASS_MAP;
11
+ export declare const __SUPPORTED_THEME_COLORS: Readonly<{
12
+ readonly "text-purple-500": "典雅紫·清";
13
+ readonly "text-orange-500": "轻奢橙·暖";
14
+ readonly "text-indigo-500": "沉稳蓝·冷";
15
+ readonly "text-emerald-500": "温润绿·愈";
16
+ readonly "text-rose-500": "玫瑰红·柔";
17
+ }>;
18
+ export declare const THEME_COLOR_HEX_MAP: Readonly<{
19
+ readonly "text-purple-500": "#AC62FD";
20
+ readonly "text-orange-500": "#F97316";
21
+ readonly "text-indigo-500": "#6366F1";
22
+ readonly "text-emerald-500": "#10B981";
23
+ readonly "text-rose-500": "#F43F5E";
24
+ }>;
25
+ export declare const THEME_COLOR_NAME_TO_CLASS_MAP: Readonly<{
26
+ readonly purple: "text-purple-500";
27
+ readonly orange: "text-orange-500";
28
+ readonly indigo: "text-indigo-500";
29
+ readonly emerald: "text-emerald-500";
30
+ readonly rose: "text-rose-500";
31
+ }>;
32
+ export declare const validateThemeColor: (colorClass: string) => colorClass is SupportedThemeColor;
33
+ export declare const validateThemeName: (colorName: string) => colorName is SupportedThemeName;
34
+ export declare const themeIconColor: SupportedThemeColor;
35
+ export declare const themeSvgIconColor: "#AC62FD" | "#F97316" | "#6366F1" | "#10B981" | "#F43F5E";
3
36
  export declare const themeSvgIconSize: string | number;
37
+ export declare const THEME_BUTTON_GRADIENT_CLASS_MAP: Readonly<{
38
+ readonly "text-purple-500": "bg-linear-to-r from-purple-400 to-pink-500 dark:from-purple-500 dark:to-pink-600";
39
+ readonly "text-orange-500": "bg-linear-to-r from-orange-500 to-orange-600 dark:from-orange-500 dark:to-orange-700";
40
+ readonly "text-indigo-500": "bg-linear-to-r from-indigo-400 to-blue-500 dark:from-indigo-500 dark:to-blue-600";
41
+ readonly "text-emerald-500": "bg-linear-to-r from-emerald-400 to-teal-500 dark:from-emerald-500 dark:to-teal-600";
42
+ readonly "text-rose-500": "bg-linear-to-r from-rose-400 to-pink-500 dark:from-rose-500 dark:to-pink-600";
43
+ }>;
44
+ export declare const THEME_BUTTON_GRADIENT_HOVER_CLASS_MAP: Readonly<{
45
+ readonly "text-purple-500": "hover:from-purple-500 hover:to-pink-600 dark:hover:from-purple-600 dark:hover:to-pink-700";
46
+ readonly "text-orange-500": "hover:from-orange-500 hover:to-amber-600 dark:hover:from-orange-600 dark:hover:to-amber-700";
47
+ readonly "text-indigo-500": "hover:from-indigo-500 hover:to-blue-600 dark:hover:from-indigo-600 dark:hover:to-blue-700";
48
+ readonly "text-emerald-500": "hover:from-emerald-500 hover:to-teal-600 dark:hover:from-emerald-600 dark:hover:to-teal-700";
49
+ readonly "text-rose-500": "hover:from-rose-500 hover:to-pink-600 dark:hover:from-rose-600 dark:hover:to-pink-700";
50
+ }>;
51
+ export declare const themeButtonGradientClass: "bg-linear-to-r from-purple-400 to-pink-500 dark:from-purple-500 dark:to-pink-600" | "bg-linear-to-r from-orange-500 to-orange-600 dark:from-orange-500 dark:to-orange-700" | "bg-linear-to-r from-indigo-400 to-blue-500 dark:from-indigo-500 dark:to-blue-600" | "bg-linear-to-r from-emerald-400 to-teal-500 dark:from-emerald-500 dark:to-teal-600" | "bg-linear-to-r from-rose-400 to-pink-500 dark:from-rose-500 dark:to-pink-600";
52
+ export declare const themeButtonGradientHoverClass: "hover:from-purple-500 hover:to-pink-600 dark:hover:from-purple-600 dark:hover:to-pink-700" | "hover:from-orange-500 hover:to-amber-600 dark:hover:from-orange-600 dark:hover:to-amber-700" | "hover:from-indigo-500 hover:to-blue-600 dark:hover:from-indigo-600 dark:hover:to-blue-700" | "hover:from-emerald-500 hover:to-teal-600 dark:hover:from-emerald-600 dark:hover:to-teal-700" | "hover:from-rose-500 hover:to-pink-600 dark:hover:from-rose-600 dark:hover:to-pink-700";
53
+ export declare const THEME_HERO_EYES_ON_CLASS_MAP: Readonly<{
54
+ readonly "text-purple-500": "bg-linear-to-r from-purple-400 to-pink-600";
55
+ readonly "text-orange-500": "bg-linear-to-r from-orange-500 to-red-500";
56
+ readonly "text-indigo-500": "bg-linear-to-r from-indigo-400 to-blue-600";
57
+ readonly "text-emerald-500": "bg-linear-to-r from-emerald-400 to-teal-600";
58
+ readonly "text-rose-500": "bg-linear-to-r from-rose-400 to-pink-600";
59
+ }>;
60
+ export declare const themeHeroEyesOnClass: "bg-linear-to-r from-purple-400 to-pink-600" | "bg-linear-to-r from-orange-500 to-red-500" | "bg-linear-to-r from-indigo-400 to-blue-600" | "bg-linear-to-r from-emerald-400 to-teal-600" | "bg-linear-to-r from-rose-400 to-pink-600";
61
+ export declare const THEME_RICH_TEXT_MARK_CLASS_MAP: Readonly<{
62
+ readonly "text-purple-500": "bg-purple-300 dark:bg-purple-600";
63
+ readonly "text-orange-500": "bg-orange-300 dark:bg-orange-600";
64
+ readonly "text-indigo-500": "bg-indigo-300 dark:bg-indigo-600";
65
+ readonly "text-emerald-500": "bg-emerald-300 dark:bg-emerald-600";
66
+ readonly "text-rose-500": "bg-rose-300 dark:bg-rose-600";
67
+ }>;
68
+ export declare const themeRichTextMarkClass: "bg-purple-300 dark:bg-purple-600" | "bg-orange-300 dark:bg-orange-600" | "bg-indigo-300 dark:bg-indigo-600" | "bg-emerald-300 dark:bg-emerald-600" | "bg-rose-300 dark:bg-rose-600";
@@ -1,11 +1,117 @@
1
1
  'use strict';
2
2
 
3
- // Attention: This icon color will be used in the entire project, and it depends on the ENV variable NEXT_PUBLIC_STYLE_ICON_COLOR
4
- const themeIconColor = process.env.NEXT_PUBLIC_STYLE_ICON_COLOR || "text-purple-500";
5
- // Attention: This icon color will be used in the entire project, and it depends on the ENV variable NEXT_PUBLIC_STYLE_SVG_ICON_COLOR
6
- const themeSvgIconColor = process.env.NEXT_PUBLIC_STYLE_SVG_ICON_COLOR || "#AC62FD";
3
+ /**
4
+ * Theme style utility (TypeScript)
5
+ * Maintainer: xxx
6
+ * Note:
7
+ * 1. Static color classes for Tailwind CSS 4.x scanning
8
+ * 2. Single config: NEXT_PUBLIC_STYLE_ICON_COLOR (Tailwind class only)
9
+ * 3. Premium/elegant color system (uppercase hex values)
10
+ */
11
+ // Supported theme color classes (static for Tailwind scan)
12
+ const __SUPPORTED_THEME_COLORS = Object.freeze({
13
+ "text-purple-500": "典雅紫·清",
14
+ "text-orange-500": "轻奢橙·暖",
15
+ "text-indigo-500": "沉稳蓝·冷",
16
+ "text-emerald-500": "温润绿·愈",
17
+ "text-rose-500": "玫瑰红·柔"
18
+ });
19
+ // Hex color map (uppercase, match Tailwind classes)
20
+ const THEME_COLOR_HEX_MAP = Object.freeze({
21
+ "text-purple-500": "#AC62FD",
22
+ "text-orange-500": "#F97316",
23
+ "text-indigo-500": "#6366F1",
24
+ "text-emerald-500": "#10B981",
25
+ "text-rose-500": "#F43F5E",
26
+ });
27
+ // Short theme names for env configuration
28
+ const THEME_COLOR_NAME_TO_CLASS_MAP = Object.freeze({
29
+ purple: "text-purple-500",
30
+ orange: "text-orange-500",
31
+ indigo: "text-indigo-500",
32
+ emerald: "text-emerald-500",
33
+ rose: "text-rose-500",
34
+ });
35
+ // Validate theme color class (type guard)
36
+ const validateThemeColor = (colorClass) => {
37
+ return Object.prototype.hasOwnProperty.call(THEME_COLOR_HEX_MAP, colorClass);
38
+ };
39
+ const validateThemeName = (colorName) => {
40
+ return Object.prototype.hasOwnProperty.call(THEME_COLOR_NAME_TO_CLASS_MAP, colorName);
41
+ };
42
+ // Theme icon text color (type-safe, global)
43
+ const themeIconColor = (() => {
44
+ const envColorRaw = process.env.NEXT_PUBLIC_STYLE_ICON_COLOR;
45
+ const envColor = envColorRaw === null || envColorRaw === void 0 ? void 0 : envColorRaw.trim().toLowerCase();
46
+ if (envColor) {
47
+ if (validateThemeName(envColor)) {
48
+ return THEME_COLOR_NAME_TO_CLASS_MAP[envColor];
49
+ }
50
+ // backward compatible: allow old full tailwind class value
51
+ if (validateThemeColor(envColor)) {
52
+ return envColor;
53
+ }
54
+ }
55
+ console.warn(`[ThemeUtil] Invalid NEXT_PUBLIC_STYLE_ICON_COLOR: ${envColorRaw}. Fallback to text-purple-500.
56
+ Supported names: ${Object.keys(THEME_COLOR_NAME_TO_CLASS_MAP).join(", ")}
57
+ Supported classes(legacy): ${Object.keys(THEME_COLOR_HEX_MAP).join(", ")}`);
58
+ return "text-purple-500";
59
+ })();
60
+ // SVG icon color (auto-derived, type-safe - NO any type)
61
+ const themeSvgIconColor = THEME_COLOR_HEX_MAP[themeIconColor];
62
+ // SVG icon size (global)
7
63
  const themeSvgIconSize = process.env.NEXT_PUBLIC_STYLE_SVG_ICON_SIZE || 18;
64
+ // Theme button gradient classes (static for Tailwind scan)
65
+ const THEME_BUTTON_GRADIENT_CLASS_MAP = Object.freeze({
66
+ "text-purple-500": "bg-linear-to-r from-purple-400 to-pink-500 dark:from-purple-500 dark:to-pink-600",
67
+ "text-orange-500": "bg-linear-to-r from-orange-500 to-orange-600 dark:from-orange-500 dark:to-orange-700",
68
+ "text-indigo-500": "bg-linear-to-r from-indigo-400 to-blue-500 dark:from-indigo-500 dark:to-blue-600",
69
+ "text-emerald-500": "bg-linear-to-r from-emerald-400 to-teal-500 dark:from-emerald-500 dark:to-teal-600",
70
+ "text-rose-500": "bg-linear-to-r from-rose-400 to-pink-500 dark:from-rose-500 dark:to-pink-600",
71
+ });
72
+ // Theme button hover gradient classes (static for Tailwind scan)
73
+ const THEME_BUTTON_GRADIENT_HOVER_CLASS_MAP = Object.freeze({
74
+ "text-purple-500": "hover:from-purple-500 hover:to-pink-600 dark:hover:from-purple-600 dark:hover:to-pink-700",
75
+ "text-orange-500": "hover:from-orange-500 hover:to-amber-600 dark:hover:from-orange-600 dark:hover:to-amber-700",
76
+ "text-indigo-500": "hover:from-indigo-500 hover:to-blue-600 dark:hover:from-indigo-600 dark:hover:to-blue-700",
77
+ "text-emerald-500": "hover:from-emerald-500 hover:to-teal-600 dark:hover:from-emerald-600 dark:hover:to-teal-700",
78
+ "text-rose-500": "hover:from-rose-500 hover:to-pink-600 dark:hover:from-rose-600 dark:hover:to-pink-700",
79
+ });
80
+ // Global button gradient classes (type-safe, follows themeIconColor)
81
+ const themeButtonGradientClass = THEME_BUTTON_GRADIENT_CLASS_MAP[themeIconColor];
82
+ const themeButtonGradientHoverClass = THEME_BUTTON_GRADIENT_HOVER_CLASS_MAP[themeIconColor];
83
+ // Theme hero text gradient classes (for bg-clip-text headlines)
84
+ const THEME_HERO_EYES_ON_CLASS_MAP = Object.freeze({
85
+ "text-purple-500": "bg-linear-to-r from-purple-400 to-pink-600",
86
+ "text-orange-500": "bg-linear-to-r from-orange-500 to-red-500",
87
+ "text-indigo-500": "bg-linear-to-r from-indigo-400 to-blue-600",
88
+ "text-emerald-500": "bg-linear-to-r from-emerald-400 to-teal-600",
89
+ "text-rose-500": "bg-linear-to-r from-rose-400 to-pink-600",
90
+ });
91
+ const themeHeroEyesOnClass = THEME_HERO_EYES_ON_CLASS_MAP[themeIconColor];
92
+ // Theme rich-text <mark> highlight background classes (darker emphasis, readable)
93
+ const THEME_RICH_TEXT_MARK_CLASS_MAP = Object.freeze({
94
+ "text-purple-500": "bg-purple-300 dark:bg-purple-600",
95
+ "text-orange-500": "bg-orange-300 dark:bg-orange-600",
96
+ "text-indigo-500": "bg-indigo-300 dark:bg-indigo-600",
97
+ "text-emerald-500": "bg-emerald-300 dark:bg-emerald-600",
98
+ "text-rose-500": "bg-rose-300 dark:bg-rose-600",
99
+ });
100
+ const themeRichTextMarkClass = THEME_RICH_TEXT_MARK_CLASS_MAP[themeIconColor];
8
101
 
102
+ exports.THEME_BUTTON_GRADIENT_CLASS_MAP = THEME_BUTTON_GRADIENT_CLASS_MAP;
103
+ exports.THEME_BUTTON_GRADIENT_HOVER_CLASS_MAP = THEME_BUTTON_GRADIENT_HOVER_CLASS_MAP;
104
+ exports.THEME_COLOR_HEX_MAP = THEME_COLOR_HEX_MAP;
105
+ exports.THEME_COLOR_NAME_TO_CLASS_MAP = THEME_COLOR_NAME_TO_CLASS_MAP;
106
+ exports.THEME_HERO_EYES_ON_CLASS_MAP = THEME_HERO_EYES_ON_CLASS_MAP;
107
+ exports.THEME_RICH_TEXT_MARK_CLASS_MAP = THEME_RICH_TEXT_MARK_CLASS_MAP;
108
+ exports.__SUPPORTED_THEME_COLORS = __SUPPORTED_THEME_COLORS;
109
+ exports.themeButtonGradientClass = themeButtonGradientClass;
110
+ exports.themeButtonGradientHoverClass = themeButtonGradientHoverClass;
111
+ exports.themeHeroEyesOnClass = themeHeroEyesOnClass;
9
112
  exports.themeIconColor = themeIconColor;
113
+ exports.themeRichTextMarkClass = themeRichTextMarkClass;
10
114
  exports.themeSvgIconColor = themeSvgIconColor;
11
115
  exports.themeSvgIconSize = themeSvgIconSize;
116
+ exports.validateThemeColor = validateThemeColor;
117
+ exports.validateThemeName = validateThemeName;
@@ -1,7 +1,100 @@
1
- // Attention: This icon color will be used in the entire project, and it depends on the ENV variable NEXT_PUBLIC_STYLE_ICON_COLOR
2
- const themeIconColor = process.env.NEXT_PUBLIC_STYLE_ICON_COLOR || "text-purple-500";
3
- // Attention: This icon color will be used in the entire project, and it depends on the ENV variable NEXT_PUBLIC_STYLE_SVG_ICON_COLOR
4
- const themeSvgIconColor = process.env.NEXT_PUBLIC_STYLE_SVG_ICON_COLOR || "#AC62FD";
1
+ /**
2
+ * Theme style utility (TypeScript)
3
+ * Maintainer: xxx
4
+ * Note:
5
+ * 1. Static color classes for Tailwind CSS 4.x scanning
6
+ * 2. Single config: NEXT_PUBLIC_STYLE_ICON_COLOR (Tailwind class only)
7
+ * 3. Premium/elegant color system (uppercase hex values)
8
+ */
9
+ // Supported theme color classes (static for Tailwind scan)
10
+ const __SUPPORTED_THEME_COLORS = Object.freeze({
11
+ "text-purple-500": "典雅紫·清",
12
+ "text-orange-500": "轻奢橙·暖",
13
+ "text-indigo-500": "沉稳蓝·冷",
14
+ "text-emerald-500": "温润绿·愈",
15
+ "text-rose-500": "玫瑰红·柔"
16
+ });
17
+ // Hex color map (uppercase, match Tailwind classes)
18
+ const THEME_COLOR_HEX_MAP = Object.freeze({
19
+ "text-purple-500": "#AC62FD",
20
+ "text-orange-500": "#F97316",
21
+ "text-indigo-500": "#6366F1",
22
+ "text-emerald-500": "#10B981",
23
+ "text-rose-500": "#F43F5E",
24
+ });
25
+ // Short theme names for env configuration
26
+ const THEME_COLOR_NAME_TO_CLASS_MAP = Object.freeze({
27
+ purple: "text-purple-500",
28
+ orange: "text-orange-500",
29
+ indigo: "text-indigo-500",
30
+ emerald: "text-emerald-500",
31
+ rose: "text-rose-500",
32
+ });
33
+ // Validate theme color class (type guard)
34
+ const validateThemeColor = (colorClass) => {
35
+ return Object.prototype.hasOwnProperty.call(THEME_COLOR_HEX_MAP, colorClass);
36
+ };
37
+ const validateThemeName = (colorName) => {
38
+ return Object.prototype.hasOwnProperty.call(THEME_COLOR_NAME_TO_CLASS_MAP, colorName);
39
+ };
40
+ // Theme icon text color (type-safe, global)
41
+ const themeIconColor = (() => {
42
+ const envColorRaw = process.env.NEXT_PUBLIC_STYLE_ICON_COLOR;
43
+ const envColor = envColorRaw === null || envColorRaw === void 0 ? void 0 : envColorRaw.trim().toLowerCase();
44
+ if (envColor) {
45
+ if (validateThemeName(envColor)) {
46
+ return THEME_COLOR_NAME_TO_CLASS_MAP[envColor];
47
+ }
48
+ // backward compatible: allow old full tailwind class value
49
+ if (validateThemeColor(envColor)) {
50
+ return envColor;
51
+ }
52
+ }
53
+ console.warn(`[ThemeUtil] Invalid NEXT_PUBLIC_STYLE_ICON_COLOR: ${envColorRaw}. Fallback to text-purple-500.
54
+ Supported names: ${Object.keys(THEME_COLOR_NAME_TO_CLASS_MAP).join(", ")}
55
+ Supported classes(legacy): ${Object.keys(THEME_COLOR_HEX_MAP).join(", ")}`);
56
+ return "text-purple-500";
57
+ })();
58
+ // SVG icon color (auto-derived, type-safe - NO any type)
59
+ const themeSvgIconColor = THEME_COLOR_HEX_MAP[themeIconColor];
60
+ // SVG icon size (global)
5
61
  const themeSvgIconSize = process.env.NEXT_PUBLIC_STYLE_SVG_ICON_SIZE || 18;
62
+ // Theme button gradient classes (static for Tailwind scan)
63
+ const THEME_BUTTON_GRADIENT_CLASS_MAP = Object.freeze({
64
+ "text-purple-500": "bg-linear-to-r from-purple-400 to-pink-500 dark:from-purple-500 dark:to-pink-600",
65
+ "text-orange-500": "bg-linear-to-r from-orange-500 to-orange-600 dark:from-orange-500 dark:to-orange-700",
66
+ "text-indigo-500": "bg-linear-to-r from-indigo-400 to-blue-500 dark:from-indigo-500 dark:to-blue-600",
67
+ "text-emerald-500": "bg-linear-to-r from-emerald-400 to-teal-500 dark:from-emerald-500 dark:to-teal-600",
68
+ "text-rose-500": "bg-linear-to-r from-rose-400 to-pink-500 dark:from-rose-500 dark:to-pink-600",
69
+ });
70
+ // Theme button hover gradient classes (static for Tailwind scan)
71
+ const THEME_BUTTON_GRADIENT_HOVER_CLASS_MAP = Object.freeze({
72
+ "text-purple-500": "hover:from-purple-500 hover:to-pink-600 dark:hover:from-purple-600 dark:hover:to-pink-700",
73
+ "text-orange-500": "hover:from-orange-500 hover:to-amber-600 dark:hover:from-orange-600 dark:hover:to-amber-700",
74
+ "text-indigo-500": "hover:from-indigo-500 hover:to-blue-600 dark:hover:from-indigo-600 dark:hover:to-blue-700",
75
+ "text-emerald-500": "hover:from-emerald-500 hover:to-teal-600 dark:hover:from-emerald-600 dark:hover:to-teal-700",
76
+ "text-rose-500": "hover:from-rose-500 hover:to-pink-600 dark:hover:from-rose-600 dark:hover:to-pink-700",
77
+ });
78
+ // Global button gradient classes (type-safe, follows themeIconColor)
79
+ const themeButtonGradientClass = THEME_BUTTON_GRADIENT_CLASS_MAP[themeIconColor];
80
+ const themeButtonGradientHoverClass = THEME_BUTTON_GRADIENT_HOVER_CLASS_MAP[themeIconColor];
81
+ // Theme hero text gradient classes (for bg-clip-text headlines)
82
+ const THEME_HERO_EYES_ON_CLASS_MAP = Object.freeze({
83
+ "text-purple-500": "bg-linear-to-r from-purple-400 to-pink-600",
84
+ "text-orange-500": "bg-linear-to-r from-orange-500 to-red-500",
85
+ "text-indigo-500": "bg-linear-to-r from-indigo-400 to-blue-600",
86
+ "text-emerald-500": "bg-linear-to-r from-emerald-400 to-teal-600",
87
+ "text-rose-500": "bg-linear-to-r from-rose-400 to-pink-600",
88
+ });
89
+ const themeHeroEyesOnClass = THEME_HERO_EYES_ON_CLASS_MAP[themeIconColor];
90
+ // Theme rich-text <mark> highlight background classes (darker emphasis, readable)
91
+ const THEME_RICH_TEXT_MARK_CLASS_MAP = Object.freeze({
92
+ "text-purple-500": "bg-purple-300 dark:bg-purple-600",
93
+ "text-orange-500": "bg-orange-300 dark:bg-orange-600",
94
+ "text-indigo-500": "bg-indigo-300 dark:bg-indigo-600",
95
+ "text-emerald-500": "bg-emerald-300 dark:bg-emerald-600",
96
+ "text-rose-500": "bg-rose-300 dark:bg-rose-600",
97
+ });
98
+ const themeRichTextMarkClass = THEME_RICH_TEXT_MARK_CLASS_MAP[themeIconColor];
6
99
 
7
- export { themeIconColor, themeSvgIconColor, themeSvgIconSize };
100
+ export { THEME_BUTTON_GRADIENT_CLASS_MAP, THEME_BUTTON_GRADIENT_HOVER_CLASS_MAP, THEME_COLOR_HEX_MAP, THEME_COLOR_NAME_TO_CLASS_MAP, THEME_HERO_EYES_ON_CLASS_MAP, THEME_RICH_TEXT_MARK_CLASS_MAP, __SUPPORTED_THEME_COLORS, themeButtonGradientClass, themeButtonGradientHoverClass, themeHeroEyesOnClass, themeIconColor, themeRichTextMarkClass, themeSvgIconColor, themeSvgIconSize, validateThemeColor, validateThemeName };
@@ -10,7 +10,6 @@ var utils = require('@windrun-huaiin/lib/utils');
10
10
  function CopyableText({ text, children, }) {
11
11
  const [copied, setCopied] = React.useState(false);
12
12
  const handleCopy = (e) => tslib_es6.__awaiter(this, void 0, void 0, function* () {
13
- // 关键!阻止 button 默认行为,才能让移动端长按生效
14
13
  e.preventDefault();
15
14
  if (!navigator.clipboard)
16
15
  return;
@@ -20,18 +19,14 @@ function CopyableText({ text, children, }) {
20
19
  setTimeout(() => setCopied(false), 2000);
21
20
  }
22
21
  catch (_a) {
23
- // 静默失败
22
+ // do nothing, just silence fail
24
23
  }
25
24
  });
26
25
  if (!text)
27
26
  return jsxRuntime.jsx("span", { className: "text-slate-400", children: "--" });
28
27
  return (
29
- // 改成 div + onMouseDown + preventDefault
30
- // 这样既能点又能长按,还能用 hover 高亮
31
- jsxRuntime.jsxs("div", { onMouseDown: handleCopy,
32
- // 关键两行:允许文本被选中 + 允许长按菜单
33
- className: utils.cn('group relative inline-flex items-center gap-1.5 rounded-md', 'px-1.5 -mx-1.5 py-0.5 cursor-pointer select-text', // select-text 至关重要!
34
- 'hover:bg-purple-50 hover:text-purple-700', 'dark:hover:bg-purple-500/10 dark:hover:text-purple-300', 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-purple-400', 'transition-all', 'text-[0.5rem] sm:text-[0.625rem] md:text-xs font-mono leading-tight', 'min-h-4'), title: "Click to copy", children: [jsxRuntime.jsx("span", { className: "break-all", children: children || text }), jsxRuntime.jsx(globalIcon.globalLucideIcons.Check, { className: utils.cn('size-3 shrink-0', 'transition-opacity duration-200', copied ? 'opacity-100' : 'opacity-0') })] }));
28
+ // div + onMouseDown + preventDefault
29
+ jsxRuntime.jsxs("div", { onMouseDown: handleCopy, className: utils.cn('group relative inline-flex items-center gap-1.5 rounded-md', 'px-1.5 -mx-1.5 py-0.5 cursor-pointer select-text', 'hover:bg-purple-50 hover:text-purple-700', 'dark:hover:bg-purple-500/10 dark:hover:text-purple-300', 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-purple-400', 'transition-all', 'text-[0.5rem] sm:text-[0.625rem] md:text-xs font-mono leading-tight', 'min-h-4'), title: "Click to copy", children: [jsxRuntime.jsx("span", { className: "break-all", children: children || text }), jsxRuntime.jsx(globalIcon.globalLucideIcons.Check, { className: utils.cn('size-3 shrink-0', 'transition-opacity duration-200', copied ? 'opacity-100' : 'opacity-0') })] }));
35
30
  }
36
31
 
37
32
  exports.CopyableText = CopyableText;
@@ -8,7 +8,6 @@ import { cn } from '@windrun-huaiin/lib/utils';
8
8
  function CopyableText({ text, children, }) {
9
9
  const [copied, setCopied] = useState(false);
10
10
  const handleCopy = (e) => __awaiter(this, void 0, void 0, function* () {
11
- // 关键!阻止 button 默认行为,才能让移动端长按生效
12
11
  e.preventDefault();
13
12
  if (!navigator.clipboard)
14
13
  return;
@@ -18,18 +17,14 @@ function CopyableText({ text, children, }) {
18
17
  setTimeout(() => setCopied(false), 2000);
19
18
  }
20
19
  catch (_a) {
21
- // 静默失败
20
+ // do nothing, just silence fail
22
21
  }
23
22
  });
24
23
  if (!text)
25
24
  return jsx("span", { className: "text-slate-400", children: "--" });
26
25
  return (
27
- // 改成 div + onMouseDown + preventDefault
28
- // 这样既能点又能长按,还能用 hover 高亮
29
- jsxs("div", { onMouseDown: handleCopy,
30
- // 关键两行:允许文本被选中 + 允许长按菜单
31
- className: cn('group relative inline-flex items-center gap-1.5 rounded-md', 'px-1.5 -mx-1.5 py-0.5 cursor-pointer select-text', // select-text 至关重要!
32
- 'hover:bg-purple-50 hover:text-purple-700', 'dark:hover:bg-purple-500/10 dark:hover:text-purple-300', 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-purple-400', 'transition-all', 'text-[0.5rem] sm:text-[0.625rem] md:text-xs font-mono leading-tight', 'min-h-4'), title: "Click to copy", children: [jsx("span", { className: "break-all", children: children || text }), jsx(globalLucideIcons.Check, { className: cn('size-3 shrink-0', 'transition-opacity duration-200', copied ? 'opacity-100' : 'opacity-0') })] }));
26
+ // div + onMouseDown + preventDefault
27
+ jsxs("div", { onMouseDown: handleCopy, className: cn('group relative inline-flex items-center gap-1.5 rounded-md', 'px-1.5 -mx-1.5 py-0.5 cursor-pointer select-text', 'hover:bg-purple-50 hover:text-purple-700', 'dark:hover:bg-purple-500/10 dark:hover:text-purple-300', 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-purple-400', 'transition-all', 'text-[0.5rem] sm:text-[0.625rem] md:text-xs font-mono leading-tight', 'min-h-4'), title: "Click to copy", children: [jsx("span", { className: "break-all", children: children || text }), jsx(globalLucideIcons.Check, { className: cn('size-3 shrink-0', 'transition-opacity duration-200', copied ? 'opacity-100' : 'opacity-0') })] }));
33
28
  }
34
29
 
35
30
  export { CopyableText };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@windrun-huaiin/base-ui",
3
- "version": "13.0.0",
3
+ "version": "14.0.0",
4
4
  "description": "Base UI components for windrun-huaiin projects",
5
5
  "type": "module",
6
6
  "exports": {
@@ -9,6 +9,11 @@
9
9
  "import": "./dist/ui/index.mjs",
10
10
  "require": "./dist/ui/index.js"
11
11
  },
12
+ "./lib": {
13
+ "types": "./dist/lib/index.d.ts",
14
+ "import": "./dist/lib/index.mjs",
15
+ "require": "./dist/lib/index.js"
16
+ },
12
17
  "./components": {
13
18
  "types": "./dist/components/index.d.ts",
14
19
  "import": "./dist/components/index.mjs",
@@ -41,7 +46,7 @@
41
46
  "@radix-ui/react-slot": "^1.2.2",
42
47
  "class-variance-authority": "^0.7.1",
43
48
  "lucide-react": "^0.575.0",
44
- "@windrun-huaiin/lib": "^13.0.0"
49
+ "@windrun-huaiin/lib": "^14.0.0"
45
50
  },
46
51
  "peerDependencies": {
47
52
  "clsx": "^2.1.1",
@@ -0,0 +1 @@
1
+ export * from './theme-util';
@@ -1,7 +1,120 @@
1
+ /**
2
+ * Theme style utility (TypeScript)
3
+ * Maintainer: xxx
4
+ * Note:
5
+ * 1. Static color classes for Tailwind CSS 4.x scanning
6
+ * 2. Single config: NEXT_PUBLIC_STYLE_ICON_COLOR (Tailwind class only)
7
+ * 3. Premium/elegant color system (uppercase hex values)
8
+ */
1
9
 
2
- // Attention: This icon color will be used in the entire project, and it depends on the ENV variable NEXT_PUBLIC_STYLE_ICON_COLOR
3
- export const themeIconColor = process.env.NEXT_PUBLIC_STYLE_ICON_COLOR || "text-purple-500";
10
+ // Define type for supported theme color classes (literal type)
11
+ export type SupportedThemeColor = keyof typeof THEME_COLOR_HEX_MAP;
12
+ export type SupportedThemeName = keyof typeof THEME_COLOR_NAME_TO_CLASS_MAP;
4
13
 
5
- // Attention: This icon color will be used in the entire project, and it depends on the ENV variable NEXT_PUBLIC_STYLE_SVG_ICON_COLOR
6
- export const themeSvgIconColor = process.env.NEXT_PUBLIC_STYLE_SVG_ICON_COLOR || "#AC62FD";
7
- export const themeSvgIconSize = process.env.NEXT_PUBLIC_STYLE_SVG_ICON_SIZE || 18
14
+ // Supported theme color classes (static for Tailwind scan)
15
+ export const __SUPPORTED_THEME_COLORS = Object.freeze({
16
+ "text-purple-500": "典雅紫·清",
17
+ "text-orange-500": "轻奢橙·暖",
18
+ "text-indigo-500": "沉稳蓝·冷",
19
+ "text-emerald-500": "温润绿·愈",
20
+ "text-rose-500": "玫瑰红·柔"
21
+ } as const);
22
+
23
+ // Hex color map (uppercase, match Tailwind classes)
24
+ export const THEME_COLOR_HEX_MAP = Object.freeze({
25
+ "text-purple-500": "#AC62FD",
26
+ "text-orange-500": "#F97316",
27
+ "text-indigo-500": "#6366F1",
28
+ "text-emerald-500": "#10B981",
29
+ "text-rose-500": "#F43F5E",
30
+ } as const);
31
+
32
+ // Short theme names for env configuration
33
+ export const THEME_COLOR_NAME_TO_CLASS_MAP = Object.freeze({
34
+ purple: "text-purple-500",
35
+ orange: "text-orange-500",
36
+ indigo: "text-indigo-500",
37
+ emerald: "text-emerald-500",
38
+ rose: "text-rose-500",
39
+ } as const);
40
+
41
+ // Validate theme color class (type guard)
42
+ export const validateThemeColor = (colorClass: string): colorClass is SupportedThemeColor => {
43
+ return Object.prototype.hasOwnProperty.call(THEME_COLOR_HEX_MAP, colorClass);
44
+ };
45
+
46
+ export const validateThemeName = (colorName: string): colorName is SupportedThemeName => {
47
+ return Object.prototype.hasOwnProperty.call(THEME_COLOR_NAME_TO_CLASS_MAP, colorName);
48
+ };
49
+
50
+ // Theme icon text color (type-safe, global)
51
+ export const themeIconColor: SupportedThemeColor = (() => {
52
+ const envColorRaw = process.env.NEXT_PUBLIC_STYLE_ICON_COLOR;
53
+ const envColor = envColorRaw?.trim().toLowerCase();
54
+ if (envColor) {
55
+ if (validateThemeName(envColor)) {
56
+ return THEME_COLOR_NAME_TO_CLASS_MAP[envColor];
57
+ }
58
+ // backward compatible: allow old full tailwind class value
59
+ if (validateThemeColor(envColor)) {
60
+ return envColor;
61
+ }
62
+ }
63
+
64
+ console.warn(
65
+ `[ThemeUtil] Invalid NEXT_PUBLIC_STYLE_ICON_COLOR: ${envColorRaw}. Fallback to text-purple-500.
66
+ Supported names: ${Object.keys(THEME_COLOR_NAME_TO_CLASS_MAP).join(", ")}
67
+ Supported classes(legacy): ${Object.keys(THEME_COLOR_HEX_MAP).join(", ")}`
68
+ );
69
+ return "text-purple-500";
70
+ })();
71
+
72
+ // SVG icon color (auto-derived, type-safe - NO any type)
73
+ export const themeSvgIconColor = THEME_COLOR_HEX_MAP[themeIconColor];
74
+
75
+ // SVG icon size (global)
76
+ export const themeSvgIconSize = process.env.NEXT_PUBLIC_STYLE_SVG_ICON_SIZE || 18;
77
+
78
+ // Theme button gradient classes (static for Tailwind scan)
79
+ export const THEME_BUTTON_GRADIENT_CLASS_MAP = Object.freeze({
80
+ "text-purple-500": "bg-linear-to-r from-purple-400 to-pink-500 dark:from-purple-500 dark:to-pink-600",
81
+ "text-orange-500": "bg-linear-to-r from-orange-500 to-orange-600 dark:from-orange-500 dark:to-orange-700",
82
+ "text-indigo-500": "bg-linear-to-r from-indigo-400 to-blue-500 dark:from-indigo-500 dark:to-blue-600",
83
+ "text-emerald-500": "bg-linear-to-r from-emerald-400 to-teal-500 dark:from-emerald-500 dark:to-teal-600",
84
+ "text-rose-500": "bg-linear-to-r from-rose-400 to-pink-500 dark:from-rose-500 dark:to-pink-600",
85
+ } as const);
86
+
87
+ // Theme button hover gradient classes (static for Tailwind scan)
88
+ export const THEME_BUTTON_GRADIENT_HOVER_CLASS_MAP = Object.freeze({
89
+ "text-purple-500": "hover:from-purple-500 hover:to-pink-600 dark:hover:from-purple-600 dark:hover:to-pink-700",
90
+ "text-orange-500": "hover:from-orange-500 hover:to-amber-600 dark:hover:from-orange-600 dark:hover:to-amber-700",
91
+ "text-indigo-500": "hover:from-indigo-500 hover:to-blue-600 dark:hover:from-indigo-600 dark:hover:to-blue-700",
92
+ "text-emerald-500": "hover:from-emerald-500 hover:to-teal-600 dark:hover:from-emerald-600 dark:hover:to-teal-700",
93
+ "text-rose-500": "hover:from-rose-500 hover:to-pink-600 dark:hover:from-rose-600 dark:hover:to-pink-700",
94
+ } as const);
95
+
96
+ // Global button gradient classes (type-safe, follows themeIconColor)
97
+ export const themeButtonGradientClass = THEME_BUTTON_GRADIENT_CLASS_MAP[themeIconColor];
98
+ export const themeButtonGradientHoverClass = THEME_BUTTON_GRADIENT_HOVER_CLASS_MAP[themeIconColor];
99
+
100
+ // Theme hero text gradient classes (for bg-clip-text headlines)
101
+ export const THEME_HERO_EYES_ON_CLASS_MAP = Object.freeze({
102
+ "text-purple-500": "bg-linear-to-r from-purple-400 to-pink-600",
103
+ "text-orange-500": "bg-linear-to-r from-orange-500 to-red-500",
104
+ "text-indigo-500": "bg-linear-to-r from-indigo-400 to-blue-600",
105
+ "text-emerald-500": "bg-linear-to-r from-emerald-400 to-teal-600",
106
+ "text-rose-500": "bg-linear-to-r from-rose-400 to-pink-600",
107
+ } as const);
108
+
109
+ export const themeHeroEyesOnClass = THEME_HERO_EYES_ON_CLASS_MAP[themeIconColor];
110
+
111
+ // Theme rich-text <mark> highlight background classes (darker emphasis, readable)
112
+ export const THEME_RICH_TEXT_MARK_CLASS_MAP = Object.freeze({
113
+ "text-purple-500": "bg-purple-300 dark:bg-purple-600",
114
+ "text-orange-500": "bg-orange-300 dark:bg-orange-600",
115
+ "text-indigo-500": "bg-indigo-300 dark:bg-indigo-600",
116
+ "text-emerald-500": "bg-emerald-300 dark:bg-emerald-600",
117
+ "text-rose-500": "bg-rose-300 dark:bg-rose-600",
118
+ } as const);
119
+
120
+ export const themeRichTextMarkClass = THEME_RICH_TEXT_MARK_CLASS_MAP[themeIconColor];
@@ -15,7 +15,6 @@ export function CopyableText({
15
15
  const [copied, setCopied] = useState(false);
16
16
 
17
17
  const handleCopy = async (e: React.MouseEvent) => {
18
- // 关键!阻止 button 默认行为,才能让移动端长按生效
19
18
  e.preventDefault();
20
19
 
21
20
  if (!navigator.clipboard) return;
@@ -25,21 +24,19 @@ export function CopyableText({
25
24
  setCopied(true);
26
25
  setTimeout(() => setCopied(false), 2000);
27
26
  } catch {
28
- // 静默失败
27
+ // do nothing, just silence fail
29
28
  }
30
29
  };
31
30
 
32
31
  if (!text) return <span className="text-slate-400">--</span>;
33
32
 
34
33
  return (
35
- // 改成 div + onMouseDown + preventDefault
36
- // 这样既能点又能长按,还能用 hover 高亮
34
+ // div + onMouseDown + preventDefault
37
35
  <div
38
36
  onMouseDown={handleCopy}
39
- // 关键两行:允许文本被选中 + 允许长按菜单
40
37
  className={cn(
41
38
  'group relative inline-flex items-center gap-1.5 rounded-md',
42
- 'px-1.5 -mx-1.5 py-0.5 cursor-pointer select-text', // select-text 至关重要!
39
+ 'px-1.5 -mx-1.5 py-0.5 cursor-pointer select-text',
43
40
  'hover:bg-purple-50 hover:text-purple-700',
44
41
  'dark:hover:bg-purple-500/10 dark:hover:text-purple-300',
45
42
  'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-purple-400',