@builder.io/react 3.0.1 → 3.0.2-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/builder-react-lite.cjs.js +1 -1
- package/dist/builder-react-lite.esm.js +1 -1
- package/dist/builder-react.browser.js +1 -1
- package/dist/builder-react.cjs.js +1 -1
- package/dist/builder-react.unpkg.js +1 -1
- package/dist/lib/package.json +3 -3
- package/dist/lib/rollup.config.js +23 -29
- package/dist/lib/rollup.config.js.map +1 -1
- package/dist/lib/src/blocks/Button.js +7 -13
- package/dist/lib/src/blocks/Button.js.map +1 -1
- package/dist/lib/src/blocks/Columns.js +15 -21
- package/dist/lib/src/blocks/Columns.js.map +1 -1
- package/dist/lib/src/blocks/CustomCode.js +13 -19
- package/dist/lib/src/blocks/CustomCode.js.map +1 -1
- package/dist/lib/src/blocks/Embed.js +7 -13
- package/dist/lib/src/blocks/Embed.js.map +1 -1
- package/dist/lib/src/blocks/Fragment.js +6 -12
- package/dist/lib/src/blocks/Fragment.js.map +1 -1
- package/dist/lib/src/blocks/Image.js +30 -39
- package/dist/lib/src/blocks/Image.js.map +1 -1
- package/dist/lib/src/blocks/Mutation.js +10 -17
- package/dist/lib/src/blocks/Mutation.js.map +1 -1
- package/dist/lib/src/blocks/Router.js +18 -24
- package/dist/lib/src/blocks/Router.js.map +1 -1
- package/dist/lib/src/blocks/Section.js +9 -15
- package/dist/lib/src/blocks/Section.js.map +1 -1
- package/dist/lib/src/blocks/Slot.js +10 -14
- package/dist/lib/src/blocks/Slot.js.map +1 -1
- package/dist/lib/src/blocks/StateProvider.js +8 -14
- package/dist/lib/src/blocks/StateProvider.js.map +1 -1
- package/dist/lib/src/blocks/Symbol.js +21 -27
- package/dist/lib/src/blocks/Symbol.js.map +1 -1
- package/dist/lib/src/blocks/Text.js +14 -20
- package/dist/lib/src/blocks/Text.js.map +1 -1
- package/dist/lib/src/blocks/Video.js +15 -21
- package/dist/lib/src/blocks/Video.js.map +1 -1
- package/dist/lib/src/blocks/forms/Button.js +5 -11
- package/dist/lib/src/blocks/forms/Button.js.map +1 -1
- package/dist/lib/src/blocks/forms/Form.js +22 -28
- package/dist/lib/src/blocks/forms/Form.js.map +1 -1
- package/dist/lib/src/blocks/forms/Input.js +6 -12
- package/dist/lib/src/blocks/forms/Input.js.map +1 -1
- package/dist/lib/src/blocks/forms/Label.js +8 -14
- package/dist/lib/src/blocks/forms/Label.js.map +1 -1
- package/dist/lib/src/blocks/forms/Select.js +7 -13
- package/dist/lib/src/blocks/forms/Select.js.map +1 -1
- package/dist/lib/src/blocks/forms/TextArea.js +5 -11
- package/dist/lib/src/blocks/forms/TextArea.js.map +1 -1
- package/dist/lib/src/blocks/raw/Img.js +5 -11
- package/dist/lib/src/blocks/raw/Img.js.map +1 -1
- package/dist/lib/src/blocks/raw/RawText.js +4 -31
- package/dist/lib/src/blocks/raw/RawText.js.map +1 -1
- package/dist/lib/src/builder-react-lite.js +17 -30
- package/dist/lib/src/builder-react-lite.js.map +1 -1
- package/dist/lib/src/builder-react.js +44 -98
- package/dist/lib/src/builder-react.js.map +1 -1
- package/dist/lib/src/components/Link.js +4 -11
- package/dist/lib/src/components/Link.js.map +1 -1
- package/dist/lib/src/components/builder-block.component.js +46 -52
- package/dist/lib/src/components/builder-block.component.js.map +1 -1
- package/dist/lib/src/components/builder-blocks.component.js +16 -22
- package/dist/lib/src/components/builder-blocks.component.js.map +1 -1
- package/dist/lib/src/components/builder-component.component.js +102 -108
- package/dist/lib/src/components/builder-component.component.js.map +1 -1
- package/dist/lib/src/components/builder-content.component.js +31 -38
- package/dist/lib/src/components/builder-content.component.js.map +1 -1
- package/dist/lib/src/components/insert-spacer.component.js +11 -17
- package/dist/lib/src/components/insert-spacer.component.js.map +1 -1
- package/dist/lib/src/components/no-wrap.js +1 -5
- package/dist/lib/src/components/no-wrap.js.map +1 -1
- package/dist/lib/src/components/variants-provider.component.js +9 -36
- package/dist/lib/src/components/variants-provider.component.js.map +1 -1
- package/dist/lib/src/constants/device-sizes.constant.js +5 -9
- package/dist/lib/src/constants/device-sizes.constant.js.map +1 -1
- package/dist/lib/src/decorators/builder-block.decorator.js +3 -7
- package/dist/lib/src/decorators/builder-block.decorator.js.map +1 -1
- package/dist/lib/src/functions/apply-patch-with-mutation.js +1 -5
- package/dist/lib/src/functions/apply-patch-with-mutation.js.map +1 -1
- package/dist/lib/src/functions/apply-patch-with-mutation.test.js +4 -6
- package/dist/lib/src/functions/apply-patch-with-mutation.test.js.map +1 -1
- package/dist/lib/src/functions/block-to-html-string.js +5 -10
- package/dist/lib/src/functions/block-to-html-string.js.map +1 -1
- package/dist/lib/src/functions/debonce-next-tick.js +3 -7
- package/dist/lib/src/functions/debonce-next-tick.js.map +1 -1
- package/dist/lib/src/functions/get-builder-pixel.js +1 -5
- package/dist/lib/src/functions/get-builder-pixel.js.map +1 -1
- package/dist/lib/src/functions/get.js +1 -5
- package/dist/lib/src/functions/get.js.map +1 -1
- package/dist/lib/src/functions/no-wrap.js +4 -11
- package/dist/lib/src/functions/no-wrap.js.map +1 -1
- package/dist/lib/src/functions/safe-dynamic-require.js +8 -8
- package/dist/lib/src/functions/safe-dynamic-require.js.map +1 -1
- package/dist/lib/src/functions/set.js +1 -5
- package/dist/lib/src/functions/set.js.map +1 -1
- package/dist/lib/src/functions/string-to-function.js +11 -16
- package/dist/lib/src/functions/string-to-function.js.map +1 -1
- package/dist/lib/src/functions/throttle.js +1 -5
- package/dist/lib/src/functions/throttle.js.map +1 -1
- package/dist/lib/src/functions/try-eval.js +8 -12
- package/dist/lib/src/functions/try-eval.js.map +1 -1
- package/dist/lib/src/functions/update-metadata.js +5 -9
- package/dist/lib/src/functions/update-metadata.js.map +1 -1
- package/dist/lib/src/functions/utils.js +1 -5
- package/dist/lib/src/functions/utils.js.map +1 -1
- package/dist/lib/src/functions/with-builder.js +3 -7
- package/dist/lib/src/functions/with-builder.js.map +1 -1
- package/dist/lib/src/functions/with-children.js +6 -13
- package/dist/lib/src/functions/with-children.js.map +1 -1
- package/dist/lib/src/hooks/useIsPreviewing.js +6 -10
- package/dist/lib/src/hooks/useIsPreviewing.js.map +1 -1
- package/dist/lib/src/scripts/init-editing.js +2 -4
- package/dist/lib/src/scripts/init-editing.js.map +1 -1
- package/dist/lib/src/store/builder-async-requests.js +4 -12
- package/dist/lib/src/store/builder-async-requests.js.map +1 -1
- package/dist/lib/src/store/builder-meta.js +2 -8
- package/dist/lib/src/store/builder-meta.js.map +1 -1
- package/dist/lib/src/store/builder-store.js +2 -8
- package/dist/lib/src/store/builder-store.js.map +1 -1
- package/dist/lib/src/to-error.js +1 -5
- package/dist/lib/src/to-error.js.map +1 -1
- package/dist/lib/test/basic.test.js +49 -74
- package/dist/lib/test/basic.test.js.map +1 -1
- package/dist/lib/test/functions/render-block.js +3 -8
- package/dist/lib/test/functions/render-block.js.map +1 -1
- package/dist/lib/test/image.test.js +14 -39
- package/dist/lib/test/image.test.js.map +1 -1
- package/package.json +5 -4
- package/rollup.config.ts +0 -1
- package/dist/builder-react.es5.js +0 -2
- package/dist/builder-react.es5.js.map +0 -1
|
@@ -1,38 +1,11 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
'use client';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
-
}
|
|
9
|
-
Object.defineProperty(o, k2, desc);
|
|
10
|
-
}) : (function(o, m, k, k2) {
|
|
11
|
-
if (k2 === undefined) k2 = k;
|
|
12
|
-
o[k2] = m[k];
|
|
13
|
-
}));
|
|
14
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
-
}) : function(o, v) {
|
|
17
|
-
o["default"] = v;
|
|
18
|
-
});
|
|
19
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
20
|
-
if (mod && mod.__esModule) return mod;
|
|
21
|
-
var result = {};
|
|
22
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
23
|
-
__setModuleDefault(result, mod);
|
|
24
|
-
return result;
|
|
25
|
-
};
|
|
26
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
-
exports.RawText = void 0;
|
|
28
|
-
var React = __importStar(require("react"));
|
|
29
|
-
var sdk_1 = require("@builder.io/sdk");
|
|
30
|
-
var RawText = function (props) {
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { Builder } from '@builder.io/sdk';
|
|
4
|
+
export var RawText = function (props) {
|
|
31
5
|
var attributes = props.attributes || {};
|
|
32
6
|
return (React.createElement("span", { className: (attributes === null || attributes === void 0 ? void 0 : attributes.class) || (attributes === null || attributes === void 0 ? void 0 : attributes.className), dangerouslySetInnerHTML: { __html: props.text || '' } }));
|
|
33
7
|
};
|
|
34
|
-
|
|
35
|
-
sdk_1.Builder.registerComponent(exports.RawText, {
|
|
8
|
+
Builder.registerComponent(RawText, {
|
|
36
9
|
name: 'Builder:RawText',
|
|
37
10
|
hideFromInsertMenu: true,
|
|
38
11
|
inputs: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RawText.js","sourceRoot":"","sources":["../../../../../src/blocks/raw/RawText.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RawText.js","sourceRoot":"","sources":["../../../../../src/blocks/raw/RawText.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;AACb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAkB,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAQ1D,MAAM,CAAC,IAAM,OAAO,GAAG,UAAC,KAAmB;IACzC,IAAM,UAAU,GAAG,KAAK,CAAC,UAAU,IAAI,EAAE,CAAC;IAC1C,OAAO,CACL,8BACE,SAAS,EAAE,CAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,KAAK,MAAI,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,SAAS,CAAA,EACrD,uBAAuB,EAAE,EAAE,MAAM,EAAE,KAAK,CAAC,IAAI,IAAI,EAAE,EAAE,GACrD,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,OAAO,CAAC,iBAAiB,CAAC,OAAO,EAAE;IACjC,IAAI,EAAE,iBAAiB;IACvB,kBAAkB,EAAE,IAAI;IACxB,MAAM,EAAE;QACN;YACE,IAAI,EAAE,MAAM;YACZ,MAAM,EAAE,IAAI;YACZ,IAAI,EAAE,UAAU;YAChB,QAAQ,EAAE,IAAI;SACf;KACF;CACF,CAAC,CAAC"}
|
|
@@ -1,31 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
var builder_store_1 = require("./store/builder-store");
|
|
19
|
-
Object.defineProperty(exports, "BuilderStoreContext", { enumerable: true, get: function () { return builder_store_1.BuilderStoreContext; } });
|
|
20
|
-
var builder_meta_1 = require("./store/builder-meta");
|
|
21
|
-
Object.defineProperty(exports, "BuilderMetaContext", { enumerable: true, get: function () { return builder_meta_1.BuilderMetaContext; } });
|
|
22
|
-
var builder_async_requests_1 = require("./store/builder-async-requests");
|
|
23
|
-
Object.defineProperty(exports, "BuilderAsyncRequestsContext", { enumerable: true, get: function () { return builder_async_requests_1.BuilderAsyncRequestsContext; } });
|
|
24
|
-
var with_children_1 = require("./functions/with-children");
|
|
25
|
-
Object.defineProperty(exports, "withChildren", { enumerable: true, get: function () { return with_children_1.withChildren; } });
|
|
26
|
-
var string_to_function_1 = require("./functions/string-to-function");
|
|
27
|
-
Object.defineProperty(exports, "stringToFunction", { enumerable: true, get: function () { return string_to_function_1.stringToFunction; } });
|
|
28
|
-
var useIsPreviewing_1 = require("./hooks/useIsPreviewing");
|
|
29
|
-
Object.defineProperty(exports, "useIsPreviewing", { enumerable: true, get: function () { return useIsPreviewing_1.useIsPreviewing; } });
|
|
30
|
-
exports.default = sdk_1.builder;
|
|
1
|
+
import './scripts/init-editing';
|
|
2
|
+
import { builder, Builder } from '@builder.io/sdk';
|
|
3
|
+
Builder.isReact = true;
|
|
4
|
+
export { BuilderBlocks } from './components/builder-blocks.component';
|
|
5
|
+
export { BuilderBlock as BuilderBlockComponent } from './components/builder-block.component';
|
|
6
|
+
export { BuilderContent } from './components/builder-content.component';
|
|
7
|
+
import { BuilderComponent } from './components/builder-component.component';
|
|
8
|
+
export { BuilderStoreContext } from './store/builder-store';
|
|
9
|
+
export { BuilderMetaContext } from './store/builder-meta';
|
|
10
|
+
export { BuilderAsyncRequestsContext } from './store/builder-async-requests';
|
|
11
|
+
export { withChildren } from './functions/with-children';
|
|
12
|
+
export { BuilderComponent as BuilderPage };
|
|
13
|
+
export { BuilderComponent };
|
|
14
|
+
export { stringToFunction } from './functions/string-to-function';
|
|
15
|
+
export { useIsPreviewing } from './hooks/useIsPreviewing';
|
|
16
|
+
export { builder, Builder };
|
|
17
|
+
export default builder;
|
|
31
18
|
//# sourceMappingURL=builder-react-lite.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builder-react-lite.js","sourceRoot":"","sources":["../../../src/builder-react-lite.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"builder-react-lite.js","sourceRoot":"","sources":["../../../src/builder-react-lite.ts"],"names":[],"mappings":"AAAA,OAAO,wBAAwB,CAAC;AAEhC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAGnD,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC;AAEvB,OAAO,EAAE,aAAa,EAAE,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
-
|
|
45
|
-
var with_children_1 = require("./functions/with-children");
|
|
46
|
-
Object.defineProperty(exports, "withChildren", { enumerable: true, get: function () { return with_children_1.withChildren; } });
|
|
47
|
-
var no_wrap_1 = require("./functions/no-wrap");
|
|
48
|
-
Object.defineProperty(exports, "noWrap", { enumerable: true, get: function () { return no_wrap_1.noWrap; } });
|
|
49
|
-
var Text_1 = require("./blocks/Text");
|
|
50
|
-
Object.defineProperty(exports, "Text", { enumerable: true, get: function () { return Text_1.Text; } });
|
|
51
|
-
var Slot_1 = require("./blocks/Slot");
|
|
52
|
-
Object.defineProperty(exports, "Dropzone", { enumerable: true, get: function () { return Slot_1.Slot; } });
|
|
53
|
-
var Fragment_1 = require("./blocks/Fragment");
|
|
54
|
-
Object.defineProperty(exports, "Fragment", { enumerable: true, get: function () { return Fragment_1.Fragment; } });
|
|
55
|
-
var Columns_1 = require("./blocks/Columns");
|
|
56
|
-
Object.defineProperty(exports, "Columns", { enumerable: true, get: function () { return Columns_1.Columns; } });
|
|
57
|
-
var Embed_1 = require("./blocks/Embed");
|
|
58
|
-
Object.defineProperty(exports, "Embed", { enumerable: true, get: function () { return Embed_1.Embed; } });
|
|
59
|
-
var CustomCode_1 = require("./blocks/CustomCode");
|
|
60
|
-
Object.defineProperty(exports, "CustomCode", { enumerable: true, get: function () { return CustomCode_1.CustomCode; } });
|
|
61
|
-
var Image_1 = require("./blocks/Image");
|
|
62
|
-
Object.defineProperty(exports, "Image", { enumerable: true, get: function () { return Image_1.Image; } });
|
|
63
|
-
Object.defineProperty(exports, "getSrcSet", { enumerable: true, get: function () { return Image_1.getSrcSet; } });
|
|
64
|
-
var Video_1 = require("./blocks/Video");
|
|
65
|
-
Object.defineProperty(exports, "Video", { enumerable: true, get: function () { return Video_1.Video; } });
|
|
66
|
-
var Symbol_1 = require("./blocks/Symbol");
|
|
67
|
-
Object.defineProperty(exports, "Symbol", { enumerable: true, get: function () { return Symbol_1.Symbol; } });
|
|
68
|
-
var Button_1 = require("./blocks/Button");
|
|
69
|
-
Object.defineProperty(exports, "Button", { enumerable: true, get: function () { return Button_1.Button; } });
|
|
70
|
-
var Section_1 = require("./blocks/Section");
|
|
71
|
-
Object.defineProperty(exports, "Section", { enumerable: true, get: function () { return Section_1.Section; } });
|
|
72
|
-
var StateProvider_1 = require("./blocks/StateProvider");
|
|
73
|
-
Object.defineProperty(exports, "StateProvider", { enumerable: true, get: function () { return StateProvider_1.StateProvider; } });
|
|
74
|
-
var Router_1 = require("./blocks/Router");
|
|
75
|
-
Object.defineProperty(exports, "Router", { enumerable: true, get: function () { return Router_1.Router; } });
|
|
76
|
-
var Mutation_1 = require("./blocks/Mutation");
|
|
77
|
-
Object.defineProperty(exports, "Mutation", { enumerable: true, get: function () { return Mutation_1.Mutation; } });
|
|
78
|
-
var Form_1 = require("./blocks/forms/Form");
|
|
79
|
-
Object.defineProperty(exports, "Form", { enumerable: true, get: function () { return Form_1.Form; } });
|
|
80
|
-
var Input_1 = require("./blocks/forms/Input");
|
|
81
|
-
Object.defineProperty(exports, "FormInput", { enumerable: true, get: function () { return Input_1.FormInput; } });
|
|
82
|
-
var Button_2 = require("./blocks/forms/Button");
|
|
83
|
-
Object.defineProperty(exports, "FormSubmitButton", { enumerable: true, get: function () { return Button_2.FormSubmitButton; } });
|
|
84
|
-
var Label_1 = require("./blocks/forms/Label"); // advanced?
|
|
85
|
-
Object.defineProperty(exports, "Label", { enumerable: true, get: function () { return Label_1.Label; } });
|
|
86
|
-
var Select_1 = require("./blocks/forms/Select"); // advanced?
|
|
87
|
-
Object.defineProperty(exports, "FormSelect", { enumerable: true, get: function () { return Select_1.FormSelect; } });
|
|
88
|
-
var TextArea_1 = require("./blocks/forms/TextArea");
|
|
89
|
-
Object.defineProperty(exports, "TextArea", { enumerable: true, get: function () { return TextArea_1.TextArea; } });
|
|
90
|
-
var Img_1 = require("./blocks/raw/Img");
|
|
91
|
-
Object.defineProperty(exports, "Img", { enumerable: true, get: function () { return Img_1.Img; } });
|
|
92
|
-
var RawText_1 = require("./blocks/raw/RawText");
|
|
93
|
-
Object.defineProperty(exports, "RawText", { enumerable: true, get: function () { return RawText_1.RawText; } });
|
|
94
|
-
var string_to_function_1 = require("./functions/string-to-function");
|
|
95
|
-
Object.defineProperty(exports, "stringToFunction", { enumerable: true, get: function () { return string_to_function_1.stringToFunction; } });
|
|
96
|
-
var useIsPreviewing_1 = require("./hooks/useIsPreviewing");
|
|
97
|
-
Object.defineProperty(exports, "useIsPreviewing", { enumerable: true, get: function () { return useIsPreviewing_1.useIsPreviewing; } });
|
|
98
|
-
exports.default = sdk_1.builder;
|
|
1
|
+
import './scripts/init-editing';
|
|
2
|
+
import { builder, Builder } from '@builder.io/sdk';
|
|
3
|
+
Builder.isReact = true;
|
|
4
|
+
export { BuilderBlocks } from './components/builder-blocks.component';
|
|
5
|
+
export { BuilderBlock as BuilderBlockComponent } from './components/builder-block.component';
|
|
6
|
+
export { BuilderContent } from './components/builder-content.component';
|
|
7
|
+
import { BuilderComponent, onChange } from './components/builder-component.component';
|
|
8
|
+
export { BuilderStoreContext } from './store/builder-store';
|
|
9
|
+
export { BuilderMetaContext } from './store/builder-meta';
|
|
10
|
+
export { BuilderAsyncRequestsContext } from './store/builder-async-requests';
|
|
11
|
+
export { BuilderBlock } from './decorators/builder-block.decorator';
|
|
12
|
+
export * from './functions/update-metadata';
|
|
13
|
+
export { withBuilder } from './functions/with-builder';
|
|
14
|
+
export { withChildren } from './functions/with-children';
|
|
15
|
+
export { noWrap } from './functions/no-wrap';
|
|
16
|
+
export { BuilderComponent as BuilderPage, onChange };
|
|
17
|
+
export { BuilderComponent };
|
|
18
|
+
export { BuilderComponent as RenderContent };
|
|
19
|
+
export { Text } from './blocks/Text';
|
|
20
|
+
export { Slot as Dropzone } from './blocks/Slot';
|
|
21
|
+
export { Fragment } from './blocks/Fragment';
|
|
22
|
+
export { Columns } from './blocks/Columns';
|
|
23
|
+
export { Embed } from './blocks/Embed';
|
|
24
|
+
export { CustomCode } from './blocks/CustomCode';
|
|
25
|
+
export { Image, getSrcSet } from './blocks/Image';
|
|
26
|
+
export { Video } from './blocks/Video';
|
|
27
|
+
export { Symbol } from './blocks/Symbol';
|
|
28
|
+
export { Button } from './blocks/Button';
|
|
29
|
+
export { Section } from './blocks/Section';
|
|
30
|
+
export { StateProvider } from './blocks/StateProvider';
|
|
31
|
+
export { Router } from './blocks/Router';
|
|
32
|
+
export { Mutation } from './blocks/Mutation';
|
|
33
|
+
export { Form } from './blocks/forms/Form';
|
|
34
|
+
export { FormInput } from './blocks/forms/Input';
|
|
35
|
+
export { FormSubmitButton } from './blocks/forms/Button';
|
|
36
|
+
export { Label } from './blocks/forms/Label'; // advanced?
|
|
37
|
+
export { FormSelect } from './blocks/forms/Select'; // advanced?
|
|
38
|
+
export { TextArea } from './blocks/forms/TextArea';
|
|
39
|
+
export { Img } from './blocks/raw/Img';
|
|
40
|
+
export { RawText } from './blocks/raw/RawText';
|
|
41
|
+
export { stringToFunction } from './functions/string-to-function';
|
|
42
|
+
export { useIsPreviewing } from './hooks/useIsPreviewing';
|
|
43
|
+
export { builder, Builder };
|
|
44
|
+
export default builder;
|
|
99
45
|
//# sourceMappingURL=builder-react.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builder-react.js","sourceRoot":"","sources":["../../../src/builder-react.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"builder-react.js","sourceRoot":"","sources":["../../../src/builder-react.ts"],"names":[],"mappings":"AAAA,OAAO,wBAAwB,CAAC;AAEhC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAGnD,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC;AAEvB,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AACtE,OAAO,EAAE,YAAY,IAAI,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAC7F,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AACxE,OAAO,E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AC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC,CAAC,YAAY;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC,CAAC,YAAY;AAChE,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAE/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC;AAC5B,eAAe,OAAO,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
'use client';
|
|
3
2
|
var __assign = (this && this.__assign) || function () {
|
|
4
3
|
__assign = Object.assign || function(t) {
|
|
@@ -11,13 +10,8 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
10
|
};
|
|
12
11
|
return __assign.apply(this, arguments);
|
|
13
12
|
};
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
};
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.Link = void 0;
|
|
19
|
-
var react_1 = __importDefault(require("react"));
|
|
20
|
-
var builder_store_1 = require("../store/builder-store");
|
|
13
|
+
import React from 'react';
|
|
14
|
+
import { BuilderStoreContext } from '../store/builder-store';
|
|
21
15
|
/**
|
|
22
16
|
* Link component should be used instead of an anchor tag in our components,
|
|
23
17
|
* this is to allow our users to override anchor tags in
|
|
@@ -25,11 +19,10 @@ var builder_store_1 = require("../store/builder-store");
|
|
|
25
19
|
* custom Link component (e.g Next, Gatsby, React Router)
|
|
26
20
|
* <BuilderComponent renderLink=(props) => <myCustomLink {...props} /> />
|
|
27
21
|
*/
|
|
28
|
-
var Link = function (props) { return (
|
|
22
|
+
export var Link = function (props) { return (React.createElement(BuilderStoreContext.Consumer, null, function (context) {
|
|
29
23
|
if (context.renderLink) {
|
|
30
24
|
return context.renderLink(props);
|
|
31
25
|
}
|
|
32
|
-
return
|
|
26
|
+
return React.createElement("a", __assign({}, props));
|
|
33
27
|
})); };
|
|
34
|
-
exports.Link = Link;
|
|
35
28
|
//# sourceMappingURL=Link.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Link.js","sourceRoot":"","sources":["../../../../src/components/Link.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Link.js","sourceRoot":"","sources":["../../../../src/components/Link.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;;;AACb,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D;;;;;;GAMG;AACH,MAAM,CAAC,IAAM,IAAI,GAA6D,UAAA,KAAK,IAAI,OAAA,CACrF,oBAAC,mBAAmB,CAAC,QAAQ,QAC1B,UAAA,OAAO;IACN,IAAI,OAAO,CAAC,UAAU,EAAE;QACtB,OAAO,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;KAClC;IACD,OAAO,sCAAO,KAAK,EAAI,CAAC;AAC1B,CAAC,CAC4B,CAChC,EATsF,CAStF,CAAC"}
|