@flighthq/layout 0.5.1-next.815.cc08b93 → 0.5.1-next.903.f434bc2

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/README.md CHANGED
@@ -13,5 +13,5 @@ Import the supported application-facing API from `@flighthq/layout`. The `@fligh
13
13
  This package is part of the locked-version Flight SDK graph. Applications may instead install and import `@flighthq/sdk` when package-level tree shaking is sufficient.
14
14
 
15
15
  - [Flight project](https://github.com/flighthq/flight)
16
- - [Source for @flighthq/layout@0.5.1-next.815.cc08b93](https://github.com/flighthq/flight/tree/cc08b93ef981080fa86bdd5143dc61dbdbf2665b/packages/layout)
17
- - [License](https://github.com/flighthq/flight/blob/cc08b93ef981080fa86bdd5143dc61dbdbf2665b/LICENSE.md)
16
+ - [Source for @flighthq/layout@0.5.1-next.903.f434bc2](https://github.com/flighthq/flight/tree/f434bc233778d75aeea61995df3a8cfaec459a85/packages/layout)
17
+ - [License](https://github.com/flighthq/flight/blob/f434bc233778d75aeea61995df3a8cfaec459a85/LICENSE.md)
@@ -4,4 +4,5 @@ export * from './flexLayout';
4
4
  export * from './gridLayout';
5
5
  export * from './layoutState';
6
6
  export * from './resolveLayoutTree';
7
+ export { initializeLayoutState } from './layoutState';
7
8
  //# sourceMappingURL=contract.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../src/contract.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC"}
1
+ {"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../src/contract.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC"}
package/dist/contract.js CHANGED
@@ -4,4 +4,5 @@ export * from './flexLayout';
4
4
  export * from './gridLayout';
5
5
  export * from './layoutState';
6
6
  export * from './resolveLayoutTree';
7
+ export { initializeLayoutState } from './layoutState';
7
8
  //# sourceMappingURL=contract.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"contract.js","sourceRoot":"","sources":["../src/contract.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC"}
1
+ {"version":3,"file":"contract.js","sourceRoot":"","sources":["../src/contract.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC"}
@@ -1,4 +1,5 @@
1
- import type { LayoutResolver, LayoutState } from '@flighthq/types/contract';
1
+ import type { LayoutResolver, LayoutState, EntityConstruction } from '@flighthq/types/contract';
2
2
  export declare function createLayoutState(): LayoutState;
3
+ export declare function initializeLayoutState(out: EntityConstruction<LayoutState>): void;
3
4
  export declare function registerLayoutResolver(state: Readonly<LayoutState>, kind: string, resolver: LayoutResolver | null): void;
4
5
  //# sourceMappingURL=layoutState.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"layoutState.d.ts","sourceRoot":"","sources":["../src/layoutState.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAI5E,wBAAgB,iBAAiB,IAAI,WAAW,CAW/C;AAID,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,QAAQ,CAAC,WAAW,CAAC,EAC5B,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,cAAc,GAAG,IAAI,GAC9B,IAAI,CAGN"}
1
+ {"version":3,"file":"layoutState.d.ts","sourceRoot":"","sources":["../src/layoutState.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAEhG,wBAAgB,iBAAiB,IAAI,WAAW,CAI/C;AAID,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,kBAAkB,CAAC,WAAW,CAAC,GAAG,IAAI,CAShF;AAID,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,QAAQ,CAAC,WAAW,CAAC,EAC5B,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,cAAc,GAAG,IAAI,GAC9B,IAAI,CAGN"}
@@ -1,17 +1,20 @@
1
- import { createEntity } from '@flighthq/entity/contract';
1
+ import { allocateEntity, finishEntity } from '@flighthq/entity/contract';
2
+ export function createLayoutState() {
3
+ const out = allocateEntity();
4
+ initializeLayoutState(out);
5
+ return finishEntity(out);
6
+ }
2
7
  // Allocates the operation state and its open, last-write-wins resolver registry. Built-in resolvers are
3
8
  // opt-in registrations, so creating the core state never links anchor, flex, or grid code.
4
- export function createLayoutState() {
5
- return createEntity({
6
- guard: null,
7
- lastFailureActualLength: 0,
8
- lastFailureKind: null,
9
- lastFailureNodeIndex: -1,
10
- lastFailureParentIndex: -1,
11
- lastFailureRequiredLength: 0,
12
- lastFailureResolverKind: null,
13
- resolvers: new Map(),
14
- });
9
+ export function initializeLayoutState(out) {
10
+ out.guard = null;
11
+ out.lastFailureActualLength = 0;
12
+ out.lastFailureKind = null;
13
+ out.lastFailureNodeIndex = -1;
14
+ out.lastFailureParentIndex = -1;
15
+ out.lastFailureRequiredLength = 0;
16
+ out.lastFailureResolverKind = null;
17
+ out.resolvers = new Map();
15
18
  }
16
19
  // Registers or replaces one container-kind resolver. Passing null removes it. Bare built-in names are
17
20
  // reserved by the SDK; custom kinds use a vendor prefix such as `acme.Flow`.
@@ -1 +1 @@
1
- {"version":3,"file":"layoutState.js","sourceRoot":"","sources":["../src/layoutState.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAGzD,wGAAwG;AACxG,2FAA2F;AAC3F,MAAM,UAAU,iBAAiB;IAC/B,OAAO,YAAY,CAAC;QAClB,KAAK,EAAE,IAAI;QACX,uBAAuB,EAAE,CAAC;QAC1B,eAAe,EAAE,IAAI;QACrB,oBAAoB,EAAE,CAAC,CAAC;QACxB,sBAAsB,EAAE,CAAC,CAAC;QAC1B,yBAAyB,EAAE,CAAC;QAC5B,uBAAuB,EAAE,IAAI;QAC7B,SAAS,EAAE,IAAI,GAAG,EAAE;KACrB,CAAC,CAAC;AACL,CAAC;AAED,sGAAsG;AACtG,6EAA6E;AAC7E,MAAM,UAAU,sBAAsB,CACpC,KAA4B,EAC5B,IAAY,EACZ,QAA+B;IAE/B,IAAI,QAAQ,KAAK,IAAI;QAAE,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;;QAC/C,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AAC3C,CAAC"}
1
+ {"version":3,"file":"layoutState.js","sourceRoot":"","sources":["../src/layoutState.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAGzE,MAAM,UAAU,iBAAiB;IAC/B,MAAM,GAAG,GAAG,cAAc,EAAe,CAAC;IAC1C,qBAAqB,CAAC,GAAG,CAAC,CAAC;IAC3B,OAAO,YAAY,CAAC,GAAG,CAAC,CAAC;AAC3B,CAAC;AAED,wGAAwG;AACxG,2FAA2F;AAC3F,MAAM,UAAU,qBAAqB,CAAC,GAAoC;IACxE,GAAG,CAAC,KAAK,GAAG,IAAI,CAAC;IACjB,GAAG,CAAC,uBAAuB,GAAG,CAAC,CAAC;IAChC,GAAG,CAAC,eAAe,GAAG,IAAI,CAAC;IAC3B,GAAG,CAAC,oBAAoB,GAAG,CAAC,CAAC,CAAC;IAC9B,GAAG,CAAC,sBAAsB,GAAG,CAAC,CAAC,CAAC;IAChC,GAAG,CAAC,yBAAyB,GAAG,CAAC,CAAC;IAClC,GAAG,CAAC,uBAAuB,GAAG,IAAI,CAAC;IACnC,GAAG,CAAC,SAAS,GAAG,IAAI,GAAG,EAAE,CAAC;AAC5B,CAAC;AAED,sGAAsG;AACtG,6EAA6E;AAC7E,MAAM,UAAU,sBAAsB,CACpC,KAA4B,EAC5B,IAAY,EACZ,QAA+B;IAE/B,IAAI,QAAQ,KAAK,IAAI;QAAE,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;;QAC/C,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AAC3C,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flighthq/layout",
3
- "version": "0.5.1-next.815.cc08b93",
3
+ "version": "0.5.1-next.903.f434bc2",
4
4
  "author": "Joshua Granick and other contributors",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -38,8 +38,8 @@
38
38
  "clean:dist": "tsx ../../scripts/clean-package-dist.ts"
39
39
  },
40
40
  "dependencies": {
41
- "@flighthq/entity": "0.5.1-next.815.cc08b93",
42
- "@flighthq/types": "0.5.1-next.815.cc08b93"
41
+ "@flighthq/entity": "0.5.1-next.903.f434bc2",
42
+ "@flighthq/types": "0.5.1-next.903.f434bc2"
43
43
  },
44
44
  "devDependencies": {
45
45
  "typescript": "^5.3.0"