@type32/yaml-editor-form 0.2.1 → 0.2.3

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/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@type32/yaml-editor-form",
3
3
  "configKey": "yamlEditorForm",
4
- "version": "0.2.1",
4
+ "version": "0.2.3",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
package/dist/module.mjs CHANGED
@@ -5,9 +5,12 @@ const module$1 = defineNuxtModule({
5
5
  name: "@type32/yaml-editor-form",
6
6
  configKey: "yamlEditorForm"
7
7
  },
8
- // Default configuration options of the Nuxt module
9
- defaults: {},
10
- setup(_options, _nuxt) {
8
+ moduleDependencies: {
9
+ "@nuxt/ui": {
10
+ version: ">=4.4.0"
11
+ }
12
+ },
13
+ async setup(_options, _nuxt) {
11
14
  const resolver = createResolver(import.meta.url);
12
15
  addComponentsDir({ path: resolver.resolve("runtime/components") });
13
16
  addImportsDir(resolver.resolve("runtime/composables"));
@@ -19,6 +22,7 @@ const module$1 = defineNuxtModule({
19
22
  "./runtime/assets/css"
20
23
  );
21
24
  _nuxt.options.css.unshift(resolver.resolve("./runtime/assets/css/main.css"));
25
+ _nuxt.options.css.push(resolver.resolve("./runtime/assets/css/main.css"));
22
26
  }
23
27
  });
24
28
 
@@ -1 +1 @@
1
- @import "tailwindcss";@import "tailwindcss/utilities" layer(utilities);@import "@nuxt/ui";.yaml-collapsible-content{@apply mt-1 ml-2 pl-3 border-l border-l-muted}
1
+ @import "tailwindcss";@import "tailwindcss/utilities" layer(utilities);@import "@nuxt/ui";@source "../**";.yaml-collapsible-content{@apply mt-1 ml-2 pl-3 border-l border-l-muted}.yaml-form-editor-field-container{@apply grid grid-cols-1}.yaml-form-editor-field{@apply transition p-1 rounded-lg}
@@ -34,8 +34,8 @@ const addFieldOptions = computed(() => {
34
34
 
35
35
  <template>
36
36
  <ClientOnly>
37
- <div class="space-y-4">
38
- <div class="space-y-3">
37
+ <div class="grid grid-cols-1 gap-2">
38
+ <div class="yaml-form-editor-field-container">
39
39
  <YamlFormField
40
40
  v-for="(value, key) in data"
41
41
  :key="String(key)"
@@ -57,6 +57,7 @@ const addFieldOptions = computed(() => {
57
57
  };
58
58
  }
59
59
  }"
60
+ class="yaml-form-editor-field"
60
61
  >
61
62
  <!-- Forward all slots to YamlFormField for custom field components -->
62
63
  <template v-for="(_, name) in $slots" #[name]="slotProps">
@@ -75,6 +76,7 @@ const addFieldOptions = computed(() => {
75
76
  label="Add Field"
76
77
  variant="ghost"
77
78
  :size="size"
79
+ block
78
80
  />
79
81
  </UDropdownMenu>
80
82
  </div>
@@ -237,9 +237,6 @@ const itemCount = computed(() => {
237
237
  }
238
238
  return 0;
239
239
  });
240
- const indentClass = computed(() => {
241
- return props.depth > 0 ? "pl-2" : "";
242
- });
243
240
  const typeOptions = computed(() => {
244
241
  const currentType = valueType.value;
245
242
  return fieldTypes.value.filter((ft) => isValidConversion(currentType, ft.type)).map((ft) => ({
@@ -262,7 +259,7 @@ const addArrayItemOptions = computed(() => {
262
259
  </script>
263
260
 
264
261
  <template>
265
- <div :class="indentClass" class="space-y-1">
262
+ <div :class="{ 'pl-2': props.depth > 0 }" class="space-y-1">
266
263
  <!-- For Objects and Arrays: Use Collapsible -->
267
264
  <template v-if="valueType === 'object' || valueType === 'array'">
268
265
  <!-- Edit mode for field key -->
package/package.json CHANGED
@@ -1,76 +1,73 @@
1
1
  {
2
- "name": "@type32/yaml-editor-form",
3
- "version": "0.2.1",
4
- "description": "YAML Editor Form Component for Nuxt.",
5
- "repository": "https://github.com/CTRL-Neo-Studios/yaml-editor-form",
6
- "license": "MIT",
7
- "type": "module",
8
- "private": false,
9
- "exports": {
10
- ".": {
11
- "types": "./dist/types.d.mts",
12
- "import": "./dist/module.mjs"
13
- }
14
- },
15
- "main": "./dist/module.mjs",
16
- "typesVersions": {
17
- "*": {
18
- ".": [
19
- "./dist/types.d.mts"
20
- ]
21
- }
22
- },
23
- "files": [
24
- "dist"
25
- ],
26
- "scripts": {
27
- "prepack": "bunx nuxt-module-build build",
28
- "dev": "bun run dev:prepare && bunx nuxi dev playground",
29
- "dev:build": "bunx nuxi build playground",
30
- "dev:prepare": "bunx nuxt-module-build build --stub && bunx nuxt-module-build prepare && bunx nuxi prepare playground",
31
- "release": "bun run prepack && bunx changelogen --release && bun publish && git push --follow-tags",
32
- "lint": "bunx eslint .",
33
- "test": "bunx vitest run",
34
- "test:watch": "bunx vitest watch",
35
- "test:types": "bunx vue-tsc --noEmit && cd playground && bunx vue-tsc --noEmit"
36
- },
37
- "dependencies": {
38
- "@nuxt/image": "2.0.0",
39
- "@nuxt/kit": "^4.2.2",
40
- "@nuxt/ui": "^4.4.0",
41
- "@tiptap/extension-collaboration": "^3.16.0",
42
- "@tiptap/extension-node-range": "^3.16.0",
43
- "@tiptap/y-tiptap": "^3.0.1",
44
- "js-yaml": "^4.1.1",
45
- "tailwindcss": "^4.1.18",
46
- "yaml": "^2.8.2",
47
- "yjs": "^13.6.29"
48
- },
49
- "devDependencies": {
50
- "@iconify-json/lucide": "^1.2.86",
51
- "@iconify-json/simple-icons": "^1.2.67",
52
- "@nuxt/devtools": "^3.1.1",
53
- "@nuxt/fonts": "0.12.1",
54
- "@nuxt/icon": "2.2.1",
55
- "@nuxt/module-builder": "^1.0.2",
56
- "@nuxt/schema": "^4.2.2",
57
- "@nuxt/test-utils": "^3.23.0",
58
- "@types/js-yaml": "^4.0.9",
59
- "@types/node": "^25.0.10",
60
- "changelogen": "^0.6.2",
61
- "nuxt": "^4.2.2",
62
- "typescript": "~5.9.3",
63
- "vitest": "^4.0.17",
64
- "vue-tsc": "^3.2.2"
65
- },
66
- "trustedDependencies": [
67
- "@parcel/watcher",
68
- "@tailwindcss/oxide",
69
- "core-js",
70
- "esbuild",
71
- "sharp",
72
- "unrs-resolver",
73
- "vue-demi",
74
- "js-yaml"
75
- ]
2
+ "name": "@type32/yaml-editor-form",
3
+ "version": "0.2.3",
4
+ "description": "YAML Editor Form Component for Nuxt.",
5
+ "repository": "https://github.com/CTRL-Neo-Studios/yaml-editor-form",
6
+ "license": "MIT",
7
+ "type": "module",
8
+ "private": false,
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/types.d.mts",
12
+ "import": "./dist/module.mjs"
13
+ }
14
+ },
15
+ "main": "./dist/module.mjs",
16
+ "typesVersions": {
17
+ "*": {
18
+ ".": [
19
+ "./dist/types.d.mts"
20
+ ]
21
+ }
22
+ },
23
+ "files": [
24
+ "dist"
25
+ ],
26
+ "scripts": {
27
+ "prepack": "bunx nuxt-module-build build",
28
+ "dev": "bun run dev:prepare && bunx nuxi dev playground",
29
+ "dev:build": "bunx nuxi build playground",
30
+ "dev:prepare": "bunx nuxt-module-build build --stub && bunx nuxt-module-build prepare && bunx nuxi prepare playground",
31
+ "release": "bun run prepack && bunx changelogen --release && bun publish && git push --follow-tags",
32
+ "lint": "bunx eslint .",
33
+ "test": "bunx vitest run",
34
+ "test:watch": "bunx vitest watch",
35
+ "test:types": "bunx vue-tsc --noEmit && cd playground && bunx vue-tsc --noEmit"
36
+ },
37
+ "dependencies": {
38
+ "@nuxt/image": "2.0.0",
39
+ "@nuxt/kit": "^4.3.0",
40
+ "@nuxt/ui": "^4.4.0",
41
+ "@tailwindcss/vite": "^4.1.18",
42
+ "@tiptap/extension-collaboration": "^3.18.0",
43
+ "@tiptap/extension-node-range": "^3.18.0",
44
+ "@tiptap/y-tiptap": "^3.0.2",
45
+ "js-yaml": "^4.1.1",
46
+ "tailwindcss": "^4.1.18",
47
+ "yaml": "^2.8.2",
48
+ "yjs": "^13.6.29"
49
+ },
50
+ "devDependencies": {
51
+ "@iconify-json/lucide": "^1.2.87",
52
+ "@iconify-json/simple-icons": "^1.2.68",
53
+ "@nuxt/devtools": "^3.1.1",
54
+ "@nuxt/fonts": "0.13.0",
55
+ "@nuxt/icon": "2.2.1",
56
+ "@nuxt/module-builder": "^1.0.2",
57
+ "@nuxt/schema": "^4.3.0",
58
+ "@nuxt/test-utils": "^3.23.0",
59
+ "@types/js-yaml": "^4.0.9",
60
+ "@types/node": "^25.1.0",
61
+ "changelogen": "^0.6.2",
62
+ "nuxt": "^4.3.0",
63
+ "typescript": "~5.9.3",
64
+ "vitest": "^4.0.18",
65
+ "vue-tsc": "^3.2.4"
66
+ },
67
+ "trustedDependencies": [
68
+ "@parcel/watcher",
69
+ "esbuild",
70
+ "sharp",
71
+ "vue-demi"
72
+ ]
76
73
  }