@valbuild/react 0.59.0 → 0.60.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 (45) hide show
  1. package/dist/declarations/src/internal/index.d.ts +0 -1
  2. package/dist/{slicedToArray-11a666de.cjs.dev.js → slicedToArray-129629e4.cjs.dev.js} +11 -0
  3. package/dist/{slicedToArray-c405fbf0.cjs.prod.js → slicedToArray-386a8ae8.cjs.prod.js} +11 -0
  4. package/dist/{slicedToArray-7b69258f.browser.esm.js → slicedToArray-6b2002fa.browser.esm.js} +11 -1
  5. package/dist/{slicedToArray-e7da2c5e.worker.esm.js → slicedToArray-7a63acfd.worker.esm.js} +11 -1
  6. package/dist/{slicedToArray-1dc7d2d6.esm.js → slicedToArray-a79154e9.esm.js} +11 -1
  7. package/internal/dist/valbuild-react-internal.browser.esm.js +0 -1
  8. package/internal/dist/valbuild-react-internal.cjs.dev.js +0 -13
  9. package/internal/dist/valbuild-react-internal.cjs.prod.js +0 -13
  10. package/internal/dist/valbuild-react-internal.esm.js +0 -1
  11. package/internal/dist/valbuild-react-internal.worker.esm.js +0 -1
  12. package/jsx-dev-runtime/dist/valbuild-react-jsx-dev-runtime.browser.esm.js +1 -2
  13. package/jsx-dev-runtime/dist/valbuild-react-jsx-dev-runtime.cjs.dev.js +2 -3
  14. package/jsx-dev-runtime/dist/valbuild-react-jsx-dev-runtime.cjs.prod.js +2 -3
  15. package/jsx-dev-runtime/dist/valbuild-react-jsx-dev-runtime.esm.js +1 -2
  16. package/jsx-dev-runtime/dist/valbuild-react-jsx-dev-runtime.worker.esm.js +1 -2
  17. package/jsx-runtime/dist/valbuild-react-jsx-runtime.browser.esm.js +1 -2
  18. package/jsx-runtime/dist/valbuild-react-jsx-runtime.cjs.dev.js +2 -3
  19. package/jsx-runtime/dist/valbuild-react-jsx-runtime.cjs.prod.js +2 -3
  20. package/jsx-runtime/dist/valbuild-react-jsx-runtime.esm.js +1 -2
  21. package/jsx-runtime/dist/valbuild-react-jsx-runtime.worker.esm.js +1 -2
  22. package/package.json +5 -6
  23. package/stega/dist/valbuild-react-stega.browser.esm.js +1 -2
  24. package/stega/dist/valbuild-react-stega.cjs.dev.js +12 -13
  25. package/stega/dist/valbuild-react-stega.cjs.prod.js +12 -13
  26. package/stega/dist/valbuild-react-stega.esm.js +1 -2
  27. package/stega/dist/valbuild-react-stega.worker.esm.js +1 -2
  28. package/dist/ValProvider-09e313e2.worker.esm.js +0 -87
  29. package/dist/ValProvider-461fa48b.cjs.js +0 -7
  30. package/dist/ValProvider-461fa48b.cjs.prod.js +0 -115
  31. package/dist/ValProvider-a3b1e699.esm.js +0 -92
  32. package/dist/ValProvider-b34afe68.browser.esm.js +0 -92
  33. package/dist/ValProvider-d17e4d13.cjs.dev.js +0 -121
  34. package/dist/ValUI-1922d8db.cjs.dev.js +0 -83
  35. package/dist/ValUI-23e2422b.cjs.js +0 -7
  36. package/dist/ValUI-23e2422b.cjs.prod.js +0 -83
  37. package/dist/ValUI-7d39a3f6.browser.esm.js +0 -79
  38. package/dist/ValUI-84a9cc93.worker.esm.js +0 -79
  39. package/dist/ValUI-8775ef5c.esm.js +0 -79
  40. package/dist/declarations/src/internal/ValProvider.d.ts +0 -17
  41. package/dist/typeof-16428c61.cjs.prod.js +0 -13
  42. package/dist/typeof-9915e135.browser.esm.js +0 -11
  43. package/dist/typeof-a1531d8f.esm.js +0 -11
  44. package/dist/typeof-b568f48f.cjs.dev.js +0 -13
  45. package/dist/typeof-e0c837cc.worker.esm.js +0 -11
@@ -1,79 +0,0 @@
1
- 'use client';
2
- import { VAL_CSS_PATH, ValOverlay } from '@valbuild/ui';
3
- import { _ as _slicedToArray } from './slicedToArray-7b69258f.browser.esm.js';
4
- import { useRef, useState, useLayoutEffect } from 'react';
5
- import { createPortal } from 'react-dom';
6
- import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
7
- import { useValApi, useValStore } from './ValProvider-b34afe68.browser.esm.js';
8
- import './unsupportedIterableToArray-cce3cb41.browser.esm.js';
9
-
10
- function ShadowContent(_ref) {
11
- var root = _ref.root,
12
- children = _ref.children;
13
- return /*#__PURE__*/createPortal(children, root);
14
- }
15
- var ShadowRoot = function ShadowRoot(_ref2) {
16
- var children = _ref2.children,
17
- style = _ref2.style;
18
- var node = useRef(null);
19
- var _useState = useState(null),
20
- _useState2 = _slicedToArray(_useState, 2),
21
- root = _useState2[0],
22
- setRoot = _useState2[1];
23
- useLayoutEffect(function () {
24
- if (node.current) {
25
- if (node.current.shadowRoot) {
26
- setRoot(node.current.shadowRoot);
27
- } else {
28
- var _root = node.current.attachShadow({
29
- mode: "open"
30
- });
31
- setRoot(_root);
32
- }
33
- }
34
- }, []);
35
- return /*#__PURE__*/jsx("div", {
36
- ref: node,
37
- style: style,
38
- id: "val-ui",
39
- children: root && /*#__PURE__*/jsx(ShadowContent, {
40
- root: root,
41
- children: children
42
- })
43
- });
44
- };
45
-
46
- function ValUI(props) {
47
- var api = useValApi();
48
- var store = useValStore();
49
- if (!api || !store) {
50
- return null;
51
- }
52
- return /*#__PURE__*/jsx(Fragment, {
53
- children: /*#__PURE__*/jsxs(ShadowRoot, {
54
- children: [/*#__PURE__*/jsx("link", {
55
- rel: "preconnect",
56
- href: "https://fonts.googleapis.com"
57
- }), /*#__PURE__*/jsx("link", {
58
- rel: "preconnect",
59
- href: "https://fonts.gstatic.com",
60
- crossOrigin: "anonymous"
61
- }), /*#__PURE__*/jsx("link", {
62
- href: "https://fonts.googleapis.com/css2?family=Space+Mono:ital,wght@0,400;0,700;1,400&display=swap",
63
- rel: "stylesheet"
64
- }), /*#__PURE__*/jsx("link", {
65
- href: "https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;1,100;1,300;1,400;1,500;1,700&family=Space+Mono:ital,wght@0,400;0,700;1,400&display=swap",
66
- rel: "stylesheet"
67
- }), /*#__PURE__*/jsx("link", {
68
- rel: "stylesheet",
69
- href: "".concat(props.host || "/api/val", "/static").concat(VAL_CSS_PATH)
70
- }), /*#__PURE__*/jsx(ValOverlay, {
71
- api: api,
72
- store: store,
73
- onSubmit: props.onSubmit
74
- })]
75
- })
76
- });
77
- }
78
-
79
- export { ValUI as default };
@@ -1,79 +0,0 @@
1
- 'use client';
2
- import { VAL_CSS_PATH, ValOverlay } from '@valbuild/ui';
3
- import { _ as _slicedToArray } from './slicedToArray-e7da2c5e.worker.esm.js';
4
- import { useRef, useState, useLayoutEffect } from 'react';
5
- import { createPortal } from 'react-dom';
6
- import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
7
- import { useValApi, useValStore } from './ValProvider-09e313e2.worker.esm.js';
8
- import './unsupportedIterableToArray-50359a05.worker.esm.js';
9
-
10
- function ShadowContent(_ref) {
11
- var root = _ref.root,
12
- children = _ref.children;
13
- return /*#__PURE__*/createPortal(children, root);
14
- }
15
- var ShadowRoot = function ShadowRoot(_ref2) {
16
- var children = _ref2.children,
17
- style = _ref2.style;
18
- var node = useRef(null);
19
- var _useState = useState(null),
20
- _useState2 = _slicedToArray(_useState, 2),
21
- root = _useState2[0],
22
- setRoot = _useState2[1];
23
- useLayoutEffect(function () {
24
- if (node.current) {
25
- if (node.current.shadowRoot) {
26
- setRoot(node.current.shadowRoot);
27
- } else {
28
- var _root = node.current.attachShadow({
29
- mode: "open"
30
- });
31
- setRoot(_root);
32
- }
33
- }
34
- }, []);
35
- return /*#__PURE__*/jsx("div", {
36
- ref: node,
37
- style: style,
38
- id: "val-ui",
39
- children: root && /*#__PURE__*/jsx(ShadowContent, {
40
- root: root,
41
- children: children
42
- })
43
- });
44
- };
45
-
46
- function ValUI(props) {
47
- var api = useValApi();
48
- var store = useValStore();
49
- if (!api || !store) {
50
- return null;
51
- }
52
- return /*#__PURE__*/jsx(Fragment, {
53
- children: /*#__PURE__*/jsxs(ShadowRoot, {
54
- children: [/*#__PURE__*/jsx("link", {
55
- rel: "preconnect",
56
- href: "https://fonts.googleapis.com"
57
- }), /*#__PURE__*/jsx("link", {
58
- rel: "preconnect",
59
- href: "https://fonts.gstatic.com",
60
- crossOrigin: "anonymous"
61
- }), /*#__PURE__*/jsx("link", {
62
- href: "https://fonts.googleapis.com/css2?family=Space+Mono:ital,wght@0,400;0,700;1,400&display=swap",
63
- rel: "stylesheet"
64
- }), /*#__PURE__*/jsx("link", {
65
- href: "https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;1,100;1,300;1,400;1,500;1,700&family=Space+Mono:ital,wght@0,400;0,700;1,400&display=swap",
66
- rel: "stylesheet"
67
- }), /*#__PURE__*/jsx("link", {
68
- rel: "stylesheet",
69
- href: "".concat(props.host || "/api/val", "/static").concat(VAL_CSS_PATH)
70
- }), /*#__PURE__*/jsx(ValOverlay, {
71
- api: api,
72
- store: store,
73
- onSubmit: props.onSubmit
74
- })]
75
- })
76
- });
77
- }
78
-
79
- export { ValUI as default };
@@ -1,79 +0,0 @@
1
- 'use client';
2
- import { VAL_CSS_PATH, ValOverlay } from '@valbuild/ui';
3
- import { _ as _slicedToArray } from './slicedToArray-1dc7d2d6.esm.js';
4
- import { useRef, useState, useLayoutEffect } from 'react';
5
- import { createPortal } from 'react-dom';
6
- import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
7
- import { useValApi, useValStore } from './ValProvider-a3b1e699.esm.js';
8
- import './unsupportedIterableToArray-7c30dadf.esm.js';
9
-
10
- function ShadowContent(_ref) {
11
- var root = _ref.root,
12
- children = _ref.children;
13
- return /*#__PURE__*/createPortal(children, root);
14
- }
15
- var ShadowRoot = function ShadowRoot(_ref2) {
16
- var children = _ref2.children,
17
- style = _ref2.style;
18
- var node = useRef(null);
19
- var _useState = useState(null),
20
- _useState2 = _slicedToArray(_useState, 2),
21
- root = _useState2[0],
22
- setRoot = _useState2[1];
23
- useLayoutEffect(function () {
24
- if (node.current) {
25
- if (node.current.shadowRoot) {
26
- setRoot(node.current.shadowRoot);
27
- } else {
28
- var _root = node.current.attachShadow({
29
- mode: "open"
30
- });
31
- setRoot(_root);
32
- }
33
- }
34
- }, []);
35
- return /*#__PURE__*/jsx("div", {
36
- ref: node,
37
- style: style,
38
- id: "val-ui",
39
- children: root && /*#__PURE__*/jsx(ShadowContent, {
40
- root: root,
41
- children: children
42
- })
43
- });
44
- };
45
-
46
- function ValUI(props) {
47
- var api = useValApi();
48
- var store = useValStore();
49
- if (!api || !store) {
50
- return null;
51
- }
52
- return /*#__PURE__*/jsx(Fragment, {
53
- children: /*#__PURE__*/jsxs(ShadowRoot, {
54
- children: [/*#__PURE__*/jsx("link", {
55
- rel: "preconnect",
56
- href: "https://fonts.googleapis.com"
57
- }), /*#__PURE__*/jsx("link", {
58
- rel: "preconnect",
59
- href: "https://fonts.gstatic.com",
60
- crossOrigin: "anonymous"
61
- }), /*#__PURE__*/jsx("link", {
62
- href: "https://fonts.googleapis.com/css2?family=Space+Mono:ital,wght@0,400;0,700;1,400&display=swap",
63
- rel: "stylesheet"
64
- }), /*#__PURE__*/jsx("link", {
65
- href: "https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;1,100;1,300;1,400;1,500;1,700&family=Space+Mono:ital,wght@0,400;0,700;1,400&display=swap",
66
- rel: "stylesheet"
67
- }), /*#__PURE__*/jsx("link", {
68
- rel: "stylesheet",
69
- href: "".concat(props.host || "/api/val", "/static").concat(VAL_CSS_PATH)
70
- }), /*#__PURE__*/jsx(ValOverlay, {
71
- api: api,
72
- store: store,
73
- onSubmit: props.onSubmit
74
- })]
75
- })
76
- });
77
- }
78
-
79
- export { ValUI as default };
@@ -1,17 +0,0 @@
1
- import React from "react";
2
- import { ValApi } from "@valbuild/core";
3
- import { ValStore } from "@valbuild/shared/internal";
4
- export declare const useValStore: () => ValStore | undefined;
5
- export type UseValStore = typeof useValStore;
6
- export declare const useValApi: () => any;
7
- export type UseValApi = typeof useValApi;
8
- export type ValContext = {
9
- readonly valStore?: ValStore;
10
- readonly valApi?: ValApi;
11
- };
12
- export declare const ValContext: React.Context<ValContext> | undefined;
13
- export type ValProviderProps = {
14
- children?: React.ReactNode;
15
- onSubmit: (refreshRequired: boolean) => void;
16
- };
17
- export declare function ValProvider({ children, onSubmit }: ValProviderProps): import("react/jsx-runtime").JSX.Element;
@@ -1,13 +0,0 @@
1
- 'use strict';
2
-
3
- function _typeof(o) {
4
- "@babel/helpers - typeof";
5
-
6
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
7
- return typeof o;
8
- } : function (o) {
9
- return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
10
- }, _typeof(o);
11
- }
12
-
13
- exports._typeof = _typeof;
@@ -1,11 +0,0 @@
1
- function _typeof(o) {
2
- "@babel/helpers - typeof";
3
-
4
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
5
- return typeof o;
6
- } : function (o) {
7
- return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
8
- }, _typeof(o);
9
- }
10
-
11
- export { _typeof as _ };
@@ -1,11 +0,0 @@
1
- function _typeof(o) {
2
- "@babel/helpers - typeof";
3
-
4
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
5
- return typeof o;
6
- } : function (o) {
7
- return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
8
- }, _typeof(o);
9
- }
10
-
11
- export { _typeof as _ };
@@ -1,13 +0,0 @@
1
- 'use strict';
2
-
3
- function _typeof(o) {
4
- "@babel/helpers - typeof";
5
-
6
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
7
- return typeof o;
8
- } : function (o) {
9
- return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
10
- }, _typeof(o);
11
- }
12
-
13
- exports._typeof = _typeof;
@@ -1,11 +0,0 @@
1
- function _typeof(o) {
2
- "@babel/helpers - typeof";
3
-
4
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
5
- return typeof o;
6
- } : function (o) {
7
- return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
8
- }, _typeof(o);
9
- }
10
-
11
- export { _typeof as _ };