@valbuild/react 0.58.0 → 0.60.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/internal/index.d.ts +0 -1
- package/dist/{slicedToArray-11a666de.cjs.dev.js → slicedToArray-129629e4.cjs.dev.js} +11 -0
- package/dist/{slicedToArray-c405fbf0.cjs.prod.js → slicedToArray-386a8ae8.cjs.prod.js} +11 -0
- package/dist/{slicedToArray-7b69258f.browser.esm.js → slicedToArray-6b2002fa.browser.esm.js} +11 -1
- package/dist/{slicedToArray-e7da2c5e.worker.esm.js → slicedToArray-7a63acfd.worker.esm.js} +11 -1
- package/dist/{slicedToArray-1dc7d2d6.esm.js → slicedToArray-a79154e9.esm.js} +11 -1
- package/dist/toConsumableArray-0a75a603.worker.esm.js +19 -0
- package/dist/toConsumableArray-0ccd58b7.esm.js +19 -0
- package/dist/toConsumableArray-5a71fbb3.browser.esm.js +19 -0
- package/dist/toConsumableArray-b2d28ffa.cjs.dev.js +21 -0
- package/dist/toConsumableArray-b5e3b83f.cjs.prod.js +21 -0
- package/internal/dist/valbuild-react-internal.browser.esm.js +2 -18
- package/internal/dist/valbuild-react-internal.cjs.dev.js +3 -31
- package/internal/dist/valbuild-react-internal.cjs.prod.js +3 -31
- package/internal/dist/valbuild-react-internal.esm.js +2 -18
- package/internal/dist/valbuild-react-internal.worker.esm.js +2 -18
- package/jsx-dev-runtime/dist/valbuild-react-jsx-dev-runtime.browser.esm.js +1 -2
- package/jsx-dev-runtime/dist/valbuild-react-jsx-dev-runtime.cjs.dev.js +2 -3
- package/jsx-dev-runtime/dist/valbuild-react-jsx-dev-runtime.cjs.prod.js +2 -3
- package/jsx-dev-runtime/dist/valbuild-react-jsx-dev-runtime.esm.js +1 -2
- package/jsx-dev-runtime/dist/valbuild-react-jsx-dev-runtime.worker.esm.js +1 -2
- package/jsx-runtime/dist/valbuild-react-jsx-runtime.browser.esm.js +1 -2
- package/jsx-runtime/dist/valbuild-react-jsx-runtime.cjs.dev.js +2 -3
- package/jsx-runtime/dist/valbuild-react-jsx-runtime.cjs.prod.js +2 -3
- package/jsx-runtime/dist/valbuild-react-jsx-runtime.esm.js +1 -2
- package/jsx-runtime/dist/valbuild-react-jsx-runtime.worker.esm.js +1 -2
- package/package.json +5 -6
- package/stega/dist/valbuild-react-stega.browser.esm.js +53 -8
- package/stega/dist/valbuild-react-stega.cjs.dev.js +64 -19
- package/stega/dist/valbuild-react-stega.cjs.prod.js +64 -19
- package/stega/dist/valbuild-react-stega.esm.js +53 -8
- package/stega/dist/valbuild-react-stega.worker.esm.js +53 -8
- package/dist/ValProvider-47b779dc.esm.js +0 -689
- package/dist/ValProvider-48e6e607.browser.esm.js +0 -689
- package/dist/ValProvider-5b6a05e9.cjs.js +0 -7
- package/dist/ValProvider-5b6a05e9.cjs.prod.js +0 -712
- package/dist/ValProvider-7c2a7439.worker.esm.js +0 -684
- package/dist/ValProvider-87161e66.cjs.dev.js +0 -718
- package/dist/ValUI-1922d8db.cjs.dev.js +0 -83
- package/dist/ValUI-23e2422b.cjs.js +0 -7
- package/dist/ValUI-23e2422b.cjs.prod.js +0 -83
- package/dist/ValUI-7d39a3f6.browser.esm.js +0 -79
- package/dist/ValUI-84a9cc93.worker.esm.js +0 -79
- package/dist/ValUI-8775ef5c.esm.js +0 -79
- package/dist/declarations/src/internal/ValProvider.d.ts +0 -17
- package/dist/declarations/src/internal/ValStore.d.ts +0 -16
- package/dist/defineProperty-6ed7deb7.browser.esm.js +0 -32
- package/dist/defineProperty-82fbeafc.worker.esm.js +0 -32
- package/dist/defineProperty-9bf3d0c0.esm.js +0 -32
- package/dist/defineProperty-c84f9aba.cjs.dev.js +0 -35
- package/dist/defineProperty-f8fe5660.cjs.prod.js +0 -35
- package/dist/typeof-16428c61.cjs.prod.js +0 -13
- package/dist/typeof-9915e135.browser.esm.js +0 -11
- package/dist/typeof-a1531d8f.esm.js +0 -11
- package/dist/typeof-b568f48f.cjs.dev.js +0 -13
- package/dist/typeof-e0c837cc.worker.esm.js +0 -11
@@ -1,10 +1,9 @@
|
|
1
|
-
import { _ as _slicedToArray } from '../../dist/slicedToArray-
|
2
|
-
import { _ as _typeof } from '../../dist/typeof-e0c837cc.worker.esm.js';
|
1
|
+
import { a as _typeof, _ as _slicedToArray } from '../../dist/slicedToArray-7a63acfd.worker.esm.js';
|
3
2
|
import ReactJSXRuntime__default from 'react/jsx-runtime';
|
4
3
|
import jsxRuntimeDev__default from 'react/jsx-dev-runtime';
|
5
4
|
import React from 'react';
|
6
5
|
import { vercelStegaDecode, VERCEL_STEGA_REGEX, vercelStegaSplit, vercelStegaCombine } from '@vercel/stega';
|
7
|
-
import { _ as
|
6
|
+
import { _ as _toConsumableArray } from '../../dist/toConsumableArray-0a75a603.worker.esm.js';
|
8
7
|
import { Internal, VAL_EXTENSION, FILE_REF_PROP } from '@valbuild/core';
|
9
8
|
import { parseRichTextSource } from '@valbuild/shared/internal';
|
10
9
|
import '../../dist/unsupportedIterableToArray-50359a05.worker.esm.js';
|
@@ -104,6 +103,37 @@ function autoTagJSX() {
|
|
104
103
|
JsxPro.jsxDEV && ( /**/JsxPro.jsxDEV = WrapJsx(JsxPro.jsxDEV));
|
105
104
|
}
|
106
105
|
|
106
|
+
function toPrimitive(t, r) {
|
107
|
+
if ("object" != typeof t || !t) return t;
|
108
|
+
var e = t[Symbol.toPrimitive];
|
109
|
+
if (void 0 !== e) {
|
110
|
+
var i = e.call(t, r || "default");
|
111
|
+
if ("object" != typeof i) return i;
|
112
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
113
|
+
}
|
114
|
+
return ("string" === r ? String : Number)(t);
|
115
|
+
}
|
116
|
+
|
117
|
+
function toPropertyKey(t) {
|
118
|
+
var i = toPrimitive(t, "string");
|
119
|
+
return "symbol" == typeof i ? i : String(i);
|
120
|
+
}
|
121
|
+
|
122
|
+
function _defineProperty(obj, key, value) {
|
123
|
+
key = toPropertyKey(key);
|
124
|
+
if (key in obj) {
|
125
|
+
Object.defineProperty(obj, key, {
|
126
|
+
value: value,
|
127
|
+
enumerable: true,
|
128
|
+
configurable: true,
|
129
|
+
writable: true
|
130
|
+
});
|
131
|
+
} else {
|
132
|
+
obj[key] = value;
|
133
|
+
}
|
134
|
+
return obj;
|
135
|
+
}
|
136
|
+
|
107
137
|
function ownKeys(e, r) {
|
108
138
|
var t = Object.keys(e);
|
109
139
|
if (Object.getOwnPropertySymbols) {
|
@@ -137,8 +167,11 @@ function _objectSpread2(e) {
|
|
137
167
|
|
138
168
|
function stegaEncode(input, opts) {
|
139
169
|
function rec(sourceOrSelector, recOpts) {
|
170
|
+
if (recOpts !== null && recOpts !== void 0 && recOpts.schema && isLiteralSchema(recOpts === null || recOpts === void 0 ? void 0 : recOpts.schema)) {
|
171
|
+
return sourceOrSelector;
|
172
|
+
}
|
140
173
|
if (recOpts !== null && recOpts !== void 0 && recOpts.schema && isUnionSchema(recOpts === null || recOpts === void 0 ? void 0 : recOpts.schema)) {
|
141
|
-
if (sourceOrSelector && _typeof(sourceOrSelector) === "object" && recOpts.schema.key) {
|
174
|
+
if (sourceOrSelector && _typeof(sourceOrSelector) === "object" && recOpts.schema.key && typeof recOpts.schema.key === "string") {
|
142
175
|
var _key = sourceOrSelector[recOpts.schema.key];
|
143
176
|
if (_key) {
|
144
177
|
var schema = recOpts.schema.items.find(function (s) {
|
@@ -163,11 +196,17 @@ function stegaEncode(input, opts) {
|
|
163
196
|
});
|
164
197
|
}
|
165
198
|
}
|
166
|
-
|
199
|
+
// illegal value, return as is
|
200
|
+
return sourceOrSelector;
|
201
|
+
}
|
202
|
+
if (typeof sourceOrSelector === "string" && recOpts.schema.key && typeof recOpts.schema.key !== "string") {
|
203
|
+
var _ref;
|
167
204
|
return rec(sourceOrSelector, {
|
168
205
|
path: recOpts.path,
|
169
|
-
schema: recOpts.schema.items.find(function (s) {
|
170
|
-
|
206
|
+
schema: (_ref = [recOpts.schema.key]).concat.apply(_ref, _toConsumableArray(recOpts.schema.items)).find(function (s) {
|
207
|
+
if (isLiteralSchema(s)) {
|
208
|
+
return s.value === sourceOrSelector;
|
209
|
+
}
|
171
210
|
})
|
172
211
|
});
|
173
212
|
}
|
@@ -195,8 +234,14 @@ function stegaEncode(input, opts) {
|
|
195
234
|
}
|
196
235
|
if (sourceOrSelector[VAL_EXTENSION] === "file" && typeof sourceOrSelector[FILE_REF_PROP] === "string") {
|
197
236
|
var fileSelector = Internal.convertFileSource(sourceOrSelector);
|
237
|
+
var url = fileSelector.url;
|
238
|
+
if (opts.disabled) {
|
239
|
+
url = fileSelector.url;
|
240
|
+
} else {
|
241
|
+
url = "/api/val/files/public" + fileSelector.url;
|
242
|
+
}
|
198
243
|
return _objectSpread2(_objectSpread2({}, fileSelector), {}, {
|
199
|
-
url: rec(
|
244
|
+
url: rec(url, recOpts)
|
200
245
|
});
|
201
246
|
}
|
202
247
|
console.error("Encountered unexpected extension: ".concat(sourceOrSelector[VAL_EXTENSION]));
|