nuxt-ui-tools 1.16.8 → 1.16.9

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
@@ -5,7 +5,7 @@
5
5
  "configKey": "nuxtUiTools",
6
6
  "docs": "https://ui.nuxt.com/docs/getting-started/installation/nuxt",
7
7
  "name": "nuxt-ui-tools",
8
- "version": "1.16.8",
8
+ "version": "1.16.9",
9
9
  "builder": {
10
10
  "@nuxt/module-builder": "1.0.3",
11
11
  "unbuild": "unknown"
@@ -86,6 +86,7 @@ const controlAttrs = computed(() => {
86
86
  provideFormFieldBare(bare);
87
87
  provideFormFieldControlAttrs(controlAttrs);
88
88
  const field = computed(() => createFormFieldInstance(props.field));
89
+ const headless = computed(() => !field.value.capability.has("layout"));
89
90
  const path = computed(() => fieldPath(props.parentPath, props.field));
90
91
  const childPath = computed(() => childParentPath(props.parentPath, props.field));
91
92
  const visible = computed(() => form.shouldRender(props.field, path.value));
@@ -200,7 +201,7 @@ function resolveControlLabel(controlField) {
200
201
  </script>
201
202
 
202
203
  <template>
203
- <template v-if="visible && bare">
204
+ <template v-if="visible && (bare || headless)">
204
205
  <component :is="renderer" v-if="renderer" v-bind="rendererProps" />
205
206
  <UAlert
206
207
  v-else
@@ -9,6 +9,7 @@ import { useUiToolsLocale } from "#ui-tools/i18n";
9
9
  import { useFormActions } from "../../composables/use-form-actions";
10
10
  import { useFormGridLayout } from "../../composables/use-form-layout";
11
11
  import { useFormRoot } from "../../composables/use-form-root";
12
+ import { createFormFieldInstance } from "../../utils/field-instance";
12
13
  import { getFormHeader } from "../../utils/overlay";
13
14
  import { isRecord } from "../../utils/path";
14
15
  import { isFunction, isNumber, isString } from "../../utils/predicate";
@@ -69,6 +70,11 @@ watch(
69
70
  const displayedStep = computed(
70
71
  () => isSteppedSchema(schemaRef.value) ? getSchemaSteps(schemaRef.value)[displayedStepIndex.value] : void 0
71
72
  );
73
+ const skeletonFields = computed(
74
+ () => runtime.currentFields.value.filter(
75
+ (field) => createFormFieldInstance(field).capability.has("layout")
76
+ )
77
+ );
72
78
  const displayedFields = computed(
73
79
  () => isSteppedSchema(schemaRef.value) ? displayedStep.value?.fields ?? [] : getSchemaFields(schemaRef.value)
74
80
  );
@@ -295,7 +301,7 @@ function getSchemaShowStepper(schema) {
295
301
  :style="grid.style.value"
296
302
  >
297
303
  <div
298
- v-for="field in runtime.currentFields.value"
304
+ v-for="field in skeletonFields"
299
305
  :key="field.key"
300
306
  :class="mergeFormUiClass('grid gap-2', formUi.ui.value.root?.ui?.skeletonField)"
301
307
  >
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nuxt-ui-tools",
3
- "version": "1.16.8",
3
+ "version": "1.16.9",
4
4
  "description": "Nuxt module and runtime toolkit for UI-heavy Nuxt applications",
5
5
  "homepage": "https://github.com/ChronicStone/nuxt-ui-tools#readme",
6
6
  "bugs": "https://github.com/ChronicStone/nuxt-ui-tools/issues",