paperlab 0.7.1 → 0.8.1

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.
Files changed (37) hide show
  1. package/README.md +57 -28
  2. package/dist/{FxPostPass-M66QMVVC.js → FxPostPass-ACFSHY3S.js} +24 -6
  3. package/dist/FxPostPass-ACFSHY3S.js.map +1 -0
  4. package/dist/chunk-BIFUJCUA.js +34 -0
  5. package/dist/chunk-BIFUJCUA.js.map +1 -0
  6. package/dist/{chunk-NTDVOOBA.js → chunk-LUKNPQ3S.js} +385 -165
  7. package/dist/chunk-LUKNPQ3S.js.map +1 -0
  8. package/dist/{chunk-GB6BMHC3.js → chunk-S74YZAXE.js} +7 -19
  9. package/dist/chunk-S74YZAXE.js.map +1 -0
  10. package/dist/{damageContract-DPF1YFLZ.d.cts → damageContract-9RC4egJg.d.cts} +31 -3
  11. package/dist/{damageContract-DPF1YFLZ.d.ts → damageContract-9RC4egJg.d.ts} +31 -3
  12. package/dist/fx.cjs +336 -107
  13. package/dist/fx.cjs.map +1 -1
  14. package/dist/fx.d.cts +113 -89
  15. package/dist/fx.d.ts +113 -89
  16. package/dist/fx.js +293 -63
  17. package/dist/fx.js.map +1 -1
  18. package/dist/index.cjs +422 -193
  19. package/dist/index.cjs.map +1 -1
  20. package/dist/index.d.cts +13 -5
  21. package/dist/index.d.ts +13 -5
  22. package/dist/index.js +21 -8
  23. package/dist/index.js.map +1 -1
  24. package/dist/{slots-C5PqY0Q5.d.cts → slots-DbJQfwVd.d.cts} +13 -1
  25. package/dist/{slots-C5PqY0Q5.d.ts → slots-DbJQfwVd.d.ts} +13 -1
  26. package/dist/stage.cjs +417 -201
  27. package/dist/stage.cjs.map +1 -1
  28. package/dist/stage.d.cts +1 -1
  29. package/dist/stage.d.ts +1 -1
  30. package/dist/stage.js +12 -12
  31. package/dist/stage.js.map +1 -1
  32. package/package.json +5 -5
  33. package/dist/FxPostPass-M66QMVVC.js.map +0 -1
  34. package/dist/chunk-7TLIWPGM.js +0 -36
  35. package/dist/chunk-7TLIWPGM.js.map +0 -1
  36. package/dist/chunk-GB6BMHC3.js.map +0 -1
  37. package/dist/chunk-NTDVOOBA.js.map +0 -1
package/dist/stage.d.cts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as react from 'react';
2
- import { F as FieldPaperSlot, a as PaperConfigInput } from './slots-C5PqY0Q5.cjs';
2
+ import { F as FieldPaperSlot, a as PaperConfigInput } from './slots-DbJQfwVd.cjs';
3
3
  import { z } from 'zod';
4
4
 
5
5
  /**
package/dist/stage.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as react from 'react';
2
- import { F as FieldPaperSlot, a as PaperConfigInput } from './slots-C5PqY0Q5.js';
2
+ import { F as FieldPaperSlot, a as PaperConfigInput } from './slots-DbJQfwVd.js';
3
3
  import { z } from 'zod';
4
4
 
5
5
  /**
package/dist/stage.js CHANGED
@@ -16,8 +16,8 @@ import {
16
16
  resolveLighting,
17
17
  usePrefersReducedMotion,
18
18
  walkPathSchema
19
- } from "./chunk-NTDVOOBA.js";
20
- import "./chunk-7TLIWPGM.js";
19
+ } from "./chunk-LUKNPQ3S.js";
20
+ import "./chunk-BIFUJCUA.js";
21
21
 
22
22
  // src/stage/PaperStage.tsx
23
23
  import * as THREE6 from "three";
@@ -304,7 +304,7 @@ var ModelBoundary = class extends Component {
304
304
  return { failed: true };
305
305
  }
306
306
  componentDidCatch(error) {
307
- console.warn("[paperlab] figure.model failed to load \u2014 using the capsule figure.", error);
307
+ console.warn("[paperlab] figure.model failed to load. Using the capsule figure.", error);
308
308
  }
309
309
  render() {
310
310
  return this.state.failed ? this.props.fallback : this.props.children;
@@ -804,7 +804,7 @@ function warnOnce(cause) {
804
804
  if (warned) return;
805
805
  warned = true;
806
806
  console.warn(
807
- "[paperlab/stage] Rendering without the print pass \u2014 tone curve, bloom, vignette and grain are off.\nThey need two optional peers:\n npm i @react-three/postprocessing postprocessing\nSet `grade` to all zeros to turn the pass off deliberately and silence this.",
807
+ "[paperlab/stage] Rendering without the print pass, so tone curve, bloom, vignette and grain are off.\nThey need two optional peers:\n npm i @react-three/postprocessing postprocessing\nSet `grade` to all zeros to turn the pass off deliberately and silence this.",
808
808
  ...cause === void 0 ? [] : [cause]
809
809
  );
810
810
  }
@@ -1932,7 +1932,7 @@ var stagePresets = {
1932
1932
  archive: {
1933
1933
  id: "archive",
1934
1934
  label: "Archive",
1935
- description: "Narrow strips packed tight \u2014 a corridor of records you edge through.",
1935
+ description: "Narrow strips packed tight, a corridor of records you edge through.",
1936
1936
  stage: {
1937
1937
  path: walks.bend,
1938
1938
  // Far enough back that the figure reads as small; a `low` camera
@@ -2097,7 +2097,7 @@ const text = ${JSON.stringify(input.text)}` : "";
2097
2097
  const scrolls = stageSchema.parse(input.stage).showFigure ? "walk the figure" : "move the camera";
2098
2098
  const images = input.images?.length ? exportableImages(input.images) : null;
2099
2099
  const imagesConst = images ? `
2100
- ${images.substituted ? "\n// Your uploaded pictures cannot travel in a snippet \u2014 these are\n// placeholders in the same order. Point them at your own files." : ""}
2100
+ ${images.substituted ? "\n// Your uploaded pictures cannot travel in a snippet, so these are\n// placeholders in the same order. Point them at your own files." : ""}
2101
2101
  const images = ${JSON.stringify(images.list, null, 2)}` : "";
2102
2102
  if (!input.scroll) {
2103
2103
  return `import { PaperStage, type StageConfigInput } from 'paperlab/stage'${input.paper ? "\nimport type { PaperConfigInput } from 'paperlab'" : ""}
@@ -2154,24 +2154,24 @@ ${propLines(input, " ")}
2154
2154
  }
2155
2155
  function buildStageAgentPayload(input) {
2156
2156
  const name = input.componentName ?? "PaperNave";
2157
- const sizing = input.scroll ? `4. Sizing: the component brings its own height \u2014 it reserves ${SCROLL_HEIGHTS} viewport
2157
+ const sizing = input.scroll ? `4. Sizing: the component brings its own height. It reserves ${SCROLL_HEIGHTS} viewport
2158
2158
  heights of scroll and pins the canvas inside that. Drop it into the page
2159
2159
  flow as a section; do NOT wrap it in a fixed-height container.` : `4. Sizing: the component fills its parent container. Place it where I ask;
2160
2160
  give the parent an explicit height.`;
2161
2161
  const subject = stageSchema.parse(input.stage).showFigure ? "paper as architecture, with a figure walking through it" : "paper as architecture, banners hung along a walk you move through";
2162
- return `Integrate a Paperlab stage \u2014 ${subject} \u2014 into this project. (paperlab agent-payload v${AGENT_PAYLOAD_VERSION})
2162
+ return `Integrate a Paperlab stage (${subject}) into this project. (paperlab agent-payload v${AGENT_PAYLOAD_VERSION})
2163
2163
 
2164
2164
  1. Install the dependencies:
2165
2165
 
2166
2166
  npm i paperlab three @react-three/fiber gsap @react-three/postprocessing postprocessing
2167
2167
 
2168
- The last two are only needed by stage mode \u2014 <Paper> and <PaperField> do
2169
- not use them \u2014 and they are optional even here: <PaperStage> loads the
2168
+ The last two are only needed by stage mode (<Paper> and <PaperField> do
2169
+ not use them), and they are optional even here: <PaperStage> loads the
2170
2170
  print pass on demand, so a stage without them renders, just without the
2171
2171
  tone curve, bloom, vignette and grain. Install them to get the grade.
2172
2172
 
2173
2173
  2. Create the component below as \`components/${name}.tsx\` (or the project's
2174
- component convention). It is self-contained \u2014 it owns its own <Canvas>,
2174
+ component convention). It is self-contained: it owns its own <Canvas>,
2175
2175
  its own camera and its own lighting:
2176
2176
 
2177
2177
  \`\`\`tsx
@@ -2184,7 +2184,7 @@ ${buildStageComponentSource(input)}
2184
2184
  ${sizing}
2185
2185
 
2186
2186
  5. Verify: run the dev server. You should see ${describeStage(input)}.
2187
- If the canvas is blank, the container almost certainly has no height \u2014 give
2187
+ If the canvas is blank, the container almost certainly has no height. Give
2188
2188
  it one (this is the classic React Three Fiber integration bug, not a
2189
2189
  paperlab bug).
2190
2190