@vaadin/hilla-models 25.0.9 → 25.0.10

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 (2) hide show
  1. package/core.js.map +1 -1
  2. package/package.json +2 -2
package/core.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"core.js","sourceRoot":"","sources":["src/core.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,KAAK,EAAE,UAAU,EAA4C,KAAK,EAAc,MAAM,YAAY,CAAC;AAM5G,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,gBAAgB,CAAC,KAAK,EAAE,GAAY,EAAE,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,KAAK,EAAE,CAAC;AAM9G,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,gBAAgB,CAAC,cAAc,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,KAAK,EAAE,CAAC;AAMjG,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,gBAAgB,CAAC,cAAc,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,KAAK,EAAE,CAAC;AAMhG,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,gBAAgB,CAAC,cAAc,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,KAAK,EAAE,CAAC;AAYtG,MAAM,CAAC,MAAM,UAAU,GAAG,IAAI,gBAAgB,CAAC,KAAK,EAAE,GAAc,EAAE,CAAC,EAAE,CAAC;KACvE,IAAI,CAAC,OAAO,CAAC;KACb,MAAM,CAAC,UAAU,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;KACpC,KAAK,EAAE,CAAC;AAOX,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,gBAAgB,CAAC,KAAK,EAAE,GAAc,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,KAAK,EAAE,CAAC;AAYrG,MAAM,CAAC,MAAM,SAAS,GAAG,IAAI,gBAAgB,CAAmC,KAAK,CAAC;KACnF,IAAI,CAAC,MAAM,CAAC;KAEZ,MAAM,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,EAAiB,EAAE,CAAC;KAC3C,oBAAoB,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;KAC7D,KAAK,EAAE,CAAC","sourcesContent":["import type { EmptyObject } from 'type-fest';\nimport { CoreModelBuilder } from './builders.js';\nimport { $enum, $itemModel, type $members, type AnyObject, type Enum, Model, type Value } from './model.js';\n\n/**\n * The model of a primitive value, like `string`, `number` or `boolean`.\n */\nexport type PrimitiveModel<V = unknown> = Model<V>;\nexport const PrimitiveModel = new CoreModelBuilder(Model, (): unknown => undefined).name('primitive').build();\n\n/**\n * The model of a string value.\n */\nexport type StringModel = PrimitiveModel<string>;\nexport const StringModel = new CoreModelBuilder(PrimitiveModel, () => '').name('string').build();\n\n/**\n * The model of a number value.\n */\nexport type NumberModel = PrimitiveModel<number>;\nexport const NumberModel = new CoreModelBuilder(PrimitiveModel, () => 0).name('number').build();\n\n/**\n * The model of a boolean value.\n */\nexport type BooleanModel = PrimitiveModel<boolean>;\nexport const BooleanModel = new CoreModelBuilder(PrimitiveModel, () => false).name('boolean').build();\n\n/**\n * The model of an array data.\n */\nexport type ArrayModel<M extends Model = Model> = Model<\n Array<Value<M>>,\n Readonly<{\n [$itemModel]: M;\n }>\n>;\n\nexport const ArrayModel = new CoreModelBuilder(Model, (): unknown[] => [])\n .name('Array')\n .define($itemModel, { value: Model })\n .build();\n\n/**\n * The model of an object data.\n */\nexport type ObjectModel<V, EX extends AnyObject = EmptyObject, R extends keyof any = never> = Model<V, EX, R>;\n\nexport const ObjectModel = new CoreModelBuilder(Model, (): AnyObject => ({})).name('Object').build();\n\n/**\n * The model of an enum data.\n */\nexport type EnumModel<T extends typeof Enum> = Model<\n T[keyof T],\n Readonly<{\n [$enum]: T;\n }>\n>;\n\nexport const EnumModel = new CoreModelBuilder<(typeof Enum)[keyof typeof Enum]>(Model)\n .name('Enum')\n // eslint-disable-next-line @typescript-eslint/consistent-type-assertions\n .define($enum, { value: {} as typeof Enum })\n .defaultValueProvider((self) => Object.values(self[$enum])[0])\n .build();\n\n/**\n * The model of a union data.\n */\nexport type UnionModel<MM extends Model[]> = Model<Value<MM[number]>, Readonly<{ [$members]: MM }>>;\n"]}
1
+ {"version":3,"file":"core.js","sourceRoot":"","sources":["src/core.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,KAAK,EAAE,UAAU,EAA4C,KAAK,EAAc,MAAM,YAAY,CAAC;AAM5G,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,gBAAgB,CAAC,KAAK,EAAE,GAAY,EAAE,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,KAAK,EAAE,CAAC;AAM9G,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,gBAAgB,CAAC,cAAc,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,KAAK,EAAE,CAAC;AAMjG,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,gBAAgB,CAAC,cAAc,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,KAAK,EAAE,CAAC;AAMhG,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,gBAAgB,CAAC,cAAc,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,KAAK,EAAE,CAAC;AAYtG,MAAM,CAAC,MAAM,UAAU,GAAG,IAAI,gBAAgB,CAAC,KAAK,EAAE,GAAc,EAAE,CAAC,EAAE,CAAC;KACvE,IAAI,CAAC,OAAO,CAAC;KACb,MAAM,CAAC,UAAU,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;KACpC,KAAK,EAAE,CAAC;AAOX,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,gBAAgB,CAAC,KAAK,EAAE,GAAc,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,KAAK,EAAE,CAAC;AAYrG,MAAM,CAAC,MAAM,SAAS,GAAG,IAAI,gBAAgB,CAAmC,KAAK,CAAC;KACnF,IAAI,CAAC,MAAM,CAAC;KACZ,MAAM,CAA4B,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC;KACvD,oBAAoB,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;KAC7D,KAAK,EAAE,CAAC","sourcesContent":["import type { EmptyObject } from 'type-fest';\nimport { CoreModelBuilder } from './builders.js';\nimport { $enum, $itemModel, type $members, type AnyObject, type Enum, Model, type Value } from './model.js';\n\n/**\n * The model of a primitive value, like `string`, `number` or `boolean`.\n */\nexport type PrimitiveModel<V = unknown> = Model<V>;\nexport const PrimitiveModel = new CoreModelBuilder(Model, (): unknown => undefined).name('primitive').build();\n\n/**\n * The model of a string value.\n */\nexport type StringModel = PrimitiveModel<string>;\nexport const StringModel = new CoreModelBuilder(PrimitiveModel, () => '').name('string').build();\n\n/**\n * The model of a number value.\n */\nexport type NumberModel = PrimitiveModel<number>;\nexport const NumberModel = new CoreModelBuilder(PrimitiveModel, () => 0).name('number').build();\n\n/**\n * The model of a boolean value.\n */\nexport type BooleanModel = PrimitiveModel<boolean>;\nexport const BooleanModel = new CoreModelBuilder(PrimitiveModel, () => false).name('boolean').build();\n\n/**\n * The model of an array data.\n */\nexport type ArrayModel<M extends Model = Model> = Model<\n Array<Value<M>>,\n Readonly<{\n [$itemModel]: M;\n }>\n>;\n\nexport const ArrayModel = new CoreModelBuilder(Model, (): unknown[] => [])\n .name('Array')\n .define($itemModel, { value: Model })\n .build();\n\n/**\n * The model of an object data.\n */\nexport type ObjectModel<V, EX extends AnyObject = EmptyObject, R extends keyof any = never> = Model<V, EX, R>;\n\nexport const ObjectModel = new CoreModelBuilder(Model, (): AnyObject => ({})).name('Object').build();\n\n/**\n * The model of an enum data.\n */\nexport type EnumModel<T extends typeof Enum> = Model<\n T[keyof T],\n Readonly<{\n [$enum]: T;\n }>\n>;\n\nexport const EnumModel = new CoreModelBuilder<(typeof Enum)[keyof typeof Enum]>(Model)\n .name('Enum')\n .define<typeof $enum, typeof Enum>($enum, { value: {} })\n .defaultValueProvider((self) => Object.values(self[$enum])[0])\n .build();\n\n/**\n * The model of a union data.\n */\nexport type UnionModel<MM extends Model[]> = Model<Value<MM[number]>, Readonly<{ [$members]: MM }>>;\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/hilla-models",
3
- "version": "25.0.9",
3
+ "version": "25.0.10",
4
4
  "description": "Generative form models for Hilla",
5
5
  "main": "index.js",
6
6
  "module": "index.js",
@@ -43,7 +43,7 @@
43
43
  "access": "public"
44
44
  },
45
45
  "dependencies": {
46
- "@vaadin/hilla-lit-form": "25.0.9"
46
+ "@vaadin/hilla-lit-form": "25.0.10"
47
47
  },
48
48
  "peerDependencies": {
49
49
  "react": "18 || 19",