@zoneflow/core 0.0.14 → 0.0.16

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.
@@ -6,6 +6,8 @@ export type CreateZoneInput = {
6
6
  zoneType?: ZoneType;
7
7
  inputDisabled?: boolean;
8
8
  outputDisabled?: boolean;
9
+ fixedWidth?: boolean;
10
+ fixedHeight?: boolean;
9
11
  action?: ZoneAction;
10
12
  meta?: Record<string, unknown>;
11
13
  };
package/dist/mutation.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export function createZone(model, input) {
2
- const { id, name, parentZoneId = null, zoneType = "container", inputDisabled, outputDisabled, action, meta, } = input;
2
+ const { id, name, parentZoneId = null, zoneType = "container", inputDisabled, outputDisabled, fixedWidth, fixedHeight, action, meta, } = input;
3
3
  if (model.zonesById[id])
4
4
  return model;
5
5
  const newZone = {
@@ -9,6 +9,8 @@ export function createZone(model, input) {
9
9
  zoneType,
10
10
  inputDisabled,
11
11
  outputDisabled,
12
+ fixedWidth,
13
+ fixedHeight,
12
14
  childZoneIds: [],
13
15
  pathIds: [],
14
16
  pathsById: {},
package/dist/types.d.ts CHANGED
@@ -56,6 +56,16 @@ export type Zone = {
56
56
  zoneType: ZoneType;
57
57
  inputDisabled?: boolean;
58
58
  outputDisabled?: boolean;
59
+ /**
60
+ * When true, the zone's width cannot be changed by the resize handle.
61
+ * Useful for chip-like or one-line zones.
62
+ */
63
+ fixedWidth?: boolean;
64
+ /**
65
+ * When true, the zone's height cannot be changed by the resize handle.
66
+ * Useful for chip-like or one-line zones.
67
+ */
68
+ fixedHeight?: boolean;
59
69
  childZoneIds: ZoneId[];
60
70
  action?: ZoneAction;
61
71
  pathIds: PathId[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zoneflow/core",
3
- "version": "0.0.14",
3
+ "version": "0.0.16",
4
4
  "license": "MIT",
5
5
  "description": "Zoneflow core model, layout, mutation, validation, and document utilities.",
6
6
  "type": "module",