@schemx/vue 1.0.0-next.1 → 1.0.0-next.2

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/README.md CHANGED
@@ -83,6 +83,7 @@ console.log(Schemx === schemxForm) // true
83
83
  | `modelValue` | `T` | `{}` | `v-model` 的输入端;非空值参与初始快照,后续替换会同步到内部表单,字段变化会通过 `update:modelValue` 输出 |
84
84
  | `initialValues` | `T` | `{}` | 创建内部表单时的初始值,也是 `reset()` 的还原基准 |
85
85
  | `form` | `SchemxInstance<T>` | `undefined` | 外部表单实例;传入后组件不再创建实例,但仍会提供 Vue 上下文并同步 `schemas`;组件级回调不会写入该实例,`v-model` 仍监听实例变化 |
86
+ | `rendererProps` | `SchemxRendererPropsMap<T>` | `undefined` | 按 Renderer 类型设置静态默认 Props;字段 `componentProps` 与 Runtime 注入值优先 |
86
87
  | `rendererRegistry` | `RendererRegistry` | 全局 `rendererRegistry` | 当前表单使用的 Renderer Registry |
87
88
  | `defaultRendererType` | `SchemxRendererKey` | `undefined` | 创建内部表单且未传 `rendererRegistry` 时的默认 Renderer 类型;Vue 全局 Registry 存在时由该 Registry 的 fallback 决定 |
88
89
  | `validationRuleRegistry` | `ValidationRuleRegistry` | 全局 `validationRuleRegistry` | 当前表单使用的校验规则 Registry |
@@ -100,9 +101,13 @@ console.log(Schemx === schemxForm) // true
100
101
  | `colon` | `boolean` | `undefined` | 表单级标签冒号默认值;字段自身配置优先,均未配置时为 `true` |
101
102
  | `onFinish` | `(values: Readonly<T>) => void \| Promise<void>` | `undefined` | `submit()` 校验通过后的回调 Prop |
102
103
  | `onFinishFailed` | `(failure: ValidationFailure<T>) => void` | `undefined` | `submit()` 校验失败后的回调 Prop |
104
+ | `onReset` | `() => void` | `undefined` | 内部表单完整 `reset()` 完成后的回调;不在 `resetFields()` 后触发 |
105
+ | `onLoadingChange` | `(loading: boolean) => void` | `undefined` | 内部表单提交开始和结束时的回调 |
103
106
  | `onValuesChange` | `(changedValues, latestSnapshot) => void` | `undefined` | 字段值变化后的回调 Prop |
104
107
  | `onFieldsChange` | `(changedFields, allFields) => void` | `undefined` | 字段路径变化后的回调 Prop |
105
108
  | `onRuleError` | `CreateValidatorOptions<T>["onRuleError"]` | `undefined` | 规则解析异常回调;内部创建实例时当前不会透传,需在外部 `form` 实例上配置 |
109
+ | `loading` | `boolean` | `undefined` | 覆盖内置操作区显示的提交状态,不改变 Core 的真实提交状态 |
110
+ | `submitter` / `resetter` | `boolean \| SchemxFormActionConfig` | `true` | 控制内置提交 / 重置按钮;设为 `false` 隐藏,配置可设置 `text` 和 `buttonProps` |
106
111
  | `class` | `string` | `""` | 添加到根 `.schemx` 元素的类名 |
107
112
  | `style` | `StyleValue` | `{}` | 绑定到根 `.schemx` 元素 |
108
113
 
@@ -118,6 +123,7 @@ console.log(Schemx === schemxForm) // true
118
123
  - 外部替换 `modelValue` 后,组件会调用 `setFieldsValue()` 同步内部表单。
119
124
  - 内部或外部 `form` 的字段变化都会发出 `update:modelValue`,值为最新表单快照;同步来自 `modelValue` 的变化不会重复发出该事件。
120
125
  - 传入外部 `form` 时,组件级 `onFinish`、`onFinishFailed`、`onValuesChange` 和 `onFieldsChange` 不会重新配置该实例;这些回调应在创建外部实例时配置。
126
+ - 传入外部 `form` 时,`onReset` 与 `onLoadingChange` 同样不会重新配置该实例;请在创建该实例时传入回调。
121
127
  - `onFinish`、`onFinishFailed`、`onValuesChange` 和 `onFieldsChange` 是声明过的回调 Props,不在 `defineEmits` 的事件列表中。模板中的 `@finish` 等写法会按 Vue listener Prop 规则映射到这些 Props,但 TypeScript 用户更适合显式传回调。
122
128
 
123
129
  内部表单模式还存在一个 `onFinish` 等待边界:组件传给 core 的包装函数会调用 `props.onFinish(values)`,但没有 `return` 或 `await` 其返回值。因此 `submit()` 只等待这层立即完成的包装 Promise,不等待业务 `onFinish` 返回的异步任务;该任务后续 reject 也不会沿 `submit()` 传播。业务回调若在返回 Promise 前同步抛错,包装函数会转为 rejected Promise,core 的 `submit()` 仍会收到该拒绝。传入外部 `form` 时组件不会安装这层包装,等待和错误传播完全取决于外部实例创建者配置的回调;core `createForm()` 本身会 `await` 直接传给它的 `onFinish`。
@@ -141,6 +147,8 @@ console.log(Schemx === schemxForm) // true
141
147
  | `{name}Content` | 当前字段 Schema 字段及 `columnElement` | 替换控件内容区域;`columnElement` 是已经创建的 Renderer VNode;同一数组路径当前对应 `user,nameContent` |
142
148
  | `{name}Error` | 当前字段 Schema 字段及 `errors` | 替换错误区域;同一数组路径当前对应 `user,nameError` |
143
149
  | `{name}:{slotName}` | 原样传给 Renderer | 去掉 `{name}:` 前缀后作为 Renderer 命名 Slot;同一数组路径的前缀为 `user.name:`,例如 `user.name:prefix` |
150
+ | `submitter` | `{ form, loading, disabled, submit }` | 替换内置提交按钮。 |
151
+ | `resetter` | `{ form, loading, disabled, reset }` | 替换内置重置按钮。 |
144
152
 
145
153
  字段名和 `Label` / `Content` / `Error` 组合支持 camelCase 与 kebab-case 互查。子 Renderer Slot 的字段名前缀也支持这两种形式。
146
154
 
@@ -160,6 +168,18 @@ console.log(Schemx === schemxForm) // true
160
168
  </Schemx>
161
169
  ```
162
170
 
171
+ ### `Button`
172
+
173
+ 根入口导出独立的 `Button` 组件及 `SchemxButtonProps`、`SchemxButtonSize` 类型。它支持原生按钮属性、`loading`、`loadingText`、`disabled` 与 `size`(`small`、`medium`、`large`);加载时会自动禁用按钮并设置 `aria-busy`。`prefix`、默认与 `suffix` 插槽依次渲染,`loadingText` 仅替换默认插槽内容。
174
+
175
+ ```vue
176
+ <Button :loading="saving" loading-text="保存中" size="small">
177
+ <template #prefix>✓</template>
178
+ 保存
179
+ <template #suffix>→</template>
180
+ </Button>
181
+ ```
182
+
163
183
  ### 组件 ref 暴露实例
164
184
 
165
185
  组件通过 `defineExpose` 暴露传入或内部创建的完整 `SchemxInstance<T>`。该接口当前共有 41 个成员:
@@ -701,6 +721,8 @@ componentProps: {
701
721
  | `useDictionary()` | 管理依赖字段的函数式选项来源 |
702
722
  | `useStableRef()` | 创建引用保持稳定的 `shallowRef` |
703
723
  | `useViewSchemas()` | 把 `subscribeViewSchemas()` 桥接为 Vue `shallowRef` |
724
+ | `useFormSelector()` | 从共享表单值 Bridge 派生只读 Vue Ref |
725
+ | `getCoreForm()` | 从 Vue Facade 取得原始 Core Form |
704
726
 
705
727
  `useForm()` 只负责创建和销毁实例。如需让自定义组件树中的 `useField()`、`useDictionary()` 或 `FormItem` 找到实例,Provider 必须在 `setup()` 的同步调用栈中调用 `createFormContext(form)`;展示层还应调用 `createFormConfigContext({ schemaConfig })`。直接使用 `<Schemx>` 时,这两种上下文已经由组件提供。
706
728
 
@@ -713,10 +735,10 @@ componentProps: {
713
735
  ```ts
714
736
  function useForm<TValues extends Values = Values>(
715
737
  options?: CreateFormOptions<TValues, NamePath<TValues>>
716
- ): SchemxInstance<TValues>
738
+ ): VueSchemxInstance<TValues>
717
739
  ```
718
740
 
719
- 源码中参数类型名为 `UseFormOptions<TValues>`,结构等同上面的 `CreateFormOptions`;`UseFormOptions` 未从根入口导出。`options` 可选,未传 Registry 时使用 Vue 全局 `rendererRegistry` 和 `validationRuleRegistry`。函数同步返回 `SchemxInstance<TValues>`,不读取 Context,也**不会自动 `provide`**;当前 Vue effect scope 销毁时会调用 `form.destroy()`。非 Vue scope 场景应改用 Core `createForm()` 并自行销毁。
741
+ 源码中参数类型名为 `UseFormOptions<TValues>`,结构等同上面的 `CreateFormOptions`;`UseFormOptions` 未从根入口导出。`options` 可选,未传 Registry 时使用 Vue 全局 `rendererRegistry` 和 `validationRuleRegistry`。函数同步返回 `VueSchemxInstance<TValues>`:它与 `SchemxInstance<TValues>` 结构兼容,但 `getFieldValue()`、`getFieldErrors()`、`isFieldTouched()`、`isFieldPending()`、`getFieldsValue()` 和聚合状态读取可被 Vue effect 追踪。需要原始 Core 实例时使用 `getCoreForm(form)`。`useForm()` 不读取 Context,也**不会自动 `provide`**;当前 Vue effect scope 销毁时会释放 Bridge 并销毁 Form。非 Vue scope 场景应改用 Core `createForm()` 并自行销毁。
720
742
 
721
743
  ```ts
722
744
  import { createFormContext, useForm } from "@schemx/vue"
@@ -730,6 +752,12 @@ createFormContext(form)
730
752
 
731
753
  `useForm()` 除了补全 Vue 全局 Registry 外,会把 Core options 原样传给 `createForm()`。因此直接调用时,`modelValue` 会按 Core 规则覆盖同名 `initialValues` 并形成初始快照,`submit()` 也会等待直接传入的 `onFinish` Promise。前文 `modelValue` 不初始化、不持续反向同步,以及 `onFinish` Promise 不被等待的限制,只属于 `<Schemx>` 内部创建实例时的 Props 转换与回调包装,不属于 `useForm()` 本身。`defaultRendererType` 仍会受全局 Renderer Registry 已被补全的影响,见前文说明。
732
754
 
755
+ ### Vue Facade 与共享 Bridge
756
+
757
+ 同一 Core Form 始终复用一个 Facade;Vue Bridge 按需创建,并在存活期间由各个 Vue owner 共享。Facade 的写入、校验、提交、Schema 与 Registry 方法都委托原始 Core Form;仅常用状态读取会额外建立 Vue 依赖。`getFieldsValue()` 无参数时依赖全表值,传入路径时仅依赖这些字段。`getFieldSnapshot()`、`getFieldsSnapshot()`、`getInitialValue()` 与 `getInitialValues()` 保持 Core 的无依赖快照语义。
758
+
759
+ `useFormSelector()` 和 `useField()` 复用这个 Bridge;前者返回 selector 结果的只读 Ref,后者复用字段 `value`、`errors`、`touched` 和 `pending` Ref。最后一个 Vue owner 释放或手动调用 `form.destroy()` 后,Bridge 会停止订阅并释放 Core External Store。
760
+
733
761
  ### 3 组 Context API
734
762
 
735
763
  3 组 Reader 都要求 Context 存在,没有可选读取模式或默认值。`create*Context()` 必须在 Provider 组件的 `setup()` 同步阶段调用,且只对后代可见;`use*Context()` 仅读取最近祖先提供的值。
@@ -737,8 +765,8 @@ createFormContext(form)
737
765
  ```ts
738
766
  function createFormContext<TValues extends Values = Values>(
739
767
  instance: SchemxInstance<TValues>
740
- ): void
741
- function useFormContext<TValues extends Values = Values>(): SchemxInstance<TValues>
768
+ ): VueSchemxInstance<TValues>
769
+ function useFormContext<TValues extends Values = Values>(): VueSchemxInstance<TValues>
742
770
 
743
771
  function createFieldContext<TValues extends Values = Values>(
744
772
  field: FieldInstance<TValues>
@@ -755,7 +783,7 @@ function useFormConfigContext(): FormContextProps
755
783
 
756
784
  | Provider 签名 | Reader 签名 | 职责、所有权与缺失行为 |
757
785
  | ------------------------------------------------------------------ | ------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------- |
758
- | `createFormContext<T>(form: SchemxInstance<T>): void` | `useFormContext<T>(): SchemxInstance<T>` | 提供 / 读取表单实例。Provider 不创建、不销毁实例;缺失时 Reader 抛出带 `createFormContext(form)` 指引的 `Error`。 |
786
+ | `createFormContext<T>(form: SchemxInstance<T>): VueSchemxInstance<T>` | `useFormContext<T>(): VueSchemxInstance<T>` | Core Form 或已有 Facade 归一化后提供 / 读取。Provider 只持有 Bridge,不销毁外部 Core Form;缺失时 Reader 抛出带 `createFormContext(form)` 指引的 `Error`。 |
759
787
  | `createFieldContext<TValues extends Values = Values>(field): void` | `useFieldContext(): FieldInstance<Values>` | 提供 / 读取 `useField()` 返回的字段控制器。Provider 不创建字段、不接管订阅;缺失时 Reader 抛出指向 `createFieldContext(field)` 的 `Error`。 |
760
788
  | `createFormConfigContext<T>(props: FormContextProps<T>): void` | `useFormConfigContext(): FormContextProps` | 提供 / 读取表单展示配置。Provider 不复制、不更新传入对象;缺失时 Reader 抛出带 `createFormConfigContext(props)` 指引的 `Error`。 |
761
789
 
@@ -803,9 +831,9 @@ function useField<TValues extends Values = Values>(
803
831
  ): FieldInstance<TValues>
804
832
  ```
805
833
 
806
- Hook 从 `useFormContext()` 取得表单,为 `name` 创建 Core 字段控制器,再用 Vue Ref 桥接状态。它保留 Core `SchemxFieldInstance` 的全部成员,并增加 `value: Ref<FieldValue<...> | undefined>`、`errors: ComputedRef<readonly string[]>`、`dirty: ComputedRef<boolean>` 与 `pending: ComputedRef<boolean>`;`dirty` 实际读取 Core `isTouched()`。只有 `value` 可通过 `.value` 写入,其余三个 computed 状态只读。`getValue()` 被覆盖为读取 `value.value`。Core 方法的完整签名见 [Core 单字段控制器](../core#单字段控制器)。
834
+ Hook 从 `useFormContext()` 取得 Facade,为 `name` 创建 Core 字段控制器,并复用共享 Vue Field Bridge。它保留 Core `SchemxFieldInstance` 的全部成员,并增加 `value: Ref<FieldValue<...> | undefined>`、`errors: ComputedRef<readonly string[]>`、`dirty: ComputedRef<boolean>` 与 `pending: ComputedRef<boolean>`;`dirty` 读取字段 touched Ref。`getValue()`、`getErrors()`、`isTouched()` `isPending()` 都读取对应 Vue Ref,`getValues()` 则通过 Facade 读取全表值。只有 `value` 可通过 `.value` 写入,其余三个 computed 状态只读。Core 方法的完整签名见 [Core 单字段控制器](../core#单字段控制器)。
807
835
 
808
- `useField()` 的缓存第 1 层按 `form` 实例引用区分,第 2 层直接以传入的 `name` 作为 `Map` key。因此字符串路径按相同字符串值共享桥接订阅;数组 `NamePath` 只在复用同一数组引用时共享,内容相同但新建的数组会生成不同缓存条目。共享条目使用引用计数:组件卸载时计数减 1,归零后取消 effect 并移除缓存。`FieldInstance` 可从 `@schemx/vue` 根入口导入;不需要依赖深层路径。
836
+ `useField()` 不缓存字段控制器对象;每次调用只创建轻量的 Core 控制器包装,并复用当前 Form Bridge 中按 Field External Store 身份缓存的字段 Ref。Bridge 以公开 `NamePath` 规范化结果复用字段;当前公开类型仅支持字符串路径。Form Bridge 由 `useForm()`、Form Context `useFormSelector()` Vue owner 的引用计数持有,最后一个 owner 释放或手动销毁后停止订阅。`FieldInstance` 可从 `@schemx/vue` 根入口导入;不需要依赖深层路径。
809
837
 
810
838
  ```ts
811
839
  import { createFieldContext, useField } from "@schemx/vue"
@@ -1049,6 +1077,7 @@ Vue 根入口自有以下公开类型:
1049
1077
  | 表单组件 | `schemxForm` | 可安装的表单组件;与 `default` 指向同一对象。 |
1050
1078
  | 组件 | `FormItem` | 渲染字段或分组 ViewSchema。 |
1051
1079
  | 组件 | `FormGroup` | 渲染分组 ViewSchema。 |
1080
+ | 组件 | `Button` | 支持 loading、尺寸与前后缀插槽的基础按钮。 |
1052
1081
  | HOC | `WithRemoteOptions` | 为 Renderer 接入 Dictionary。 |
1053
1082
  | Registry | `rendererRegistry` | Vue 全局 Renderer Registry。 |
1054
1083
  | Registry | `validationRuleRegistry` | Vue 全局 ValidationRuleRegistry。 |
@@ -1074,6 +1103,7 @@ Vue 根入口自有以下公开类型:
1074
1103
  | Dictionary 类型 | `SchemxWithDictionary` | 为 Props 增加 `dict`。 |
1075
1104
  | Dictionary 类型 | `UseDictionaryReturn` | `useDictionary()` 返回值。 |
1076
1105
  | 表单类型 | `SchemxFormProps<TValues>` | `<Schemx>` 组件 Props 类型。 |
1106
+ | 按钮类型 | `SchemxButtonProps`、`SchemxButtonSize` | `Button` 的 Props 与尺寸类型。 |
1077
1107
  | 字段类型 | `FieldInstance<TValues>` | Vue Ref / Computed 桥接后的字段控制器类型。 |
1078
1108
 
1079
1109
  根入口没有名为 `SchemxForm` 的命名导出。
package/dist/analyze.html CHANGED
@@ -4929,7 +4929,7 @@ var drawChart = (function (exports) {
4929
4929
  </script>
4930
4930
  <script>
4931
4931
  /*<!--*/
4932
- const data = {"version":2,"tree":{"name":"root","children":[{"name":"index.cjs","children":[{"name":"src","children":[{"name":"styles/index.css","uid":"59ce7164-1"},{"name":"config/appConfig.ts","uid":"59ce7164-3"},{"name":"utils","children":[{"uid":"59ce7164-5","name":"rendererProvider.ts"},{"uid":"59ce7164-7","name":"rulesProvider.ts"},{"uid":"59ce7164-23","name":"equal.ts"},{"uid":"59ce7164-29","name":"validation.ts"},{"uid":"59ce7164-31","name":"slot.ts"},{"uid":"59ce7164-39","name":"helpers.ts"}]},{"name":"hooks","children":[{"uid":"59ce7164-9","name":"useForm.ts"},{"uid":"59ce7164-11","name":"provideFormContext.ts"},{"uid":"59ce7164-13","name":"useField.ts"},{"uid":"59ce7164-15","name":"provideFieldContext.ts"},{"uid":"59ce7164-17","name":"useWatch.ts"},{"uid":"59ce7164-19","name":"useDictionary.ts"},{"uid":"59ce7164-21","name":"provideFormConfigContext.ts"},{"uid":"59ce7164-25","name":"useStableRef.ts"},{"uid":"59ce7164-27","name":"useViewSchemas.ts"}]},{"name":"components","children":[{"name":"FormGroup/index.tsx","uid":"59ce7164-33"},{"name":"FormItem","children":[{"uid":"59ce7164-35","name":"slot.tsx"},{"uid":"59ce7164-37","name":"index.tsx"}]}]},{"uid":"59ce7164-41","name":"form.vue?vue&type=script&setup=true&lang.ts"},{"uid":"59ce7164-43","name":"form.ts"},{"name":"hocs/withRemoteOptions.ts","uid":"59ce7164-45"},{"uid":"59ce7164-47","name":"index.ts"}]}]}],"isRoot":true},"nodeParts":{"59ce7164-1":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"metaUid":"59ce7164-0"},"59ce7164-3":{"renderedLength":957,"gzipLength":384,"brotliLength":326,"metaUid":"59ce7164-2"},"59ce7164-5":{"renderedLength":65,"gzipLength":72,"brotliLength":52,"metaUid":"59ce7164-4"},"59ce7164-7":{"renderedLength":67,"gzipLength":68,"brotliLength":53,"metaUid":"59ce7164-6"},"59ce7164-9":{"renderedLength":815,"gzipLength":323,"brotliLength":286,"metaUid":"59ce7164-8"},"59ce7164-11":{"renderedLength":468,"gzipLength":280,"brotliLength":223,"metaUid":"59ce7164-10"},"59ce7164-13":{"renderedLength":1600,"gzipLength":561,"brotliLength":498,"metaUid":"59ce7164-12"},"59ce7164-15":{"renderedLength":410,"gzipLength":249,"brotliLength":198,"metaUid":"59ce7164-14"},"59ce7164-17":{"renderedLength":551,"gzipLength":219,"brotliLength":186,"metaUid":"59ce7164-16"},"59ce7164-19":{"renderedLength":2879,"gzipLength":953,"brotliLength":814,"metaUid":"59ce7164-18"},"59ce7164-21":{"renderedLength":483,"gzipLength":288,"brotliLength":239,"metaUid":"59ce7164-20"},"59ce7164-23":{"renderedLength":206,"gzipLength":156,"brotliLength":122,"metaUid":"59ce7164-22"},"59ce7164-25":{"renderedLength":240,"gzipLength":168,"brotliLength":143,"metaUid":"59ce7164-24"},"59ce7164-27":{"renderedLength":269,"gzipLength":168,"brotliLength":140,"metaUid":"59ce7164-26"},"59ce7164-29":{"renderedLength":788,"gzipLength":325,"brotliLength":267,"metaUid":"59ce7164-28"},"59ce7164-31":{"renderedLength":1278,"gzipLength":491,"brotliLength":404,"metaUid":"59ce7164-30"},"59ce7164-33":{"renderedLength":3726,"gzipLength":1330,"brotliLength":1126,"metaUid":"59ce7164-32"},"59ce7164-35":{"renderedLength":4194,"gzipLength":1528,"brotliLength":1268,"metaUid":"59ce7164-34"},"59ce7164-37":{"renderedLength":5525,"gzipLength":1897,"brotliLength":1561,"metaUid":"59ce7164-36"},"59ce7164-39":{"renderedLength":1052,"gzipLength":382,"brotliLength":332,"metaUid":"59ce7164-38"},"59ce7164-41":{"renderedLength":4713,"gzipLength":1498,"brotliLength":1309,"metaUid":"59ce7164-40"},"59ce7164-43":{"renderedLength":384,"gzipLength":269,"brotliLength":214,"metaUid":"59ce7164-42"},"59ce7164-45":{"renderedLength":1052,"gzipLength":455,"brotliLength":378,"metaUid":"59ce7164-44"},"59ce7164-47":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"metaUid":"59ce7164-46"}},"nodeMetas":{"59ce7164-0":{"id":"/src/styles/index.css","moduleParts":{"index.cjs":"59ce7164-1"},"imported":[],"importedBy":[{"uid":"59ce7164-46"},{"uid":"59ce7164-40"}]},"59ce7164-2":{"id":"/src/config/appConfig.ts","moduleParts":{"index.cjs":"59ce7164-3"},"imported":[{"uid":"59ce7164-55"}],"importedBy":[{"uid":"59ce7164-52"}]},"59ce7164-4":{"id":"/src/utils/rendererProvider.ts","moduleParts":{"index.cjs":"59ce7164-5"},"imported":[{"uid":"59ce7164-54"}],"importedBy":[{"uid":"59ce7164-46"},{"uid":"59ce7164-8"}]},"59ce7164-6":{"id":"/src/utils/rulesProvider.ts","moduleParts":{"index.cjs":"59ce7164-7"},"imported":[{"uid":"59ce7164-50"}],"importedBy":[{"uid":"59ce7164-46"},{"uid":"59ce7164-8"}]},"59ce7164-8":{"id":"/src/hooks/useForm.ts","moduleParts":{"index.cjs":"59ce7164-9"},"imported":[{"uid":"59ce7164-55"},{"uid":"59ce7164-50"},{"uid":"59ce7164-52"},{"uid":"59ce7164-4"},{"uid":"59ce7164-6"}],"importedBy":[{"uid":"59ce7164-48"}]},"59ce7164-10":{"id":"/src/hooks/provideFormContext.ts","moduleParts":{"index.cjs":"59ce7164-11"},"imported":[{"uid":"59ce7164-55"}],"importedBy":[{"uid":"59ce7164-48"},{"uid":"59ce7164-12"},{"uid":"59ce7164-16"},{"uid":"59ce7164-18"}]},"59ce7164-12":{"id":"/src/hooks/useField.ts","moduleParts":{"index.cjs":"59ce7164-13"},"imported":[{"uid":"59ce7164-55"},{"uid":"59ce7164-50"},{"uid":"59ce7164-10"}],"importedBy":[{"uid":"59ce7164-48"}]},"59ce7164-14":{"id":"/src/hooks/provideFieldContext.ts","moduleParts":{"index.cjs":"59ce7164-15"},"imported":[{"uid":"59ce7164-55"}],"importedBy":[{"uid":"59ce7164-48"},{"uid":"59ce7164-44"}]},"59ce7164-16":{"id":"/src/hooks/useWatch.ts","moduleParts":{"index.cjs":"59ce7164-17"},"imported":[{"uid":"59ce7164-55"},{"uid":"59ce7164-50"},{"uid":"59ce7164-10"}],"importedBy":[{"uid":"59ce7164-48"},{"uid":"59ce7164-18"}]},"59ce7164-18":{"id":"/src/hooks/useDictionary.ts","moduleParts":{"index.cjs":"59ce7164-19"},"imported":[{"uid":"59ce7164-55"},{"uid":"59ce7164-10"},{"uid":"59ce7164-16"}],"importedBy":[{"uid":"59ce7164-48"},{"uid":"59ce7164-44"}]},"59ce7164-20":{"id":"/src/hooks/provideFormConfigContext.ts","moduleParts":{"index.cjs":"59ce7164-21"},"imported":[{"uid":"59ce7164-55"}],"importedBy":[{"uid":"59ce7164-48"}]},"59ce7164-22":{"id":"/src/utils/equal.ts","moduleParts":{"index.cjs":"59ce7164-23"},"imported":[],"importedBy":[{"uid":"59ce7164-24"}]},"59ce7164-24":{"id":"/src/hooks/useStableRef.ts","moduleParts":{"index.cjs":"59ce7164-25"},"imported":[{"uid":"59ce7164-55"},{"uid":"59ce7164-22"}],"importedBy":[{"uid":"59ce7164-48"}]},"59ce7164-26":{"id":"/src/hooks/useViewSchemas.ts","moduleParts":{"index.cjs":"59ce7164-27"},"imported":[{"uid":"59ce7164-55"}],"importedBy":[{"uid":"59ce7164-48"}]},"59ce7164-28":{"id":"/src/utils/validation.ts","moduleParts":{"index.cjs":"59ce7164-29"},"imported":[],"importedBy":[{"uid":"59ce7164-57"}]},"59ce7164-30":{"id":"/src/utils/slot.ts","moduleParts":{"index.cjs":"59ce7164-31"},"imported":[],"importedBy":[{"uid":"59ce7164-57"}]},"59ce7164-32":{"id":"/src/components/FormGroup/index.tsx","moduleParts":{"index.cjs":"59ce7164-33"},"imported":[{"uid":"59ce7164-55"},{"uid":"59ce7164-56"},{"uid":"59ce7164-36"}],"importedBy":[{"uid":"59ce7164-46"},{"uid":"59ce7164-36"}]},"59ce7164-34":{"id":"/src/components/FormItem/slot.tsx","moduleParts":{"index.cjs":"59ce7164-35"},"imported":[{"uid":"59ce7164-55"},{"uid":"59ce7164-57"}],"importedBy":[{"uid":"59ce7164-36"}]},"59ce7164-36":{"id":"/src/components/FormItem/index.tsx","moduleParts":{"index.cjs":"59ce7164-37"},"imported":[{"uid":"59ce7164-55"},{"uid":"59ce7164-50"},{"uid":"59ce7164-56"},{"uid":"59ce7164-48"},{"uid":"59ce7164-57"},{"uid":"59ce7164-32"},{"uid":"59ce7164-34"}],"importedBy":[{"uid":"59ce7164-46"},{"uid":"59ce7164-42"},{"uid":"59ce7164-32"},{"uid":"59ce7164-40"}]},"59ce7164-38":{"id":"/src/utils/helpers.ts","moduleParts":{"index.cjs":"59ce7164-39"},"imported":[{"uid":"59ce7164-50"}],"importedBy":[{"uid":"59ce7164-40"}]},"59ce7164-40":{"id":"/src/form.vue?vue&type=script&setup=true&lang.ts","moduleParts":{"index.cjs":"59ce7164-41"},"imported":[{"uid":"59ce7164-55"},{"uid":"59ce7164-50"},{"uid":"59ce7164-64"},{"uid":"59ce7164-36"},{"uid":"59ce7164-48"},{"uid":"59ce7164-38"},{"uid":"59ce7164-0"}],"importedBy":[{"uid":"59ce7164-61"}]},"59ce7164-42":{"id":"/src/form.ts","moduleParts":{"index.cjs":"59ce7164-43"},"imported":[{"uid":"59ce7164-36"},{"uid":"59ce7164-52"},{"uid":"59ce7164-53"}],"importedBy":[{"uid":"59ce7164-46"}]},"59ce7164-44":{"id":"/src/hocs/withRemoteOptions.ts","moduleParts":{"index.cjs":"59ce7164-45"},"imported":[{"uid":"59ce7164-55"},{"uid":"59ce7164-14"},{"uid":"59ce7164-18"}],"importedBy":[{"uid":"59ce7164-49"}]},"59ce7164-46":{"id":"/src/index.ts","moduleParts":{"index.cjs":"59ce7164-47"},"imported":[{"uid":"59ce7164-0"},{"uid":"59ce7164-42"},{"uid":"59ce7164-4"},{"uid":"59ce7164-6"},{"uid":"59ce7164-48"},{"uid":"59ce7164-49"},{"uid":"59ce7164-36"},{"uid":"59ce7164-32"},{"uid":"59ce7164-50"},{"uid":"59ce7164-51"}],"importedBy":[],"isEntry":true},"59ce7164-48":{"id":"/src/hooks/index.ts","moduleParts":{},"imported":[{"uid":"59ce7164-8"},{"uid":"59ce7164-10"},{"uid":"59ce7164-12"},{"uid":"59ce7164-14"},{"uid":"59ce7164-16"},{"uid":"59ce7164-18"},{"uid":"59ce7164-20"},{"uid":"59ce7164-24"},{"uid":"59ce7164-26"}],"importedBy":[{"uid":"59ce7164-46"},{"uid":"59ce7164-36"},{"uid":"59ce7164-40"}]},"59ce7164-49":{"id":"/src/hocs/index.ts","moduleParts":{},"imported":[{"uid":"59ce7164-44"}],"importedBy":[{"uid":"59ce7164-46"}]},"59ce7164-50":{"id":"@schemx/core","moduleParts":{},"imported":[],"importedBy":[{"uid":"59ce7164-46"},{"uid":"59ce7164-6"},{"uid":"59ce7164-36"},{"uid":"59ce7164-8"},{"uid":"59ce7164-12"},{"uid":"59ce7164-16"},{"uid":"59ce7164-40"},{"uid":"59ce7164-38"}],"isExternal":true},"59ce7164-51":{"id":"/src/types/index.ts","moduleParts":{},"imported":[{"uid":"59ce7164-58"},{"uid":"59ce7164-59"},{"uid":"59ce7164-60"}],"importedBy":[{"uid":"59ce7164-46"}]},"59ce7164-52":{"id":"/src/config/index.ts","moduleParts":{},"imported":[{"uid":"59ce7164-2"}],"importedBy":[{"uid":"59ce7164-42"},{"uid":"59ce7164-8"}]},"59ce7164-53":{"id":"/src/formRuntime.js","moduleParts":{},"imported":[{"uid":"59ce7164-61"}],"importedBy":[{"uid":"59ce7164-42"}]},"59ce7164-54":{"id":"@schemx/core/adapter","moduleParts":{},"imported":[],"importedBy":[{"uid":"59ce7164-4"}],"isExternal":true},"59ce7164-55":{"id":"vue","moduleParts":{},"imported":[],"importedBy":[{"uid":"59ce7164-36"},{"uid":"59ce7164-32"},{"uid":"59ce7164-8"},{"uid":"59ce7164-10"},{"uid":"59ce7164-12"},{"uid":"59ce7164-14"},{"uid":"59ce7164-16"},{"uid":"59ce7164-18"},{"uid":"59ce7164-20"},{"uid":"59ce7164-24"},{"uid":"59ce7164-26"},{"uid":"59ce7164-44"},{"uid":"59ce7164-34"},{"uid":"59ce7164-2"},{"uid":"59ce7164-40"}],"isExternal":true},"59ce7164-56":{"id":"classnames","moduleParts":{},"imported":[],"importedBy":[{"uid":"59ce7164-36"},{"uid":"59ce7164-32"}],"isExternal":true},"59ce7164-57":{"id":"/src/utils/index.ts","moduleParts":{},"imported":[{"uid":"59ce7164-62"},{"uid":"59ce7164-28"},{"uid":"59ce7164-30"},{"uid":"59ce7164-63"}],"importedBy":[{"uid":"59ce7164-36"},{"uid":"59ce7164-34"}]},"59ce7164-58":{"id":"/src/types/dictionary.ts","moduleParts":{},"imported":[],"importedBy":[{"uid":"59ce7164-51"}]},"59ce7164-59":{"id":"/src/types/form.ts","moduleParts":{},"imported":[],"importedBy":[{"uid":"59ce7164-51"}]},"59ce7164-60":{"id":"/src/types/field.ts","moduleParts":{},"imported":[],"importedBy":[{"uid":"59ce7164-51"}]},"59ce7164-61":{"id":"/src/form.vue","moduleParts":{},"imported":[{"uid":"59ce7164-40"}],"importedBy":[{"uid":"59ce7164-53"}]},"59ce7164-62":{"id":"/src/utils/dynamic.ts","moduleParts":{},"imported":[{"uid":"59ce7164-64"}],"importedBy":[{"uid":"59ce7164-57"}]},"59ce7164-63":{"id":"/src/utils/diff.ts","moduleParts":{},"imported":[{"uid":"59ce7164-65"}],"importedBy":[{"uid":"59ce7164-57"}]},"59ce7164-64":{"id":"es-toolkit","moduleParts":{},"imported":[],"importedBy":[{"uid":"59ce7164-62"},{"uid":"59ce7164-40"}],"isExternal":true},"59ce7164-65":{"id":"es-toolkit/compat","moduleParts":{},"imported":[],"importedBy":[{"uid":"59ce7164-63"}],"isExternal":true}},"env":{"rollup":"4.14.3"},"options":{"gzip":true,"brotli":true,"sourcemap":false}};
4932
+ const data = {"version":2,"tree":{"name":"root","children":[{"name":"index.cjs","children":[{"name":"src","children":[{"name":"styles/index.css","uid":"409cd899-1"},{"name":"config/appConfig.ts","uid":"409cd899-3"},{"uid":"409cd899-5","name":"formBridge.ts"},{"name":"utils","children":[{"uid":"409cd899-7","name":"rendererProvider.ts"},{"uid":"409cd899-9","name":"rulesProvider.ts"},{"uid":"409cd899-25","name":"equal.ts"},{"uid":"409cd899-33","name":"validation.ts"},{"uid":"409cd899-35","name":"slot.ts"},{"uid":"409cd899-47","name":"helpers.ts"}]},{"name":"hooks","children":[{"uid":"409cd899-11","name":"useForm.ts"},{"uid":"409cd899-13","name":"provideFormContext.ts"},{"uid":"409cd899-15","name":"useField.ts"},{"uid":"409cd899-17","name":"provideFieldContext.ts"},{"uid":"409cd899-19","name":"useWatch.ts"},{"uid":"409cd899-21","name":"useDictionary.ts"},{"uid":"409cd899-23","name":"provideFormConfigContext.ts"},{"uid":"409cd899-27","name":"useStableRef.ts"},{"uid":"409cd899-29","name":"useViewSchemas.ts"},{"uid":"409cd899-31","name":"useFormSelector.ts"}]},{"name":"components","children":[{"name":"FormGroup/index.tsx","uid":"409cd899-37"},{"name":"FormItem","children":[{"uid":"409cd899-39","name":"slot.tsx"},{"uid":"409cd899-41","name":"index.tsx"}]},{"name":"Button","children":[{"uid":"409cd899-43","name":"index.vue?vue&type=script&setup=true&lang.ts"},{"uid":"409cd899-45","name":"index.vue?vue&type=style&index=0&lang.css"}]}]},{"uid":"409cd899-49","name":"form.vue?vue&type=script&setup=true&lang.ts"},{"uid":"409cd899-51","name":"form.ts"},{"name":"hocs/withRemoteOptions.ts","uid":"409cd899-53"},{"uid":"409cd899-55","name":"index.ts"}]}]}],"isRoot":true},"nodeParts":{"409cd899-1":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"metaUid":"409cd899-0"},"409cd899-3":{"renderedLength":1317,"gzipLength":489,"brotliLength":422,"metaUid":"409cd899-2"},"409cd899-5":{"renderedLength":6908,"gzipLength":1387,"brotliLength":1226,"metaUid":"409cd899-4"},"409cd899-7":{"renderedLength":65,"gzipLength":72,"brotliLength":52,"metaUid":"409cd899-6"},"409cd899-9":{"renderedLength":67,"gzipLength":68,"brotliLength":53,"metaUid":"409cd899-8"},"409cd899-11":{"renderedLength":1079,"gzipLength":482,"brotliLength":400,"metaUid":"409cd899-10"},"409cd899-13":{"renderedLength":628,"gzipLength":340,"brotliLength":290,"metaUid":"409cd899-12"},"409cd899-15":{"renderedLength":1038,"gzipLength":344,"brotliLength":307,"metaUid":"409cd899-14"},"409cd899-17":{"renderedLength":410,"gzipLength":249,"brotliLength":198,"metaUid":"409cd899-16"},"409cd899-19":{"renderedLength":564,"gzipLength":229,"brotliLength":192,"metaUid":"409cd899-18"},"409cd899-21":{"renderedLength":2879,"gzipLength":953,"brotliLength":814,"metaUid":"409cd899-20"},"409cd899-23":{"renderedLength":483,"gzipLength":288,"brotliLength":239,"metaUid":"409cd899-22"},"409cd899-25":{"renderedLength":206,"gzipLength":156,"brotliLength":122,"metaUid":"409cd899-24"},"409cd899-27":{"renderedLength":240,"gzipLength":168,"brotliLength":143,"metaUid":"409cd899-26"},"409cd899-29":{"renderedLength":1781,"gzipLength":706,"brotliLength":590,"metaUid":"409cd899-28"},"409cd899-31":{"renderedLength":594,"gzipLength":306,"brotliLength":266,"metaUid":"409cd899-30"},"409cd899-33":{"renderedLength":788,"gzipLength":325,"brotliLength":267,"metaUid":"409cd899-32"},"409cd899-35":{"renderedLength":1278,"gzipLength":491,"brotliLength":404,"metaUid":"409cd899-34"},"409cd899-37":{"renderedLength":3726,"gzipLength":1330,"brotliLength":1126,"metaUid":"409cd899-36"},"409cd899-39":{"renderedLength":4194,"gzipLength":1528,"brotliLength":1268,"metaUid":"409cd899-38"},"409cd899-41":{"renderedLength":5674,"gzipLength":2071,"brotliLength":1707,"metaUid":"409cd899-40"},"409cd899-43":{"renderedLength":2486,"gzipLength":913,"brotliLength":789,"metaUid":"409cd899-42"},"409cd899-45":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"metaUid":"409cd899-44"},"409cd899-47":{"renderedLength":1052,"gzipLength":382,"brotliLength":332,"metaUid":"409cd899-46"},"409cd899-49":{"renderedLength":10188,"gzipLength":2759,"brotliLength":2326,"metaUid":"409cd899-48"},"409cd899-51":{"renderedLength":384,"gzipLength":269,"brotliLength":214,"metaUid":"409cd899-50"},"409cd899-53":{"renderedLength":1052,"gzipLength":455,"brotliLength":378,"metaUid":"409cd899-52"},"409cd899-55":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"metaUid":"409cd899-54"}},"nodeMetas":{"409cd899-0":{"id":"/src/styles/index.css","moduleParts":{"index.cjs":"409cd899-1"},"imported":[],"importedBy":[{"uid":"409cd899-54"},{"uid":"409cd899-48"}]},"409cd899-2":{"id":"/src/config/appConfig.ts","moduleParts":{"index.cjs":"409cd899-3"},"imported":[{"uid":"409cd899-65"}],"importedBy":[{"uid":"409cd899-61"}]},"409cd899-4":{"id":"/src/formBridge.ts","moduleParts":{"index.cjs":"409cd899-5"},"imported":[{"uid":"409cd899-65"},{"uid":"409cd899-63"}],"importedBy":[{"uid":"409cd899-56"},{"uid":"409cd899-10"},{"uid":"409cd899-12"},{"uid":"409cd899-14"},{"uid":"409cd899-18"},{"uid":"409cd899-28"},{"uid":"409cd899-30"}]},"409cd899-6":{"id":"/src/utils/rendererProvider.ts","moduleParts":{"index.cjs":"409cd899-7"},"imported":[{"uid":"409cd899-63"}],"importedBy":[{"uid":"409cd899-54"},{"uid":"409cd899-10"}]},"409cd899-8":{"id":"/src/utils/rulesProvider.ts","moduleParts":{"index.cjs":"409cd899-9"},"imported":[{"uid":"409cd899-59"}],"importedBy":[{"uid":"409cd899-54"},{"uid":"409cd899-10"}]},"409cd899-10":{"id":"/src/hooks/useForm.ts","moduleParts":{"index.cjs":"409cd899-11"},"imported":[{"uid":"409cd899-65"},{"uid":"409cd899-59"},{"uid":"409cd899-61"},{"uid":"409cd899-4"},{"uid":"409cd899-6"},{"uid":"409cd899-8"}],"importedBy":[{"uid":"409cd899-56"}]},"409cd899-12":{"id":"/src/hooks/provideFormContext.ts","moduleParts":{"index.cjs":"409cd899-13"},"imported":[{"uid":"409cd899-65"},{"uid":"409cd899-4"}],"importedBy":[{"uid":"409cd899-56"},{"uid":"409cd899-14"},{"uid":"409cd899-18"},{"uid":"409cd899-20"}]},"409cd899-14":{"id":"/src/hooks/useField.ts","moduleParts":{"index.cjs":"409cd899-15"},"imported":[{"uid":"409cd899-65"},{"uid":"409cd899-59"},{"uid":"409cd899-4"},{"uid":"409cd899-12"}],"importedBy":[{"uid":"409cd899-56"}]},"409cd899-16":{"id":"/src/hooks/provideFieldContext.ts","moduleParts":{"index.cjs":"409cd899-17"},"imported":[{"uid":"409cd899-65"}],"importedBy":[{"uid":"409cd899-56"},{"uid":"409cd899-52"}]},"409cd899-18":{"id":"/src/hooks/useWatch.ts","moduleParts":{"index.cjs":"409cd899-19"},"imported":[{"uid":"409cd899-65"},{"uid":"409cd899-59"},{"uid":"409cd899-4"},{"uid":"409cd899-12"}],"importedBy":[{"uid":"409cd899-56"},{"uid":"409cd899-20"}]},"409cd899-20":{"id":"/src/hooks/useDictionary.ts","moduleParts":{"index.cjs":"409cd899-21"},"imported":[{"uid":"409cd899-65"},{"uid":"409cd899-12"},{"uid":"409cd899-18"}],"importedBy":[{"uid":"409cd899-56"},{"uid":"409cd899-52"}]},"409cd899-22":{"id":"/src/hooks/provideFormConfigContext.ts","moduleParts":{"index.cjs":"409cd899-23"},"imported":[{"uid":"409cd899-65"}],"importedBy":[{"uid":"409cd899-56"}]},"409cd899-24":{"id":"/src/utils/equal.ts","moduleParts":{"index.cjs":"409cd899-25"},"imported":[],"importedBy":[{"uid":"409cd899-26"}]},"409cd899-26":{"id":"/src/hooks/useStableRef.ts","moduleParts":{"index.cjs":"409cd899-27"},"imported":[{"uid":"409cd899-65"},{"uid":"409cd899-24"}],"importedBy":[{"uid":"409cd899-56"}]},"409cd899-28":{"id":"/src/hooks/useViewSchemas.ts","moduleParts":{"index.cjs":"409cd899-29"},"imported":[{"uid":"409cd899-65"},{"uid":"409cd899-59"},{"uid":"409cd899-4"}],"importedBy":[{"uid":"409cd899-56"},{"uid":"409cd899-40"}]},"409cd899-30":{"id":"/src/hooks/useFormSelector.ts","moduleParts":{"index.cjs":"409cd899-31"},"imported":[{"uid":"409cd899-65"},{"uid":"409cd899-4"}],"importedBy":[{"uid":"409cd899-56"}]},"409cd899-32":{"id":"/src/utils/validation.ts","moduleParts":{"index.cjs":"409cd899-33"},"imported":[],"importedBy":[{"uid":"409cd899-67"}]},"409cd899-34":{"id":"/src/utils/slot.ts","moduleParts":{"index.cjs":"409cd899-35"},"imported":[],"importedBy":[{"uid":"409cd899-67"}]},"409cd899-36":{"id":"/src/components/FormGroup/index.tsx","moduleParts":{"index.cjs":"409cd899-37"},"imported":[{"uid":"409cd899-65"},{"uid":"409cd899-66"},{"uid":"409cd899-40"}],"importedBy":[{"uid":"409cd899-54"},{"uid":"409cd899-40"}]},"409cd899-38":{"id":"/src/components/FormItem/slot.tsx","moduleParts":{"index.cjs":"409cd899-39"},"imported":[{"uid":"409cd899-65"},{"uid":"409cd899-67"}],"importedBy":[{"uid":"409cd899-40"}]},"409cd899-40":{"id":"/src/components/FormItem/index.tsx","moduleParts":{"index.cjs":"409cd899-41"},"imported":[{"uid":"409cd899-65"},{"uid":"409cd899-59"},{"uid":"409cd899-66"},{"uid":"409cd899-56"},{"uid":"409cd899-28"},{"uid":"409cd899-67"},{"uid":"409cd899-36"},{"uid":"409cd899-38"}],"importedBy":[{"uid":"409cd899-54"},{"uid":"409cd899-50"},{"uid":"409cd899-36"},{"uid":"409cd899-48"}]},"409cd899-42":{"id":"/src/components/Button/index.vue?vue&type=script&setup=true&lang.ts","moduleParts":{"index.cjs":"409cd899-43"},"imported":[{"uid":"409cd899-65"}],"importedBy":[{"uid":"409cd899-64"}]},"409cd899-44":{"id":"/src/components/Button/index.vue?vue&type=style&index=0&lang.css","moduleParts":{"index.cjs":"409cd899-45"},"imported":[],"importedBy":[{"uid":"409cd899-64"}]},"409cd899-46":{"id":"/src/utils/helpers.ts","moduleParts":{"index.cjs":"409cd899-47"},"imported":[{"uid":"409cd899-59"}],"importedBy":[{"uid":"409cd899-48"}]},"409cd899-48":{"id":"/src/form.vue?vue&type=script&setup=true&lang.ts","moduleParts":{"index.cjs":"409cd899-49"},"imported":[{"uid":"409cd899-65"},{"uid":"409cd899-59"},{"uid":"409cd899-74"},{"uid":"409cd899-40"},{"uid":"409cd899-58"},{"uid":"409cd899-56"},{"uid":"409cd899-46"},{"uid":"409cd899-0"}],"importedBy":[{"uid":"409cd899-71"}]},"409cd899-50":{"id":"/src/form.ts","moduleParts":{"index.cjs":"409cd899-51"},"imported":[{"uid":"409cd899-40"},{"uid":"409cd899-61"},{"uid":"409cd899-62"}],"importedBy":[{"uid":"409cd899-54"}]},"409cd899-52":{"id":"/src/hocs/withRemoteOptions.ts","moduleParts":{"index.cjs":"409cd899-53"},"imported":[{"uid":"409cd899-65"},{"uid":"409cd899-16"},{"uid":"409cd899-20"}],"importedBy":[{"uid":"409cd899-57"}]},"409cd899-54":{"id":"/src/index.ts","moduleParts":{"index.cjs":"409cd899-55"},"imported":[{"uid":"409cd899-0"},{"uid":"409cd899-50"},{"uid":"409cd899-6"},{"uid":"409cd899-8"},{"uid":"409cd899-56"},{"uid":"409cd899-57"},{"uid":"409cd899-58"},{"uid":"409cd899-40"},{"uid":"409cd899-36"},{"uid":"409cd899-59"},{"uid":"409cd899-60"}],"importedBy":[],"isEntry":true},"409cd899-56":{"id":"/src/hooks/index.ts","moduleParts":{},"imported":[{"uid":"409cd899-10"},{"uid":"409cd899-4"},{"uid":"409cd899-12"},{"uid":"409cd899-14"},{"uid":"409cd899-16"},{"uid":"409cd899-18"},{"uid":"409cd899-20"},{"uid":"409cd899-22"},{"uid":"409cd899-26"},{"uid":"409cd899-28"},{"uid":"409cd899-30"}],"importedBy":[{"uid":"409cd899-54"},{"uid":"409cd899-40"},{"uid":"409cd899-48"}]},"409cd899-57":{"id":"/src/hocs/index.ts","moduleParts":{},"imported":[{"uid":"409cd899-52"}],"importedBy":[{"uid":"409cd899-54"}]},"409cd899-58":{"id":"/src/components/Button/index.ts","moduleParts":{},"imported":[{"uid":"409cd899-64"}],"importedBy":[{"uid":"409cd899-54"},{"uid":"409cd899-48"}]},"409cd899-59":{"id":"@schemx/core","moduleParts":{},"imported":[],"importedBy":[{"uid":"409cd899-54"},{"uid":"409cd899-8"},{"uid":"409cd899-40"},{"uid":"409cd899-10"},{"uid":"409cd899-14"},{"uid":"409cd899-18"},{"uid":"409cd899-28"},{"uid":"409cd899-48"},{"uid":"409cd899-46"}],"isExternal":true},"409cd899-60":{"id":"/src/types/index.ts","moduleParts":{},"imported":[{"uid":"409cd899-68"},{"uid":"409cd899-69"},{"uid":"409cd899-70"}],"importedBy":[{"uid":"409cd899-54"}]},"409cd899-61":{"id":"/src/config/index.ts","moduleParts":{},"imported":[{"uid":"409cd899-2"}],"importedBy":[{"uid":"409cd899-50"},{"uid":"409cd899-10"}]},"409cd899-62":{"id":"/src/formRuntime.js","moduleParts":{},"imported":[{"uid":"409cd899-71"}],"importedBy":[{"uid":"409cd899-50"}]},"409cd899-63":{"id":"@schemx/core/adapter","moduleParts":{},"imported":[],"importedBy":[{"uid":"409cd899-6"},{"uid":"409cd899-4"}],"isExternal":true},"409cd899-64":{"id":"/src/components/Button/index.vue","moduleParts":{},"imported":[{"uid":"409cd899-42"},{"uid":"409cd899-44"}],"importedBy":[{"uid":"409cd899-58"}]},"409cd899-65":{"id":"vue","moduleParts":{},"imported":[],"importedBy":[{"uid":"409cd899-40"},{"uid":"409cd899-36"},{"uid":"409cd899-10"},{"uid":"409cd899-4"},{"uid":"409cd899-12"},{"uid":"409cd899-14"},{"uid":"409cd899-16"},{"uid":"409cd899-18"},{"uid":"409cd899-20"},{"uid":"409cd899-22"},{"uid":"409cd899-26"},{"uid":"409cd899-28"},{"uid":"409cd899-30"},{"uid":"409cd899-52"},{"uid":"409cd899-38"},{"uid":"409cd899-2"},{"uid":"409cd899-42"},{"uid":"409cd899-48"}],"isExternal":true},"409cd899-66":{"id":"classnames","moduleParts":{},"imported":[],"importedBy":[{"uid":"409cd899-40"},{"uid":"409cd899-36"}],"isExternal":true},"409cd899-67":{"id":"/src/utils/index.ts","moduleParts":{},"imported":[{"uid":"409cd899-72"},{"uid":"409cd899-32"},{"uid":"409cd899-34"},{"uid":"409cd899-73"}],"importedBy":[{"uid":"409cd899-40"},{"uid":"409cd899-38"}]},"409cd899-68":{"id":"/src/types/dictionary.ts","moduleParts":{},"imported":[],"importedBy":[{"uid":"409cd899-60"}]},"409cd899-69":{"id":"/src/types/form.ts","moduleParts":{},"imported":[],"importedBy":[{"uid":"409cd899-60"}]},"409cd899-70":{"id":"/src/types/field.ts","moduleParts":{},"imported":[],"importedBy":[{"uid":"409cd899-60"}]},"409cd899-71":{"id":"/src/form.vue","moduleParts":{},"imported":[{"uid":"409cd899-48"}],"importedBy":[{"uid":"409cd899-62"}]},"409cd899-72":{"id":"/src/utils/dynamic.ts","moduleParts":{},"imported":[{"uid":"409cd899-74"}],"importedBy":[{"uid":"409cd899-67"}]},"409cd899-73":{"id":"/src/utils/diff.ts","moduleParts":{},"imported":[{"uid":"409cd899-75"}],"importedBy":[{"uid":"409cd899-67"}]},"409cd899-74":{"id":"es-toolkit","moduleParts":{},"imported":[],"importedBy":[{"uid":"409cd899-72"},{"uid":"409cd899-48"}],"isExternal":true},"409cd899-75":{"id":"es-toolkit/compat","moduleParts":{},"imported":[],"importedBy":[{"uid":"409cd899-73"}],"isExternal":true}},"env":{"rollup":"4.14.3"},"options":{"gzip":true,"brotli":true,"sourcemap":false}};
4933
4933
 
4934
4934
  const run = () => {
4935
4935
  const width = window.innerWidth;
@@ -0,0 +1,3 @@
1
+ export { default } from './index.vue';
2
+ export type { SchemxButtonProps, SchemxButtonSize } from './types';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Button/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AACrC,YAAY,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA"}
@@ -0,0 +1,21 @@
1
+ import { ButtonHTMLAttributes } from 'vue';
2
+ /**
3
+ * 内置按钮的尺寸。
4
+ */
5
+ export type SchemxButtonSize = "small" | "medium" | "large";
6
+ /**
7
+ * 内置按钮的 Props。
8
+ */
9
+ export interface SchemxButtonProps extends Omit<ButtonHTMLAttributes, "disabled" | "size"> {
10
+ /** 点击事件。 */
11
+ onClick?: (event: MouseEvent) => void;
12
+ /** 是否显示加载状态。加载时按钮不可点击。 */
13
+ loading?: boolean;
14
+ /** 加载状态下替换按钮内容的文本。 */
15
+ loadingText?: string;
16
+ /** 是否禁用按钮。 */
17
+ disabled?: boolean;
18
+ /** 按钮尺寸。 */
19
+ size?: SchemxButtonSize;
20
+ }
21
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/Button/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,KAAK,CAAA;AAE/C;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAA;AAE3D;;GAEG;AACH,MAAM,WAAW,iBACf,SAAQ,IAAI,CAAC,oBAAoB,EAAE,UAAU,GAAG,MAAM,CAAC;IACvD,YAAY;IACZ,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAA;IACrC,0BAA0B;IAC1B,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,sBAAsB;IACtB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,cAAc;IACd,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,YAAY;IACZ,IAAI,CAAC,EAAE,gBAAgB,CAAA;CACxB"}
@@ -2,7 +2,7 @@ import { PropType, VNodeChild } from 'vue';
2
2
  /**
3
3
  * FormItem 属性。
4
4
  *
5
- * @typeParam TValues - 表单值类型
5
+ * 提供待渲染的原始 ViewSchema;具体字段或分组类型由组件内部运行时收窄。
6
6
  */
7
7
  export interface SchemxItemProps {
8
8
  schema: unknown;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/FormItem/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EAA6C,QAAQ,EAAc,MAAM,KAAK,CAAA;AACrF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AA4BrC;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,OAAO,CAAA;CAChB;AAED,QAAA,MAAM,QAAQ;;cAKQ,QAAQ,CAAC,OAAO,CAAC;;;UAMxB,UAAU;;cANH,QAAQ,CAAC,OAAO,CAAC;;;iGAgBrC,CAAA;AA+LF,eAAe,QAAQ,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/FormItem/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EAAgC,QAAQ,EAAE,MAAM,KAAK,CAAA;AAC5D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AA6BrC;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,OAAO,CAAA;CAChB;AAED,QAAA,MAAM,QAAQ;;cAKQ,QAAQ,CAAC,OAAO,CAAC;;;UAYxB,UAAU;;cAZH,QAAQ,CAAC,OAAO,CAAC;;;iGAsBrC,CAAA;AAsLF,eAAe,QAAQ,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"appConfig.d.ts","sourceRoot":"","sources":["../../src/config/appConfig.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,KAAK,GAAG,EAAiD,MAAM,KAAK,CAAA;AAE7E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAoChD;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,GAAG,EAAE,MAAM,GAAE,YAAiB,GAAG,IAAI,CAKhF;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,IAAI,YAAY,CAQjD"}
1
+ {"version":3,"file":"appConfig.d.ts","sourceRoot":"","sources":["../../src/config/appConfig.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,KAAK,GAAG,EAAiD,MAAM,KAAK,CAAA;AAE7E,OAAO,KAAK,EAAE,YAAY,EAA0B,MAAM,cAAc,CAAA;AA0DxE;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,GAAG,EAAE,MAAM,GAAE,YAAiB,GAAG,IAAI,CAKhF;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,IAAI,YAAY,CAQjD"}
@@ -0,0 +1,188 @@
1
+ import { ShallowRef } from 'vue';
2
+ import { FieldExternalStore, FormExternalStore } from '@schemx/core/adapter';
3
+ import { FieldValue, NamePath, SchemxInstance, Values } from '@schemx/core';
4
+ /**
5
+ * 可在 Vue effect 中直接读取 Form 方法的结构兼容实例类型。
6
+ *
7
+ * Facade 与 Core Form 不同一引用,但保留完整的 `SchemxInstance` API。
8
+ */
9
+ export type VueSchemxInstance<TValues extends Values = Values> = SchemxInstance<TValues>;
10
+ /**
11
+ * External Store 中 pending 字段的只读聚合快照。
12
+ */
13
+ type PendingFieldsSnapshot<TValues extends Values> = readonly ReturnType<SchemxInstance<TValues>["getPendingFields"]>[number][];
14
+ /**
15
+ * Vue 中单个字段状态的 Ref 投影。
16
+ */
17
+ export interface VueFieldBridge<TValues extends Values = Values, TName extends NamePath<TValues> = NamePath<TValues>> {
18
+ /**
19
+ * 对应的 Core 字段 External Store。
20
+ */
21
+ readonly store: FieldExternalStore<TValues, TName>;
22
+ /**
23
+ * 当前字段值。
24
+ */
25
+ readonly value: ShallowRef<FieldValue<TValues, TName> | undefined>;
26
+ /**
27
+ * 当前字段错误消息。
28
+ */
29
+ readonly errors: ShallowRef<readonly string[]>;
30
+ /**
31
+ * 当前字段 touched 状态。
32
+ */
33
+ readonly touched: ShallowRef<boolean>;
34
+ /**
35
+ * 当前字段 pending 状态。
36
+ */
37
+ readonly pending: ShallowRef<boolean>;
38
+ }
39
+ /**
40
+ * 包含唯一 Vue Facade 的共享 Form Bridge。
41
+ */
42
+ export interface VueFormBridge<TValues extends Values = Values> {
43
+ /**
44
+ * 原始 Core Form。
45
+ */
46
+ readonly form: SchemxInstance<TValues>;
47
+ /**
48
+ * 该 Form 的 Core External Store owner。
49
+ */
50
+ readonly externalStore: FormExternalStore<TValues>;
51
+ /**
52
+ * 全表值 Ref。
53
+ */
54
+ readonly values: ShallowRef<TValues>;
55
+ /**
56
+ * 已 touched 字段 Ref。
57
+ */
58
+ readonly touchedFields: ShallowRef<readonly NamePath<TValues>[]>;
59
+ /**
60
+ * pending 字段 Ref。
61
+ */
62
+ readonly pendingFields: ShallowRef<PendingFieldsSnapshot<TValues>>;
63
+ /**
64
+ * 当前表单提交状态的 Vue Ref 投影。
65
+ */
66
+ readonly loading: ShallowRef<boolean>;
67
+ /**
68
+ * 按 Field External Store 身份缓存的字段 Ref 投影。
69
+ */
70
+ readonly fieldBridges: Map<object, ManagedVueFieldBridge<TValues>>;
71
+ /**
72
+ * 正在使用当前 Bridge 的 Vue owner 数量。
73
+ */
74
+ refCount: number;
75
+ /**
76
+ * Bridge 是否已被手动或自动释放。
77
+ */
78
+ destroyed: boolean;
79
+ /**
80
+ * 取消 Form 级 External Store 订阅。
81
+ */
82
+ readonly unsubscribe: () => void;
83
+ /**
84
+ * 与原始 Core Form 对应的唯一 Vue Facade。
85
+ */
86
+ readonly facade: VueSchemxInstance<TValues>;
87
+ }
88
+ /**
89
+ * 内部使用的、可停止订阅的字段 Ref 投影。
90
+ */
91
+ interface ManagedVueFieldBridge<TValues extends Values> extends VueFieldBridge<TValues> {
92
+ dispose(): void;
93
+ }
94
+ /**
95
+ * 返回原始 Core Form;普通 Core Form 输入时保持引用不变。
96
+ *
97
+ * @param form - Core Form 或 Vue Facade。
98
+ * @returns 原始 Core Form。
99
+ *
100
+ * @example
101
+ * ```ts
102
+ * const coreForm = getCoreForm(form)
103
+ * const snapshot = coreForm.getFieldsSnapshot()
104
+ * ```
105
+ */
106
+ export declare function getCoreForm<TValues extends Values = Values>(form: SchemxInstance<TValues> | VueSchemxInstance<TValues>): SchemxInstance<TValues>;
107
+ /**
108
+ * 获取指定 Form 的共享 Vue Bridge。
109
+ *
110
+ * @param form - Core Form 或 Vue Facade。
111
+ * @returns 对应的共享 Bridge。
112
+ *
113
+ * @remarks
114
+ * 首次调用会创建 External Store 订阅;调用方应使用
115
+ * `retainVueFormBridge()` 持有 Bridge,并在 owner 销毁时释放。
116
+ *
117
+ * @example
118
+ * ```ts
119
+ * const bridge = getVueFormBridge(form)
120
+ * const release = retainVueFormBridge(bridge)
121
+ * onScopeDispose(release)
122
+ * ```
123
+ */
124
+ export declare function getVueFormBridge<TValues extends Values = Values>(form: SchemxInstance<TValues> | VueSchemxInstance<TValues>): VueFormBridge<TValues>;
125
+ /**
126
+ * 获取指定 Form 的唯一 Vue Facade。
127
+ *
128
+ * @param form - Core Form 或已有 Vue Facade。
129
+ * @returns 可被 Vue effect 追踪的 Facade。
130
+ *
131
+ * @example
132
+ * ```ts
133
+ * const reactiveForm = getVueFormFacade(form)
134
+ * watchEffect(() => {
135
+ * console.log(reactiveForm.getFieldsValue())
136
+ * })
137
+ * ```
138
+ */
139
+ export declare function getVueFormFacade<TValues extends Values = Values>(form: SchemxInstance<TValues> | VueSchemxInstance<TValues>): VueSchemxInstance<TValues>;
140
+ /**
141
+ * 为一个 Vue owner 保留 Bridge,并返回对应的幂等释放函数。
142
+ *
143
+ * @param bridge - 要保留的共享 Bridge。
144
+ * @returns 释放当前 owner 的函数。
145
+ *
146
+ * @remarks
147
+ * 返回的释放函数可安全重复调用;最后一个 owner 释放后,Bridge 会自动销毁。
148
+ *
149
+ * @example
150
+ * ```ts
151
+ * const bridge = getVueFormBridge(form)
152
+ * const release = retainVueFormBridge(bridge)
153
+ * onScopeDispose(release)
154
+ * ```
155
+ */
156
+ export declare function retainVueFormBridge<TValues extends Values>(bridge: VueFormBridge<TValues>): () => void;
157
+ /**
158
+ * 获取一个字段的共享 Vue Ref 投影。
159
+ *
160
+ * @param bridge - 所属 Form Bridge。
161
+ * @param name - 字段路径。
162
+ * @returns 对应字段的共享 Vue Bridge。
163
+ *
164
+ * @example
165
+ * ```ts
166
+ * const bridge = getVueFormBridge(form)
167
+ * const field = getVueFieldBridge(bridge, "email")
168
+ * watchEffect(() => console.log(field.value.value))
169
+ * ```
170
+ */
171
+ export declare function getVueFieldBridge<TValues extends Values = Values, TName extends NamePath<TValues> = NamePath<TValues>>(bridge: VueFormBridge<TValues>, name: TName): VueFieldBridge<TValues, TName>;
172
+ /**
173
+ * 销毁共享 Bridge、全部字段订阅与 Core External Store。
174
+ *
175
+ * @param bridge - 要销毁的共享 Form Bridge。
176
+ *
177
+ * @remarks
178
+ * 销毁后 Bridge、字段 Ref 投影和 External Store 均不可继续使用;通常由
179
+ * `retainVueFormBridge()` 返回的最后一个释放函数自动触发。
180
+ *
181
+ * @example
182
+ * ```ts
183
+ * disposeVueFormBridge(bridge)
184
+ * ```
185
+ */
186
+ export declare function disposeVueFormBridge<TValues extends Values>(bridge: VueFormBridge<TValues>): void;
187
+ export {};
188
+ //# sourceMappingURL=formBridge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"formBridge.d.ts","sourceRoot":"","sources":["../src/formBridge.ts"],"names":[],"mappings":"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"}
@@ -5,6 +5,8 @@
5
5
  */
6
6
  /** useForm - 表单状态管理 */
7
7
  export { useForm } from './useForm';
8
+ /** Vue Form Facade - 在 Vue effect 中可追踪的 Form 实例。 */
9
+ export { getCoreForm, type VueSchemxInstance } from '../formBridge';
8
10
  /** createFormContext - 表单上下文注入与消费 */
9
11
  export { createFormContext, useFormContext } from './provideFormContext';
10
12
  /** useField - 单字段控制 */
@@ -21,4 +23,6 @@ export { createFormConfigContext, useFormConfigContext, type FormContextProps, }
21
23
  export { useStableRef } from './useStableRef';
22
24
  /** useViewSchemas - ViewSchemas Vue 桥接 */
23
25
  export { useViewSchemas } from './useViewSchemas';
26
+ /** useFormSelector - 表单值 Selector Vue 桥接 */
27
+ export { useFormSelector, type UseFormSelectorOptions, } from './useFormSelector';
24
28
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,uBAAuB;AACvB,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAEnC,qCAAqC;AACrC,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAExE,uBAAuB;AACvB,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAErC,sCAAsC;AACtC,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAE3E,wBAAwB;AACxB,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAEjF,6BAA6B;AAC7B,OAAO,EAAE,aAAa,EAAE,KAAK,mBAAmB,EAAE,MAAM,iBAAiB,CAAA;AAEzE,wCAAwC;AACxC,OAAO,EACL,uBAAuB,EACvB,oBAAoB,EACpB,KAAK,gBAAgB,GACtB,MAAM,4BAA4B,CAAA;AAEnC,uCAAuC;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAE7C,0CAA0C;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,uBAAuB;AACvB,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAEnC,oDAAoD;AACpD,OAAO,EAAE,WAAW,EAAE,KAAK,iBAAiB,EAAE,MAAM,eAAe,CAAA;AAEnE,qCAAqC;AACrC,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAExE,uBAAuB;AACvB,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAErC,sCAAsC;AACtC,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAE3E,wBAAwB;AACxB,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAEjF,6BAA6B;AAC7B,OAAO,EAAE,aAAa,EAAE,KAAK,mBAAmB,EAAE,MAAM,iBAAiB,CAAA;AAEzE,wCAAwC;AACxC,OAAO,EACL,uBAAuB,EACvB,oBAAoB,EACpB,KAAK,gBAAgB,GACtB,MAAM,4BAA4B,CAAA;AAEnC,uCAAuC;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAE7C,0CAA0C;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAEjD,4CAA4C;AAC5C,OAAO,EACL,eAAe,EACf,KAAK,sBAAsB,GAC5B,MAAM,mBAAmB,CAAA"}
@@ -1,6 +1,7 @@
1
1
  import { InjectionKey } from 'vue';
2
+ import { VueSchemxInstance } from '../formBridge';
2
3
  import { SchemxInstance, Values } from '@schemx/core';
3
- type FormContextInstance = SchemxInstance<any>;
4
+ type FormContextInstance = VueSchemxInstance<any>;
4
5
  /**
5
6
  * SchemxInstance 在 Vue provide/inject 中使用的注入 key。
6
7
  *
@@ -34,7 +35,7 @@ export declare const FORM_INSTANCE_KEY: InjectionKey<FormContextInstance>;
34
35
  * createFormContext(form)
35
36
  * ```
36
37
  */
37
- export declare function createFormContext<TValues extends Values = Values>(instance: SchemxInstance<TValues>): void;
38
+ export declare function createFormContext<TValues extends Values = Values>(instance: SchemxInstance<TValues>): VueSchemxInstance<TValues>;
38
39
  /**
39
40
  * 获取最近祖先组件提供的表单实例。
40
41
  *
@@ -53,6 +54,6 @@ export declare function createFormContext<TValues extends Values = Values>(insta
53
54
  * form.setFieldValue("name", "Schemx")
54
55
  * ```
55
56
  */
56
- export declare function useFormContext<TValues extends Values = Values>(): SchemxInstance<TValues>;
57
+ export declare function useFormContext<TValues extends Values = Values>(): VueSchemxInstance<TValues>;
57
58
  export {};
58
59
  //# sourceMappingURL=provideFormContext.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"provideFormContext.d.ts","sourceRoot":"","sources":["../../src/hooks/provideFormContext.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAU,KAAK,YAAY,EAAW,MAAM,KAAK,CAAA;AAExD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAI1D,KAAK,mBAAmB,GAAG,cAAc,CAAC,GAAG,CAAC,CAAA;AAE9C;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,EAAgC,YAAY,CAC/E,mBAAmB,CACpB,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,mCAA2B,CAAA;AAEzD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,SAAS,MAAM,GAAG,MAAM,EAC/D,QAAQ,EAAE,cAAc,CAAC,OAAO,CAAC,GAChC,IAAI,CAEN;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,cAAc,CAC5B,OAAO,SAAS,MAAM,GAAG,MAAM,KAC5B,cAAc,CAAC,OAAO,CAAC,CAW3B"}
1
+ {"version":3,"file":"provideFormContext.d.ts","sourceRoot":"","sources":["../../src/hooks/provideFormContext.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAA0B,KAAK,YAAY,EAAW,MAAM,KAAK,CAAA;AAExE,OAAO,EAIL,KAAK,iBAAiB,EACvB,MAAM,eAAe,CAAA;AAEtB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAK1D,KAAK,mBAAmB,GAAG,iBAAiB,CAAC,GAAG,CAAC,CAAA;AAEjD;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,EAAgC,YAAY,CAC/E,mBAAmB,CACpB,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,mCAA2B,CAAA;AAEzD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,SAAS,MAAM,GAAG,MAAM,EAC/D,QAAQ,EAAE,cAAc,CAAC,OAAO,CAAC,GAChC,iBAAiB,CAAC,OAAO,CAAC,CAQ5B;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,cAAc,CAC5B,OAAO,SAAS,MAAM,GAAG,MAAM,KAC5B,iBAAiB,CAAC,OAAO,CAAC,CAW9B"}
@@ -1,36 +1,10 @@
1
- import { FieldInstance } from '../types/field';
2
1
  import { NamePath, Values } from '@schemx/core';
2
+ import { FieldInstance } from '../types/field';
3
3
  /**
4
- * 获取单个字段的控制能力
5
- *
6
- * 通过 core 层 createField 提供字段操作方法,
7
- * 通过 subscribe 回调桥接 Signal 变化到 Vue shallowRef。
8
- *
9
- * @param name - 字段名(支持嵌套路径,如 'user.address.city')
10
- * @returns 字段状态和操作方法
11
- *
12
- * @example
13
- * ```typescript
14
- * const field = useField('username')
15
- *
16
- * // 响应式值(在 computed/watchEffect/template 中自动追踪)
17
- * field.getValue()
18
- *
19
- * // 响应式错误
20
- * field.errors.value // readonly string[]
21
- *
22
- * // 响应式脏状态
23
- * field.dirty.value // boolean
24
- *
25
- * // 响应式操作中状态
26
- * field.pending.value // boolean
27
- *
28
- * // 写入值
29
- * field.setValue('new value')
4
+ * 获取单个字段的控制能力。
30
5
  *
31
- * // 校验
32
- * const result = await field.validate()
33
- * ```
6
+ * @param name - 字段路径(支持嵌套字段)。
7
+ * @returns 包含 Vue Ref 状态和 Core 字段操作的控制器。
34
8
  */
35
9
  export declare const useField: <TValues extends Values = Values>(name: NamePath<TValues>) => FieldInstance<TValues>;
36
10
  export default useField;
@@ -1 +1 @@
1
- {"version":3,"file":"useField.d.ts","sourceRoot":"","sources":["../../src/hooks/useField.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAMH,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAI9C,OAAO,KAAK,EAAE,QAAQ,EAAkB,MAAM,EAAE,MAAM,cAAc,CAAA;AAwEpE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,eAAO,MAAM,QAAQ,GAAI,OAAO,SAAS,MAAM,GAAG,MAAM,EACtD,MAAM,QAAQ,CAAC,OAAO,CAAC,KACtB,aAAa,CAAC,OAAO,CAuCvB,CAAA;AAED,eAAe,QAAQ,CAAA"}
1
+ {"version":3,"file":"useField.d.ts","sourceRoot":"","sources":["../../src/hooks/useField.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAgBH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAwCnD;;;;;GAKG;AACH,eAAO,MAAM,QAAQ,GAAI,OAAO,SAAS,MAAM,GAAG,MAAM,EACtD,MAAM,QAAQ,CAAC,OAAO,CAAC,KACtB,aAAa,CAAC,OAAO,CAOvB,CAAA;AAED,eAAe,QAAQ,CAAA"}