@valbuild/react 0.99.1 → 0.101.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/declarations/src/stega/stegaEncode.d.ts +16 -0
- package/dist/{raw-481a7769.browser.esm.js → raw-0293ccee.browser.esm.js} +7 -1
- package/dist/{raw-06fcd975.worker.esm.js → raw-a20b5f53.worker.esm.js} +7 -1
- package/dist/{raw-f726efa7.cjs.dev.js → raw-af73dda7.cjs.dev.js} +7 -1
- package/dist/{raw-22e4345d.cjs.prod.js → raw-bac58cc7.cjs.prod.js} +7 -1
- package/dist/{raw-0321d2fc.esm.js → raw-e561ced7.esm.js} +7 -1
- package/internal/dist/valbuild-react-internal.browser.esm.js +1 -1
- package/internal/dist/valbuild-react-internal.cjs.dev.js +1 -1
- package/internal/dist/valbuild-react-internal.cjs.prod.js +1 -1
- package/internal/dist/valbuild-react-internal.esm.js +1 -1
- package/internal/dist/valbuild-react-internal.worker.esm.js +1 -1
- package/package.json +4 -4
- package/stega/dist/valbuild-react-stega.browser.esm.js +2 -2
- package/stega/dist/valbuild-react-stega.cjs.dev.js +1 -1
- package/stega/dist/valbuild-react-stega.cjs.prod.js +1 -1
- package/stega/dist/valbuild-react-stega.esm.js +2 -2
- package/stega/dist/valbuild-react-stega.worker.esm.js +2 -2
|
@@ -169,6 +169,22 @@ export type StegaOfSource<T extends Source> = Json extends T ? Json : T extends
|
|
|
169
169
|
export declare function stegaEncode(input: any, opts: {
|
|
170
170
|
getModule?: (modulePath: string) => any;
|
|
171
171
|
disabled?: boolean;
|
|
172
|
+
/**
|
|
173
|
+
* Seeds the recursion for a RAW source value that is not a selector, so its
|
|
174
|
+
* strings still get edit tags.
|
|
175
|
+
*
|
|
176
|
+
* Needed for a `.jsonValues()` entry loaded by key: its content is plain
|
|
177
|
+
* JSON with no `Path`/`GetSchema` symbols, so the selector branch below
|
|
178
|
+
* cannot fire and — without this — every string hits the `!recOpts` bail in
|
|
179
|
+
* the encoder and the whole call is an identity transform.
|
|
180
|
+
*
|
|
181
|
+
* `path` is the entry's path (`Internal.createValPathOfItem(modulePath, key)`)
|
|
182
|
+
* and `schema` is the SERIALIZED item schema.
|
|
183
|
+
*/
|
|
184
|
+
root?: {
|
|
185
|
+
path: any;
|
|
186
|
+
schema: any;
|
|
187
|
+
};
|
|
172
188
|
}): any;
|
|
173
189
|
export declare function stegaClean(source: string): string;
|
|
174
190
|
export declare function getModuleIds(input: any): string[];
|
|
@@ -256,6 +256,9 @@ function stegaEncode(input, opts) {
|
|
|
256
256
|
if (recOpts !== null && recOpts !== void 0 && recOpts.schema && isDateTimeSchema(recOpts === null || recOpts === void 0 ? void 0 : recOpts.schema)) {
|
|
257
257
|
return sourceOrSelector;
|
|
258
258
|
}
|
|
259
|
+
if (recOpts !== null && recOpts !== void 0 && recOpts.schema && isColorSchema(recOpts === null || recOpts === void 0 ? void 0 : recOpts.schema)) {
|
|
260
|
+
return sourceOrSelector;
|
|
261
|
+
}
|
|
259
262
|
if (recOpts !== null && recOpts !== void 0 && recOpts.schema && isUnionSchema(recOpts === null || recOpts === void 0 ? void 0 : recOpts.schema)) {
|
|
260
263
|
// Handle tagged union
|
|
261
264
|
var taggedSchema = resolveTaggedUnionSchema(sourceOrSelector, recOpts.schema);
|
|
@@ -359,7 +362,7 @@ function stegaEncode(input, opts) {
|
|
|
359
362
|
console.error("Unexpected type of source selector: ".concat(_typeof(sourceOrSelector)));
|
|
360
363
|
return sourceOrSelector;
|
|
361
364
|
}
|
|
362
|
-
return rec(input);
|
|
365
|
+
return rec(input, opts.disabled ? undefined : opts.root);
|
|
363
366
|
}
|
|
364
367
|
function isRecordSchema(schema) {
|
|
365
368
|
return (schema === null || schema === void 0 ? void 0 : schema.type) === "record";
|
|
@@ -373,6 +376,9 @@ function isDateSchema(schema) {
|
|
|
373
376
|
function isDateTimeSchema(schema) {
|
|
374
377
|
return (schema === null || schema === void 0 ? void 0 : schema.type) === "dateTime";
|
|
375
378
|
}
|
|
379
|
+
function isColorSchema(schema) {
|
|
380
|
+
return (schema === null || schema === void 0 ? void 0 : schema.type) === "color";
|
|
381
|
+
}
|
|
376
382
|
function unknownSchema(schema) {
|
|
377
383
|
console.debug("Found unknown schema", schema);
|
|
378
384
|
return schema;
|
|
@@ -256,6 +256,9 @@ function stegaEncode(input, opts) {
|
|
|
256
256
|
if (recOpts !== null && recOpts !== void 0 && recOpts.schema && isDateTimeSchema(recOpts === null || recOpts === void 0 ? void 0 : recOpts.schema)) {
|
|
257
257
|
return sourceOrSelector;
|
|
258
258
|
}
|
|
259
|
+
if (recOpts !== null && recOpts !== void 0 && recOpts.schema && isColorSchema(recOpts === null || recOpts === void 0 ? void 0 : recOpts.schema)) {
|
|
260
|
+
return sourceOrSelector;
|
|
261
|
+
}
|
|
259
262
|
if (recOpts !== null && recOpts !== void 0 && recOpts.schema && isUnionSchema(recOpts === null || recOpts === void 0 ? void 0 : recOpts.schema)) {
|
|
260
263
|
// Handle tagged union
|
|
261
264
|
var taggedSchema = resolveTaggedUnionSchema(sourceOrSelector, recOpts.schema);
|
|
@@ -359,7 +362,7 @@ function stegaEncode(input, opts) {
|
|
|
359
362
|
console.error("Unexpected type of source selector: ".concat(_typeof(sourceOrSelector)));
|
|
360
363
|
return sourceOrSelector;
|
|
361
364
|
}
|
|
362
|
-
return rec(input);
|
|
365
|
+
return rec(input, opts.disabled ? undefined : opts.root);
|
|
363
366
|
}
|
|
364
367
|
function isRecordSchema(schema) {
|
|
365
368
|
return (schema === null || schema === void 0 ? void 0 : schema.type) === "record";
|
|
@@ -373,6 +376,9 @@ function isDateSchema(schema) {
|
|
|
373
376
|
function isDateTimeSchema(schema) {
|
|
374
377
|
return (schema === null || schema === void 0 ? void 0 : schema.type) === "dateTime";
|
|
375
378
|
}
|
|
379
|
+
function isColorSchema(schema) {
|
|
380
|
+
return (schema === null || schema === void 0 ? void 0 : schema.type) === "color";
|
|
381
|
+
}
|
|
376
382
|
function unknownSchema(schema) {
|
|
377
383
|
console.debug("Found unknown schema", schema);
|
|
378
384
|
return schema;
|
|
@@ -258,6 +258,9 @@ function stegaEncode(input, opts) {
|
|
|
258
258
|
if (recOpts !== null && recOpts !== void 0 && recOpts.schema && isDateTimeSchema(recOpts === null || recOpts === void 0 ? void 0 : recOpts.schema)) {
|
|
259
259
|
return sourceOrSelector;
|
|
260
260
|
}
|
|
261
|
+
if (recOpts !== null && recOpts !== void 0 && recOpts.schema && isColorSchema(recOpts === null || recOpts === void 0 ? void 0 : recOpts.schema)) {
|
|
262
|
+
return sourceOrSelector;
|
|
263
|
+
}
|
|
261
264
|
if (recOpts !== null && recOpts !== void 0 && recOpts.schema && isUnionSchema(recOpts === null || recOpts === void 0 ? void 0 : recOpts.schema)) {
|
|
262
265
|
// Handle tagged union
|
|
263
266
|
var taggedSchema = resolveTaggedUnionSchema(sourceOrSelector, recOpts.schema);
|
|
@@ -361,7 +364,7 @@ function stegaEncode(input, opts) {
|
|
|
361
364
|
console.error("Unexpected type of source selector: ".concat(slicedToArray._typeof(sourceOrSelector)));
|
|
362
365
|
return sourceOrSelector;
|
|
363
366
|
}
|
|
364
|
-
return rec(input);
|
|
367
|
+
return rec(input, opts.disabled ? undefined : opts.root);
|
|
365
368
|
}
|
|
366
369
|
function isRecordSchema(schema) {
|
|
367
370
|
return (schema === null || schema === void 0 ? void 0 : schema.type) === "record";
|
|
@@ -375,6 +378,9 @@ function isDateSchema(schema) {
|
|
|
375
378
|
function isDateTimeSchema(schema) {
|
|
376
379
|
return (schema === null || schema === void 0 ? void 0 : schema.type) === "dateTime";
|
|
377
380
|
}
|
|
381
|
+
function isColorSchema(schema) {
|
|
382
|
+
return (schema === null || schema === void 0 ? void 0 : schema.type) === "color";
|
|
383
|
+
}
|
|
378
384
|
function unknownSchema(schema) {
|
|
379
385
|
console.debug("Found unknown schema", schema);
|
|
380
386
|
return schema;
|
|
@@ -258,6 +258,9 @@ function stegaEncode(input, opts) {
|
|
|
258
258
|
if (recOpts !== null && recOpts !== void 0 && recOpts.schema && isDateTimeSchema(recOpts === null || recOpts === void 0 ? void 0 : recOpts.schema)) {
|
|
259
259
|
return sourceOrSelector;
|
|
260
260
|
}
|
|
261
|
+
if (recOpts !== null && recOpts !== void 0 && recOpts.schema && isColorSchema(recOpts === null || recOpts === void 0 ? void 0 : recOpts.schema)) {
|
|
262
|
+
return sourceOrSelector;
|
|
263
|
+
}
|
|
261
264
|
if (recOpts !== null && recOpts !== void 0 && recOpts.schema && isUnionSchema(recOpts === null || recOpts === void 0 ? void 0 : recOpts.schema)) {
|
|
262
265
|
// Handle tagged union
|
|
263
266
|
var taggedSchema = resolveTaggedUnionSchema(sourceOrSelector, recOpts.schema);
|
|
@@ -361,7 +364,7 @@ function stegaEncode(input, opts) {
|
|
|
361
364
|
console.error("Unexpected type of source selector: ".concat(slicedToArray._typeof(sourceOrSelector)));
|
|
362
365
|
return sourceOrSelector;
|
|
363
366
|
}
|
|
364
|
-
return rec(input);
|
|
367
|
+
return rec(input, opts.disabled ? undefined : opts.root);
|
|
365
368
|
}
|
|
366
369
|
function isRecordSchema(schema) {
|
|
367
370
|
return (schema === null || schema === void 0 ? void 0 : schema.type) === "record";
|
|
@@ -375,6 +378,9 @@ function isDateSchema(schema) {
|
|
|
375
378
|
function isDateTimeSchema(schema) {
|
|
376
379
|
return (schema === null || schema === void 0 ? void 0 : schema.type) === "dateTime";
|
|
377
380
|
}
|
|
381
|
+
function isColorSchema(schema) {
|
|
382
|
+
return (schema === null || schema === void 0 ? void 0 : schema.type) === "color";
|
|
383
|
+
}
|
|
378
384
|
function unknownSchema(schema) {
|
|
379
385
|
console.debug("Found unknown schema", schema);
|
|
380
386
|
return schema;
|
|
@@ -256,6 +256,9 @@ function stegaEncode(input, opts) {
|
|
|
256
256
|
if (recOpts !== null && recOpts !== void 0 && recOpts.schema && isDateTimeSchema(recOpts === null || recOpts === void 0 ? void 0 : recOpts.schema)) {
|
|
257
257
|
return sourceOrSelector;
|
|
258
258
|
}
|
|
259
|
+
if (recOpts !== null && recOpts !== void 0 && recOpts.schema && isColorSchema(recOpts === null || recOpts === void 0 ? void 0 : recOpts.schema)) {
|
|
260
|
+
return sourceOrSelector;
|
|
261
|
+
}
|
|
259
262
|
if (recOpts !== null && recOpts !== void 0 && recOpts.schema && isUnionSchema(recOpts === null || recOpts === void 0 ? void 0 : recOpts.schema)) {
|
|
260
263
|
// Handle tagged union
|
|
261
264
|
var taggedSchema = resolveTaggedUnionSchema(sourceOrSelector, recOpts.schema);
|
|
@@ -359,7 +362,7 @@ function stegaEncode(input, opts) {
|
|
|
359
362
|
console.error("Unexpected type of source selector: ".concat(_typeof(sourceOrSelector)));
|
|
360
363
|
return sourceOrSelector;
|
|
361
364
|
}
|
|
362
|
-
return rec(input);
|
|
365
|
+
return rec(input, opts.disabled ? undefined : opts.root);
|
|
363
366
|
}
|
|
364
367
|
function isRecordSchema(schema) {
|
|
365
368
|
return (schema === null || schema === void 0 ? void 0 : schema.type) === "record";
|
|
@@ -373,6 +376,9 @@ function isDateSchema(schema) {
|
|
|
373
376
|
function isDateTimeSchema(schema) {
|
|
374
377
|
return (schema === null || schema === void 0 ? void 0 : schema.type) === "dateTime";
|
|
375
378
|
}
|
|
379
|
+
function isColorSchema(schema) {
|
|
380
|
+
return (schema === null || schema === void 0 ? void 0 : schema.type) === "color";
|
|
381
|
+
}
|
|
376
382
|
function unknownSchema(schema) {
|
|
377
383
|
console.debug("Found unknown schema", schema);
|
|
378
384
|
return schema;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as _objectSpread2, r as raw, c as attrs, e as _toConsumableArray } from '../../dist/raw-
|
|
1
|
+
import { d as _objectSpread2, r as raw, c as attrs, e as _toConsumableArray } from '../../dist/raw-0293ccee.browser.esm.js';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { jsx } from 'react/jsx-runtime';
|
|
4
4
|
import '../../dist/slicedToArray-9cce0d9f.browser.esm.js';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var raw = require('../../dist/raw-
|
|
5
|
+
var raw = require('../../dist/raw-af73dda7.cjs.dev.js');
|
|
6
6
|
var React = require('react');
|
|
7
7
|
var ReactJSXRuntime = require('react/jsx-runtime');
|
|
8
8
|
require('../../dist/slicedToArray-e9e8e991.cjs.dev.js');
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var raw = require('../../dist/raw-
|
|
5
|
+
var raw = require('../../dist/raw-bac58cc7.cjs.prod.js');
|
|
6
6
|
var React = require('react');
|
|
7
7
|
var ReactJSXRuntime = require('react/jsx-runtime');
|
|
8
8
|
require('../../dist/slicedToArray-86004d59.cjs.prod.js');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as _objectSpread2, r as raw, c as attrs, e as _toConsumableArray } from '../../dist/raw-
|
|
1
|
+
import { d as _objectSpread2, r as raw, c as attrs, e as _toConsumableArray } from '../../dist/raw-e561ced7.esm.js';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { jsx } from 'react/jsx-runtime';
|
|
4
4
|
import '../../dist/slicedToArray-0c0a3b4a.esm.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as _objectSpread2, r as raw, c as attrs, e as _toConsumableArray } from '../../dist/raw-
|
|
1
|
+
import { d as _objectSpread2, r as raw, c as attrs, e as _toConsumableArray } from '../../dist/raw-a20b5f53.worker.esm.js';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { jsx } from 'react/jsx-runtime';
|
|
4
4
|
import '../../dist/slicedToArray-7d0170b6.worker.esm.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@valbuild/react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.101.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Val - React internal helpers",
|
|
6
6
|
"repository": {
|
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@vercel/stega": "^0.1.0",
|
|
13
13
|
"base64-arraybuffer": "^1.0.2",
|
|
14
|
-
"@valbuild/core": "0.
|
|
15
|
-
"@valbuild/shared": "0.
|
|
16
|
-
"@valbuild/ui": "0.
|
|
14
|
+
"@valbuild/core": "0.101.0",
|
|
15
|
+
"@valbuild/shared": "0.101.0",
|
|
16
|
+
"@valbuild/ui": "0.101.0"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
19
|
"@testing-library/react": "^14.0.0",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as _typeof, _ as _slicedToArray } from '../../dist/slicedToArray-9cce0d9f.browser.esm.js';
|
|
2
|
-
import { s as stegaDecodeStrings, _ as _createForOfIteratorHelper } from '../../dist/raw-
|
|
3
|
-
export { c as attrs, g as getModuleIds, r as raw, b as stegaClean, s as stegaDecodeStrings, a as stegaEncode } from '../../dist/raw-
|
|
2
|
+
import { s as stegaDecodeStrings, _ as _createForOfIteratorHelper } from '../../dist/raw-0293ccee.browser.esm.js';
|
|
3
|
+
export { c as attrs, g as getModuleIds, r as raw, b as stegaClean, s as stegaDecodeStrings, a as stegaEncode } from '../../dist/raw-0293ccee.browser.esm.js';
|
|
4
4
|
import ReactJSXRuntime__default from 'react/jsx-runtime';
|
|
5
5
|
import jsxRuntimeDev__default from 'react/jsx-dev-runtime';
|
|
6
6
|
import React from 'react';
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var slicedToArray = require('../../dist/slicedToArray-e9e8e991.cjs.dev.js');
|
|
6
|
-
var raw = require('../../dist/raw-
|
|
6
|
+
var raw = require('../../dist/raw-af73dda7.cjs.dev.js');
|
|
7
7
|
var ReactJSXRuntime = require('react/jsx-runtime');
|
|
8
8
|
var jsxRuntimeDev = require('react/jsx-dev-runtime');
|
|
9
9
|
var React = require('react');
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var slicedToArray = require('../../dist/slicedToArray-86004d59.cjs.prod.js');
|
|
6
|
-
var raw = require('../../dist/raw-
|
|
6
|
+
var raw = require('../../dist/raw-bac58cc7.cjs.prod.js');
|
|
7
7
|
var ReactJSXRuntime = require('react/jsx-runtime');
|
|
8
8
|
var jsxRuntimeDev = require('react/jsx-dev-runtime');
|
|
9
9
|
var React = require('react');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as _typeof, _ as _slicedToArray } from '../../dist/slicedToArray-0c0a3b4a.esm.js';
|
|
2
|
-
import { s as stegaDecodeStrings, _ as _createForOfIteratorHelper } from '../../dist/raw-
|
|
3
|
-
export { c as attrs, g as getModuleIds, r as raw, b as stegaClean, s as stegaDecodeStrings, a as stegaEncode } from '../../dist/raw-
|
|
2
|
+
import { s as stegaDecodeStrings, _ as _createForOfIteratorHelper } from '../../dist/raw-e561ced7.esm.js';
|
|
3
|
+
export { c as attrs, g as getModuleIds, r as raw, b as stegaClean, s as stegaDecodeStrings, a as stegaEncode } from '../../dist/raw-e561ced7.esm.js';
|
|
4
4
|
import ReactJSXRuntime__default from 'react/jsx-runtime';
|
|
5
5
|
import jsxRuntimeDev__default from 'react/jsx-dev-runtime';
|
|
6
6
|
import React from 'react';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as _typeof, _ as _slicedToArray } from '../../dist/slicedToArray-7d0170b6.worker.esm.js';
|
|
2
|
-
import { s as stegaDecodeStrings, _ as _createForOfIteratorHelper } from '../../dist/raw-
|
|
3
|
-
export { c as attrs, g as getModuleIds, r as raw, b as stegaClean, s as stegaDecodeStrings, a as stegaEncode } from '../../dist/raw-
|
|
2
|
+
import { s as stegaDecodeStrings, _ as _createForOfIteratorHelper } from '../../dist/raw-a20b5f53.worker.esm.js';
|
|
3
|
+
export { c as attrs, g as getModuleIds, r as raw, b as stegaClean, s as stegaDecodeStrings, a as stegaEncode } from '../../dist/raw-a20b5f53.worker.esm.js';
|
|
4
4
|
import ReactJSXRuntime__default from 'react/jsx-runtime';
|
|
5
5
|
import jsxRuntimeDev__default from 'react/jsx-dev-runtime';
|
|
6
6
|
import React from 'react';
|