@pooder/kit 5.1.0 → 5.3.0
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/.test-dist/src/CanvasService.js +249 -249
- package/.test-dist/src/ViewportSystem.js +75 -75
- package/.test-dist/src/background.js +203 -203
- package/.test-dist/src/bridgeSelection.js +20 -20
- package/.test-dist/src/constraints.js +237 -237
- package/.test-dist/src/dieline.js +818 -818
- package/.test-dist/src/edgeScale.js +12 -12
- package/.test-dist/src/extensions/background.js +203 -0
- package/.test-dist/src/extensions/bridgeSelection.js +20 -0
- package/.test-dist/src/extensions/constraints.js +237 -0
- package/.test-dist/src/extensions/dieline.js +828 -0
- package/.test-dist/src/extensions/edgeScale.js +12 -0
- package/.test-dist/src/extensions/feature.js +825 -0
- package/.test-dist/src/extensions/featureComplete.js +32 -0
- package/.test-dist/src/extensions/film.js +167 -0
- package/.test-dist/src/extensions/geometry.js +545 -0
- package/.test-dist/src/extensions/image.js +1529 -0
- package/.test-dist/src/extensions/index.js +30 -0
- package/.test-dist/src/extensions/maskOps.js +279 -0
- package/.test-dist/src/extensions/mirror.js +104 -0
- package/.test-dist/src/extensions/ruler.js +345 -0
- package/.test-dist/src/extensions/sceneLayout.js +96 -0
- package/.test-dist/src/extensions/sceneLayoutModel.js +196 -0
- package/.test-dist/src/extensions/sceneVisibility.js +62 -0
- package/.test-dist/src/extensions/size.js +331 -0
- package/.test-dist/src/extensions/tracer.js +538 -0
- package/.test-dist/src/extensions/white-ink.js +1190 -0
- package/.test-dist/src/extensions/wrappedOffsets.js +33 -0
- package/.test-dist/src/feature.js +826 -826
- package/.test-dist/src/featureComplete.js +32 -32
- package/.test-dist/src/film.js +167 -167
- package/.test-dist/src/geometry.js +506 -506
- package/.test-dist/src/image.js +1250 -1250
- package/.test-dist/src/index.js +2 -19
- package/.test-dist/src/maskOps.js +270 -270
- package/.test-dist/src/mirror.js +104 -104
- package/.test-dist/src/renderSpec.js +2 -2
- package/.test-dist/src/ruler.js +343 -343
- package/.test-dist/src/sceneLayout.js +99 -99
- package/.test-dist/src/sceneLayoutModel.js +196 -196
- package/.test-dist/src/sceneView.js +40 -40
- package/.test-dist/src/sceneVisibility.js +42 -42
- package/.test-dist/src/services/CanvasService.js +249 -0
- package/.test-dist/src/services/ViewportSystem.js +76 -0
- package/.test-dist/src/services/index.js +24 -0
- package/.test-dist/src/services/renderSpec.js +2 -0
- package/.test-dist/src/size.js +332 -332
- package/.test-dist/src/tracer.js +544 -544
- package/.test-dist/src/white-ink.js +829 -829
- package/.test-dist/src/wrappedOffsets.js +33 -33
- package/CHANGELOG.md +12 -0
- package/dist/index.d.mts +14 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.js +3521 -3220
- package/dist/index.mjs +3532 -3226
- package/package.json +1 -1
- package/src/coordinate.ts +106 -106
- package/src/extensions/background.ts +230 -230
- package/src/extensions/bridgeSelection.ts +17 -17
- package/src/extensions/constraints.ts +322 -322
- package/src/extensions/dieline.ts +20 -17
- package/src/extensions/edgeScale.ts +19 -19
- package/src/extensions/feature.ts +1021 -1021
- package/src/extensions/featureComplete.ts +46 -46
- package/src/extensions/film.ts +194 -194
- package/src/extensions/geometry.ts +719 -719
- package/src/extensions/image.ts +1924 -1594
- package/src/extensions/index.ts +11 -11
- package/src/extensions/maskOps.ts +365 -299
- package/src/extensions/mirror.ts +128 -128
- package/src/extensions/ruler.ts +451 -451
- package/src/extensions/sceneLayout.ts +140 -140
- package/src/extensions/sceneLayoutModel.ts +342 -342
- package/src/extensions/sceneVisibility.ts +71 -71
- package/src/extensions/size.ts +389 -389
- package/src/extensions/tracer.ts +302 -370
- package/src/extensions/white-ink.ts +1489 -1366
- package/src/extensions/wrappedOffsets.ts +33 -33
- package/src/index.ts +2 -2
- package/src/services/CanvasService.ts +300 -300
- package/src/services/ViewportSystem.ts +95 -95
- package/src/services/index.ts +3 -3
- package/src/services/renderSpec.ts +18 -18
- package/src/units.ts +27 -27
- package/tests/run.ts +118 -118
- package/tsconfig.test.json +15 -15
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.wrappedDistance = wrappedDistance;
|
|
4
|
-
exports.sampleWrappedOffsets = sampleWrappedOffsets;
|
|
5
|
-
function wrappedDistance(total, start, end) {
|
|
6
|
-
if (!Number.isFinite(total) || total <= 0)
|
|
7
|
-
return 0;
|
|
8
|
-
if (!Number.isFinite(start) || !Number.isFinite(end))
|
|
9
|
-
return 0;
|
|
10
|
-
const s = ((start % total) + total) % total;
|
|
11
|
-
const e = ((end % total) + total) % total;
|
|
12
|
-
return e >= s ? e - s : total - s + e;
|
|
13
|
-
}
|
|
14
|
-
function sampleWrappedOffsets(total, start, end, count) {
|
|
15
|
-
if (!Number.isFinite(total) || total <= 0)
|
|
16
|
-
return [];
|
|
17
|
-
if (!Number.isFinite(start) || !Number.isFinite(end))
|
|
18
|
-
return [];
|
|
19
|
-
const n = Math.max(0, Math.floor(count));
|
|
20
|
-
if (n <= 0)
|
|
21
|
-
return [];
|
|
22
|
-
const dist = wrappedDistance(total, start, end);
|
|
23
|
-
if (n === 1)
|
|
24
|
-
return [((start % total) + total) % total];
|
|
25
|
-
const step = dist / (n - 1);
|
|
26
|
-
const offsets = [];
|
|
27
|
-
for (let i = 0; i < n; i++) {
|
|
28
|
-
const raw = start + step * i;
|
|
29
|
-
const wrapped = ((raw % total) + total) % total;
|
|
30
|
-
offsets.push(wrapped);
|
|
31
|
-
}
|
|
32
|
-
return offsets;
|
|
33
|
-
}
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.wrappedDistance = wrappedDistance;
|
|
4
|
+
exports.sampleWrappedOffsets = sampleWrappedOffsets;
|
|
5
|
+
function wrappedDistance(total, start, end) {
|
|
6
|
+
if (!Number.isFinite(total) || total <= 0)
|
|
7
|
+
return 0;
|
|
8
|
+
if (!Number.isFinite(start) || !Number.isFinite(end))
|
|
9
|
+
return 0;
|
|
10
|
+
const s = ((start % total) + total) % total;
|
|
11
|
+
const e = ((end % total) + total) % total;
|
|
12
|
+
return e >= s ? e - s : total - s + e;
|
|
13
|
+
}
|
|
14
|
+
function sampleWrappedOffsets(total, start, end, count) {
|
|
15
|
+
if (!Number.isFinite(total) || total <= 0)
|
|
16
|
+
return [];
|
|
17
|
+
if (!Number.isFinite(start) || !Number.isFinite(end))
|
|
18
|
+
return [];
|
|
19
|
+
const n = Math.max(0, Math.floor(count));
|
|
20
|
+
if (n <= 0)
|
|
21
|
+
return [];
|
|
22
|
+
const dist = wrappedDistance(total, start, end);
|
|
23
|
+
if (n === 1)
|
|
24
|
+
return [((start % total) + total) % total];
|
|
25
|
+
const step = dist / (n - 1);
|
|
26
|
+
const offsets = [];
|
|
27
|
+
for (let i = 0; i < n; i++) {
|
|
28
|
+
const raw = start + step * i;
|
|
29
|
+
const wrapped = ((raw % total) + total) % total;
|
|
30
|
+
offsets.push(wrapped);
|
|
31
|
+
}
|
|
32
|
+
return offsets;
|
|
33
|
+
}
|
package/CHANGELOG.md
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -52,12 +52,15 @@ declare class ImageTool implements Extension {
|
|
|
52
52
|
private focusedImageId;
|
|
53
53
|
private renderSeq;
|
|
54
54
|
private dirtyTrackerDisposable?;
|
|
55
|
+
private cropShapeHatchPattern?;
|
|
56
|
+
private cropShapeHatchPatternColor?;
|
|
55
57
|
activate(context: ExtensionContext): void;
|
|
56
58
|
deactivate(context: ExtensionContext): void;
|
|
57
59
|
private onToolActivated;
|
|
58
60
|
private onSelectionChanged;
|
|
59
61
|
private onSelectionCleared;
|
|
60
62
|
private onSceneLayoutChanged;
|
|
63
|
+
private onSceneGeometryChanged;
|
|
61
64
|
private syncToolActiveFromWorkbench;
|
|
62
65
|
private isImageEditingVisible;
|
|
63
66
|
private isDebugEnabled;
|
|
@@ -105,9 +108,15 @@ declare class ImageTool implements Extension {
|
|
|
105
108
|
private getSourceSize;
|
|
106
109
|
private getCoverScale;
|
|
107
110
|
private getFrameVisualConfig;
|
|
111
|
+
private toSceneGeometryLike;
|
|
112
|
+
private resolveSceneGeometryForOverlay;
|
|
113
|
+
private resolveCutShapeRadius;
|
|
114
|
+
private getCropShapeHatchPattern;
|
|
115
|
+
private buildCropShapeOverlaySpecs;
|
|
108
116
|
private resolveRenderImageState;
|
|
109
117
|
private computeCanvasProps;
|
|
110
118
|
private getCurrentSrc;
|
|
119
|
+
private applyImageControlVisibility;
|
|
111
120
|
private upsertImageObject;
|
|
112
121
|
private syncImageZOrder;
|
|
113
122
|
private buildOverlaySpecs;
|
|
@@ -501,6 +510,11 @@ declare class WhiteInkTool implements Extension {
|
|
|
501
510
|
private getPrimaryImageSource;
|
|
502
511
|
private getCurrentSrc;
|
|
503
512
|
private getImageSnapshot;
|
|
513
|
+
private getImagePlacementState;
|
|
514
|
+
private shouldRestoreSnapshotToSource;
|
|
515
|
+
private getCoverScale;
|
|
516
|
+
private ensureSourceSize;
|
|
517
|
+
private resolveAlignedImageSnapshot;
|
|
504
518
|
private getImageElementFromObject;
|
|
505
519
|
private rememberSourceSize;
|
|
506
520
|
private getSourceSize;
|
package/dist/index.d.ts
CHANGED
|
@@ -52,12 +52,15 @@ declare class ImageTool implements Extension {
|
|
|
52
52
|
private focusedImageId;
|
|
53
53
|
private renderSeq;
|
|
54
54
|
private dirtyTrackerDisposable?;
|
|
55
|
+
private cropShapeHatchPattern?;
|
|
56
|
+
private cropShapeHatchPatternColor?;
|
|
55
57
|
activate(context: ExtensionContext): void;
|
|
56
58
|
deactivate(context: ExtensionContext): void;
|
|
57
59
|
private onToolActivated;
|
|
58
60
|
private onSelectionChanged;
|
|
59
61
|
private onSelectionCleared;
|
|
60
62
|
private onSceneLayoutChanged;
|
|
63
|
+
private onSceneGeometryChanged;
|
|
61
64
|
private syncToolActiveFromWorkbench;
|
|
62
65
|
private isImageEditingVisible;
|
|
63
66
|
private isDebugEnabled;
|
|
@@ -105,9 +108,15 @@ declare class ImageTool implements Extension {
|
|
|
105
108
|
private getSourceSize;
|
|
106
109
|
private getCoverScale;
|
|
107
110
|
private getFrameVisualConfig;
|
|
111
|
+
private toSceneGeometryLike;
|
|
112
|
+
private resolveSceneGeometryForOverlay;
|
|
113
|
+
private resolveCutShapeRadius;
|
|
114
|
+
private getCropShapeHatchPattern;
|
|
115
|
+
private buildCropShapeOverlaySpecs;
|
|
108
116
|
private resolveRenderImageState;
|
|
109
117
|
private computeCanvasProps;
|
|
110
118
|
private getCurrentSrc;
|
|
119
|
+
private applyImageControlVisibility;
|
|
111
120
|
private upsertImageObject;
|
|
112
121
|
private syncImageZOrder;
|
|
113
122
|
private buildOverlaySpecs;
|
|
@@ -501,6 +510,11 @@ declare class WhiteInkTool implements Extension {
|
|
|
501
510
|
private getPrimaryImageSource;
|
|
502
511
|
private getCurrentSrc;
|
|
503
512
|
private getImageSnapshot;
|
|
513
|
+
private getImagePlacementState;
|
|
514
|
+
private shouldRestoreSnapshotToSource;
|
|
515
|
+
private getCoverScale;
|
|
516
|
+
private ensureSourceSize;
|
|
517
|
+
private resolveAlignedImageSnapshot;
|
|
504
518
|
private getImageElementFromObject;
|
|
505
519
|
private rememberSourceSize;
|
|
506
520
|
private getSourceSize;
|