@flighthq/shape 0.5.1-next.904.b545d9c → 0.5.1-next.905.5fbf787

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.904.b545d9c](https://github.com/flighthq/flight/tree/b545d9cfe622400923a81685c78547f2be54eff5/packages/shape)
17
- - [License](https://github.com/flighthq/flight/blob/b545d9cfe622400923a81685c78547f2be54eff5/LICENSE.md)
16
+ - [Source for @flighthq/shape@0.5.1-next.905.5fbf787](https://github.com/flighthq/flight/tree/5fbf7874064c384307542d68b4dcb6a895ff0dcf/packages/shape)
17
+ - [License](https://github.com/flighthq/flight/blob/5fbf7874064c384307542d68b4dcb6a895ff0dcf/LICENSE.md)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flighthq/shape",
3
- "version": "0.5.1-next.904.b545d9c",
3
+ "version": "0.5.1-next.905.5fbf787",
4
4
  "author": "Joshua Granick and other contributors",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -38,15 +38,15 @@
38
38
  "clean:dist": "tsx ../../scripts/clean-package-dist.ts"
39
39
  },
40
40
  "dependencies": {
41
- "@flighthq/animation": "0.5.1-next.904.b545d9c",
42
- "@flighthq/entity": "0.5.1-next.904.b545d9c",
43
- "@flighthq/geometry": "0.5.1-next.904.b545d9c",
44
- "@flighthq/log": "0.5.1-next.904.b545d9c",
45
- "@flighthq/math": "0.5.1-next.904.b545d9c",
46
- "@flighthq/node": "0.5.1-next.904.b545d9c",
47
- "@flighthq/path": "0.5.1-next.904.b545d9c",
48
- "@flighthq/scene2d": "0.5.1-next.904.b545d9c",
49
- "@flighthq/types": "0.5.1-next.904.b545d9c"
41
+ "@flighthq/animation": "0.5.1-next.905.5fbf787",
42
+ "@flighthq/entity": "0.5.1-next.905.5fbf787",
43
+ "@flighthq/geometry": "0.5.1-next.905.5fbf787",
44
+ "@flighthq/log": "0.5.1-next.905.5fbf787",
45
+ "@flighthq/math": "0.5.1-next.905.5fbf787",
46
+ "@flighthq/node": "0.5.1-next.905.5fbf787",
47
+ "@flighthq/path": "0.5.1-next.905.5fbf787",
48
+ "@flighthq/scene2d": "0.5.1-next.905.5fbf787",
49
+ "@flighthq/types": "0.5.1-next.905.5fbf787"
50
50
  },
51
51
  "devDependencies": {
52
52
  "typescript": "^5.3.0"
@@ -15,6 +15,7 @@ import {
15
15
  createMorphShapeData,
16
16
  createMorphShapeRuntime,
17
17
  getMorphShapeRuntime,
18
+ initializeMorphShapeData,
18
19
  setMorphShapeProgress,
19
20
  } from './morphShape';
20
21
  import { getShapeBounds } from './shape';
@@ -158,6 +159,21 @@ describe('getMorphShapeRuntime', () => {
158
159
  });
159
160
  });
160
161
 
162
+ describe('initializeMorphShapeData', () => {
163
+ it('is the construction initializer of createMorphShapeData', () => {
164
+ expect(typeof initializeMorphShapeData).toBe('function');
165
+ });
166
+ });
167
+
168
+ function createTestMorph(offset = 0): PathMorph {
169
+ const start = createPath();
170
+ appendPathMoveTo(start, offset, offset);
171
+ appendPathLineTo(start, offset + 10, offset);
172
+ const end = createPath();
173
+ appendPathMoveTo(end, offset + 10, offset + 20);
174
+ appendPathLineTo(end, offset + 30, offset + 20);
175
+ return createPathMorph(start, end)!;
176
+ }
161
177
  describe('setMorphShapeProgress', () => {
162
178
  it('does not invalidate or resample unchanged progress', () => {
163
179
  const shape = createMorphShape(createTestMorph());
@@ -207,13 +223,3 @@ describe('setMorphShapeProgress', () => {
207
223
  expect(shape.data.path.data.slice(0, 2)).toStrictEqual([15, 30]);
208
224
  });
209
225
  });
210
-
211
- function createTestMorph(offset = 0): PathMorph {
212
- const start = createPath();
213
- appendPathMoveTo(start, offset, offset);
214
- appendPathLineTo(start, offset + 10, offset);
215
- const end = createPath();
216
- appendPathMoveTo(end, offset + 10, offset + 20);
217
- appendPathLineTo(end, offset + 30, offset + 20);
218
- return createPathMorph(start, end)!;
219
- }
@@ -17,6 +17,7 @@ import {
17
17
  applyAnimationClipToMorphShape,
18
18
  applyMorphShapeAnimationSample,
19
19
  createMorphShapeAnimationTarget,
20
+ initializeMorphShapeAnimationTarget,
20
21
  } from './morphShapeAnimation';
21
22
  import { appendMorphShapeBeginFill } from './morphShapePaint';
22
23
 
@@ -149,3 +150,8 @@ function createTestMorph(offset = 0) {
149
150
  appendPathLineTo(end, offset + 40, offset + 30);
150
151
  return createPathMorph(start, end)!;
151
152
  }
153
+ describe('initializeMorphShapeAnimationTarget', () => {
154
+ it('is the construction initializer of createMorphShapeAnimationTarget', () => {
155
+ expect(typeof initializeMorphShapeAnimationTarget).toBe('function');
156
+ });
157
+ });
@@ -6,6 +6,7 @@ import {
6
6
  createScale9ShapeData,
7
7
  createScale9ShapeRuntime,
8
8
  getScale9ShapeRuntime,
9
+ initializeScale9ShapeData,
9
10
  } from './scale9Shape';
10
11
 
11
12
  const grid = { x: 10, y: 10, width: 80, height: 80 };
@@ -65,3 +66,8 @@ describe('getScale9ShapeRuntime', () => {
65
66
  expect(runtime).not.toBeNull();
66
67
  });
67
68
  });
69
+ describe('initializeScale9ShapeData', () => {
70
+ it('is the construction initializer of createScale9ShapeData', () => {
71
+ expect(typeof initializeScale9ShapeData).toBe('function');
72
+ });
73
+ });
package/src/shape.test.ts CHANGED
@@ -21,6 +21,7 @@ import {
21
21
  getShapeBounds,
22
22
  getShapeCommandCount,
23
23
  getShapeRuntime,
24
+ initializeShapeData,
24
25
  isShapeEmpty,
25
26
  } from './shape';
26
27
  import {
@@ -355,6 +356,11 @@ describe('getShapeRuntime', () => {
355
356
  });
356
357
  });
357
358
 
359
+ describe('initializeShapeData', () => {
360
+ it('is the construction initializer of createShapeData', () => {
361
+ expect(typeof initializeShapeData).toBe('function');
362
+ });
363
+ });
358
364
  describe('isShapeEmpty', () => {
359
365
  it('returns true for a shape with no commands', () => {
360
366
  const shape = createShape();