@pixpilot/formily-shadcn 0.11.1 → 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 (49) 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/column.d.ts +2 -2
  13. package/dist/components/date-picker.d.ts +3 -3
  14. package/dist/components/file-upload/avatar-upload.cjs +35 -0
  15. package/dist/components/file-upload/avatar-upload.d.cts +12 -0
  16. package/dist/components/file-upload/avatar-upload.d.ts +12 -0
  17. package/dist/components/file-upload/avatar-upload.js +30 -0
  18. package/dist/components/file-upload/file-upload-inline.d.ts +8 -8
  19. package/dist/components/file-upload/file-upload.d.ts +8 -8
  20. package/dist/components/file-upload/index.cjs +1 -0
  21. package/dist/components/file-upload/index.d.cts +1 -0
  22. package/dist/components/file-upload/index.d.ts +1 -0
  23. package/dist/components/file-upload/index.js +1 -0
  24. package/dist/components/form-grid.d.ts +2 -2
  25. package/dist/components/form-item/connected-form-item.d.cts +4 -4
  26. package/dist/components/form-item/connected-form-item.d.ts +4 -4
  27. package/dist/components/icon-picker.d.ts +3 -3
  28. package/dist/components/input.d.ts +2 -2
  29. package/dist/components/json-schema-form-renderer/json-schema-form-renderer.cjs +1 -4
  30. package/dist/components/json-schema-form-renderer/json-schema-form-renderer.js +3 -5
  31. package/dist/components/json-schema-form-renderer/types.d.cts +1 -2
  32. package/dist/components/json-schema-form-renderer/types.d.ts +1 -2
  33. package/dist/components/number-input.d.ts +2 -2
  34. package/dist/components/schema-field/schema-field-basics.d.ts +226 -226
  35. package/dist/components/schema-field/schema-field-extended.cjs +5 -0
  36. package/dist/components/schema-field/schema-field-extended.d.cts +23 -9
  37. package/dist/components/schema-field/schema-field-extended.d.ts +482 -468
  38. package/dist/components/schema-field/schema-field-extended.js +5 -0
  39. package/dist/components/schema-field/schema-field.d.cts +9 -9
  40. package/dist/components/schema-field/schema-field.d.ts +253 -253
  41. package/dist/components/switch.d.ts +2 -2
  42. package/dist/components/tags-input-inline.d.ts +2 -2
  43. package/dist/index.cjs +2 -0
  44. package/dist/index.d.cts +2 -1
  45. package/dist/index.d.ts +2 -1
  46. package/dist/index.js +2 -1
  47. package/dist/utils/transform-schema.cjs +8 -2
  48. package/dist/utils/transform-schema.js +8 -2
  49. package/package.json +5 -5
@@ -1,4 +1,4 @@
1
- import * as react25 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: react25.ForwardRefExoticComponent<Omit<Partial<_radix_ui_react_switch0.SwitchProps & react25.RefAttributes<HTMLButtonElement>>, "ref"> & react25.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 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 };
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,13 @@ const inputSchemaMap = {
27
27
  object: { "x-component": "ObjectContainer" }
28
28
  };
29
29
  function transformSchema(schema, fieldsDecorators) {
30
- (0, json_schema_traverse.default)(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
+ }
36
+ (0, json_schema_traverse.default)(normalizedSchema, {
31
37
  allKeys: true,
32
38
  cb: (currentSchema) => {
33
39
  const { type } = currentSchema;
@@ -45,7 +51,7 @@ function transformSchema(schema, fieldsDecorators) {
45
51
  }
46
52
  }
47
53
  });
48
- return schema;
54
+ return normalizedSchema;
49
55
  }
50
56
 
51
57
  //#endregion
@@ -25,7 +25,13 @@ const inputSchemaMap = {
25
25
  object: { "x-component": "ObjectContainer" }
26
26
  };
27
27
  function transformSchema(schema, fieldsDecorators) {
28
- traverse(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
+ }
34
+ traverse(normalizedSchema, {
29
35
  allKeys: true,
30
36
  cb: (currentSchema) => {
31
37
  const { type } = currentSchema;
@@ -43,7 +49,7 @@ function transformSchema(schema, fieldsDecorators) {
43
49
  }
44
50
  }
45
51
  });
46
- return schema;
52
+ return normalizedSchema;
47
53
  }
48
54
 
49
55
  //#endregion
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pixpilot/formily-shadcn",
3
3
  "type": "module",
4
- "version": "0.11.1",
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",
@@ -54,11 +54,11 @@
54
54
  "react-dom": "19.2.0",
55
55
  "tsdown": "^0.15.12",
56
56
  "typescript": "^5.9.3",
57
+ "@internal/eslint-config": "0.3.0",
58
+ "@internal/prettier-config": "0.0.1",
57
59
  "@internal/tsconfig": "0.1.0",
58
60
  "@internal/tsdown-config": "0.1.0",
59
- "@internal/vitest-config": "0.1.0",
60
- "@internal/eslint-config": "0.3.0",
61
- "@internal/prettier-config": "0.0.1"
61
+ "@internal/vitest-config": "0.1.0"
62
62
  },
63
63
  "prettier": "@internal/prettier-config",
64
64
  "scripts": {