@valbuild/react 0.110.1 → 0.111.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.
@@ -294,6 +294,12 @@ function stegaEncode(input, opts) {
294
294
  if (recOpts !== null && recOpts !== void 0 && recOpts.schema && isColorSchema(recOpts === null || recOpts === void 0 ? void 0 : recOpts.schema)) {
295
295
  return sourceOrSelector;
296
296
  }
297
+ // Stega weaves invisible characters into the string. In source code they
298
+ // are not invisible: they are syntax errors, or silent corruption in a
299
+ // string literal. So a code value is handed back verbatim.
300
+ if (recOpts !== null && recOpts !== void 0 && recOpts.schema && isCodeSchema(recOpts === null || recOpts === void 0 ? void 0 : recOpts.schema)) {
301
+ return sourceOrSelector;
302
+ }
297
303
  if (recOpts !== null && recOpts !== void 0 && recOpts.schema && isUnionSchema(recOpts === null || recOpts === void 0 ? void 0 : recOpts.schema)) {
298
304
  // Handle tagged union
299
305
  var taggedSchema = resolveTaggedUnionSchema(sourceOrSelector, recOpts.schema);
@@ -407,6 +413,9 @@ function isDateTimeSchema(schema) {
407
413
  function isColorSchema(schema) {
408
414
  return (schema === null || schema === void 0 ? void 0 : schema.type) === "color";
409
415
  }
416
+ function isCodeSchema(schema) {
417
+ return (schema === null || schema === void 0 ? void 0 : schema.type) === "code";
418
+ }
410
419
  function unknownSchema(schema) {
411
420
  console.debug("Found unknown schema", schema);
412
421
  return schema;
@@ -292,6 +292,12 @@ function stegaEncode(input, opts) {
292
292
  if (recOpts !== null && recOpts !== void 0 && recOpts.schema && isColorSchema(recOpts === null || recOpts === void 0 ? void 0 : recOpts.schema)) {
293
293
  return sourceOrSelector;
294
294
  }
295
+ // Stega weaves invisible characters into the string. In source code they
296
+ // are not invisible: they are syntax errors, or silent corruption in a
297
+ // string literal. So a code value is handed back verbatim.
298
+ if (recOpts !== null && recOpts !== void 0 && recOpts.schema && isCodeSchema(recOpts === null || recOpts === void 0 ? void 0 : recOpts.schema)) {
299
+ return sourceOrSelector;
300
+ }
295
301
  if (recOpts !== null && recOpts !== void 0 && recOpts.schema && isUnionSchema(recOpts === null || recOpts === void 0 ? void 0 : recOpts.schema)) {
296
302
  // Handle tagged union
297
303
  var taggedSchema = resolveTaggedUnionSchema(sourceOrSelector, recOpts.schema);
@@ -405,6 +411,9 @@ function isDateTimeSchema(schema) {
405
411
  function isColorSchema(schema) {
406
412
  return (schema === null || schema === void 0 ? void 0 : schema.type) === "color";
407
413
  }
414
+ function isCodeSchema(schema) {
415
+ return (schema === null || schema === void 0 ? void 0 : schema.type) === "code";
416
+ }
408
417
  function unknownSchema(schema) {
409
418
  console.debug("Found unknown schema", schema);
410
419
  return schema;
@@ -294,6 +294,12 @@ function stegaEncode(input, opts) {
294
294
  if (recOpts !== null && recOpts !== void 0 && recOpts.schema && isColorSchema(recOpts === null || recOpts === void 0 ? void 0 : recOpts.schema)) {
295
295
  return sourceOrSelector;
296
296
  }
297
+ // Stega weaves invisible characters into the string. In source code they
298
+ // are not invisible: they are syntax errors, or silent corruption in a
299
+ // string literal. So a code value is handed back verbatim.
300
+ if (recOpts !== null && recOpts !== void 0 && recOpts.schema && isCodeSchema(recOpts === null || recOpts === void 0 ? void 0 : recOpts.schema)) {
301
+ return sourceOrSelector;
302
+ }
297
303
  if (recOpts !== null && recOpts !== void 0 && recOpts.schema && isUnionSchema(recOpts === null || recOpts === void 0 ? void 0 : recOpts.schema)) {
298
304
  // Handle tagged union
299
305
  var taggedSchema = resolveTaggedUnionSchema(sourceOrSelector, recOpts.schema);
@@ -407,6 +413,9 @@ function isDateTimeSchema(schema) {
407
413
  function isColorSchema(schema) {
408
414
  return (schema === null || schema === void 0 ? void 0 : schema.type) === "color";
409
415
  }
416
+ function isCodeSchema(schema) {
417
+ return (schema === null || schema === void 0 ? void 0 : schema.type) === "code";
418
+ }
410
419
  function unknownSchema(schema) {
411
420
  console.debug("Found unknown schema", schema);
412
421
  return schema;
@@ -292,6 +292,12 @@ function stegaEncode(input, opts) {
292
292
  if (recOpts !== null && recOpts !== void 0 && recOpts.schema && isColorSchema(recOpts === null || recOpts === void 0 ? void 0 : recOpts.schema)) {
293
293
  return sourceOrSelector;
294
294
  }
295
+ // Stega weaves invisible characters into the string. In source code they
296
+ // are not invisible: they are syntax errors, or silent corruption in a
297
+ // string literal. So a code value is handed back verbatim.
298
+ if (recOpts !== null && recOpts !== void 0 && recOpts.schema && isCodeSchema(recOpts === null || recOpts === void 0 ? void 0 : recOpts.schema)) {
299
+ return sourceOrSelector;
300
+ }
295
301
  if (recOpts !== null && recOpts !== void 0 && recOpts.schema && isUnionSchema(recOpts === null || recOpts === void 0 ? void 0 : recOpts.schema)) {
296
302
  // Handle tagged union
297
303
  var taggedSchema = resolveTaggedUnionSchema(sourceOrSelector, recOpts.schema);
@@ -405,6 +411,9 @@ function isDateTimeSchema(schema) {
405
411
  function isColorSchema(schema) {
406
412
  return (schema === null || schema === void 0 ? void 0 : schema.type) === "color";
407
413
  }
414
+ function isCodeSchema(schema) {
415
+ return (schema === null || schema === void 0 ? void 0 : schema.type) === "code";
416
+ }
408
417
  function unknownSchema(schema) {
409
418
  console.debug("Found unknown schema", schema);
410
419
  return schema;
@@ -292,6 +292,12 @@ function stegaEncode(input, opts) {
292
292
  if (recOpts !== null && recOpts !== void 0 && recOpts.schema && isColorSchema(recOpts === null || recOpts === void 0 ? void 0 : recOpts.schema)) {
293
293
  return sourceOrSelector;
294
294
  }
295
+ // Stega weaves invisible characters into the string. In source code they
296
+ // are not invisible: they are syntax errors, or silent corruption in a
297
+ // string literal. So a code value is handed back verbatim.
298
+ if (recOpts !== null && recOpts !== void 0 && recOpts.schema && isCodeSchema(recOpts === null || recOpts === void 0 ? void 0 : recOpts.schema)) {
299
+ return sourceOrSelector;
300
+ }
295
301
  if (recOpts !== null && recOpts !== void 0 && recOpts.schema && isUnionSchema(recOpts === null || recOpts === void 0 ? void 0 : recOpts.schema)) {
296
302
  // Handle tagged union
297
303
  var taggedSchema = resolveTaggedUnionSchema(sourceOrSelector, recOpts.schema);
@@ -405,6 +411,9 @@ function isDateTimeSchema(schema) {
405
411
  function isColorSchema(schema) {
406
412
  return (schema === null || schema === void 0 ? void 0 : schema.type) === "color";
407
413
  }
414
+ function isCodeSchema(schema) {
415
+ return (schema === null || schema === void 0 ? void 0 : schema.type) === "code";
416
+ }
408
417
  function unknownSchema(schema) {
409
418
  console.debug("Found unknown schema", schema);
410
419
  return schema;
@@ -1,4 +1,4 @@
1
- import { d as _objectSpread2, r as raw, c as attrs, e as _toConsumableArray } from '../../dist/raw-31c1b7d6.browser.esm.js';
1
+ import { d as _objectSpread2, r as raw, c as attrs, e as _toConsumableArray } from '../../dist/raw-d07598da.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-9e45e445.cjs.dev.js');
5
+ var raw = require('../../dist/raw-97c845bb.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-18eb953f.cjs.prod.js');
5
+ var raw = require('../../dist/raw-cb20d03c.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-628bf5e1.esm.js';
1
+ import { d as _objectSpread2, r as raw, c as attrs, e as _toConsumableArray } from '../../dist/raw-e467df42.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-5a505416.worker.esm.js';
1
+ import { d as _objectSpread2, r as raw, c as attrs, e as _toConsumableArray } from '../../dist/raw-c3e48d09.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.110.1",
3
+ "version": "0.111.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": "^1.1.0",
13
13
  "base64-arraybuffer": "^1.0.2",
14
- "@valbuild/ui": "0.110.1",
15
- "@valbuild/core": "0.110.0",
16
- "@valbuild/shared": "0.110.0"
14
+ "@valbuild/core": "0.111.0",
15
+ "@valbuild/ui": "0.111.0",
16
+ "@valbuild/shared": "0.111.0"
17
17
  },
18
18
  "devDependencies": {
19
19
  "@testing-library/react": "^16.3.3",
@@ -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-31c1b7d6.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-31c1b7d6.browser.esm.js';
2
+ import { s as stegaDecodeStrings, _ as _createForOfIteratorHelper } from '../../dist/raw-d07598da.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-d07598da.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-9e45e445.cjs.dev.js');
6
+ var raw = require('../../dist/raw-97c845bb.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-18eb953f.cjs.prod.js');
6
+ var raw = require('../../dist/raw-cb20d03c.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-628bf5e1.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-628bf5e1.esm.js';
2
+ import { s as stegaDecodeStrings, _ as _createForOfIteratorHelper } from '../../dist/raw-e467df42.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-e467df42.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-5a505416.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-5a505416.worker.esm.js';
2
+ import { s as stegaDecodeStrings, _ as _createForOfIteratorHelper } from '../../dist/raw-c3e48d09.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-c3e48d09.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';