@valbuild/next 0.106.1 → 0.108.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.
@@ -327,6 +327,130 @@ function ValCanvasBridge(_ref) {
327
327
  };
328
328
  }, [post]);
329
329
 
330
+ /**
331
+ * Two-finger gestures, handed to the studio.
332
+ *
333
+ * The window around the page is the studio's, and the page is a frame: a
334
+ * finger that lands here is this document's and the studio never hears about
335
+ * it. So a pinch on the page could not zoom the window, which on a phone is
336
+ * the only zoom there is — the toolbar's + and - are a poor substitute for the
337
+ * gesture everyone already makes.
338
+ *
339
+ * Two fingers and only two. One finger is the page's: it scrolls it, taps its
340
+ * links, drags whatever the page put there. Two are the window's, for zooming
341
+ * and for moving the page around inside it. Nothing has to be moded, and the
342
+ * two cannot be confused for one another.
343
+ *
344
+ * `passive: false` because both handlers cancel: the default for two fingers
345
+ * is the browser's own page zoom, which inside a frame the studio is already
346
+ * scaling produces two zooms fighting over one gesture.
347
+ */
348
+ React.useEffect(function () {
349
+ var midpoint = function midpoint(touches) {
350
+ return {
351
+ x: (touches[0].clientX + touches[1].clientX) / 2,
352
+ y: (touches[0].clientY + touches[1].clientY) / 2
353
+ };
354
+ };
355
+ var span = function span(touches) {
356
+ return Math.hypot(touches[0].clientX - touches[1].clientX, touches[0].clientY - touches[1].clientY);
357
+ };
358
+ /**
359
+ * Whether a gesture is in progress.
360
+ *
361
+ * `touchend` fires per finger, so lifting one of two leaves a `touchend`
362
+ * carrying a single touch — which is the end of the gesture — and the
363
+ * second leaves one carrying none. Without this the second would post a
364
+ * second `end` for a gesture that was already over.
365
+ */
366
+ var active = false;
367
+ var onStart = function onStart(event) {
368
+ if (event.touches.length !== 2) return;
369
+ event.preventDefault();
370
+ active = true;
371
+ post({
372
+ val: VAL_CANVAS_MESSAGE,
373
+ type: "pinch",
374
+ phase: "start",
375
+ span: span(event.touches),
376
+ center: midpoint(event.touches)
377
+ });
378
+ };
379
+ var onMove = function onMove(event) {
380
+ if (event.touches.length !== 2 || !active) return;
381
+ event.preventDefault();
382
+ post({
383
+ val: VAL_CANVAS_MESSAGE,
384
+ type: "pinch",
385
+ phase: "move",
386
+ span: span(event.touches),
387
+ center: midpoint(event.touches)
388
+ });
389
+ };
390
+ var onEnd = function onEnd(event) {
391
+ if (!active || event.touches.length >= 2) return;
392
+ active = false;
393
+ post({
394
+ val: VAL_CANVAS_MESSAGE,
395
+ type: "pinch",
396
+ phase: "end",
397
+ span: 0,
398
+ center: {
399
+ x: 0,
400
+ y: 0
401
+ }
402
+ });
403
+ };
404
+ document.addEventListener("touchstart", onStart, {
405
+ passive: false
406
+ });
407
+ document.addEventListener("touchmove", onMove, {
408
+ passive: false
409
+ });
410
+ document.addEventListener("touchend", onEnd);
411
+ document.addEventListener("touchcancel", onEnd);
412
+ return function () {
413
+ document.removeEventListener("touchstart", onStart);
414
+ document.removeEventListener("touchmove", onMove);
415
+ document.removeEventListener("touchend", onEnd);
416
+ document.removeEventListener("touchcancel", onEnd);
417
+ };
418
+ }, [post]);
419
+
420
+ /**
421
+ * And ctrl/cmd + wheel, which is what a trackpad pinch reports as.
422
+ *
423
+ * The same problem as touches and the same answer: the wheel event lands on
424
+ * this document, so without relaying it a trackpad pinch over the page does
425
+ * nothing while the identical gesture over the canvas background zooms.
426
+ *
427
+ * A PLAIN wheel is deliberately left alone — that is the page scrolling
428
+ * itself, which is exactly what it should do.
429
+ */
430
+ React.useEffect(function () {
431
+ var onWheel = function onWheel(event) {
432
+ if (!event.ctrlKey && !event.metaKey) return;
433
+ event.preventDefault();
434
+ post({
435
+ val: VAL_CANVAS_MESSAGE,
436
+ type: "zoom",
437
+ // The same response curve the studio uses for a wheel on its own
438
+ // background, so the gesture feels the same on both sides of the frame.
439
+ factor: 1 - event.deltaY / 300,
440
+ center: {
441
+ x: event.clientX,
442
+ y: event.clientY
443
+ }
444
+ });
445
+ };
446
+ document.addEventListener("wheel", onWheel, {
447
+ passive: false
448
+ });
449
+ return function () {
450
+ return document.removeEventListener("wheel", onWheel);
451
+ };
452
+ }, [post]);
453
+
330
454
  /**
331
455
  * The outlines, as a stylesheet rather than as injected elements.
332
456
  *
@@ -0,0 +1,7 @@
1
+ 'use strict';
2
+
3
+ if (process.env.NODE_ENV === "production") {
4
+ module.exports = require("./ValCanvasBridge-32299c6e.cjs.prod.js");
5
+ } else {
6
+ module.exports = require("./ValCanvasBridge-32299c6e.cjs.dev.js");
7
+ }
@@ -335,6 +335,130 @@ function ValCanvasBridge(_ref) {
335
335
  };
336
336
  }, [post]);
337
337
 
338
+ /**
339
+ * Two-finger gestures, handed to the studio.
340
+ *
341
+ * The window around the page is the studio's, and the page is a frame: a
342
+ * finger that lands here is this document's and the studio never hears about
343
+ * it. So a pinch on the page could not zoom the window, which on a phone is
344
+ * the only zoom there is — the toolbar's + and - are a poor substitute for the
345
+ * gesture everyone already makes.
346
+ *
347
+ * Two fingers and only two. One finger is the page's: it scrolls it, taps its
348
+ * links, drags whatever the page put there. Two are the window's, for zooming
349
+ * and for moving the page around inside it. Nothing has to be moded, and the
350
+ * two cannot be confused for one another.
351
+ *
352
+ * `passive: false` because both handlers cancel: the default for two fingers
353
+ * is the browser's own page zoom, which inside a frame the studio is already
354
+ * scaling produces two zooms fighting over one gesture.
355
+ */
356
+ React__default["default"].useEffect(function () {
357
+ var midpoint = function midpoint(touches) {
358
+ return {
359
+ x: (touches[0].clientX + touches[1].clientX) / 2,
360
+ y: (touches[0].clientY + touches[1].clientY) / 2
361
+ };
362
+ };
363
+ var span = function span(touches) {
364
+ return Math.hypot(touches[0].clientX - touches[1].clientX, touches[0].clientY - touches[1].clientY);
365
+ };
366
+ /**
367
+ * Whether a gesture is in progress.
368
+ *
369
+ * `touchend` fires per finger, so lifting one of two leaves a `touchend`
370
+ * carrying a single touch — which is the end of the gesture — and the
371
+ * second leaves one carrying none. Without this the second would post a
372
+ * second `end` for a gesture that was already over.
373
+ */
374
+ var active = false;
375
+ var onStart = function onStart(event) {
376
+ if (event.touches.length !== 2) return;
377
+ event.preventDefault();
378
+ active = true;
379
+ post({
380
+ val: internal.VAL_CANVAS_MESSAGE,
381
+ type: "pinch",
382
+ phase: "start",
383
+ span: span(event.touches),
384
+ center: midpoint(event.touches)
385
+ });
386
+ };
387
+ var onMove = function onMove(event) {
388
+ if (event.touches.length !== 2 || !active) return;
389
+ event.preventDefault();
390
+ post({
391
+ val: internal.VAL_CANVAS_MESSAGE,
392
+ type: "pinch",
393
+ phase: "move",
394
+ span: span(event.touches),
395
+ center: midpoint(event.touches)
396
+ });
397
+ };
398
+ var onEnd = function onEnd(event) {
399
+ if (!active || event.touches.length >= 2) return;
400
+ active = false;
401
+ post({
402
+ val: internal.VAL_CANVAS_MESSAGE,
403
+ type: "pinch",
404
+ phase: "end",
405
+ span: 0,
406
+ center: {
407
+ x: 0,
408
+ y: 0
409
+ }
410
+ });
411
+ };
412
+ document.addEventListener("touchstart", onStart, {
413
+ passive: false
414
+ });
415
+ document.addEventListener("touchmove", onMove, {
416
+ passive: false
417
+ });
418
+ document.addEventListener("touchend", onEnd);
419
+ document.addEventListener("touchcancel", onEnd);
420
+ return function () {
421
+ document.removeEventListener("touchstart", onStart);
422
+ document.removeEventListener("touchmove", onMove);
423
+ document.removeEventListener("touchend", onEnd);
424
+ document.removeEventListener("touchcancel", onEnd);
425
+ };
426
+ }, [post]);
427
+
428
+ /**
429
+ * And ctrl/cmd + wheel, which is what a trackpad pinch reports as.
430
+ *
431
+ * The same problem as touches and the same answer: the wheel event lands on
432
+ * this document, so without relaying it a trackpad pinch over the page does
433
+ * nothing while the identical gesture over the canvas background zooms.
434
+ *
435
+ * A PLAIN wheel is deliberately left alone — that is the page scrolling
436
+ * itself, which is exactly what it should do.
437
+ */
438
+ React__default["default"].useEffect(function () {
439
+ var onWheel = function onWheel(event) {
440
+ if (!event.ctrlKey && !event.metaKey) return;
441
+ event.preventDefault();
442
+ post({
443
+ val: internal.VAL_CANVAS_MESSAGE,
444
+ type: "zoom",
445
+ // The same response curve the studio uses for a wheel on its own
446
+ // background, so the gesture feels the same on both sides of the frame.
447
+ factor: 1 - event.deltaY / 300,
448
+ center: {
449
+ x: event.clientX,
450
+ y: event.clientY
451
+ }
452
+ });
453
+ };
454
+ document.addEventListener("wheel", onWheel, {
455
+ passive: false
456
+ });
457
+ return function () {
458
+ return document.removeEventListener("wheel", onWheel);
459
+ };
460
+ }, [post]);
461
+
338
462
  /**
339
463
  * The outlines, as a stylesheet rather than as injected elements.
340
464
  *
@@ -335,6 +335,130 @@ function ValCanvasBridge(_ref) {
335
335
  };
336
336
  }, [post]);
337
337
 
338
+ /**
339
+ * Two-finger gestures, handed to the studio.
340
+ *
341
+ * The window around the page is the studio's, and the page is a frame: a
342
+ * finger that lands here is this document's and the studio never hears about
343
+ * it. So a pinch on the page could not zoom the window, which on a phone is
344
+ * the only zoom there is — the toolbar's + and - are a poor substitute for the
345
+ * gesture everyone already makes.
346
+ *
347
+ * Two fingers and only two. One finger is the page's: it scrolls it, taps its
348
+ * links, drags whatever the page put there. Two are the window's, for zooming
349
+ * and for moving the page around inside it. Nothing has to be moded, and the
350
+ * two cannot be confused for one another.
351
+ *
352
+ * `passive: false` because both handlers cancel: the default for two fingers
353
+ * is the browser's own page zoom, which inside a frame the studio is already
354
+ * scaling produces two zooms fighting over one gesture.
355
+ */
356
+ React__default["default"].useEffect(function () {
357
+ var midpoint = function midpoint(touches) {
358
+ return {
359
+ x: (touches[0].clientX + touches[1].clientX) / 2,
360
+ y: (touches[0].clientY + touches[1].clientY) / 2
361
+ };
362
+ };
363
+ var span = function span(touches) {
364
+ return Math.hypot(touches[0].clientX - touches[1].clientX, touches[0].clientY - touches[1].clientY);
365
+ };
366
+ /**
367
+ * Whether a gesture is in progress.
368
+ *
369
+ * `touchend` fires per finger, so lifting one of two leaves a `touchend`
370
+ * carrying a single touch — which is the end of the gesture — and the
371
+ * second leaves one carrying none. Without this the second would post a
372
+ * second `end` for a gesture that was already over.
373
+ */
374
+ var active = false;
375
+ var onStart = function onStart(event) {
376
+ if (event.touches.length !== 2) return;
377
+ event.preventDefault();
378
+ active = true;
379
+ post({
380
+ val: internal.VAL_CANVAS_MESSAGE,
381
+ type: "pinch",
382
+ phase: "start",
383
+ span: span(event.touches),
384
+ center: midpoint(event.touches)
385
+ });
386
+ };
387
+ var onMove = function onMove(event) {
388
+ if (event.touches.length !== 2 || !active) return;
389
+ event.preventDefault();
390
+ post({
391
+ val: internal.VAL_CANVAS_MESSAGE,
392
+ type: "pinch",
393
+ phase: "move",
394
+ span: span(event.touches),
395
+ center: midpoint(event.touches)
396
+ });
397
+ };
398
+ var onEnd = function onEnd(event) {
399
+ if (!active || event.touches.length >= 2) return;
400
+ active = false;
401
+ post({
402
+ val: internal.VAL_CANVAS_MESSAGE,
403
+ type: "pinch",
404
+ phase: "end",
405
+ span: 0,
406
+ center: {
407
+ x: 0,
408
+ y: 0
409
+ }
410
+ });
411
+ };
412
+ document.addEventListener("touchstart", onStart, {
413
+ passive: false
414
+ });
415
+ document.addEventListener("touchmove", onMove, {
416
+ passive: false
417
+ });
418
+ document.addEventListener("touchend", onEnd);
419
+ document.addEventListener("touchcancel", onEnd);
420
+ return function () {
421
+ document.removeEventListener("touchstart", onStart);
422
+ document.removeEventListener("touchmove", onMove);
423
+ document.removeEventListener("touchend", onEnd);
424
+ document.removeEventListener("touchcancel", onEnd);
425
+ };
426
+ }, [post]);
427
+
428
+ /**
429
+ * And ctrl/cmd + wheel, which is what a trackpad pinch reports as.
430
+ *
431
+ * The same problem as touches and the same answer: the wheel event lands on
432
+ * this document, so without relaying it a trackpad pinch over the page does
433
+ * nothing while the identical gesture over the canvas background zooms.
434
+ *
435
+ * A PLAIN wheel is deliberately left alone — that is the page scrolling
436
+ * itself, which is exactly what it should do.
437
+ */
438
+ React__default["default"].useEffect(function () {
439
+ var onWheel = function onWheel(event) {
440
+ if (!event.ctrlKey && !event.metaKey) return;
441
+ event.preventDefault();
442
+ post({
443
+ val: internal.VAL_CANVAS_MESSAGE,
444
+ type: "zoom",
445
+ // The same response curve the studio uses for a wheel on its own
446
+ // background, so the gesture feels the same on both sides of the frame.
447
+ factor: 1 - event.deltaY / 300,
448
+ center: {
449
+ x: event.clientX,
450
+ y: event.clientY
451
+ }
452
+ });
453
+ };
454
+ document.addEventListener("wheel", onWheel, {
455
+ passive: false
456
+ });
457
+ return function () {
458
+ return document.removeEventListener("wheel", onWheel);
459
+ };
460
+ }, [post]);
461
+
338
462
  /**
339
463
  * The outlines, as a stylesheet rather than as injected elements.
340
464
  *
@@ -11,7 +11,7 @@ import { SET_AUTO_TAG_JSX_ENABLED } from '@valbuild/react/stega';
11
11
  import { VAL_THEME_SESSION_STORAGE_KEY, createValClient, isValCanvasFrame } from '@valbuild/shared/internal';
12
12
  import { p as prefixStyles, u as useConfigStorageSave, f as floatDarkBg, d as floatLightBg, v as valPrefixedClass, c as cn } from './fallbackColors-5ead2c26.esm.js';
13
13
  import { _ as _createForOfIteratorHelper } from './createForOfIteratorHelper-5758a730.esm.js';
14
- import { ValCanvasBridge } from './ValCanvasBridge-d8713d9d.esm.js';
14
+ import { ValCanvasBridge } from './ValCanvasBridge-1310aaeb.esm.js';
15
15
  import { jsxs, jsx } from 'react/jsx-runtime';
16
16
  import './unsupportedIterableToArray-5baabfdc.esm.js';
17
17
  import './defineProperty-cca5affa.esm.js';
@@ -15,7 +15,7 @@ var stega = require('@valbuild/react/stega');
15
15
  var internal = require('@valbuild/shared/internal');
16
16
  var fallbackColors = require('./fallbackColors-9a2ac53a.cjs.dev.js');
17
17
  var createForOfIteratorHelper = require('./createForOfIteratorHelper-0445603c.cjs.dev.js');
18
- var ValCanvasBridge = require('./ValCanvasBridge-96f67a41.cjs.dev.js');
18
+ var ValCanvasBridge = require('./ValCanvasBridge-cb2d9112.cjs.dev.js');
19
19
  var jsxRuntime = require('react/jsx-runtime');
20
20
  require('./unsupportedIterableToArray-c8ab77c9.cjs.dev.js');
21
21
  require('./defineProperty-f90345d7.cjs.dev.js');
@@ -15,7 +15,7 @@ var stega = require('@valbuild/react/stega');
15
15
  var internal = require('@valbuild/shared/internal');
16
16
  var fallbackColors = require('./fallbackColors-d4a5b0da.cjs.prod.js');
17
17
  var createForOfIteratorHelper = require('./createForOfIteratorHelper-d4afcad8.cjs.prod.js');
18
- var ValCanvasBridge = require('./ValCanvasBridge-f75509c6.cjs.prod.js');
18
+ var ValCanvasBridge = require('./ValCanvasBridge-32299c6e.cjs.prod.js');
19
19
  var jsxRuntime = require('react/jsx-runtime');
20
20
  require('./unsupportedIterableToArray-0d2087a2.cjs.prod.js');
21
21
  require('./defineProperty-8951f469.cjs.prod.js');
@@ -18,100 +18,24 @@ export { ValProvider } from "./ValProvider.js";
18
18
  export { ValImage, type ValImageProps } from "./ValImage.js";
19
19
  export { ValApp } from "./ValApp.js";
20
20
  export { ValModulesClient, useRegisterValModules } from "./ValModulesClient.js";
21
+ import { Internal as InternalCore } from "@valbuild/core";
22
+ import { VERSION } from "./version.js";
21
23
  export type * as t from "./ValTypes.js";
22
24
  export type { DecodeVal } from "@valbuild/react/stega";
23
- export declare const Internal: {
24
- VERSION: {
25
- next: string | null;
26
- core: string | null;
25
+ /**
26
+ * Annotated rather than inferred.
27
+ *
28
+ * The inferred type of the spread below reaches into @valbuild/core's internal
29
+ * declaration files for names like `NonEmptyArray` and `createValPathOfItem`,
30
+ * which the declaration emitter cannot write down portably: `preconstruct
31
+ * build` fails with a wall of TS2883 "the inferred type of 'Internal' cannot be
32
+ * named without a reference to ..." while `tsc --noEmit` stays happy, so it only
33
+ * shows up in the build job. Naming the type in terms of `typeof InternalCore`
34
+ * keeps everything the emitter needs reachable through the package entry point.
35
+ */
36
+ type InternalWithNextVersion = Omit<typeof InternalCore, "VERSION"> & {
37
+ VERSION: typeof InternalCore.VERSION & {
38
+ next: typeof VERSION;
27
39
  };
28
- mediaUrl: typeof import("@valbuild/core/dist/declarations/src/source/media").mediaUrl;
29
- resolveMedia: typeof import("@valbuild/core/dist/declarations/src/source/media").resolveMedia;
30
- isRemoteMediaPath: typeof import("@valbuild/core/dist/declarations/src/source/media").isRemoteMediaPath;
31
- media: {
32
- fillFromGallery: typeof import("@valbuild/core/dist/declarations/src/source/media").fillFromGallery;
33
- };
34
- getSchema: typeof import("@valbuild/core/dist/declarations/src/selector").getSchema;
35
- getValPath: typeof import("@valbuild/core/dist/declarations/src/val").getValPath;
36
- getSource: typeof import("@valbuild/core/dist/declarations/src/module").getSource;
37
- isValModule: typeof import("@valbuild/core/dist/declarations/src/module").isValModule;
38
- resolvePath: typeof import("@valbuild/core/dist/declarations/src/module").resolvePath;
39
- safeResolvePath: typeof import("@valbuild/core/dist/declarations/src/module").safeResolvePath;
40
- splitModuleFilePathAndModulePath: typeof import("@valbuild/core/dist/declarations/src/module").splitModuleFilePathAndModulePath;
41
- joinModuleFilePathAndModulePath: typeof import("@valbuild/core/dist/declarations/src/module").joinModuleFilePathAndModulePath;
42
- nextAppRouter: import("@valbuild/core").ValRouter;
43
- externalPageRouter: import("@valbuild/core").ValRouter;
44
- color: {
45
- parseColor: typeof import("@valbuild/core/dist/declarations/src/schema/colorFormat").parseColor;
46
- formatColor: typeof import("@valbuild/core/dist/declarations/src/schema/colorFormat").formatColor;
47
- convertColor: typeof import("@valbuild/core/dist/declarations/src/schema/colorFormat").convertColor;
48
- detectColorFormat: typeof import("@valbuild/core/dist/declarations/src/schema/colorFormat").detectColorFormat;
49
- colorToHex: typeof import("@valbuild/core/dist/declarations/src/schema/colorFormat").colorToHex;
50
- };
51
- remote: {
52
- createRemoteRef: typeof import("@valbuild/core/dist/declarations/src/source/remote").createRemoteRef;
53
- getValidationBasis: typeof import("@valbuild/core/dist/declarations/src/remote/validationBasis").getValidationBasis;
54
- getValidationHash: typeof import("@valbuild/core/dist/declarations/src/remote/validationBasis").getValidationHash;
55
- getFileHash: typeof import("@valbuild/core/dist/declarations/src/remote/fileHash").getFileHash;
56
- hashToRemoteFileHash: typeof import("@valbuild/core/dist/declarations/src/remote/fileHash").hashToRemoteFileHash;
57
- splitRemoteRef: typeof import("@valbuild/core/dist/declarations/src/remote/splitRemoteRef").splitRemoteRef;
58
- };
59
- validate: (val: import("@valbuild/core").ValModule<import("@valbuild/core").SelectorSource>, path: import("@valbuild/core").SourcePath, src: unknown) => import("@valbuild/core").ValidationErrors | undefined;
60
- isVal: typeof import("@valbuild/core/dist/declarations/src/val").isVal;
61
- isJson: typeof import("@valbuild/core/dist/declarations/src/source/json").isJson;
62
- getJsonImport: typeof import("@valbuild/core/dist/declarations/src/source/json").getJsonImport;
63
- resolveJsonValues: typeof import("@valbuild/core/dist/declarations/src/source/json").resolveJsonValues;
64
- createValPathOfItem: typeof import("@valbuild/core/dist/declarations/src/selector/SelectorProxy").createValPathOfItem;
65
- getSHA256Hash: (bits: Uint8Array) => string;
66
- initSchema: typeof import("@valbuild/core/dist/declarations/src/initSchema").initSchema;
67
- getMimeType: typeof import("@valbuild/core/dist/declarations/src/mimeType").getMimeType;
68
- mimeTypeToFileExt: typeof import("@valbuild/core/dist/declarations/src/mimeType").mimeTypeToFileExt;
69
- filenameToMimeType: typeof import("@valbuild/core/dist/declarations/src/mimeType").filenameToMimeType;
70
- EXT_TO_MIME_TYPES: Record<string, string>;
71
- MIME_TYPES_TO_EXT: {
72
- [k: string]: string;
73
- };
74
- ModuleFilePathSep: string;
75
- notFileOp: (op: import("@valbuild/core/patch").Operation) => op is {
76
- op: "add";
77
- path: string[];
78
- value: import("@valbuild/core/patch").JSONValue;
79
- } | {
80
- op: "remove";
81
- path: import("@valbuild/core/dist/declarations/src/fp/array").NonEmptyArray<string>;
82
- } | {
83
- op: "replace";
84
- path: string[];
85
- value: import("@valbuild/core/patch").JSONValue;
86
- } | {
87
- op: "move";
88
- from: import("@valbuild/core/dist/declarations/src/fp/array").NonEmptyArray<string>;
89
- path: string[];
90
- } | {
91
- op: "copy";
92
- from: string[];
93
- path: string[];
94
- } | {
95
- op: "test";
96
- path: string[];
97
- value: import("@valbuild/core/patch").JSONValue;
98
- };
99
- isFileOp: (op: import("@valbuild/core/patch").Operation) => op is {
100
- op: "file";
101
- path: string[];
102
- filePath: string;
103
- value: string;
104
- remote: boolean;
105
- };
106
- createPatchJSONPath: (modulePath: import("@valbuild/core").ModulePath) => string;
107
- createPatchPath: (modulePath: import("@valbuild/core").ModulePath) => string[];
108
- splitModulePath: typeof import("@valbuild/core/dist/declarations/src/module").splitModulePath;
109
- splitModuleFilePath: typeof import("@valbuild/core/dist/declarations/src/module").splitModuleFilePath;
110
- splitJoinedSourcePaths: typeof import("@valbuild/core/dist/declarations/src/module").splitJoinedSourcePaths;
111
- parentOfSourcePath: typeof import("@valbuild/core/dist/declarations/src/module").parentOfSourcePath;
112
- patchPathToModulePath: typeof import("@valbuild/core/dist/declarations/src/module").patchPathToModulePath;
113
- VAL_ENABLE_COOKIE_NAME: "val_enable";
114
- VAL_STATE_COOKIE: "val_state";
115
- VAL_SESSION_COOKIE: "val_session";
116
- createFilename: (data: string | null, filename: string | null, metadata: import("@valbuild/core").FileMetadata | import("@valbuild/core").ImageMetadata | undefined, sha256: string) => string | null;
117
40
  };
41
+ export declare const Internal: InternalWithNextVersion;
@@ -0,0 +1 @@
1
+ export declare const VERSION: string | null;
@@ -198,6 +198,18 @@ stega.autoTagJSX();
198
198
 
199
199
  // Convenience types
200
200
 
201
+ /**
202
+ * Annotated rather than inferred.
203
+ *
204
+ * The inferred type of the spread below reaches into @valbuild/core's internal
205
+ * declaration files for names like `NonEmptyArray` and `createValPathOfItem`,
206
+ * which the declaration emitter cannot write down portably: `preconstruct
207
+ * build` fails with a wall of TS2883 "the inferred type of 'Internal' cannot be
208
+ * named without a reference to ..." while `tsc --noEmit` stays happy, so it only
209
+ * shows up in the build job. Naming the type in terms of `typeof InternalCore`
210
+ * keeps everything the emitter needs reachable through the package entry point.
211
+ */
212
+
201
213
  var Internal = objectSpread2._objectSpread2(objectSpread2._objectSpread2({}, core.Internal), {}, {
202
214
  VERSION: objectSpread2._objectSpread2(objectSpread2._objectSpread2({}, core.Internal.VERSION), {}, {
203
215
  next: version.VERSION
@@ -198,6 +198,18 @@ stega.autoTagJSX();
198
198
 
199
199
  // Convenience types
200
200
 
201
+ /**
202
+ * Annotated rather than inferred.
203
+ *
204
+ * The inferred type of the spread below reaches into @valbuild/core's internal
205
+ * declaration files for names like `NonEmptyArray` and `createValPathOfItem`,
206
+ * which the declaration emitter cannot write down portably: `preconstruct
207
+ * build` fails with a wall of TS2883 "the inferred type of 'Internal' cannot be
208
+ * named without a reference to ..." while `tsc --noEmit` stays happy, so it only
209
+ * shows up in the build job. Naming the type in terms of `typeof InternalCore`
210
+ * keeps everything the emitter needs reachable through the package entry point.
211
+ */
212
+
201
213
  var Internal = objectSpread2._objectSpread2(objectSpread2._objectSpread2({}, core.Internal), {}, {
202
214
  VERSION: objectSpread2._objectSpread2(objectSpread2._objectSpread2({}, core.Internal.VERSION), {}, {
203
215
  next: version.VERSION
@@ -174,6 +174,18 @@ autoTagJSX();
174
174
 
175
175
  // Convenience types
176
176
 
177
+ /**
178
+ * Annotated rather than inferred.
179
+ *
180
+ * The inferred type of the spread below reaches into @valbuild/core's internal
181
+ * declaration files for names like `NonEmptyArray` and `createValPathOfItem`,
182
+ * which the declaration emitter cannot write down portably: `preconstruct
183
+ * build` fails with a wall of TS2883 "the inferred type of 'Internal' cannot be
184
+ * named without a reference to ..." while `tsc --noEmit` stays happy, so it only
185
+ * shows up in the build job. Naming the type in terms of `typeof InternalCore`
186
+ * keeps everything the emitter needs reachable through the package entry point.
187
+ */
188
+
177
189
  var Internal = _objectSpread2(_objectSpread2({}, Internal$1), {}, {
178
190
  VERSION: _objectSpread2(_objectSpread2({}, Internal$1.VERSION), {}, {
179
191
  next: VERSION
package/package.json CHANGED
@@ -12,7 +12,7 @@
12
12
  "next",
13
13
  "react"
14
14
  ],
15
- "version": "0.106.1",
15
+ "version": "0.108.0",
16
16
  "main": "dist/valbuild-next.cjs.js",
17
17
  "module": "dist/valbuild-next.esm.js",
18
18
  "exports": {
@@ -48,21 +48,21 @@
48
48
  "client-only": "^0.0.1",
49
49
  "server-only": "^0.0.1",
50
50
  "@valbuild/core": "0.106.0",
51
- "@valbuild/language-server": "0.106.1",
52
- "@valbuild/react": "0.106.1",
53
- "@valbuild/server": "0.106.1",
54
- "@valbuild/shared": "0.106.0",
55
- "@valbuild/ui": "0.106.1"
51
+ "@valbuild/react": "0.108.0",
52
+ "@valbuild/language-server": "0.108.0",
53
+ "@valbuild/server": "0.108.0",
54
+ "@valbuild/shared": "0.108.0",
55
+ "@valbuild/ui": "0.108.0"
56
56
  },
57
57
  "devDependencies": {
58
- "@testing-library/react": "^16.3.2",
58
+ "@testing-library/react": "^16.3.3",
59
59
  "@types/react": "^19.2.18",
60
60
  "@types/react-dom": "^19.2.5",
61
- "jest-environment-jsdom": "^29.5.0",
61
+ "jest-environment-jsdom": "^30.5.0",
62
62
  "next": "^16.3.3",
63
63
  "react": "^19.2.8",
64
64
  "react-dom": "^19.2.8",
65
- "typescript": "^5.9.3"
65
+ "typescript": "^6.0.3"
66
66
  },
67
67
  "peerDependencies": {
68
68
  "next": ">=14.3.0",
@@ -1,7 +0,0 @@
1
- 'use strict';
2
-
3
- if (process.env.NODE_ENV === "production") {
4
- module.exports = require("./ValCanvasBridge-f75509c6.cjs.prod.js");
5
- } else {
6
- module.exports = require("./ValCanvasBridge-f75509c6.cjs.dev.js");
7
- }