@flighthq/shape 0.5.1-next.650.5d3df0b → 0.5.1-next.654.b54779d

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/shape`. The `@flight
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/shape@0.5.1-next.650.5d3df0b](https://github.com/flighthq/flight/tree/5d3df0b3bd7071e51898ec6ca5f733b81cb94a54/packages/shape)
17
- - [License](https://github.com/flighthq/flight/blob/5d3df0b3bd7071e51898ec6ca5f733b81cb94a54/LICENSE.md)
16
+ - [Source for @flighthq/shape@0.5.1-next.654.b54779d](https://github.com/flighthq/flight/tree/b54779d8e000aedff716f72779c6a2a77aeabefe/packages/shape)
17
+ - [License](https://github.com/flighthq/flight/blob/b54779d8e000aedff716f72779c6a2a77aeabefe/LICENSE.md)
@@ -1,4 +1,5 @@
1
1
  import type { ShapeBoundsCommand, ShapeCommandKey } from '@flighthq/types/contract';
2
+ export declare function clearShapeBoundsCommands(): void;
2
3
  export declare function getShapeBoundsCommand(key: string): Readonly<ShapeBoundsCommand> | null;
3
4
  export declare function getShapeBoundsCommandRegistryRevision(): number;
4
5
  export declare function registerShapeBoundsCommand<K extends ShapeCommandKey>(command: ShapeBoundsCommand<K>): void;
@@ -1 +1 @@
1
- {"version":3,"file":"shapeBoundsRegistry.d.ts","sourceRoot":"","sources":["../src/shapeBoundsRegistry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAEpF,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,QAAQ,CAAC,kBAAkB,CAAC,GAAG,IAAI,CAEtF;AAED,wBAAgB,qCAAqC,IAAI,MAAM,CAE9D;AAED,wBAAgB,0BAA0B,CAAC,CAAC,SAAS,eAAe,EAAE,OAAO,EAAE,kBAAkB,CAAC,CAAC,CAAC,GAAG,IAAI,CAK1G;AAED,wBAAgB,4BAA4B,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAG9D"}
1
+ {"version":3,"file":"shapeBoundsRegistry.d.ts","sourceRoot":"","sources":["../src/shapeBoundsRegistry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAEpF,wBAAgB,wBAAwB,IAAI,IAAI,CAG/C;AAED,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,QAAQ,CAAC,kBAAkB,CAAC,GAAG,IAAI,CAEtF;AAED,wBAAgB,qCAAqC,IAAI,MAAM,CAE9D;AAED,wBAAgB,0BAA0B,CAAC,CAAC,SAAS,eAAe,EAAE,OAAO,EAAE,kBAAkB,CAAC,CAAC,CAAC,GAAG,IAAI,CAK1G;AAED,wBAAgB,4BAA4B,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAG9D"}
@@ -1,3 +1,7 @@
1
+ export function clearShapeBoundsCommands() {
2
+ _commands.clear();
3
+ _revision++;
4
+ }
1
5
  export function getShapeBoundsCommand(key) {
2
6
  return _commands.get(key) ?? null;
3
7
  }
@@ -1 +1 @@
1
- {"version":3,"file":"shapeBoundsRegistry.js","sourceRoot":"","sources":["../src/shapeBoundsRegistry.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,qBAAqB,CAAC,GAAW;IAC/C,OAAO,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC;AACpC,CAAC;AAED,MAAM,UAAU,qCAAqC;IACnD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,MAAM,UAAU,0BAA0B,CAA4B,OAA8B;IAClG,MAAM,QAAQ,GAAG,SAAS,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,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BAA4B,CAAC,GAAW;IACtD,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,GAAG,CAAC;QAAE,OAAO;IACnC,SAAS,EAAE,CAAC;AACd,CAAC;AAED,uGAAuG;AACvG,iGAAiG;AACjG,0FAA0F;AAC1F,MAAM,SAAS,GAAG,IAAI,GAAG,EAAwC,CAAC;AAClE,IAAI,SAAS,GAAG,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flighthq/shape",
3
- "version": "0.5.1-next.650.5d3df0b",
3
+ "version": "0.5.1-next.654.b54779d",
4
4
  "author": "Joshua Granick and other contributors",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -38,14 +38,14 @@
38
38
  "clean:dist": "tsx ../../scripts/clean-package-dist.ts"
39
39
  },
40
40
  "dependencies": {
41
- "@flighthq/animation": "0.5.1-next.650.5d3df0b",
42
- "@flighthq/geometry": "0.5.1-next.650.5d3df0b",
43
- "@flighthq/log": "0.5.1-next.650.5d3df0b",
44
- "@flighthq/math": "0.5.1-next.650.5d3df0b",
45
- "@flighthq/node": "0.5.1-next.650.5d3df0b",
46
- "@flighthq/path": "0.5.1-next.650.5d3df0b",
47
- "@flighthq/scene2d": "0.5.1-next.650.5d3df0b",
48
- "@flighthq/types": "0.5.1-next.650.5d3df0b"
41
+ "@flighthq/animation": "0.5.1-next.654.b54779d",
42
+ "@flighthq/geometry": "0.5.1-next.654.b54779d",
43
+ "@flighthq/log": "0.5.1-next.654.b54779d",
44
+ "@flighthq/math": "0.5.1-next.654.b54779d",
45
+ "@flighthq/node": "0.5.1-next.654.b54779d",
46
+ "@flighthq/path": "0.5.1-next.654.b54779d",
47
+ "@flighthq/scene2d": "0.5.1-next.654.b54779d",
48
+ "@flighthq/types": "0.5.1-next.654.b54779d"
49
49
  },
50
50
  "devDependencies": {
51
51
  "typescript": "^5.3.0"
@@ -1,13 +1,28 @@
1
1
  import { getNodeLocalBoundsRectangle } from '@flighthq/node/contract';
2
2
 
3
+ import { registerDefaultShapeBoundsCommands } from './registerDefaultShapeBoundsCommands';
3
4
  import { createShape } from './shape';
4
5
  import {
6
+ clearShapeBoundsCommands,
5
7
  getShapeBoundsCommand,
6
8
  getShapeBoundsCommandRegistryRevision,
7
9
  registerShapeBoundsCommand,
8
10
  unregisterShapeBoundsCommand,
9
11
  } from './shapeBoundsRegistry';
10
12
 
13
+ describe('clearShapeBoundsCommands', () => {
14
+ it('removes all registered commands and bumps the revision', () => {
15
+ registerDefaultShapeBoundsCommands();
16
+ const revision = getShapeBoundsCommandRegistryRevision();
17
+ expect(getShapeBoundsCommand('moveTo')).not.toBeNull();
18
+
19
+ clearShapeBoundsCommands();
20
+
21
+ expect(getShapeBoundsCommand('moveTo')).toBeNull();
22
+ expect(getShapeBoundsCommandRegistryRevision()).toBe(revision + 1);
23
+ });
24
+ });
25
+
11
26
  describe('getShapeBoundsCommand', () => {
12
27
  it('distinguishes an absent key from an explicitly geometry-free command', () => {
13
28
  const key = '__test.null-bounds__';