@shwfed/nuxt 0.7.9 → 0.7.10

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 (95) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/runtime/components/app.d.vue.ts +7 -56
  3. package/dist/runtime/components/app.vue +17 -404
  4. package/dist/runtime/components/app.vue.d.ts +7 -56
  5. package/dist/runtime/components/fields.d.vue.ts +154 -132
  6. package/dist/runtime/components/fields.vue +30 -295
  7. package/dist/runtime/components/fields.vue.d.ts +154 -132
  8. package/dist/runtime/components/table.d.vue.ts +63 -59
  9. package/dist/runtime/components/table.vue +52 -617
  10. package/dist/runtime/components/table.vue.d.ts +63 -59
  11. package/dist/runtime/components/ui/app/App.d.vue.ts +86 -0
  12. package/dist/runtime/components/ui/app/App.vue +414 -0
  13. package/dist/runtime/components/ui/app/App.vue.d.ts +86 -0
  14. package/dist/runtime/components/ui/checkbox/Checkbox.vue +6 -2
  15. package/dist/runtime/components/ui/expression-editor/ExpressionEditor.d.vue.ts +30 -0
  16. package/dist/runtime/components/ui/expression-editor/ExpressionEditor.vue +87 -0
  17. package/dist/runtime/components/ui/expression-editor/ExpressionEditor.vue.d.ts +30 -0
  18. package/dist/runtime/components/ui/expression-editor/index.d.ts +1 -0
  19. package/dist/runtime/components/ui/expression-editor/index.js +1 -0
  20. package/dist/runtime/components/ui/field/FieldContent.vue +1 -1
  21. package/dist/runtime/components/ui/field/FieldError.vue +2 -2
  22. package/dist/runtime/components/ui/fields/Fields.d.vue.ts +376 -0
  23. package/dist/runtime/components/ui/fields/Fields.vue +441 -0
  24. package/dist/runtime/components/ui/fields/Fields.vue.d.ts +376 -0
  25. package/dist/runtime/components/ui/fields-configurator/FieldsConfiguratorDialog.d.vue.ts +163 -0
  26. package/dist/runtime/components/ui/fields-configurator/FieldsConfiguratorDialog.vue +363 -0
  27. package/dist/runtime/components/ui/fields-configurator/FieldsConfiguratorDialog.vue.d.ts +163 -0
  28. package/dist/runtime/components/ui/input/Input.d.vue.ts +1 -0
  29. package/dist/runtime/components/ui/input/Input.vue +2 -0
  30. package/dist/runtime/components/ui/input/Input.vue.d.ts +1 -0
  31. package/dist/runtime/components/ui/input-group/InputGroupAddon.vue +4 -1
  32. package/dist/runtime/components/ui/input-group/InputGroupCombobox.d.vue.ts +8 -3
  33. package/dist/runtime/components/ui/input-group/InputGroupCombobox.vue +8 -3
  34. package/dist/runtime/components/ui/input-group/InputGroupCombobox.vue.d.ts +8 -3
  35. package/dist/runtime/components/ui/input-group/InputGroupComboboxInput.d.vue.ts +8 -1
  36. package/dist/runtime/components/ui/input-group/InputGroupComboboxInput.vue +10 -1
  37. package/dist/runtime/components/ui/input-group/InputGroupComboboxInput.vue.d.ts +8 -1
  38. package/dist/runtime/components/ui/input-group/InputGroupNumberField.d.vue.ts +5 -2
  39. package/dist/runtime/components/ui/input-group/InputGroupNumberField.vue +9 -3
  40. package/dist/runtime/components/ui/input-group/InputGroupNumberField.vue.d.ts +5 -2
  41. package/dist/runtime/components/ui/input-group/index.js +1 -1
  42. package/dist/runtime/components/ui/locale/Locale.d.vue.ts +20 -0
  43. package/dist/runtime/components/ui/locale/Locale.vue +291 -0
  44. package/dist/runtime/components/ui/locale/Locale.vue.d.ts +20 -0
  45. package/dist/runtime/components/ui/locale/index.d.ts +1 -0
  46. package/dist/runtime/components/ui/locale/index.js +1 -0
  47. package/dist/runtime/components/ui/native-select/NativeSelectOption.d.vue.ts +1 -0
  48. package/dist/runtime/components/ui/native-select/NativeSelectOption.vue +4 -1
  49. package/dist/runtime/components/ui/native-select/NativeSelectOption.vue.d.ts +1 -0
  50. package/dist/runtime/components/ui/number-field/NumberFieldInput.vue +1 -1
  51. package/dist/runtime/components/ui/switch/Switch.vue +1 -1
  52. package/dist/runtime/components/ui/table/Table.d.vue.ts +81 -0
  53. package/dist/runtime/components/ui/table/Table.vue +792 -0
  54. package/dist/runtime/components/ui/table/Table.vue.d.ts +81 -0
  55. package/dist/runtime/components/ui/table/schema.d.ts +48 -0
  56. package/dist/runtime/components/ui/table/schema.js +126 -0
  57. package/dist/runtime/components/ui/table-configurator/TableConfiguratorDialog.d.vue.ts +62 -0
  58. package/dist/runtime/components/ui/table-configurator/TableConfiguratorDialog.vue +2233 -0
  59. package/dist/runtime/components/ui/table-configurator/TableConfiguratorDialog.vue.d.ts +62 -0
  60. package/dist/runtime/components/ui/table-configurator/menu.d.ts +37 -0
  61. package/dist/runtime/components/ui/table-configurator/menu.js +227 -0
  62. package/dist/runtime/components/ui/tabs/Tabs.d.vue.ts +24 -0
  63. package/dist/runtime/components/ui/tabs/Tabs.vue +30 -0
  64. package/dist/runtime/components/ui/tabs/Tabs.vue.d.ts +24 -0
  65. package/dist/runtime/components/ui/tabs/TabsContent.d.vue.ts +18 -0
  66. package/dist/runtime/components/ui/tabs/TabsContent.vue +23 -0
  67. package/dist/runtime/components/ui/tabs/TabsContent.vue.d.ts +18 -0
  68. package/dist/runtime/components/ui/tabs/TabsList.d.vue.ts +18 -0
  69. package/dist/runtime/components/ui/tabs/TabsList.vue +25 -0
  70. package/dist/runtime/components/ui/tabs/TabsList.vue.d.ts +18 -0
  71. package/dist/runtime/components/ui/tabs/TabsTrigger.d.vue.ts +18 -0
  72. package/dist/runtime/components/ui/tabs/TabsTrigger.vue +27 -0
  73. package/dist/runtime/components/ui/tabs/TabsTrigger.vue.d.ts +18 -0
  74. package/dist/runtime/components/ui/tabs/index.d.ts +4 -0
  75. package/dist/runtime/components/ui/tabs/index.js +4 -0
  76. package/dist/runtime/components/ui/textarea/Textarea.d.vue.ts +1 -0
  77. package/dist/runtime/components/ui/textarea/Textarea.vue +3 -1
  78. package/dist/runtime/components/ui/textarea/Textarea.vue.d.ts +1 -0
  79. package/dist/runtime/components/ui/toggle/Toggle.d.vue.ts +34 -0
  80. package/dist/runtime/components/ui/toggle/Toggle.vue +32 -0
  81. package/dist/runtime/components/ui/toggle/Toggle.vue.d.ts +34 -0
  82. package/dist/runtime/components/ui/toggle/index.d.ts +7 -0
  83. package/dist/runtime/components/ui/toggle/index.js +22 -0
  84. package/dist/runtime/composables/useTableRenderers.d.ts +2 -1
  85. package/dist/runtime/composables/useTableRenderers.js +2 -1
  86. package/dist/runtime/style.css +1 -1
  87. package/dist/runtime/table-renderers/builtins.js +213 -98
  88. package/dist/runtime/table-renderers/registry.d.ts +1 -0
  89. package/dist/runtime/table-renderers/registry.js +3 -0
  90. package/dist/runtime/utils/coders.d.ts +27 -2
  91. package/dist/runtime/utils/coders.js +27 -2
  92. package/package.json +3 -1
  93. /package/dist/runtime/components/{logo.d.vue.ts → ui/logo/Logo.d.vue.ts} +0 -0
  94. /package/dist/runtime/components/{logo.vue → ui/logo/Logo.vue} +0 -0
  95. /package/dist/runtime/components/{logo.vue.d.ts → ui/logo/Logo.vue.d.ts} +0 -0
@@ -2,10 +2,35 @@ import z from "zod";
2
2
  import { parsePath } from "dot-prop";
3
3
  import { md } from "../plugins/markdown/md.js";
4
4
  import { createEnvironment } from "../plugins/cel/env.js";
5
- export const localeC = z.object({
6
- locale: z.string().regex(/^[a-z]{2}$/).describe("ISO 639-1 \u53CC\u5B57\u7B26\u8BED\u8A00\u7801"),
5
+ const localeCodeC = z.enum(["zh", "ja", "en", "ko"]);
6
+ export const supportedLocales = localeCodeC.options;
7
+ export const localeItemC = z.object({
8
+ locale: localeCodeC.describe("\u652F\u6301\u7684\u8BED\u8A00\u7801\uFF0C\u4EC5\u9650 zh\u3001ja\u3001en\u3001ko"),
7
9
  message: z.string().describe("\u9488\u5BF9\u8BE5\u8BED\u8A00\u7684 UI \u6587\u672C")
8
10
  }).describe("\u9488\u5BF9\u67D0\u4E2A\u8BED\u8A00\u7684\u672C\u5730\u5316\u5185\u5BB9");
11
+ export const localeC = z.array(localeItemC).readonly().superRefine((value, ctx) => {
12
+ const seen = /* @__PURE__ */ new Set();
13
+ let zhCount = 0;
14
+ for (const [index, item] of value.entries()) {
15
+ if (seen.has(item.locale)) {
16
+ ctx.addIssue({
17
+ code: "custom",
18
+ message: "\u8BED\u8A00\u7801\u4E0D\u80FD\u91CD\u590D",
19
+ path: [index, "locale"]
20
+ });
21
+ }
22
+ seen.add(item.locale);
23
+ if (item.locale === "zh") {
24
+ zhCount++;
25
+ }
26
+ }
27
+ if (zhCount !== 1) {
28
+ ctx.addIssue({
29
+ code: "custom",
30
+ message: "\u5FC5\u987B\u4E14\u53EA\u80FD\u5305\u542B\u4E00\u4E2A zh \u8BED\u8A00"
31
+ });
32
+ }
33
+ }).describe("\u672C\u5730\u5316\u5185\u5BB9\u5217\u8868\uFF0C\u5FC5\u987B\u5305\u542B\u4E14\u53EA\u80FD\u5305\u542B\u4E00\u4E2A zh \u8BED\u8A00");
9
34
  export const dotPropC = z.string().refine(
10
35
  (val) => {
11
36
  if (val.length === 0) return false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shwfed/nuxt",
3
- "version": "0.7.9",
3
+ "version": "0.7.10",
4
4
  "description": "",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -12,6 +12,7 @@
12
12
  "./*": "./dist/*"
13
13
  },
14
14
  "main": "./dist/module.mjs",
15
+ "types": "./dist/types.d.mts",
15
16
  "typesVersions": {
16
17
  "*": {
17
18
  ".": [
@@ -82,6 +83,7 @@
82
83
  "@vueuse/nuxt": "^14.2.1",
83
84
  "changelogen": "^0.6.2",
84
85
  "eslint": "^9.39.2",
86
+ "jsdom": "^28.1.0",
85
87
  "lint-staged": "^16.2.7",
86
88
  "nuxt": "^4.3.0",
87
89
  "simple-git-hooks": "^2.13.1",