@blueprint-ts/core 4.0.0-beta.3 → 4.0.0-beta.4

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/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## v4.0.0-beta.4 - 2026-02-26 (beta)
2
+
3
+ # [4.0.0-beta.4](/compare/v4.0.0-beta.3...v4.0.0-beta.4) (2026-02-26)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * Use WritableComputedRef for field models 3cdb7dc
1
9
  ## v4.0.0-beta.3 - 2026-02-26 (beta)
2
10
 
3
11
  # [4.0.0-beta.3](/compare/v4.0.0-beta.2...v4.0.0-beta.3) (2026-02-26)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blueprint-ts/core",
3
- "version": "4.0.0-beta.3",
3
+ "version": "4.0.0-beta.4",
4
4
  "license": "MIT",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -1,4 +1,4 @@
1
- import { reactive, computed, toRaw, type ComputedRef, watch } from 'vue'
1
+ import { reactive, computed, toRaw, type ComputedRef, type WritableComputedRef, watch } from 'vue'
2
2
  import { camelCase, upperFirst, cloneDeep, isEqual } from 'lodash-es'
3
3
  import isEqualWith from 'lodash-es/isEqualWith'
4
4
  import { type PersistedForm } from './types/PersistedForm'
@@ -21,7 +21,7 @@ type FieldErrors = ErrorMessages | ErrorObject | ErrorArray
21
21
  type ErrorBag = Record<string, FieldErrors>
22
22
 
23
23
  type FieldProperty<T> = {
24
- model: ComputedRef<T>
24
+ model: WritableComputedRef<T>
25
25
  errors: ErrorMessages
26
26
  dirty: boolean
27
27
  touched: boolean
@@ -164,7 +164,7 @@ export abstract class BaseForm<RequestBody extends object, FormBody extends obje
164
164
  private readonly dirty: DirtyMap<FormBody>
165
165
  private readonly touched: Record<keyof FormBody, boolean>
166
166
  private readonly original: FormBody
167
- private readonly _model: { [K in keyof FormBody]: ComputedRef<FormBody[K]> }
167
+ private readonly _model: { [K in keyof FormBody]: WritableComputedRef<FormBody[K]> }
168
168
  private _errors: ErrorBag = reactive<ErrorBag>({})
169
169
  private _hasErrors: ComputedRef<boolean>
170
170
  protected append: string[] = []
@@ -375,7 +375,7 @@ export abstract class BaseForm<RequestBody extends object, FormBody extends obje
375
375
  this.buildFieldDependencies()
376
376
 
377
377
  this.state = reactive(initialData) as FormBody
378
- this._model = {} as { [K in keyof FormBody]: ComputedRef<FormBody[K]> }
378
+ this._model = {} as { [K in keyof FormBody]: WritableComputedRef<FormBody[K]> }
379
379
 
380
380
  for (const key in this.state) {
381
381
  const value = this.state[key]