@bookklik/pivo-plate 0.0.0-stage → 0.2.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/lib/core.d.ts ADDED
@@ -0,0 +1,165 @@
1
+ import { g as Project, h as Selection, B as Brush, A as Atlas, V as Vec2, E as EditorSession, i as Vec3, T as Tile, c as Plane } from './types/png-CEL_ylyR.js';
2
+ export { a as AtlasRegion, D as DEFAULT_OBJECT_ID, M as Mode, P as PNG_LIMITS, b as PROJECT_PNG_LIMITS, d as PngAlphaMode, e as PngInfo, f as PngLimits, S as SceneObject, p as pngBytesDataUrl, j as pngDataUrlBytes, v as validatePngBytes, k as validatePngDataUrl } from './types/png-CEL_ylyR.js';
3
+
4
+ /** Hard cap on parent-chain depth for any object in a valid project. */
5
+ declare const MAX_HIERARCHY_DEPTH = 128;
6
+
7
+ /** Generate a reasonably unique id, optionally prefixed. */
8
+ declare function uid(prefix?: string): string;
9
+ declare function clone<T>(value: T): T;
10
+ declare function v3(x: number, y: number, z: number): Vec3;
11
+ /** Create a new, empty project with the default object-main object. */
12
+ declare function createProject(name?: string): Project;
13
+ /**
14
+ * Create an editing session for a project. Projects may have no atlases yet;
15
+ * in that case the session falls back to a blank brush referencing a
16
+ * conventional blank atlas id, so drawing can still start from nothing.
17
+ */
18
+ declare function createSession(project: Project): EditorSession;
19
+ /**
20
+ * Snap a scalar to the nearest multiple of `grid`. Grid 0 or negative grid
21
+ * falls back to identity (no snapping). Works correctly for negatives.
22
+ */
23
+ declare function snap(value: number, grid: number): number;
24
+ /**
25
+ * Map a point onto the given construction plane: the two in-plane
26
+ * coordinates are floor-snapped to the cell origin (lower corner of the
27
+ * grid cell containing the point), and the perpendicular coordinate is
28
+ * taken from the crosshair so drawing happens at the current elevation.
29
+ * Right-handed Y-up: XZ is the ground plane, XY and YZ are wall planes.
30
+ */
31
+ declare function planePoint(point: Vec3, plane: Plane, crosshair: Vec3, grid: number): Vec3;
32
+ /**
33
+ * World-space quad corners for a tile whose origin corner sits at `origin`
34
+ * on the given plane, sized `tileSize`. Corner order is consistent across
35
+ * planes: [origin, +a, +a+b, +b] where (a, b) are the plane's in-plane axes
36
+ * chosen so the triangulation [0,1,2,0,2,3] faces the plane's positive
37
+ * axis under right-handed Y-up coordinates:
38
+ * XY → +Z (a=x, b=y), XZ → +Y (a=z, b=x), YZ → +X (a=y, b=z).
39
+ */
40
+ declare function tileCorners(origin: Vec3, plane: Plane, tileSize: number): [Vec3, Vec3, Vec3, Vec3];
41
+ /**
42
+ * Validate a brush against its atlas before any tile is created or mutated:
43
+ * region must be a finite in-bounds pixel rectangle with positive size, and
44
+ * rotation must be a whole number of quarter-turns (0..3). Called by
45
+ * makeTile/applyBrush so invalid brushes are rejected before mutation.
46
+ */
47
+ declare function validateBrushAgainstAtlas(atlas: Atlas, brush: Brush): void;
48
+ /**
49
+ * Create a tile on the active object at `origin` on the session plane,
50
+ * using the session brush for UVs. Mutates the project in place (intended
51
+ * to be called inside a store transaction) and returns the new tile.
52
+ * Rejects out-of-bounds brush regions and invalid rotation flags before
53
+ * any tile is created.
54
+ */
55
+ declare function makeTile(project: Project, session: EditorSession, origin: Vec3): Tile;
56
+ /**
57
+ * Convert a brush pixel-region (top-down y, like image space) plus
58
+ * rotation/flips into four bottom-left-origin UVs matching the quad corner
59
+ * order [LL, LR, UR, UL]. Rotation is in quarter-turns, clockwise in image
60
+ * space. Margins/spacing describe *selectable cells* and do not shrink the
61
+ * requested region itself.
62
+ */
63
+ declare function brushUVs(atlas: Atlas, brush: Brush): [Vec2, Vec2, Vec2, Vec2];
64
+ /** True when the object or any of its ancestors is locked. */
65
+ declare function isObjectLocked(project: Project, id: string): boolean;
66
+ /** Ancestor visibility with a defensive cycle/depth guard. */
67
+ declare function isObjectVisible(project: Project, id: string): boolean;
68
+ /** Reparent an object. Rejects cycles (including self-parenting). */
69
+ declare function reparentObject(project: Project, id: string, parentId: string | null): void;
70
+ /** Deduplicated list of selected corners with their owning tiles. */
71
+ declare function selectedCorners(project: Project, selection: Selection): {
72
+ tile: Tile;
73
+ corner: number;
74
+ }[];
75
+ declare function translateSelection(project: Project, selection: Selection, delta: Vec3): void;
76
+ declare function rotateSelection(project: Project, selection: Selection, axis: 'x' | 'y' | 'z', radians: number, pivot: Vec3): void;
77
+ declare function scaleSelection(project: Project, selection: Selection, factor: Vec3, pivot: Vec3): void;
78
+ /** Duplicate selected tiles, offset by `delta`. Returns new tile ids. */
79
+ declare function duplicateSelection(project: Project, selection: Selection, delta: Vec3): string[];
80
+ /** Delete the selected tiles. Corner-only selections are rejected. */
81
+ declare function deleteSelection(project: Project, selection: Selection): void;
82
+ /** Reverse winding of selected tiles. */
83
+ declare function reverseSelection(project: Project, selection: Selection): void;
84
+ /** Apply the session brush's UVs (via given brush) to selected tiles.
85
+ * The whole brush is validated (region bounds, rotation flags) before any
86
+ * tile is mutated, so a rejected brush leaves every tile untouched. */
87
+ declare function applyBrush(project: Project, selection: Selection, brush: Brush): void;
88
+ /**
89
+ * Shared UV range policy: UVs must lie in the closed 0..1 range, with this
90
+ * explicit tolerance for floating-point drift. Values within tolerance are
91
+ * normalized (clamped) back to the exact bound; beyond tolerance is invalid.
92
+ */
93
+ declare const UV_TOLERANCE = 0.000001;
94
+ /** Validate one UV pair against the shared 0..1 policy; readable message. */
95
+ declare function checkUvInRange(tileId: string, uv: Vec2): void;
96
+ /** Normalize (clamp) UV components that drifted within tolerance back into 0..1. */
97
+ declare function normalizeUv(uv: Vec2): Vec2;
98
+ /**
99
+ * Transform UVs of selected tiles. `rotate` turns UVs 90° clockwise around
100
+ * the tile's UV center; flips mirror across the center; `offset` (when
101
+ * provided) translates all four UVs afterwards. All per-tile results are
102
+ * computed up front and the offset is validated BEFORE any tile is mutated,
103
+ * so a rejected operation (e.g. a non-finite offset) leaves every tile
104
+ * untouched. Range enforcement of the RESULT happens at the document
105
+ * boundary: validateProject / EditorStore.transact reject UVs outside the
106
+ * shared 0..1 policy, so an offset that would leave the range can never be
107
+ * committed through a transaction.
108
+ */
109
+ declare function transformUVs(project: Project, selection: Selection, operation: 'rotate' | 'flipX' | 'flipY', offset?: Vec2): void;
110
+ /**
111
+ * Validate an unknown value as a Project. Returns a deep clone on success.
112
+ * Throws a readable Error on any structural problem. Never mutates input.
113
+ */
114
+ declare function validateProject(value: unknown): Project;
115
+ /**
116
+ * Snapshot-based transactional store. Every successful transaction pushes an
117
+ * immutable structural snapshot onto the undo stack; failed (throwing)
118
+ * transactions leave state untouched; no-op transactions (deep-equal result)
119
+ * are omitted from history. Undo/redo history is bounded.
120
+ */
121
+ declare class EditorStore {
122
+ private readonly historyBudget;
123
+ private _project;
124
+ private _undoStack;
125
+ private _redoStack;
126
+ private _label;
127
+ private _revision;
128
+ private _savedSnapshot;
129
+ private _listeners;
130
+ private historyCosts;
131
+ constructor(project: Project, historyBudget?: number);
132
+ get project(): Project;
133
+ get canUndo(): boolean;
134
+ get canRedo(): boolean;
135
+ /** Label of the most recent committed transaction ('' if none yet). */
136
+ get historyLabel(): string;
137
+ /** Monotonically increasing counter bumped on every state change. */
138
+ get revision(): number;
139
+ /** Semantic dirty flag: current state differs from last saved state. */
140
+ get dirty(): boolean;
141
+ subscribe(fn: () => void): () => void;
142
+ private emit;
143
+ private pushHistory;
144
+ get retainedHistoryBytes(): number;
145
+ /**
146
+ * Run a synchronous mutation. The callback receives a working draft; the
147
+ * raw draft is validated with the canonical validator BEFORE publication
148
+ * and before JSON cloning could mask NaN/Infinity (which stringify to
149
+ * null). On validation failure or throw, state, revision, history, redo
150
+ * and dirty state are untouched. The committed project is re-cloned so no
151
+ * retained reference to the draft (including a callback that keeps mutating
152
+ * asynchronously after rejection or resolution) can alias committed state.
153
+ */
154
+ transact(label: string, fn: (project: Project) => void): void;
155
+ undo(): void;
156
+ redo(): void;
157
+ /** Replace the whole project (e.g. load). Validates BEFORE replacing the
158
+ * current project: on invalid input the existing state, history, revision
159
+ * and dirty flags are untouched. Clears undo/redo history on success. */
160
+ replace(project: Project): void;
161
+ /** Mark the snapshot actually downloaded; edits during a save stay dirty. */
162
+ markSaved(snapshot?: Project): void;
163
+ }
164
+
165
+ export { Atlas, Brush, EditorSession, EditorStore, MAX_HIERARCHY_DEPTH, Plane, Project, Selection, Tile, UV_TOLERANCE, Vec2, Vec3, applyBrush, brushUVs, checkUvInRange, clone, createProject, createSession, deleteSelection, duplicateSelection, isObjectLocked, isObjectVisible, makeTile, normalizeUv, planePoint, reparentObject, reverseSelection, rotateSelection, scaleSelection, selectedCorners, snap, tileCorners, transformUVs, translateSelection, uid, v3, validateBrushAgainstAtlas, validateProject };
package/lib/core.js ADDED
@@ -0,0 +1,75 @@
1
+ import "./chunks/chunk-C4CNHGLY.js";
2
+ import {
3
+ EditorStore,
4
+ MAX_HIERARCHY_DEPTH,
5
+ PNG_LIMITS,
6
+ PROJECT_PNG_LIMITS,
7
+ UV_TOLERANCE,
8
+ applyBrush,
9
+ brushUVs,
10
+ checkUvInRange,
11
+ clone,
12
+ createProject,
13
+ createSession,
14
+ deleteSelection,
15
+ duplicateSelection,
16
+ isObjectLocked,
17
+ isObjectVisible,
18
+ makeTile,
19
+ normalizeUv,
20
+ planePoint,
21
+ pngBytesDataUrl,
22
+ pngDataUrlBytes,
23
+ reparentObject,
24
+ reverseSelection,
25
+ rotateSelection,
26
+ scaleSelection,
27
+ selectedCorners,
28
+ snap,
29
+ tileCorners,
30
+ transformUVs,
31
+ translateSelection,
32
+ uid,
33
+ v3,
34
+ validateBrushAgainstAtlas,
35
+ validatePngBytes,
36
+ validatePngDataUrl,
37
+ validateProject
38
+ } from "./chunks/chunk-OYM3ZMMA.js";
39
+ export {
40
+ EditorStore,
41
+ MAX_HIERARCHY_DEPTH,
42
+ PNG_LIMITS,
43
+ PROJECT_PNG_LIMITS,
44
+ UV_TOLERANCE,
45
+ applyBrush,
46
+ brushUVs,
47
+ checkUvInRange,
48
+ clone,
49
+ createProject,
50
+ createSession,
51
+ deleteSelection,
52
+ duplicateSelection,
53
+ isObjectLocked,
54
+ isObjectVisible,
55
+ makeTile,
56
+ normalizeUv,
57
+ planePoint,
58
+ pngBytesDataUrl,
59
+ pngDataUrlBytes,
60
+ reparentObject,
61
+ reverseSelection,
62
+ rotateSelection,
63
+ scaleSelection,
64
+ selectedCorners,
65
+ snap,
66
+ tileCorners,
67
+ transformUVs,
68
+ translateSelection,
69
+ uid,
70
+ v3,
71
+ validateBrushAgainstAtlas,
72
+ validatePngBytes,
73
+ validatePngDataUrl,
74
+ validateProject
75
+ };
package/lib/index.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ export { EditorStore, MAX_HIERARCHY_DEPTH, UV_TOLERANCE, applyBrush, brushUVs, checkUvInRange, clone, createProject, createSession, deleteSelection, duplicateSelection, isObjectLocked, isObjectVisible, makeTile, normalizeUv, planePoint, reparentObject, reverseSelection, rotateSelection, scaleSelection, selectedCorners, snap, tileCorners, transformUVs, translateSelection, uid, v3, validateBrushAgainstAtlas, validateProject } from './core.js';
2
+ export { A as Atlas, a as AtlasRegion, B as Brush, D as DEFAULT_OBJECT_ID, E as EditorSession, M as Mode, P as PNG_LIMITS, b as PROJECT_PNG_LIMITS, c as Plane, d as PngAlphaMode, e as PngInfo, f as PngLimits, g as Project, S as SceneObject, h as Selection, T as Tile, V as Vec2, i as Vec3, p as pngBytesDataUrl, j as pngDataUrlBytes, v as validatePngBytes, k as validatePngDataUrl } from './types/png-CEL_ylyR.js';
3
+ export { ContainerError, ExportError, PayloadError, ProjectIOError, decodeProject, encodeProject, exportGLB, exportOBJ, inspectAlpha } from './io.js';
package/lib/index.js ADDED
@@ -0,0 +1,95 @@
1
+ import "./chunks/chunk-C4CNHGLY.js";
2
+ import {
3
+ ContainerError,
4
+ ExportError,
5
+ PayloadError,
6
+ ProjectIOError,
7
+ decodeProject,
8
+ encodeProject,
9
+ exportGLB,
10
+ exportOBJ,
11
+ inspectAlpha
12
+ } from "./chunks/chunk-DKWUGCIO.js";
13
+ import {
14
+ EditorStore,
15
+ MAX_HIERARCHY_DEPTH,
16
+ PNG_LIMITS,
17
+ PROJECT_PNG_LIMITS,
18
+ UV_TOLERANCE,
19
+ applyBrush,
20
+ brushUVs,
21
+ checkUvInRange,
22
+ clone,
23
+ createProject,
24
+ createSession,
25
+ deleteSelection,
26
+ duplicateSelection,
27
+ isObjectLocked,
28
+ isObjectVisible,
29
+ makeTile,
30
+ normalizeUv,
31
+ planePoint,
32
+ pngBytesDataUrl,
33
+ pngDataUrlBytes,
34
+ reparentObject,
35
+ reverseSelection,
36
+ rotateSelection,
37
+ scaleSelection,
38
+ selectedCorners,
39
+ snap,
40
+ tileCorners,
41
+ transformUVs,
42
+ translateSelection,
43
+ uid,
44
+ v3,
45
+ validateBrushAgainstAtlas,
46
+ validatePngBytes,
47
+ validatePngDataUrl,
48
+ validateProject
49
+ } from "./chunks/chunk-OYM3ZMMA.js";
50
+ export {
51
+ ContainerError,
52
+ EditorStore,
53
+ ExportError,
54
+ MAX_HIERARCHY_DEPTH,
55
+ PNG_LIMITS,
56
+ PROJECT_PNG_LIMITS,
57
+ PayloadError,
58
+ ProjectIOError,
59
+ UV_TOLERANCE,
60
+ applyBrush,
61
+ brushUVs,
62
+ checkUvInRange,
63
+ clone,
64
+ createProject,
65
+ createSession,
66
+ decodeProject,
67
+ deleteSelection,
68
+ duplicateSelection,
69
+ encodeProject,
70
+ exportGLB,
71
+ exportOBJ,
72
+ inspectAlpha,
73
+ isObjectLocked,
74
+ isObjectVisible,
75
+ makeTile,
76
+ normalizeUv,
77
+ planePoint,
78
+ pngBytesDataUrl,
79
+ pngDataUrlBytes,
80
+ reparentObject,
81
+ reverseSelection,
82
+ rotateSelection,
83
+ scaleSelection,
84
+ selectedCorners,
85
+ snap,
86
+ tileCorners,
87
+ transformUVs,
88
+ translateSelection,
89
+ uid,
90
+ v3,
91
+ validateBrushAgainstAtlas,
92
+ validatePngBytes,
93
+ validatePngDataUrl,
94
+ validateProject
95
+ };
package/lib/io.d.ts ADDED
@@ -0,0 +1,40 @@
1
+ import { Project, PngAlphaMode } from './core.js';
2
+
3
+ /**
4
+ * Encode a project into a versioned .pvp archive:
5
+ * project.json — the Project document (format/version/name/…)
6
+ * atlases/<id>.png — each atlas texture as a real PNG
7
+ * Atlas.dataUrl is not stored redundantly; decodeProject restores it from the
8
+ * extracted PNG bytes, preserving pixel-exact atlas data.
9
+ */
10
+ declare function encodeProject(project: Project): Promise<Uint8Array>;
11
+ /**
12
+ * Decode a .pvp archive into a validated Project. Throws
13
+ * ContainerError / PayloadError with readable messages for invalid archives.
14
+ * On success the returned Project is fully independent of the input bytes.
15
+ */
16
+ declare function decodeProject(bytes: Uint8Array): Promise<Project>;
17
+
18
+ /** Thrown for any readable IO failure (container, autosave, validation). */
19
+ declare class ProjectIOError extends Error {
20
+ constructor(message: string);
21
+ }
22
+ /** Container-level failures: bad ZIP, wrong format marker, disallowed paths. */
23
+ declare class ContainerError extends ProjectIOError {
24
+ constructor(message: string);
25
+ }
26
+ /** Thrown when a payload (project.json, embedded PNG) fails validation. */
27
+ declare class PayloadError extends ProjectIOError {
28
+ constructor(message: string);
29
+ }
30
+ /** Export failures: invalid geometry, no visible content, loader errors. */
31
+ declare class ExportError extends ProjectIOError {
32
+ constructor(message: string);
33
+ }
34
+
35
+ declare function exportOBJ(project: Project, inspectedAlpha?: Map<string, 'opaque' | 'cutout' | 'blend'>): Promise<Uint8Array>;
36
+ declare function exportGLB(project: Project, inspectedAlpha?: Map<string, 'opaque' | 'cutout' | 'blend'>): Promise<Uint8Array>;
37
+
38
+ declare function inspectAlpha(project: Project): Promise<Map<string, PngAlphaMode>>;
39
+
40
+ export { ContainerError, ExportError, PayloadError, ProjectIOError, decodeProject, encodeProject, exportGLB, exportOBJ, inspectAlpha };
package/lib/io.js ADDED
@@ -0,0 +1,23 @@
1
+ import {
2
+ ContainerError,
3
+ ExportError,
4
+ PayloadError,
5
+ ProjectIOError,
6
+ decodeProject,
7
+ encodeProject,
8
+ exportGLB,
9
+ exportOBJ,
10
+ inspectAlpha
11
+ } from "./chunks/chunk-DKWUGCIO.js";
12
+ import "./chunks/chunk-OYM3ZMMA.js";
13
+ export {
14
+ ContainerError,
15
+ ExportError,
16
+ PayloadError,
17
+ ProjectIOError,
18
+ decodeProject,
19
+ encodeProject,
20
+ exportGLB,
21
+ exportOBJ,
22
+ inspectAlpha
23
+ };
@@ -0,0 +1,122 @@
1
+ type Vec3 = [number, number, number];
2
+ type Vec2 = [number, number];
3
+ type Plane = 'XY' | 'XZ' | 'YZ';
4
+ type Mode = 'draw' | 'edit';
5
+ interface Atlas {
6
+ id: string;
7
+ name: string;
8
+ width: number;
9
+ height: number;
10
+ tileWidth: number;
11
+ tileHeight: number;
12
+ margin: number;
13
+ spacing: number;
14
+ dataUrl: string;
15
+ }
16
+ interface AtlasRegion {
17
+ x: number;
18
+ y: number;
19
+ width: number;
20
+ height: number;
21
+ }
22
+ interface Tile {
23
+ id: string;
24
+ objectId: string;
25
+ atlasId: string;
26
+ vertices: [Vec3, Vec3, Vec3, Vec3];
27
+ uvs: [Vec2, Vec2, Vec2, Vec2];
28
+ reversed: boolean;
29
+ }
30
+ interface SceneObject {
31
+ id: string;
32
+ name: string;
33
+ parentId: string | null;
34
+ visible: boolean;
35
+ locked: boolean;
36
+ }
37
+ interface Project {
38
+ format: 'pivo-plate';
39
+ version: 1;
40
+ name: string;
41
+ atlases: Atlas[];
42
+ objects: SceneObject[];
43
+ tiles: Tile[];
44
+ }
45
+ interface Selection {
46
+ tileIds: string[];
47
+ vertices: {
48
+ tileId: string;
49
+ corner: number;
50
+ }[];
51
+ }
52
+ interface Brush {
53
+ atlasId: string;
54
+ region: AtlasRegion;
55
+ rotation: 0 | 1 | 2 | 3;
56
+ flipX: boolean;
57
+ flipY: boolean;
58
+ }
59
+ interface EditorSession {
60
+ mode: Mode;
61
+ crosshair: Vec3;
62
+ plane: Plane;
63
+ planeLocked: boolean;
64
+ grid: number;
65
+ tileSize: number;
66
+ activeObjectId: string;
67
+ brush: Brush;
68
+ selection: Selection;
69
+ }
70
+ declare const DEFAULT_OBJECT_ID = "object-main";
71
+
72
+ declare const PNG_LIMITS: Readonly<{
73
+ maxBytes: number;
74
+ maxDimension: 16384;
75
+ maxPixels: 16777216;
76
+ maxInflatedBytes: number;
77
+ maxChunks: 4096;
78
+ maxAncillaryBytes: number;
79
+ maxMetadataInflatedBytes: number;
80
+ }>;
81
+ declare const PROJECT_PNG_LIMITS: Readonly<{
82
+ maxPngBytes: number;
83
+ maxPixels: 33554432;
84
+ maxInflatedBytes: number;
85
+ maxManifestBytes: number;
86
+ }>;
87
+ interface PngLimits {
88
+ maxBytes: number;
89
+ maxDimension: number;
90
+ maxPixels: number;
91
+ maxInflatedBytes: number;
92
+ maxChunks: number;
93
+ maxAncillaryBytes: number;
94
+ maxMetadataInflatedBytes: number;
95
+ }
96
+ type PngAlphaMode = 'opaque' | 'cutout' | 'blend';
97
+ interface PngInfo {
98
+ width: number;
99
+ height: number;
100
+ bitDepth: number;
101
+ colorType: number;
102
+ interlace: number;
103
+ byteLength: number;
104
+ inflatedBytes: number;
105
+ chunks: number;
106
+ ancillaryBytes: number;
107
+ alphaMode?: PngAlphaMode;
108
+ }
109
+ declare function validatePngBytes(bytes: Uint8Array, expected?: {
110
+ width: number;
111
+ height: number;
112
+ }, overrides?: Partial<PngLimits>): PngInfo;
113
+ /** Strict base64 decoded-size checks happen BEFORE allocating binary data. */
114
+ declare function pngDataUrlBytes(url: string): Uint8Array;
115
+ declare function pngBytesDataUrl(bytes: Uint8Array): string;
116
+ declare function validatePngDataUrl(url: string, expected?: {
117
+ width: number;
118
+ height: number;
119
+ }): PngInfo;
120
+
121
+ export { DEFAULT_OBJECT_ID as D, PNG_LIMITS as P, PROJECT_PNG_LIMITS as b, pngDataUrlBytes as j, validatePngDataUrl as k, pngBytesDataUrl as p, validatePngBytes as v };
122
+ export type { Atlas as A, Brush as B, EditorSession as E, Mode as M, SceneObject as S, Tile as T, Vec2 as V, AtlasRegion as a, Plane as c, PngAlphaMode as d, PngInfo as e, PngLimits as f, Project as g, Selection as h, Vec3 as i };
package/package.json CHANGED
@@ -1,6 +1,131 @@
1
1
  {
2
2
  "name": "@bookklik/pivo-plate",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.2.0",
4
+ "license": "MIT",
5
+ "author": "a-hakim",
6
+ "private": false,
7
+ "type": "module",
8
+ "description": "A local-first browser tile-to-3D modeling editor.",
9
+ "scripts": {
10
+ "dev": "vite --host 0.0.0.0",
11
+ "build": "tsc --noEmit && vite build",
12
+ "typecheck": "tsc --noEmit",
13
+ "test": "vitest run",
14
+ "test:coverage": "vitest run --coverage",
15
+ "test:browser": "node scripts/browser-readiness.mjs",
16
+ "test:layout": "node tests/layout-check.mjs",
17
+ "test:safety": "node tests/browser-safety.mjs",
18
+ "test:modeling": "node tests/browser-modeling.mjs",
19
+ "test:png": "node tests/browser-png.mjs",
20
+ "test:erase-hud": "node tests/browser-erase-hud.mjs",
21
+ "test:theme": "node tests/browser-theme.mjs",
22
+ "test:font": "node tests/browser-font.mjs",
23
+ "build:standalone": "node scripts/build-standalone.mjs",
24
+ "preview": "vite preview --host 0.0.0.0",
25
+ "docs:dev": "npm run docs:build && node scripts/preview-docs.mjs",
26
+ "docs:build": "vitepress build docs",
27
+ "docs:preview": "vitepress preview docs",
28
+ "docs:capture": "node scripts/capture-tutorials.mjs",
29
+ "check:suite": "node scripts/check-suite.mjs",
30
+ "check:dependencies": "node scripts/audit-dependencies.mjs",
31
+ "test:release": "node scripts/browser-readiness.mjs",
32
+ "test:browser:legacy": "node tests/browser-e2e.mjs",
33
+ "capture:predecessor": "node scripts/capture-predecessor.mjs",
34
+ "test:upgrade": "node scripts/browser-upgrade.mjs",
35
+ "test:standalone": "node scripts/browser-standalone.mjs",
36
+ "test:workers": "node scripts/browser-workers.mjs",
37
+ "test:menus": "node scripts/browser-menus.mjs",
38
+ "build:lib": "node scripts/build-library.mjs",
39
+ "check:package": "node scripts/check-package.mjs",
40
+ "check:consumer": "node scripts/check-consumer.mjs",
41
+ "prepack": "npm run build:lib && npm run check:package",
42
+ "prepublishOnly": "npm run check:dependencies",
43
+ "release:check": "npm run check:dependencies && npm run build && npm run docs:build && npm run build:lib && npm run check:package && npm run check:consumer"
44
+ },
45
+ "dependencies": {
46
+ "fflate": "0.8.3",
47
+ "pako": "^2.2.0"
48
+ },
49
+ "devDependencies": {
50
+ "@playwright/test": "1.64.0",
51
+ "@types/node": "^24.19.1",
52
+ "@types/pako": "^2.0.4",
53
+ "@types/three": "^0.180.0",
54
+ "@vitest/coverage-v8": "5.0.4",
55
+ "fake-indexeddb": "6.2.5",
56
+ "typescript": "^5.9.3",
57
+ "vite": "7.3.7",
58
+ "vite-plugin-pwa": "^2.0.0",
59
+ "vitepress": "^1.6.4",
60
+ "vitest": "5.0.4",
61
+ "@fontsource-variable/outfit": "^5.3.0",
62
+ "lucide": "^1.54.0",
63
+ "three": "^0.180.0",
64
+ "esbuild": "0.28.2",
65
+ "rollup": "4.65.1",
66
+ "rollup-plugin-dts": "6.5.1"
67
+ },
68
+ "engines": {
69
+ "node": ">=24"
70
+ },
71
+ "packageManager": "npm@11.19.0",
72
+ "main": "./lib/index.js",
73
+ "types": "./lib/index.d.ts",
74
+ "exports": {
75
+ ".": {
76
+ "types": "./lib/index.d.ts",
77
+ "import": "./lib/index.js",
78
+ "default": "./lib/index.js"
79
+ },
80
+ "./headless": {
81
+ "types": "./lib/index.d.ts",
82
+ "import": "./lib/index.js",
83
+ "default": "./lib/index.js"
84
+ },
85
+ "./core": {
86
+ "types": "./lib/core.d.ts",
87
+ "import": "./lib/core.js",
88
+ "default": "./lib/core.js"
89
+ },
90
+ "./io": {
91
+ "types": "./lib/io.d.ts",
92
+ "import": "./lib/io.js",
93
+ "default": "./lib/io.js"
94
+ },
95
+ "./package.json": "./package.json"
96
+ },
97
+ "files": [
98
+ "lib",
99
+ "LICENSE",
100
+ "README.md",
101
+ "docs/npm.md",
102
+ "THIRD_PARTY_NOTICES.md",
103
+ "docs/licenses"
104
+ ],
105
+ "sideEffects": false,
106
+ "repository": {
107
+ "type": "git",
108
+ "url": "git+https://github.com/bookklik-technologies/pivo-plate.git"
109
+ },
110
+ "homepage": "https://bookklik-technologies.github.io/pivo-plate/docs/",
111
+ "bugs": {
112
+ "url": "https://github.com/bookklik-technologies/pivo-plate/issues"
113
+ },
114
+ "publishConfig": {
115
+ "access": "public",
116
+ "registry": "https://registry.npmjs.org/"
117
+ },
118
+ "keywords": [
119
+ "pivo",
120
+ "headless",
121
+ "3d",
122
+ "editor"
123
+ ],
124
+ "overrides": {
125
+ "fast-uri": "3.1.9",
126
+ "serialize-javascript": "7.1.3",
127
+ "vitepress": {
128
+ "vite": "6.4.5"
129
+ }
130
+ }
131
+ }