@pixpilot/formily-shadcn 0.11.2 → 0.12.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 (52) hide show
  1. package/dist/components/array-base/components/array-copy.cjs +2 -2
  2. package/dist/components/array-base/components/array-copy.js +2 -2
  3. package/dist/components/array-base/components/edit.cjs +2 -2
  4. package/dist/components/array-base/components/edit.js +2 -2
  5. package/dist/components/array-base/components/move-down.cjs +2 -2
  6. package/dist/components/array-base/components/move-down.js +2 -2
  7. package/dist/components/array-base/components/move-up.cjs +2 -2
  8. package/dist/components/array-base/components/move-up.js +2 -2
  9. package/dist/components/array-base/components/remove.cjs +2 -2
  10. package/dist/components/array-base/components/remove.js +2 -2
  11. package/dist/components/checkbox.d.ts +2 -2
  12. package/dist/components/date-picker.d.ts +3 -3
  13. package/dist/components/file-upload/avatar-upload.cjs +35 -0
  14. package/dist/components/file-upload/avatar-upload.d.cts +12 -0
  15. package/dist/components/file-upload/avatar-upload.d.ts +12 -0
  16. package/dist/components/file-upload/avatar-upload.js +30 -0
  17. package/dist/components/file-upload/file-upload-inline.d.ts +8 -8
  18. package/dist/components/file-upload/file-upload.d.ts +8 -8
  19. package/dist/components/file-upload/index.cjs +1 -0
  20. package/dist/components/file-upload/index.d.cts +1 -0
  21. package/dist/components/file-upload/index.d.ts +1 -0
  22. package/dist/components/file-upload/index.js +1 -0
  23. package/dist/components/form-item/connected-form-item.d.cts +4 -4
  24. package/dist/components/form-item/connected-form-item.d.ts +4 -4
  25. package/dist/components/icon-picker.d.ts +3 -3
  26. package/dist/components/input.d.ts +2 -2
  27. package/dist/components/json-schema-form-renderer/json-schema-form-renderer.cjs +1 -4
  28. package/dist/components/json-schema-form-renderer/json-schema-form-renderer.js +3 -5
  29. package/dist/components/json-schema-form-renderer/types.d.cts +1 -2
  30. package/dist/components/json-schema-form-renderer/types.d.ts +1 -2
  31. package/dist/components/number-input.d.ts +2 -2
  32. package/dist/components/schema-field/schema-field-basics.d.ts +211 -211
  33. package/dist/components/schema-field/schema-field-extended.cjs +5 -0
  34. package/dist/components/schema-field/schema-field-extended.d.cts +23 -9
  35. package/dist/components/schema-field/schema-field-extended.d.ts +244 -230
  36. package/dist/components/schema-field/schema-field-extended.js +5 -0
  37. package/dist/components/schema-field/schema-field.d.ts +244 -244
  38. package/dist/components/separator.d.ts +2 -2
  39. package/dist/components/slider.d.cts +2 -2
  40. package/dist/components/slider.d.ts +2 -2
  41. package/dist/components/switch.d.cts +2 -2
  42. package/dist/components/switch.d.ts +2 -2
  43. package/dist/components/tags-input-inline.d.cts +2 -2
  44. package/dist/components/tags-input-inline.d.ts +2 -2
  45. package/dist/components/textarea.d.ts +2 -2
  46. package/dist/index.cjs +2 -0
  47. package/dist/index.d.cts +2 -1
  48. package/dist/index.d.ts +2 -1
  49. package/dist/index.js +2 -1
  50. package/dist/utils/transform-schema.cjs +6 -1
  51. package/dist/utils/transform-schema.js +6 -1
  52. package/package.json +2 -2
@@ -1,4 +1,4 @@
1
- import * as react25 from "react";
1
+ import * as react18 from "react";
2
2
  import * as _radix_ui_react_separator0 from "@radix-ui/react-separator";
3
3
 
4
4
  //#region src/components/separator.d.ts
@@ -6,6 +6,6 @@ import * as _radix_ui_react_separator0 from "@radix-ui/react-separator";
6
6
  * Formily-connected Separator component
7
7
  * A visual divider for content sections
8
8
  */
9
- declare const Separator: react25.ForwardRefExoticComponent<Omit<Partial<_radix_ui_react_separator0.SeparatorProps & react25.RefAttributes<HTMLDivElement>>, "ref"> & react25.RefAttributes<unknown>>;
9
+ declare const Separator: react18.ForwardRefExoticComponent<Omit<Partial<_radix_ui_react_separator0.SeparatorProps & react18.RefAttributes<HTMLDivElement>>, "ref"> & react18.RefAttributes<unknown>>;
10
10
  //#endregion
11
11
  export { Separator };
@@ -1,4 +1,4 @@
1
- import * as react19 from "react";
1
+ import * as react17 from "react";
2
2
  import { SliderProps } from "@pixpilot/shadcn-ui";
3
3
 
4
4
  //#region src/components/slider.d.ts
@@ -7,6 +7,6 @@ import { SliderProps } from "@pixpilot/shadcn-ui";
7
7
  * Formily-connected Slider component
8
8
  * Range input for selecting numeric values
9
9
  */
10
- declare const Slider: react19.ForwardRefExoticComponent<Omit<Partial<SliderProps>, "ref"> & react19.RefAttributes<unknown>>;
10
+ declare const Slider: react17.ForwardRefExoticComponent<Omit<Partial<SliderProps>, "ref"> & react17.RefAttributes<unknown>>;
11
11
  //#endregion
12
12
  export { Slider };
@@ -1,4 +1,4 @@
1
- import * as react14 from "react";
1
+ import * as react21 from "react";
2
2
  import { SliderProps } from "@pixpilot/shadcn-ui";
3
3
 
4
4
  //#region src/components/slider.d.ts
@@ -7,6 +7,6 @@ import { SliderProps } from "@pixpilot/shadcn-ui";
7
7
  * Formily-connected Slider component
8
8
  * Range input for selecting numeric values
9
9
  */
10
- declare const Slider$1: react14.ForwardRefExoticComponent<Omit<Partial<SliderProps>, "ref"> & react14.RefAttributes<unknown>>;
10
+ declare const Slider$1: react21.ForwardRefExoticComponent<Omit<Partial<SliderProps>, "ref"> & react21.RefAttributes<unknown>>;
11
11
  //#endregion
12
12
  export { Slider$1 as Slider };
@@ -1,4 +1,4 @@
1
- import * as react21 from "react";
1
+ import * as react19 from "react";
2
2
  import * as _radix_ui_react_switch0 from "@radix-ui/react-switch";
3
3
 
4
4
  //#region src/components/switch.d.ts
@@ -6,6 +6,6 @@ import * as _radix_ui_react_switch0 from "@radix-ui/react-switch";
6
6
  * Formily-connected Switch component
7
7
  * Toggle switch for boolean values
8
8
  */
9
- declare const Switch: react21.ForwardRefExoticComponent<Omit<Partial<_radix_ui_react_switch0.SwitchProps & react21.RefAttributes<HTMLButtonElement>>, "ref"> & react21.RefAttributes<unknown>>;
9
+ declare const Switch: react19.ForwardRefExoticComponent<Omit<Partial<_radix_ui_react_switch0.SwitchProps & react19.RefAttributes<HTMLButtonElement>>, "ref"> & react19.RefAttributes<unknown>>;
10
10
  //#endregion
11
11
  export { Switch };
@@ -1,4 +1,4 @@
1
- import * as react20 from "react";
1
+ import * as react23 from "react";
2
2
  import * as _radix_ui_react_switch0 from "@radix-ui/react-switch";
3
3
 
4
4
  //#region src/components/switch.d.ts
@@ -6,6 +6,6 @@ import * as _radix_ui_react_switch0 from "@radix-ui/react-switch";
6
6
  * Formily-connected Switch component
7
7
  * Toggle switch for boolean values
8
8
  */
9
- declare const Switch: react20.ForwardRefExoticComponent<Omit<Partial<_radix_ui_react_switch0.SwitchProps & react20.RefAttributes<HTMLButtonElement>>, "ref"> & react20.RefAttributes<unknown>>;
9
+ declare const Switch: react23.ForwardRefExoticComponent<Omit<Partial<_radix_ui_react_switch0.SwitchProps & react23.RefAttributes<HTMLButtonElement>>, "ref"> & react23.RefAttributes<unknown>>;
10
10
  //#endregion
11
11
  export { Switch };
@@ -1,4 +1,4 @@
1
- import * as react17 from "react";
1
+ import * as react22 from "react";
2
2
  import * as _pixpilot_shadcn_ui0 from "@pixpilot/shadcn-ui";
3
3
 
4
4
  //#region src/components/tags-input-inline.d.ts
@@ -10,6 +10,6 @@ import * as _pixpilot_shadcn_ui0 from "@pixpilot/shadcn-ui";
10
10
  * Based on DiceUI's tags-input for inline tag editing with keyboard navigation
11
11
  * and validation support.
12
12
  */
13
- declare const TagsInputInLine: react17.ForwardRefExoticComponent<Partial<_pixpilot_shadcn_ui0.TagsInputProps> & react17.RefAttributes<unknown>>;
13
+ declare const TagsInputInLine: react22.ForwardRefExoticComponent<Partial<_pixpilot_shadcn_ui0.TagsInputProps> & react22.RefAttributes<unknown>>;
14
14
  //#endregion
15
15
  export { TagsInputInLine };
@@ -1,4 +1,4 @@
1
- import * as react23 from "react";
1
+ import * as react26 from "react";
2
2
  import * as _pixpilot_shadcn_ui0 from "@pixpilot/shadcn-ui";
3
3
 
4
4
  //#region src/components/tags-input-inline.d.ts
@@ -10,6 +10,6 @@ import * as _pixpilot_shadcn_ui0 from "@pixpilot/shadcn-ui";
10
10
  * Based on DiceUI's tags-input for inline tag editing with keyboard navigation
11
11
  * and validation support.
12
12
  */
13
- declare const TagsInputInLine: react23.ForwardRefExoticComponent<Partial<_pixpilot_shadcn_ui0.TagsInputProps> & react23.RefAttributes<unknown>>;
13
+ declare const TagsInputInLine: react26.ForwardRefExoticComponent<Partial<_pixpilot_shadcn_ui0.TagsInputProps> & react26.RefAttributes<unknown>>;
14
14
  //#endregion
15
15
  export { TagsInputInLine };
@@ -1,9 +1,9 @@
1
- import * as react16 from "react";
1
+ import * as react0 from "react";
2
2
 
3
3
  //#region src/components/textarea.d.ts
4
4
  /**
5
5
  * Formily-connected Textarea component
6
6
  */
7
- declare const Textarea: react16.ForwardRefExoticComponent<Omit<Partial<react16.ClassAttributes<HTMLTextAreaElement> & react16.TextareaHTMLAttributes<HTMLTextAreaElement>>, "ref"> & react16.RefAttributes<unknown>>;
7
+ declare const Textarea: react0.ForwardRefExoticComponent<Omit<Partial<react0.ClassAttributes<HTMLTextAreaElement> & react0.TextareaHTMLAttributes<HTMLTextAreaElement>>, "ref"> & react0.RefAttributes<unknown>>;
8
8
  //#endregion
9
9
  export { Textarea };
package/dist/index.cjs CHANGED
@@ -9,6 +9,7 @@ const require_checkbox = require('./components/checkbox.cjs');
9
9
  const require_column = require('./components/column.cjs');
10
10
  const require_combobox = require('./components/combobox.cjs');
11
11
  const require_date_picker = require('./components/date-picker.cjs');
12
+ const require_avatar_upload = require('./components/file-upload/avatar-upload.cjs');
12
13
  const require_file_upload = require('./components/file-upload/file-upload.cjs');
13
14
  const require_file_upload_inline = require('./components/file-upload/file-upload-inline.cjs');
14
15
  require('./components/file-upload/index.cjs');
@@ -45,6 +46,7 @@ __formily_core = require_rolldown_runtime.__toESM(__formily_core);
45
46
  exports.ArrayBase = require_array_base.ArrayBase;
46
47
  exports.ArrayCards = require_array_cards.ArrayCards;
47
48
  exports.ArrayCollapse = require_array_collapse.ArrayCollapse;
49
+ exports.AvatarUpload = require_avatar_upload.AvatarUpload;
48
50
  exports.Checkbox = require_checkbox.Checkbox;
49
51
  exports.Column = require_column.Column;
50
52
  exports.Combobox = require_combobox.Combobox;
package/dist/index.d.cts CHANGED
@@ -11,6 +11,7 @@ import { Combobox } from "./components/combobox.cjs";
11
11
  import { FormLayoutOptions } from "./components/context/form-context.cjs";
12
12
  import "./components/context/index.cjs";
13
13
  import { DatePicker } from "./components/date-picker.cjs";
14
+ import { AvatarUpload } from "./components/file-upload/avatar-upload.cjs";
14
15
  import { FileUpload } from "./components/file-upload/file-upload.cjs";
15
16
  import { FileUploadInline } from "./components/file-upload/file-upload-inline.cjs";
16
17
  import "./components/file-upload/index.cjs";
@@ -42,4 +43,4 @@ import { TagsInputInLine } from "./components/tags-input-inline.cjs";
42
43
  import { Textarea } from "./components/textarea.cjs";
43
44
  import { Field, FormConsumer, FormProvider, ISchema, ObjectField, VoidField } from "@formily/react";
44
45
  import { Form as IForm, createForm } from "@formily/core";
45
- export { ArrayBase, type ArrayBaseMixins, ArrayCards, ArrayCollapse, Checkbox, Column, Combobox, ConnectedRadio, DatePicker, Field, FileUpload, FileUploadInline, Form, FormConsumer, FormGrid, FormItem, type FormLayoutOptions, FormProvider, type IArrayBaseOperationProps, type IArrayBaseProps, type IForm, type ISchema, IconPicker, Input, JsonSchemaForm, JsonSchemaFormBasic, JsonSchemaFormComponent, JsonSchemaFormComponents, JsonSchemaFormExtended, JsonSchemaFormProps, JsonSchemaFormRenderer, JsonSchemaFormRendererProps, NumberInput, ObjectField, Radio, RichTextEditor, Row, SchemaField, SchemaFieldBasics, SchemaFieldExtended, Select, Separator, Slider, Switch, TagsInputInLine, Textarea, VoidField, basicComponentRegistry, basicComponents, createForm, defaultComponentRegistry, defaultComponents, extendedComponentRegistry, extendedComponents };
46
+ export { ArrayBase, type ArrayBaseMixins, ArrayCards, ArrayCollapse, AvatarUpload, Checkbox, Column, Combobox, ConnectedRadio, DatePicker, Field, FileUpload, FileUploadInline, Form, FormConsumer, FormGrid, FormItem, type FormLayoutOptions, FormProvider, type IArrayBaseOperationProps, type IArrayBaseProps, type IForm, type ISchema, IconPicker, Input, JsonSchemaForm, JsonSchemaFormBasic, JsonSchemaFormComponent, JsonSchemaFormComponents, JsonSchemaFormExtended, JsonSchemaFormProps, JsonSchemaFormRenderer, JsonSchemaFormRendererProps, NumberInput, ObjectField, Radio, RichTextEditor, Row, SchemaField, SchemaFieldBasics, SchemaFieldExtended, Select, Separator, Slider, Switch, TagsInputInLine, Textarea, VoidField, basicComponentRegistry, basicComponents, createForm, defaultComponentRegistry, defaultComponents, extendedComponentRegistry, extendedComponents };
package/dist/index.d.ts CHANGED
@@ -11,6 +11,7 @@ import { Combobox } from "./components/combobox.js";
11
11
  import { FormLayoutOptions } from "./components/context/form-context.js";
12
12
  import "./components/context/index.js";
13
13
  import { DatePicker } from "./components/date-picker.js";
14
+ import { AvatarUpload } from "./components/file-upload/avatar-upload.js";
14
15
  import { FileUpload } from "./components/file-upload/file-upload.js";
15
16
  import { FileUploadInline } from "./components/file-upload/file-upload-inline.js";
16
17
  import "./components/file-upload/index.js";
@@ -42,4 +43,4 @@ import { TagsInputInLine } from "./components/tags-input-inline.js";
42
43
  import { Textarea } from "./components/textarea.js";
43
44
  import { Field, FormConsumer, FormProvider, ISchema, ObjectField, VoidField } from "@formily/react";
44
45
  import { Form as IForm, createForm } from "@formily/core";
45
- export { ArrayBase, type ArrayBaseMixins, ArrayCards, ArrayCollapse, Checkbox, Column, Combobox, ConnectedRadio, DatePicker, Field, FileUpload, FileUploadInline, Form, FormConsumer, FormGrid, FormItem, type FormLayoutOptions, FormProvider, type IArrayBaseOperationProps, type IArrayBaseProps, type IForm, type ISchema, IconPicker, Input, JsonSchemaForm, JsonSchemaFormBasic, JsonSchemaFormComponent, JsonSchemaFormComponents, JsonSchemaFormExtended, JsonSchemaFormProps, JsonSchemaFormRenderer, JsonSchemaFormRendererProps, NumberInput, ObjectField, Radio, RichTextEditor, Row, SchemaField, SchemaFieldBasics, SchemaFieldExtended, Select, Separator, Slider, Switch, TagsInputInLine, Textarea, VoidField, basicComponentRegistry, basicComponents, createForm, defaultComponentRegistry, defaultComponents, extendedComponentRegistry, extendedComponents };
46
+ export { ArrayBase, type ArrayBaseMixins, ArrayCards, ArrayCollapse, AvatarUpload, Checkbox, Column, Combobox, ConnectedRadio, DatePicker, Field, FileUpload, FileUploadInline, Form, FormConsumer, FormGrid, FormItem, type FormLayoutOptions, FormProvider, type IArrayBaseOperationProps, type IArrayBaseProps, type IForm, type ISchema, IconPicker, Input, JsonSchemaForm, JsonSchemaFormBasic, JsonSchemaFormComponent, JsonSchemaFormComponents, JsonSchemaFormExtended, JsonSchemaFormProps, JsonSchemaFormRenderer, JsonSchemaFormRendererProps, NumberInput, ObjectField, Radio, RichTextEditor, Row, SchemaField, SchemaFieldBasics, SchemaFieldExtended, Select, Separator, Slider, Switch, TagsInputInLine, Textarea, VoidField, basicComponentRegistry, basicComponents, createForm, defaultComponentRegistry, defaultComponents, extendedComponentRegistry, extendedComponents };
package/dist/index.js CHANGED
@@ -8,6 +8,7 @@ import { Checkbox } from "./components/checkbox.js";
8
8
  import { Column } from "./components/column.js";
9
9
  import { Combobox } from "./components/combobox.js";
10
10
  import { DatePicker } from "./components/date-picker.js";
11
+ import { AvatarUpload } from "./components/file-upload/avatar-upload.js";
11
12
  import { FileUpload } from "./components/file-upload/file-upload.js";
12
13
  import { FileUploadInline } from "./components/file-upload/file-upload-inline.js";
13
14
  import "./components/file-upload/index.js";
@@ -39,4 +40,4 @@ import "./components/json-schema-form-renderer/index.js";
39
40
  import { Field, FormConsumer, FormProvider, ObjectField, VoidField } from "@formily/react";
40
41
  import { createForm } from "@formily/core";
41
42
 
42
- export { ArrayBase, ArrayCards, ArrayCollapse, Checkbox, Column, Combobox, ConnectedRadio, DatePicker, Field, FileUpload, FileUploadInline, Form, FormConsumer, FormGrid, FormItem, FormProvider, IconPicker, Input, JsonSchemaForm, JsonSchemaFormBasic, JsonSchemaFormExtended, JsonSchemaFormRenderer, NumberInput, ObjectField, Radio, RichTextEditor, Row, SchemaField, SchemaFieldBasics, SchemaFieldExtended, Select, Separator, Slider, Switch, TagsInputInLine, Textarea, VoidField, basicComponentRegistry, basicComponents, createForm, defaultComponentRegistry, defaultComponents, extendedComponentRegistry, extendedComponents };
43
+ export { ArrayBase, ArrayCards, ArrayCollapse, AvatarUpload, Checkbox, Column, Combobox, ConnectedRadio, DatePicker, Field, FileUpload, FileUploadInline, Form, FormConsumer, FormGrid, FormItem, FormProvider, IconPicker, Input, JsonSchemaForm, JsonSchemaFormBasic, JsonSchemaFormExtended, JsonSchemaFormRenderer, NumberInput, ObjectField, Radio, RichTextEditor, Row, SchemaField, SchemaFieldBasics, SchemaFieldExtended, Select, Separator, Slider, Switch, TagsInputInLine, Textarea, VoidField, basicComponentRegistry, basicComponents, createForm, defaultComponentRegistry, defaultComponents, extendedComponentRegistry, extendedComponents };
@@ -27,7 +27,12 @@ const inputSchemaMap = {
27
27
  object: { "x-component": "ObjectContainer" }
28
28
  };
29
29
  function transformSchema(schema, fieldsDecorators) {
30
- const normalizedSchema = typeof structuredClone === "function" ? structuredClone(schema) : JSON.parse(JSON.stringify(schema));
30
+ let normalizedSchema;
31
+ try {
32
+ normalizedSchema = typeof structuredClone === "function" ? structuredClone(schema) : JSON.parse(JSON.stringify(schema));
33
+ } catch {
34
+ normalizedSchema = JSON.parse(JSON.stringify(schema));
35
+ }
31
36
  (0, json_schema_traverse.default)(normalizedSchema, {
32
37
  allKeys: true,
33
38
  cb: (currentSchema) => {
@@ -25,7 +25,12 @@ const inputSchemaMap = {
25
25
  object: { "x-component": "ObjectContainer" }
26
26
  };
27
27
  function transformSchema(schema, fieldsDecorators) {
28
- const normalizedSchema = typeof structuredClone === "function" ? structuredClone(schema) : JSON.parse(JSON.stringify(schema));
28
+ let normalizedSchema;
29
+ try {
30
+ normalizedSchema = typeof structuredClone === "function" ? structuredClone(schema) : JSON.parse(JSON.stringify(schema));
31
+ } catch {
32
+ normalizedSchema = JSON.parse(JSON.stringify(schema));
33
+ }
29
34
  traverse(normalizedSchema, {
30
35
  allKeys: true,
31
36
  cb: (currentSchema) => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pixpilot/formily-shadcn",
3
3
  "type": "module",
4
- "version": "0.11.2",
4
+ "version": "0.12.0",
5
5
  "description": "Formily integration for shadcn/ui components",
6
6
  "author": "m.doaie <m.doaie@hotmail.com>",
7
7
  "license": "MIT",
@@ -41,7 +41,7 @@
41
41
  "lucide-react": "^0.554.0",
42
42
  "pretty-bytes": "^7.1.0",
43
43
  "@pixpilot/shadcn": "0.4.0",
44
- "@pixpilot/shadcn-ui": "0.5.1"
44
+ "@pixpilot/shadcn-ui": "0.6.0"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@storybook/react": "^10.1.8",