paperlab 0.3.0 → 0.4.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/dist/stage.d.cts CHANGED
@@ -1,163 +1,7 @@
1
1
  import * as react from 'react';
2
- import { F as FieldPaperSlot, a as PaperConfigInput } from './slots-D0Nc_5dq.cjs';
2
+ import { F as FieldPaperSlot, a as PaperConfigInput } from './slots-BYoLxVZ4.cjs';
3
3
  import { z } from 'zod';
4
4
 
5
- /**
6
- * The room the walk is in.
7
- *
8
- * Stage mode was a void with a horizon: a graded dome, a flat plane, and a
9
- * bright rectangle at the end, none of it a knowable size. That is why the
10
- * walking figure was carrying the whole scale burden by itself — and why
11
- * simply removing the figure would have left an abstraction rather than a
12
- * hall. Architecture is the better answer: objects whose size the viewer
13
- * already knows, made of flat surfaces under good light, which is the one
14
- * thing a renderer never gets wrong.
15
- */
16
- /**
17
- * What holds the paper up.
18
- *
19
- * Every paper installation shows its hardware — monofilament from a ceiling
20
- * grid, steel wire, bulldog clips, a rod — and in the scattered-sheet pieces
21
- * the threads are half the composition. Stage mode's banners hung from
22
- * nothing at all, which is a bigger realism gap than any shader in the
23
- * backlog and closes for a few thin lines of geometry.
24
- */
25
- declare const stageSuspensionSchema: z.ZodObject<{
26
- /**
27
- * What carries the load.
28
- *
29
- * `thread` is monofilament to the ceiling — one straight line per sheet.
30
- * `rod` is a dowel across each sheet's top edge, hung from the ceiling at
31
- * both ends, which is a different image entirely: a rank on threads reads
32
- * as sheets floating in a row, and a rank on rods reads as sheets that
33
- * were HUNG, by someone, on something. `none` is for a stage where the
34
- * paper is meant to be impossible.
35
- */
36
- type: z.ZodDefault<z.ZodEnum<["none", "thread", "rod"]>>;
37
- color: z.ZodDefault<z.ZodString>;
38
- /**
39
- * What grips the sheet.
40
- *
41
- * A clip is wide and shallow — the bulldog clip of a gallery. A peg is
42
- * narrow and deep, and grips DOWN the face of the sheet rather than
43
- * across its edge: the domestic one, a line of paper on a washing line.
44
- * They are told apart by silhouette at any distance, which is the only
45
- * thing that survives being one instanced box at the top of an
46
- * eight-metre banner.
47
- *
48
- * This replaced a `clips: boolean`. Two of the four pieces of hardware the
49
- * plan named — pegs, and a rod — had no way to be asked for, and a boolean
50
- * cannot grow a third answer.
51
- */
52
- hardware: z.ZodDefault<z.ZodEnum<["none", "clip", "peg"]>>;
53
- }, "strip", z.ZodTypeAny, {
54
- type: "none" | "thread" | "rod";
55
- color: string;
56
- hardware: "none" | "clip" | "peg";
57
- }, {
58
- type?: "none" | "thread" | "rod" | undefined;
59
- color?: string | undefined;
60
- hardware?: "none" | "clip" | "peg" | undefined;
61
- }>;
62
- declare const stageRoomSchema: z.ZodObject<{
63
- enabled: z.ZodDefault<z.ZodBoolean>;
64
- /**
65
- * Ceiling height, as a multiple of the paper's own height.
66
- *
67
- * Relative rather than absolute because the banners ARE the architecture
68
- * here: a hall whose ceiling sits just above its hangings reads as built
69
- * for them, and one at a fixed world height reads as whatever the paper
70
- * happened to be scaled to that day.
71
- */
72
- height: z.ZodDefault<z.ZodNumber>;
73
- color: z.ZodDefault<z.ZodString>;
74
- /** Columns flanking the walk — see `stageColumnsSchema`. */
75
- columns: z.ZodDefault<z.ZodObject<{
76
- enabled: z.ZodDefault<z.ZodBoolean>;
77
- /** Centres this far apart along the walk. Roughly a bay. */
78
- spacing: z.ZodDefault<z.ZodNumber>;
79
- /** Shaft width. The number doing the work — a column is a known size. */
80
- width: z.ZodDefault<z.ZodNumber>;
81
- /**
82
- * How far off the walk's centreline each rank stands.
83
- *
84
- * Outside the banners, always. Columns are the room; the paper is the
85
- * subject, and a column standing between the viewer and a banner has
86
- * swapped the two over. Default clears a `colonnade`'s widest sensible
87
- * aisle with room to spare.
88
- */
89
- offset: z.ZodDefault<z.ZodNumber>;
90
- /**
91
- * Stone, and darker than paper on purpose.
92
- *
93
- * The brightest thing in any of these frames has to be the light, and the
94
- * second brightest has to be the paper. A column the same value as a
95
- * banner does not read as architecture behind the subject; it reads as
96
- * more banners, and the eye stops being able to tell what the room is made
97
- * of from what is hanging in it.
98
- */
99
- color: z.ZodDefault<z.ZodString>;
100
- }, "strip", z.ZodTypeAny, {
101
- width: number;
102
- offset: number;
103
- color: string;
104
- spacing: number;
105
- enabled: boolean;
106
- }, {
107
- width?: number | undefined;
108
- offset?: number | undefined;
109
- color?: string | undefined;
110
- spacing?: number | undefined;
111
- enabled?: boolean | undefined;
112
- }>>;
113
- /** A wall at the end of the walk with the source in it. */
114
- doorway: z.ZodDefault<z.ZodObject<{
115
- enabled: z.ZodDefault<z.ZodBoolean>;
116
- /** Opening size, as a multiple of the source's own. 1 frames it exactly. */
117
- opening: z.ZodDefault<z.ZodNumber>;
118
- color: z.ZodDefault<z.ZodString>;
119
- }, "strip", z.ZodTypeAny, {
120
- color: string;
121
- enabled: boolean;
122
- opening: number;
123
- }, {
124
- color?: string | undefined;
125
- enabled?: boolean | undefined;
126
- opening?: number | undefined;
127
- }>>;
128
- }, "strip", z.ZodTypeAny, {
129
- height: number;
130
- color: string;
131
- enabled: boolean;
132
- columns: {
133
- width: number;
134
- offset: number;
135
- color: string;
136
- spacing: number;
137
- enabled: boolean;
138
- };
139
- doorway: {
140
- color: string;
141
- enabled: boolean;
142
- opening: number;
143
- };
144
- }, {
145
- height?: number | undefined;
146
- color?: string | undefined;
147
- enabled?: boolean | undefined;
148
- columns?: {
149
- width?: number | undefined;
150
- offset?: number | undefined;
151
- color?: string | undefined;
152
- spacing?: number | undefined;
153
- enabled?: boolean | undefined;
154
- } | undefined;
155
- doorway?: {
156
- color?: string | undefined;
157
- enabled?: boolean | undefined;
158
- opening?: number | undefined;
159
- } | undefined;
160
- }>;
161
5
  /**
162
6
  * The print: what happens to the frame after the scene is drawn.
163
7
  *
@@ -962,16 +806,6 @@ declare function PaperStageScene({ stage: stageInput, quality, onQualityChange,
962
806
  /** `<PaperStage />` owns its Canvas; `<PaperStageScene />` drops into an existing one. */
963
807
  declare function PaperStage({ children, className, style, ...sceneProps }: PaperStageProps): react.JSX.Element;
964
808
 
965
- /**
966
- * The source's default burn, in linear light.
967
- *
968
- * Chosen by matching: at 3.4 the tone-mapped source lands on the same read
969
- * as the un-mapped plane it replaces, so a stage that never mounts a
970
- * composer looks the way it always did, and one that does gets a source
971
- * that blooms instead of a rectangle that clips.
972
- */
973
- declare const SOURCE_INTENSITY = 3.4;
974
-
975
809
  /**
976
810
  * Named stages. A mode with no presets asks its visitor to invent a space
977
811
  * out of eleven sliders before it will show them anything — and stage mode
@@ -1134,18 +968,8 @@ interface StageExportInput {
1134
968
  /** Exported component name. */
1135
969
  componentName?: string;
1136
970
  }
1137
- /** Which named walk these points are, if any — the export reads better for it. */
1138
- declare function walkNameFor(path: StageConfig['path']): WalkName | undefined;
1139
971
  /** The stage config with defaults removed — what actually needs writing down. */
1140
972
  declare function diffStage(stage: StageConfigInput): Record<string, unknown>;
1141
- /**
1142
- * JSON.stringify, except an array of plain numbers stays on one line. A walk
1143
- * is a list of coordinate pairs, and the default pretty-printer spreads each
1144
- * `[6, 17]` over four lines — twenty lines of punctuation for one gentle
1145
- * curve. Exported code is a product surface; it should read like something a
1146
- * person wrote.
1147
- */
1148
- declare function stringifyStage(value: unknown, indent?: number): string;
1149
973
  /** The one-line visual an agent verifies after `npm run dev`. */
1150
974
  declare function describeStage(input: StageExportInput): string;
1151
975
  /** Component source shared by the JSX snippet and the agent payload. */
@@ -1153,4 +977,4 @@ declare function buildStageComponentSource(input: StageExportInput): string;
1153
977
  /** The self-contained stage integration brief — one paste into a coding agent. */
1154
978
  declare function buildStageAgentPayload(input: StageExportInput): string;
1155
979
 
1156
- export { type Ground, PaperStage, type PaperStageProps, PaperStageScene, type PaperStageSceneProps, type QualityName, type QualityTier, SOURCE_INTENSITY, type ShotName, type ShotOptions, type StageConfig, type StageConfigInput, type StageExportInput, type StageGradeConfig, type StageMotion, type StageMotionInput, type StagePreset, type StageScale, type StageShot, type WalkName, type WalkPath, type WalkPathOptions, buildStageAgentPayload, buildStageComponentSource, createWalkPath, describeStage, diffStage, getStagePreset, getWalk, listStagePresets, qualityNames, shotNames, stageGradeSchema, stageMotionSchema, stagePresets, stageRoomSchema, stageSchema, stageSuspensionSchema, stringifyStage, walkNameFor, walkNames, walks };
980
+ export { type Ground, PaperStage, type PaperStageProps, PaperStageScene, type PaperStageSceneProps, type QualityName, type QualityTier, type ShotName, type ShotOptions, type StageConfig, type StageConfigInput, type StageExportInput, type StageGradeConfig, type StageMotion, type StageMotionInput, type StagePreset, type StageScale, type StageShot, type WalkName, type WalkPath, type WalkPathOptions, buildStageAgentPayload, buildStageComponentSource, createWalkPath, describeStage, diffStage, getStagePreset, getWalk, listStagePresets, qualityNames, shotNames, stagePresets, stageSchema, walkNames, walks };
package/dist/stage.d.ts CHANGED
@@ -1,163 +1,7 @@
1
1
  import * as react from 'react';
2
- import { F as FieldPaperSlot, a as PaperConfigInput } from './slots-D0Nc_5dq.js';
2
+ import { F as FieldPaperSlot, a as PaperConfigInput } from './slots-BYoLxVZ4.js';
3
3
  import { z } from 'zod';
4
4
 
5
- /**
6
- * The room the walk is in.
7
- *
8
- * Stage mode was a void with a horizon: a graded dome, a flat plane, and a
9
- * bright rectangle at the end, none of it a knowable size. That is why the
10
- * walking figure was carrying the whole scale burden by itself — and why
11
- * simply removing the figure would have left an abstraction rather than a
12
- * hall. Architecture is the better answer: objects whose size the viewer
13
- * already knows, made of flat surfaces under good light, which is the one
14
- * thing a renderer never gets wrong.
15
- */
16
- /**
17
- * What holds the paper up.
18
- *
19
- * Every paper installation shows its hardware — monofilament from a ceiling
20
- * grid, steel wire, bulldog clips, a rod — and in the scattered-sheet pieces
21
- * the threads are half the composition. Stage mode's banners hung from
22
- * nothing at all, which is a bigger realism gap than any shader in the
23
- * backlog and closes for a few thin lines of geometry.
24
- */
25
- declare const stageSuspensionSchema: z.ZodObject<{
26
- /**
27
- * What carries the load.
28
- *
29
- * `thread` is monofilament to the ceiling — one straight line per sheet.
30
- * `rod` is a dowel across each sheet's top edge, hung from the ceiling at
31
- * both ends, which is a different image entirely: a rank on threads reads
32
- * as sheets floating in a row, and a rank on rods reads as sheets that
33
- * were HUNG, by someone, on something. `none` is for a stage where the
34
- * paper is meant to be impossible.
35
- */
36
- type: z.ZodDefault<z.ZodEnum<["none", "thread", "rod"]>>;
37
- color: z.ZodDefault<z.ZodString>;
38
- /**
39
- * What grips the sheet.
40
- *
41
- * A clip is wide and shallow — the bulldog clip of a gallery. A peg is
42
- * narrow and deep, and grips DOWN the face of the sheet rather than
43
- * across its edge: the domestic one, a line of paper on a washing line.
44
- * They are told apart by silhouette at any distance, which is the only
45
- * thing that survives being one instanced box at the top of an
46
- * eight-metre banner.
47
- *
48
- * This replaced a `clips: boolean`. Two of the four pieces of hardware the
49
- * plan named — pegs, and a rod — had no way to be asked for, and a boolean
50
- * cannot grow a third answer.
51
- */
52
- hardware: z.ZodDefault<z.ZodEnum<["none", "clip", "peg"]>>;
53
- }, "strip", z.ZodTypeAny, {
54
- type: "none" | "thread" | "rod";
55
- color: string;
56
- hardware: "none" | "clip" | "peg";
57
- }, {
58
- type?: "none" | "thread" | "rod" | undefined;
59
- color?: string | undefined;
60
- hardware?: "none" | "clip" | "peg" | undefined;
61
- }>;
62
- declare const stageRoomSchema: z.ZodObject<{
63
- enabled: z.ZodDefault<z.ZodBoolean>;
64
- /**
65
- * Ceiling height, as a multiple of the paper's own height.
66
- *
67
- * Relative rather than absolute because the banners ARE the architecture
68
- * here: a hall whose ceiling sits just above its hangings reads as built
69
- * for them, and one at a fixed world height reads as whatever the paper
70
- * happened to be scaled to that day.
71
- */
72
- height: z.ZodDefault<z.ZodNumber>;
73
- color: z.ZodDefault<z.ZodString>;
74
- /** Columns flanking the walk — see `stageColumnsSchema`. */
75
- columns: z.ZodDefault<z.ZodObject<{
76
- enabled: z.ZodDefault<z.ZodBoolean>;
77
- /** Centres this far apart along the walk. Roughly a bay. */
78
- spacing: z.ZodDefault<z.ZodNumber>;
79
- /** Shaft width. The number doing the work — a column is a known size. */
80
- width: z.ZodDefault<z.ZodNumber>;
81
- /**
82
- * How far off the walk's centreline each rank stands.
83
- *
84
- * Outside the banners, always. Columns are the room; the paper is the
85
- * subject, and a column standing between the viewer and a banner has
86
- * swapped the two over. Default clears a `colonnade`'s widest sensible
87
- * aisle with room to spare.
88
- */
89
- offset: z.ZodDefault<z.ZodNumber>;
90
- /**
91
- * Stone, and darker than paper on purpose.
92
- *
93
- * The brightest thing in any of these frames has to be the light, and the
94
- * second brightest has to be the paper. A column the same value as a
95
- * banner does not read as architecture behind the subject; it reads as
96
- * more banners, and the eye stops being able to tell what the room is made
97
- * of from what is hanging in it.
98
- */
99
- color: z.ZodDefault<z.ZodString>;
100
- }, "strip", z.ZodTypeAny, {
101
- width: number;
102
- offset: number;
103
- color: string;
104
- spacing: number;
105
- enabled: boolean;
106
- }, {
107
- width?: number | undefined;
108
- offset?: number | undefined;
109
- color?: string | undefined;
110
- spacing?: number | undefined;
111
- enabled?: boolean | undefined;
112
- }>>;
113
- /** A wall at the end of the walk with the source in it. */
114
- doorway: z.ZodDefault<z.ZodObject<{
115
- enabled: z.ZodDefault<z.ZodBoolean>;
116
- /** Opening size, as a multiple of the source's own. 1 frames it exactly. */
117
- opening: z.ZodDefault<z.ZodNumber>;
118
- color: z.ZodDefault<z.ZodString>;
119
- }, "strip", z.ZodTypeAny, {
120
- color: string;
121
- enabled: boolean;
122
- opening: number;
123
- }, {
124
- color?: string | undefined;
125
- enabled?: boolean | undefined;
126
- opening?: number | undefined;
127
- }>>;
128
- }, "strip", z.ZodTypeAny, {
129
- height: number;
130
- color: string;
131
- enabled: boolean;
132
- columns: {
133
- width: number;
134
- offset: number;
135
- color: string;
136
- spacing: number;
137
- enabled: boolean;
138
- };
139
- doorway: {
140
- color: string;
141
- enabled: boolean;
142
- opening: number;
143
- };
144
- }, {
145
- height?: number | undefined;
146
- color?: string | undefined;
147
- enabled?: boolean | undefined;
148
- columns?: {
149
- width?: number | undefined;
150
- offset?: number | undefined;
151
- color?: string | undefined;
152
- spacing?: number | undefined;
153
- enabled?: boolean | undefined;
154
- } | undefined;
155
- doorway?: {
156
- color?: string | undefined;
157
- enabled?: boolean | undefined;
158
- opening?: number | undefined;
159
- } | undefined;
160
- }>;
161
5
  /**
162
6
  * The print: what happens to the frame after the scene is drawn.
163
7
  *
@@ -962,16 +806,6 @@ declare function PaperStageScene({ stage: stageInput, quality, onQualityChange,
962
806
  /** `<PaperStage />` owns its Canvas; `<PaperStageScene />` drops into an existing one. */
963
807
  declare function PaperStage({ children, className, style, ...sceneProps }: PaperStageProps): react.JSX.Element;
964
808
 
965
- /**
966
- * The source's default burn, in linear light.
967
- *
968
- * Chosen by matching: at 3.4 the tone-mapped source lands on the same read
969
- * as the un-mapped plane it replaces, so a stage that never mounts a
970
- * composer looks the way it always did, and one that does gets a source
971
- * that blooms instead of a rectangle that clips.
972
- */
973
- declare const SOURCE_INTENSITY = 3.4;
974
-
975
809
  /**
976
810
  * Named stages. A mode with no presets asks its visitor to invent a space
977
811
  * out of eleven sliders before it will show them anything — and stage mode
@@ -1134,18 +968,8 @@ interface StageExportInput {
1134
968
  /** Exported component name. */
1135
969
  componentName?: string;
1136
970
  }
1137
- /** Which named walk these points are, if any — the export reads better for it. */
1138
- declare function walkNameFor(path: StageConfig['path']): WalkName | undefined;
1139
971
  /** The stage config with defaults removed — what actually needs writing down. */
1140
972
  declare function diffStage(stage: StageConfigInput): Record<string, unknown>;
1141
- /**
1142
- * JSON.stringify, except an array of plain numbers stays on one line. A walk
1143
- * is a list of coordinate pairs, and the default pretty-printer spreads each
1144
- * `[6, 17]` over four lines — twenty lines of punctuation for one gentle
1145
- * curve. Exported code is a product surface; it should read like something a
1146
- * person wrote.
1147
- */
1148
- declare function stringifyStage(value: unknown, indent?: number): string;
1149
973
  /** The one-line visual an agent verifies after `npm run dev`. */
1150
974
  declare function describeStage(input: StageExportInput): string;
1151
975
  /** Component source shared by the JSX snippet and the agent payload. */
@@ -1153,4 +977,4 @@ declare function buildStageComponentSource(input: StageExportInput): string;
1153
977
  /** The self-contained stage integration brief — one paste into a coding agent. */
1154
978
  declare function buildStageAgentPayload(input: StageExportInput): string;
1155
979
 
1156
- export { type Ground, PaperStage, type PaperStageProps, PaperStageScene, type PaperStageSceneProps, type QualityName, type QualityTier, SOURCE_INTENSITY, type ShotName, type ShotOptions, type StageConfig, type StageConfigInput, type StageExportInput, type StageGradeConfig, type StageMotion, type StageMotionInput, type StagePreset, type StageScale, type StageShot, type WalkName, type WalkPath, type WalkPathOptions, buildStageAgentPayload, buildStageComponentSource, createWalkPath, describeStage, diffStage, getStagePreset, getWalk, listStagePresets, qualityNames, shotNames, stageGradeSchema, stageMotionSchema, stagePresets, stageRoomSchema, stageSchema, stageSuspensionSchema, stringifyStage, walkNameFor, walkNames, walks };
980
+ export { type Ground, PaperStage, type PaperStageProps, PaperStageScene, type PaperStageSceneProps, type QualityName, type QualityTier, type ShotName, type ShotOptions, type StageConfig, type StageConfigInput, type StageExportInput, type StageGradeConfig, type StageMotion, type StageMotionInput, type StagePreset, type StageScale, type StageShot, type WalkName, type WalkPath, type WalkPathOptions, buildStageAgentPayload, buildStageComponentSource, createWalkPath, describeStage, diffStage, getStagePreset, getWalk, listStagePresets, qualityNames, shotNames, stagePresets, stageSchema, walkNames, walks };
package/dist/stage.js CHANGED
@@ -15,7 +15,7 @@ import {
15
15
  resolveLighting,
16
16
  usePrefersReducedMotion,
17
17
  walkPathSchema
18
- } from "./chunk-3IMUEESH.js";
18
+ } from "./chunk-4ZU5DZEF.js";
19
19
 
20
20
  // src/stage/PaperStage.tsx
21
21
  import * as THREE6 from "three";
@@ -2189,7 +2189,6 @@ required; the component needs no props.`;
2189
2189
  export {
2190
2190
  PaperStage,
2191
2191
  PaperStageScene,
2192
- SOURCE_INTENSITY,
2193
2192
  buildStageAgentPayload,
2194
2193
  buildStageComponentSource,
2195
2194
  createWalkPath,
@@ -2200,14 +2199,8 @@ export {
2200
2199
  listStagePresets,
2201
2200
  qualityNames,
2202
2201
  shotNames,
2203
- stageGradeSchema,
2204
- stageMotionSchema,
2205
2202
  stagePresets,
2206
- stageRoomSchema,
2207
2203
  stageSchema,
2208
- stageSuspensionSchema,
2209
- stringifyStage,
2210
- walkNameFor,
2211
2204
  walkNames,
2212
2205
  walks
2213
2206
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "paperlab",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "description": "Physical, realistic paper as a React component. Sculptable sheets, preset-driven, geometry-true curl.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",