@builder.io/mitosis 0.0.56-2 → 0.0.56-22
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/src/__tests__/angular.test.js +2 -13
- package/dist/src/__tests__/builder.test.js +3 -3
- package/dist/src/__tests__/data/basic-child-component.raw.d.ts +1 -0
- package/dist/src/__tests__/data/basic-child-component.raw.jsx +21 -0
- package/dist/src/__tests__/data/basic-context.raw.d.ts +1 -0
- package/dist/src/__tests__/data/basic-context.raw.jsx +29 -0
- package/dist/src/__tests__/data/basic-custom-mitosis-package.raw.d.ts +1 -0
- package/dist/src/__tests__/data/basic-custom-mitosis-package.raw.jsx +10 -0
- package/dist/src/__tests__/data/basic-for-show.raw.d.ts +1 -0
- package/dist/src/__tests__/data/basic-for-show.raw.jsx +20 -0
- package/dist/src/__tests__/data/basic-for.raw.d.ts +1 -0
- package/dist/src/__tests__/data/basic-for.raw.jsx +23 -0
- package/dist/src/__tests__/data/basic-forwardRef-metadata.raw.d.ts +5 -0
- package/dist/src/__tests__/data/basic-forwardRef-metadata.raw.jsx +17 -0
- package/dist/src/__tests__/data/basic-forwardRef.raw.d.ts +5 -0
- package/dist/src/__tests__/data/basic-forwardRef.raw.jsx +14 -0
- package/dist/src/__tests__/data/basic-onChange.raw.d.ts +1 -0
- package/dist/src/__tests__/data/basic-onChange.raw.jsx +17 -0
- package/dist/src/__tests__/data/basic-onMount-update.raw.d.ts +5 -0
- package/dist/src/__tests__/data/basic-onMount-update.raw.jsx +17 -0
- package/dist/src/__tests__/data/basic-onUpdate-return.raw.d.ts +1 -0
- package/dist/src/__tests__/data/basic-onUpdate-return.raw.jsx +24 -0
- package/dist/src/__tests__/data/basic-outputs-meta.raw.d.ts +1 -0
- package/dist/src/__tests__/data/basic-outputs-meta.raw.jsx +17 -0
- package/dist/src/__tests__/data/basic-outputs.raw.d.ts +1 -0
- package/dist/src/__tests__/data/basic-outputs.raw.jsx +14 -0
- package/dist/src/__tests__/data/basic-preserve-export-or-local-statement.raw.d.ts +6 -0
- package/dist/src/__tests__/data/basic-preserve-export-or-local-statement.raw.jsx +14 -0
- package/dist/src/__tests__/data/basic-props-destructure.raw.d.ts +6 -0
- package/dist/src/__tests__/data/basic-props-destructure.raw.jsx +14 -0
- package/dist/src/__tests__/data/basic-props.raw.d.ts +6 -0
- package/dist/src/__tests__/data/basic-props.raw.jsx +13 -0
- package/dist/src/__tests__/data/basic-ref-assignment.raw.d.ts +4 -0
- package/dist/src/__tests__/data/basic-ref-assignment.raw.jsx +15 -0
- package/dist/src/__tests__/data/basic-ref-usePrevious.raw.d.ts +5 -0
- package/dist/src/__tests__/data/basic-ref-usePrevious.raw.jsx +35 -0
- package/dist/src/__tests__/data/basic-ref.raw.d.ts +4 -0
- package/dist/src/__tests__/data/basic-ref.raw.jsx +36 -0
- package/dist/src/__tests__/data/basic.raw.d.ts +6 -1
- package/dist/src/__tests__/data/basic.raw.jsx +13 -4
- package/dist/src/__tests__/data/blocks/button-with-metadata.raw.d.ts +1 -1
- package/dist/src/__tests__/data/blocks/button.raw.d.ts +1 -1
- package/dist/src/__tests__/data/blocks/classname-jsx.raw.d.ts +7 -0
- package/dist/src/__tests__/data/blocks/classname-jsx.raw.jsx +15 -0
- package/dist/src/__tests__/data/blocks/columns.raw.d.ts +1 -1
- package/dist/src/__tests__/data/blocks/columns.raw.jsx +1 -1
- package/dist/src/__tests__/data/blocks/content-slot-html.raw.d.ts +7 -0
- package/dist/src/__tests__/data/blocks/content-slot-html.raw.jsx +15 -0
- package/dist/src/__tests__/data/blocks/content-slot-jsx.raw.d.ts +6 -0
- package/dist/src/__tests__/data/blocks/content-slot-jsx.raw.jsx +12 -0
- package/dist/src/__tests__/data/blocks/custom-code.raw.d.ts +1 -1
- package/dist/src/__tests__/data/blocks/custom-code.raw.jsx +3 -7
- package/dist/src/__tests__/data/blocks/embed.raw.d.ts +1 -1
- package/dist/src/__tests__/data/blocks/embed.raw.jsx +3 -7
- package/dist/src/__tests__/data/blocks/form.raw.d.ts +1 -1
- package/dist/src/__tests__/data/blocks/form.raw.jsx +3 -3
- package/dist/src/__tests__/data/blocks/image.raw.d.ts +1 -1
- package/dist/src/__tests__/data/blocks/image.raw.jsx +8 -9
- package/dist/src/__tests__/data/blocks/img-state.raw.d.ts +1 -0
- package/dist/src/__tests__/data/blocks/img-state.raw.jsx +17 -0
- package/dist/src/__tests__/data/blocks/img.raw.d.ts +1 -1
- package/dist/src/__tests__/data/blocks/input.raw.d.ts +1 -1
- package/dist/src/__tests__/data/blocks/input.raw.jsx +1 -3
- package/dist/src/__tests__/data/blocks/multiple-onUpdate.raw.d.ts +1 -1
- package/dist/src/__tests__/data/blocks/multiple-onUpdateWithDeps.raw.d.ts +1 -1
- package/dist/src/__tests__/data/blocks/multiple-onUpdateWithDeps.raw.jsx +7 -1
- package/dist/src/__tests__/data/blocks/onInit-onMount.raw.d.ts +1 -0
- package/dist/src/__tests__/data/blocks/onInit-onMount.raw.jsx +13 -0
- package/dist/src/__tests__/data/blocks/onInit.raw.d.ts +8 -0
- package/dist/src/__tests__/data/blocks/onInit.raw.jsx +20 -0
- package/dist/src/__tests__/data/blocks/onMount.raw.d.ts +1 -1
- package/dist/src/__tests__/data/blocks/onUpdate.raw.d.ts +1 -1
- package/dist/src/__tests__/data/blocks/onUpdateWithDeps.raw.d.ts +1 -1
- package/dist/src/__tests__/data/blocks/onUpdateWithDeps.raw.jsx +1 -1
- package/dist/src/__tests__/data/blocks/raw-text.raw.d.ts +1 -1
- package/dist/src/__tests__/data/blocks/rootShow.raw.d.ts +1 -1
- package/dist/src/__tests__/data/blocks/section-state.raw.d.ts +6 -0
- package/dist/src/__tests__/data/blocks/section-state.raw.jsx +17 -0
- package/dist/src/__tests__/data/blocks/section.raw.d.ts +1 -1
- package/dist/src/__tests__/data/blocks/select.raw.d.ts +1 -1
- package/dist/src/__tests__/data/blocks/select.raw.jsx +1 -3
- package/dist/src/__tests__/data/blocks/self-referencing-component-with-children.raw.d.ts +1 -1
- package/dist/src/__tests__/data/blocks/self-referencing-component.raw.d.ts +1 -1
- package/dist/src/__tests__/data/blocks/shadow-dom.raw.d.ts +1 -1
- package/dist/src/__tests__/data/blocks/shadow-dom.raw.jsx +2 -4
- package/dist/src/__tests__/data/blocks/slot-html.raw.d.ts +5 -0
- package/dist/src/__tests__/data/blocks/slot-html.raw.jsx +15 -0
- package/dist/src/__tests__/data/blocks/slot-jsx.raw.d.ts +5 -0
- package/dist/src/__tests__/data/blocks/slot-jsx.raw.jsx +12 -0
- package/dist/src/__tests__/data/blocks/stamped-io.raw.d.ts +1 -1
- package/dist/src/__tests__/data/blocks/stamped-io.raw.jsx +2 -4
- package/dist/src/__tests__/data/blocks/submit-button.raw.d.ts +1 -1
- package/dist/src/__tests__/data/blocks/text.raw.d.ts +1 -1
- package/dist/src/__tests__/data/blocks/text.raw.jsx +3 -1
- package/dist/src/__tests__/data/blocks/textarea.raw.d.ts +1 -1
- package/dist/src/__tests__/data/blocks/video.raw.d.ts +1 -1
- package/dist/src/__tests__/data/blocks/video.raw.jsx +1 -1
- package/dist/src/__tests__/data/context/component-with-context.lite.d.ts +3 -1
- package/dist/src/__tests__/data/context/component-with-context.lite.jsx +7 -2
- package/dist/src/__tests__/data/styles/class-and-className.raw.d.ts +1 -0
- package/dist/src/__tests__/data/styles/class-and-className.raw.jsx +10 -0
- package/dist/src/__tests__/data/styles/class.raw.d.ts +1 -0
- package/dist/src/__tests__/data/styles/class.raw.jsx +10 -0
- package/dist/src/__tests__/data/styles/className.raw.d.ts +1 -0
- package/dist/src/__tests__/data/styles/className.raw.jsx +10 -0
- package/dist/src/__tests__/data/styles/classState.raw.d.ts +1 -0
- package/dist/src/__tests__/data/styles/classState.raw.jsx +12 -0
- package/dist/src/__tests__/data/types/component-props-interface.raw.d.ts +6 -0
- package/dist/src/__tests__/data/types/component-props-interface.raw.jsx +6 -0
- package/dist/src/__tests__/data/types/component-props-type.raw.d.ts +6 -0
- package/dist/src/__tests__/data/types/component-props-type.raw.jsx +6 -0
- package/dist/src/__tests__/data/types/preserve-typing.raw.d.ts +8 -0
- package/dist/src/__tests__/data/types/preserve-typing.raw.jsx +6 -0
- package/dist/src/__tests__/html.test.js +2 -13
- package/dist/src/__tests__/liquid.test.js +2 -103
- package/dist/src/__tests__/parse-jsx.test.js +22 -0
- package/dist/src/__tests__/qwik/convertMethodToFunction.test.d.ts +1 -0
- package/dist/src/__tests__/qwik/convertMethodToFunction.test.js +34 -0
- package/dist/src/__tests__/qwik/src-generator.test.d.ts +1 -0
- package/dist/src/__tests__/qwik/src-generator.test.js +65 -0
- package/dist/src/__tests__/qwik.directive.test.js +1 -0
- package/dist/src/__tests__/qwik.test.js +54 -23
- package/dist/src/__tests__/react-native.test.js +3 -136
- package/dist/src/__tests__/react.test.js +5 -135
- package/dist/src/__tests__/shared.d.ts +3 -0
- package/dist/src/__tests__/shared.js +232 -0
- package/dist/src/__tests__/solid.test.js +2 -97
- package/dist/src/__tests__/stencil.test.js +3 -98
- package/dist/src/__tests__/styles.test.d.ts +1 -0
- package/dist/src/__tests__/styles.test.js +23 -0
- package/dist/src/__tests__/svelte.test.js +2 -31
- package/dist/src/__tests__/vue.test.js +2 -134
- package/dist/src/__tests__/webcomponent.test.js +8 -5
- package/dist/src/constants/hooks.d.ts +6 -0
- package/dist/src/constants/hooks.js +9 -0
- package/dist/src/flow.d.ts +6 -0
- package/dist/src/flow.js +6 -2
- package/dist/src/generators/angular.d.ts +8 -2
- package/dist/src/generators/angular.js +202 -44
- package/dist/src/generators/builder.d.ts +2 -2
- package/dist/src/generators/builder.js +19 -26
- package/dist/src/generators/context/{react copy.d.ts → qwik.d.ts} +2 -2
- package/dist/src/generators/context/{react copy.js → qwik.js} +4 -5
- package/dist/src/generators/context/svelte.d.ts +1 -1
- package/dist/src/generators/helpers/context.js +1 -2
- package/dist/src/generators/html.d.ts +1 -1
- package/dist/src/generators/html.js +365 -108
- package/dist/src/generators/liquid.d.ts +1 -1
- package/dist/src/generators/liquid.js +18 -25
- package/dist/src/generators/mitosis.d.ts +1 -1
- package/dist/src/generators/mitosis.js +37 -35
- package/dist/src/generators/qwik/component-generator.d.ts +4 -0
- package/dist/src/generators/qwik/component-generator.js +276 -0
- package/dist/src/generators/qwik/component.js +21 -25
- package/dist/src/generators/qwik/convertMethodToFunction.d.ts +1 -0
- package/dist/src/generators/qwik/convertMethodToFunction.js +161 -0
- package/dist/src/generators/qwik/directives.js +27 -22
- package/dist/src/generators/qwik/handlers.js +3 -19
- package/dist/src/generators/qwik/index.d.ts +3 -1
- package/dist/src/generators/qwik/index.js +3 -1
- package/dist/src/generators/qwik/jsx.js +33 -13
- package/dist/src/generators/qwik/src-generator.d.ts +21 -8
- package/dist/src/generators/qwik/src-generator.js +163 -42
- package/dist/src/generators/qwik/styles.js +3 -3
- package/dist/src/generators/react-native.d.ts +2 -2
- package/dist/src/generators/react-native.js +8 -10
- package/dist/src/generators/react.d.ts +4 -2
- package/dist/src/generators/react.js +152 -80
- package/dist/src/generators/solid.d.ts +1 -1
- package/dist/src/generators/solid.js +41 -35
- package/dist/src/generators/stencil/collect-class-string.js +5 -8
- package/dist/src/generators/stencil/generate.d.ts +1 -1
- package/dist/src/generators/stencil/generate.js +16 -21
- package/dist/src/generators/svelte.d.ts +2 -2
- package/dist/src/generators/svelte.js +97 -43
- package/dist/src/generators/swift-ui.d.ts +1 -1
- package/dist/src/generators/swift-ui.js +17 -19
- package/dist/src/generators/template.d.ts +1 -1
- package/dist/src/generators/template.js +11 -18
- package/dist/src/generators/vue.d.ts +12 -8
- package/dist/src/generators/vue.js +111 -63
- package/dist/src/helpers/babel-transform.js +3 -8
- package/dist/src/helpers/create-mitosis-component.d.ts +1 -1
- package/dist/src/helpers/create-mitosis-component.js +1 -1
- package/dist/src/helpers/create-mitosis-node.js +1 -1
- package/dist/src/helpers/fast-clone.js +1 -3
- package/dist/src/helpers/filter-empty-text-nodes.js +1 -2
- package/dist/src/helpers/get-bindings.d.ts +2 -0
- package/dist/src/helpers/get-bindings.js +18 -0
- package/dist/src/helpers/get-prop-functions.d.ts +5 -0
- package/dist/src/helpers/get-prop-functions.js +29 -0
- package/dist/src/helpers/get-props-ref.d.ts +2 -0
- package/dist/src/helpers/get-props-ref.js +32 -0
- package/dist/src/helpers/get-refs.js +3 -2
- package/dist/src/helpers/get-state-object-string.d.ts +4 -3
- package/dist/src/helpers/get-state-object-string.js +23 -20
- package/dist/src/helpers/get-styles.js +4 -3
- package/dist/src/helpers/getters-to-functions.d.ts +1 -1
- package/dist/src/helpers/getters-to-functions.js +1 -1
- package/dist/src/helpers/has-bindings-text.d.ts +2 -0
- package/dist/src/helpers/has-bindings-text.js +21 -0
- package/dist/src/helpers/has-stateful-dom.d.ts +2 -0
- package/dist/src/helpers/has-stateful-dom.js +21 -0
- package/dist/src/helpers/is-children.js +2 -1
- package/dist/src/helpers/is-component.js +1 -3
- package/dist/src/helpers/is-html-attribute.d.ts +4 -0
- package/dist/src/helpers/is-html-attribute.js +380 -0
- package/dist/src/helpers/map-refs.js +17 -3
- package/dist/src/helpers/parsers.js +1 -2
- package/dist/src/helpers/render-imports.d.ts +18 -2
- package/dist/src/helpers/render-imports.js +100 -54
- package/dist/src/helpers/render-imports.test.d.ts +1 -0
- package/dist/src/helpers/render-imports.test.js +19 -0
- package/dist/src/helpers/replace-idenifiers.js +5 -7
- package/dist/src/helpers/strip-state-and-props-refs.d.ts +4 -1
- package/dist/src/helpers/strip-state-and-props-refs.js +24 -6
- package/dist/src/helpers/styles/collect-css.d.ts +6 -0
- package/dist/src/helpers/styles/collect-css.js +87 -0
- package/dist/src/helpers/styles/collect-css.test.d.ts +1 -0
- package/dist/src/helpers/styles/collect-css.test.js +18 -0
- package/dist/src/helpers/styles/collect-styled-components.d.ts +2 -0
- package/dist/src/helpers/styles/collect-styled-components.js +61 -0
- package/dist/src/helpers/{collect-styles.d.ts → styles/helpers.d.ts} +5 -10
- package/dist/src/helpers/styles/helpers.js +61 -0
- package/dist/src/helpers/typescript.d.ts +2 -0
- package/dist/src/{jsx-types.js → helpers/typescript.js} +0 -0
- package/dist/src/index.d.ts +7 -4
- package/dist/src/index.js +24 -8
- package/dist/src/modules/plugins.d.ts +1 -1
- package/dist/src/parsers/angular.js +22 -34
- package/dist/src/parsers/builder.d.ts +25 -23
- package/dist/src/parsers/builder.js +59 -67
- package/dist/src/parsers/jsx.d.ts +2 -1
- package/dist/src/parsers/jsx.js +300 -93
- package/dist/src/parsers/liquid.js +51 -149
- package/dist/src/plugins/compile-away-builder-components.js +158 -115
- package/dist/src/symbols/symbol-processor.js +10 -7
- package/dist/src/targets.d.ts +7 -5
- package/dist/src/targets.js +7 -1
- package/dist/src/types/config.d.ts +42 -13
- package/dist/src/types/mitosis-component.d.ts +31 -10
- package/dist/src/types/mitosis-node.d.ts +15 -9
- package/dist/src/types/transpiler.d.ts +14 -0
- package/dist/src/types/transpiler.js +2 -0
- package/dist/test/qwik/Accordion/low.jsx +9 -3
- package/dist/test/qwik/Accordion/med.jsx +2 -8
- package/dist/test/qwik/For/low.jsx +29 -25
- package/dist/test/qwik/For/med.jsx +2 -8
- package/dist/test/qwik/Image/high.js +1 -1
- package/dist/test/qwik/Image/med.js +15 -13
- package/dist/test/qwik/Image.slow/high.js +1 -1
- package/dist/test/qwik/Image.slow/med.js +15 -13
- package/dist/test/qwik/bindings/low.cjs +12 -3
- package/dist/test/qwik/bindings/med.cjs +1 -10
- package/dist/test/qwik/button/high.js +1 -1
- package/dist/test/qwik/button/low.js +9 -3
- package/dist/test/qwik/button/med.js +2 -8
- package/dist/test/qwik/component/bindings/low.jsx +48 -5
- package/dist/test/qwik/component/bindings/med.jsx +3 -49
- package/dist/test/qwik/component/component/inputs/high.cjsx +1 -1
- package/dist/test/qwik/component/component/inputs/med.cjsx +8 -9
- package/dist/test/qwik/for-loop.bindings/high.cjs +0 -0
- package/dist/test/qwik/for-loop.bindings/low.cjs +46 -0
- package/dist/test/qwik/for-loop.bindings/med.cjs +5 -0
- package/dist/test/qwik/hello_world/stylesheet/low.jsx +9 -3
- package/dist/test/qwik/hello_world/stylesheet/med.jsx +2 -8
- package/dist/test/qwik/mount/high.cjs +0 -0
- package/dist/test/qwik/mount/low.cjs +45 -0
- package/dist/test/qwik/mount/med.cjs +3 -0
- package/dist/test/qwik/page-with-symbol/low.js +9 -3
- package/dist/test/qwik/page-with-symbol/med.js +2 -8
- package/dist/test/qwik/show-hide/high.jsx +1 -1
- package/dist/test/qwik/show-hide/med.jsx +15 -13
- package/dist/test/qwik/svg/low.js +9 -3
- package/dist/test/qwik/svg/med.js +2 -8
- package/dist/test/qwik/todo/Todo.cjs/high.cjs +6 -10
- package/dist/test/qwik/todo/Todo.cjs/med.cjs +9 -9
- package/dist/test/qwik/todo/Todo.js/high.js +7 -10
- package/dist/test/qwik/todo/Todo.js/med.js +9 -9
- package/dist/test/qwik/todo/Todo.tsx/high.tsx +7 -10
- package/dist/test/qwik/todo/Todo.tsx/med.tsx +9 -9
- package/dist/test/qwik/todos/Todo.tsx/high.tsx +1 -1
- package/dist/test/qwik/todos/Todo.tsx/low.tsx +15 -12
- package/dist/test/qwik/todos/Todo.tsx/med.tsx +1 -6
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +11 -6
- package/README.md +0 -239
- package/dist/src/__tests__/data/blocks/onUpdate.raw copy.d.ts +0 -1
- package/dist/src/__tests__/data/blocks/onUpdate.raw copy.jsx +0 -10
- package/dist/src/__tests__/data/blocks/slot.raw.d.ts +0 -5
- package/dist/src/__tests__/data/blocks/slot.raw.jsx +0 -6
- package/dist/src/__tests__/data/blocks/styles.raw.d.ts +0 -1
- package/dist/src/__tests__/data/blocks/styles.raw.jsx +0 -10
- package/dist/src/helpers/babel-transform copy.d.ts +0 -8
- package/dist/src/helpers/babel-transform copy.js +0 -138
- package/dist/src/helpers/collect-styles.js +0 -178
- package/dist/src/jsx-types.d.ts +0 -1171
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var mitosis_1 = require("@builder.io/mitosis");
|
|
4
|
+
function ContentSlotCode(props) {
|
|
5
|
+
return (<div>
|
|
6
|
+
<mitosis_1.Slot name={props.slotTesting}/>
|
|
7
|
+
<div>
|
|
8
|
+
<hr />
|
|
9
|
+
</div>
|
|
10
|
+
<div>
|
|
11
|
+
<mitosis_1.Slot />
|
|
12
|
+
</div>
|
|
13
|
+
</div>);
|
|
14
|
+
}
|
|
15
|
+
exports.default = ContentSlotCode;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
function ContentSlotJsxCode(props) {
|
|
4
|
+
return (<div>
|
|
5
|
+
{props.slotTesting}
|
|
6
|
+
<div>
|
|
7
|
+
<hr />
|
|
8
|
+
</div>
|
|
9
|
+
<div>{props.children}</div>
|
|
10
|
+
</div>);
|
|
11
|
+
}
|
|
12
|
+
exports.default = ContentSlotJsxCode;
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
var mitosis_1 = require("@builder.io/mitosis");
|
|
4
4
|
function CustomCode(props) {
|
|
5
|
-
var elem = (0, mitosis_1.useRef)();
|
|
6
|
-
var state = (0, mitosis_1.
|
|
5
|
+
var elem = (0, mitosis_1.useRef)(null);
|
|
6
|
+
var state = (0, mitosis_1.useStore)({
|
|
7
7
|
scriptsInserted: [],
|
|
8
8
|
scriptsRun: [],
|
|
9
9
|
findAndRunScripts: function () {
|
|
@@ -24,11 +24,7 @@ function CustomCode(props) {
|
|
|
24
24
|
document.head.appendChild(newScript);
|
|
25
25
|
}
|
|
26
26
|
else if (!script.type ||
|
|
27
|
-
[
|
|
28
|
-
'text/javascript',
|
|
29
|
-
'application/javascript',
|
|
30
|
-
'application/ecmascript',
|
|
31
|
-
].includes(script.type)) {
|
|
27
|
+
['text/javascript', 'application/javascript', 'application/ecmascript'].includes(script.type)) {
|
|
32
28
|
if (state.scriptsRun.includes(script.innerText)) {
|
|
33
29
|
continue;
|
|
34
30
|
}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
var mitosis_1 = require("@builder.io/mitosis");
|
|
4
4
|
function Embed(props) {
|
|
5
|
-
var elem = (0, mitosis_1.useRef)();
|
|
6
|
-
var state = (0, mitosis_1.
|
|
5
|
+
var elem = (0, mitosis_1.useRef)(null);
|
|
6
|
+
var state = (0, mitosis_1.useStore)({
|
|
7
7
|
scriptsInserted: [],
|
|
8
8
|
scriptsRun: [],
|
|
9
9
|
findAndRunScripts: function () {
|
|
@@ -24,11 +24,7 @@ function Embed(props) {
|
|
|
24
24
|
document.head.appendChild(newScript);
|
|
25
25
|
}
|
|
26
26
|
else if (!script.type ||
|
|
27
|
-
[
|
|
28
|
-
'text/javascript',
|
|
29
|
-
'application/javascript',
|
|
30
|
-
'application/ecmascript',
|
|
31
|
-
].includes(script.type)) {
|
|
27
|
+
['text/javascript', 'application/javascript', 'application/ecmascript'].includes(script.type)) {
|
|
32
28
|
if (state.scriptsRun.includes(script.innerText)) {
|
|
33
29
|
continue;
|
|
34
30
|
}
|
|
@@ -22,4 +22,4 @@ export interface FormProps {
|
|
|
22
22
|
errorMessagePath?: string;
|
|
23
23
|
}
|
|
24
24
|
export declare type FormState = 'unsubmitted' | 'sending' | 'success' | 'error';
|
|
25
|
-
export default function FormComponent(props: FormProps): JSX.Element;
|
|
25
|
+
export default function FormComponent(props: FormProps): import("@builder.io/mitosis/jsx-runtime").JSX.Element;
|
|
@@ -44,7 +44,7 @@ var _fake_3 = require("@fake");
|
|
|
44
44
|
var _fake_4 = require("@fake");
|
|
45
45
|
function FormComponent(props) {
|
|
46
46
|
var _a;
|
|
47
|
-
var state = (0, mitosis_1.
|
|
47
|
+
var state = (0, mitosis_1.useStore)({
|
|
48
48
|
state: 'unsubmitted',
|
|
49
49
|
// TODO: separate response and error?
|
|
50
50
|
responseData: null,
|
|
@@ -242,11 +242,11 @@ function FormComponent(props) {
|
|
|
242
242
|
}
|
|
243
243
|
},
|
|
244
244
|
});
|
|
245
|
-
var formRef = (0, mitosis_1.useRef)();
|
|
245
|
+
var formRef = (0, mitosis_1.useRef)(null);
|
|
246
246
|
return (<form validate={props.validate} ref={formRef} action={!props.sendWithJs && props.action} method={props.method} name={props.name} onSubmit={function (event) { return state.onSubmit(event); }} {...props.attributes}>
|
|
247
247
|
<mitosis_1.Show when={props.builderBlock && props.builderBlock.children}>
|
|
248
248
|
<mitosis_1.For each={(_a = props.builderBlock) === null || _a === void 0 ? void 0 : _a.children}>
|
|
249
|
-
{function (block, index) { return
|
|
249
|
+
{function (block, index) { return <_fake_1.BuilderBlock key={block.id} block={block} index={index}/>; }}
|
|
250
250
|
</mitosis_1.For>
|
|
251
251
|
</mitosis_1.Show>
|
|
252
252
|
|
|
@@ -3,22 +3,21 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
var mitosis_1 = require("@builder.io/mitosis");
|
|
4
4
|
function Image(props) {
|
|
5
5
|
var pictureRef = (0, mitosis_1.useRef)();
|
|
6
|
-
var state = (0, mitosis_1.
|
|
6
|
+
var state = (0, mitosis_1.useStore)({
|
|
7
7
|
scrollListener: null,
|
|
8
8
|
imageLoaded: false,
|
|
9
|
-
load: false,
|
|
10
9
|
setLoaded: function () {
|
|
11
10
|
state.imageLoaded = true;
|
|
12
11
|
},
|
|
13
|
-
isBrowser: function () {
|
|
14
|
-
return (typeof window !== 'undefined' &&
|
|
15
|
-
window.navigator.product != 'ReactNative');
|
|
16
|
-
},
|
|
17
12
|
useLazyLoading: function () {
|
|
18
13
|
// TODO: Add more checks here, like testing for real web browsers
|
|
19
|
-
return !!props.lazy &&
|
|
14
|
+
return !!props.lazy && isBrowser();
|
|
20
15
|
},
|
|
21
16
|
});
|
|
17
|
+
function isBrowser() {
|
|
18
|
+
return typeof window !== 'undefined' && window.navigator.product != 'ReactNative';
|
|
19
|
+
}
|
|
20
|
+
var _a = (0, mitosis_1.useState)(false), load = _a[0], setLoad = _a[1];
|
|
22
21
|
(0, mitosis_1.onMount)(function () {
|
|
23
22
|
if (state.useLazyLoading()) {
|
|
24
23
|
// throttled scroll capture listener
|
|
@@ -27,7 +26,7 @@ function Image(props) {
|
|
|
27
26
|
var rect = pictureRef.getBoundingClientRect();
|
|
28
27
|
var buffer = window.innerHeight / 2;
|
|
29
28
|
if (rect.top < window.innerHeight + buffer) {
|
|
30
|
-
|
|
29
|
+
setLoad(true);
|
|
31
30
|
state.scrollListener = null;
|
|
32
31
|
window.removeEventListener('scroll', listener_1);
|
|
33
32
|
}
|
|
@@ -48,7 +47,7 @@ function Image(props) {
|
|
|
48
47
|
});
|
|
49
48
|
return (<>
|
|
50
49
|
<picture ref={pictureRef}>
|
|
51
|
-
<mitosis_1.Show when={!state.useLazyLoading() ||
|
|
50
|
+
<mitosis_1.Show when={!state.useLazyLoading() || load}>
|
|
52
51
|
<img alt={props.altText} aria-role={props.altText ? 'presentation' : undefined} css={{
|
|
53
52
|
opacity: '1',
|
|
54
53
|
transition: 'opacity 0.2s ease-in-out',
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function ImgStateComponent(): import("@builder.io/mitosis/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var mitosis_1 = require("@builder.io/mitosis");
|
|
4
|
+
function ImgStateComponent() {
|
|
5
|
+
var state = (0, mitosis_1.useStore)({
|
|
6
|
+
canShow: true,
|
|
7
|
+
images: ['http://example.com/qwik.png'],
|
|
8
|
+
});
|
|
9
|
+
return (<div>
|
|
10
|
+
<mitosis_1.For each={state.images}>
|
|
11
|
+
{function (item, itemIndex) { return (<>
|
|
12
|
+
<img class={'custom-class'} src={item} key={itemIndex}/>
|
|
13
|
+
</>); }}
|
|
14
|
+
</mitosis_1.For>
|
|
15
|
+
</div>);
|
|
16
|
+
}
|
|
17
|
+
exports.default = ImgStateComponent;
|
|
@@ -6,4 +6,4 @@ export interface ImgProps {
|
|
|
6
6
|
backgroundSize?: 'cover' | 'contain';
|
|
7
7
|
backgroundPosition?: 'center' | 'top' | 'left' | 'right' | 'bottom' | 'top left' | 'top right' | 'bottom left' | 'bottom right';
|
|
8
8
|
}
|
|
9
|
-
export default function ImgComponent(props: ImgProps): JSX.Element;
|
|
9
|
+
export default function ImgComponent(props: ImgProps): import("@builder.io/mitosis/jsx-runtime").JSX.Element;
|
|
@@ -8,4 +8,4 @@ export interface FormInputProps {
|
|
|
8
8
|
defaultValue?: string;
|
|
9
9
|
required?: boolean;
|
|
10
10
|
}
|
|
11
|
-
export default function FormInputComponent(props: FormInputProps): JSX.Element;
|
|
11
|
+
export default function FormInputComponent(props: FormInputProps): import("@builder.io/mitosis/jsx-runtime").JSX.Element;
|
|
@@ -3,8 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
require("@builder.io/mitosis");
|
|
4
4
|
var sdk_1 = require("@builder.io/sdk");
|
|
5
5
|
function FormInputComponent(props) {
|
|
6
|
-
return (<input {...props.attributes} key={sdk_1.Builder.isEditing && props.defaultValue
|
|
7
|
-
? props.defaultValue
|
|
8
|
-
: 'default-key'} placeholder={props.placeholder} type={props.type} name={props.name} value={props.value} defaultValue={props.defaultValue} required={props.required}/>);
|
|
6
|
+
return (<input {...props.attributes} key={sdk_1.Builder.isEditing && props.defaultValue ? props.defaultValue : 'default-key'} placeholder={props.placeholder} type={props.type} name={props.name} value={props.value} defaultValue={props.defaultValue} required={props.required}/>);
|
|
9
7
|
}
|
|
10
8
|
exports.default = FormInputComponent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function MultipleOnUpdate(): JSX.Element;
|
|
1
|
+
export default function MultipleOnUpdate(): import("@builder.io/mitosis/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function MultipleOnUpdateWithDeps(): JSX.Element;
|
|
1
|
+
export default function MultipleOnUpdateWithDeps(): import("@builder.io/mitosis/jsx-runtime").JSX.Element;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
var mitosis_1 = require("@builder.io/mitosis");
|
|
4
4
|
function MultipleOnUpdateWithDeps() {
|
|
5
|
-
var state = (0, mitosis_1.
|
|
5
|
+
var state = (0, mitosis_1.useStore)({
|
|
6
6
|
a: 'a',
|
|
7
7
|
b: 'b',
|
|
8
8
|
c: 'c',
|
|
@@ -10,9 +10,15 @@ function MultipleOnUpdateWithDeps() {
|
|
|
10
10
|
});
|
|
11
11
|
(0, mitosis_1.onUpdate)(function () {
|
|
12
12
|
console.log('Runs when a or b changes', state.a, state.b);
|
|
13
|
+
if (state.a === 'a') {
|
|
14
|
+
state.a = 'b';
|
|
15
|
+
}
|
|
13
16
|
}, [state.a, state.b]);
|
|
14
17
|
(0, mitosis_1.onUpdate)(function () {
|
|
15
18
|
console.log('Runs when c or d changes', state.c, state.d);
|
|
19
|
+
if (state.a === 'a') {
|
|
20
|
+
state.a = 'b';
|
|
21
|
+
}
|
|
16
22
|
}, [state.c, state.d]);
|
|
17
23
|
return <div />;
|
|
18
24
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function OnInit(): import("@builder.io/mitosis/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var mitosis_1 = require("@builder.io/mitosis");
|
|
4
|
+
function OnInit() {
|
|
5
|
+
(0, mitosis_1.onInit)(function () {
|
|
6
|
+
console.log('onInit');
|
|
7
|
+
});
|
|
8
|
+
(0, mitosis_1.onMount)(function () {
|
|
9
|
+
console.log('onMount');
|
|
10
|
+
});
|
|
11
|
+
return <div />;
|
|
12
|
+
}
|
|
13
|
+
exports.default = OnInit;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.defaultValues = void 0;
|
|
4
|
+
var mitosis_1 = require("@builder.io/mitosis");
|
|
5
|
+
exports.defaultValues = {
|
|
6
|
+
name: 'PatrickJS',
|
|
7
|
+
};
|
|
8
|
+
function OnInit(props) {
|
|
9
|
+
var state = (0, mitosis_1.useStore)({
|
|
10
|
+
// name: props.name
|
|
11
|
+
// name: defaultValues.name || props.name,
|
|
12
|
+
name: '',
|
|
13
|
+
});
|
|
14
|
+
(0, mitosis_1.onInit)(function () {
|
|
15
|
+
state.name = exports.defaultValues.name || props.name;
|
|
16
|
+
console.log('set defaults with props');
|
|
17
|
+
});
|
|
18
|
+
return <div>Default name defined by parent {state.name}</div>;
|
|
19
|
+
}
|
|
20
|
+
exports.default = OnInit;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function Comp(): JSX.Element;
|
|
1
|
+
export default function Comp(): import("@builder.io/mitosis/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function OnUpdate(): JSX.Element;
|
|
1
|
+
export default function OnUpdate(): import("@builder.io/mitosis/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function OnUpdateWithDeps(): JSX.Element;
|
|
1
|
+
export default function OnUpdateWithDeps(): import("@builder.io/mitosis/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var mitosis_1 = require("@builder.io/mitosis");
|
|
4
|
+
function SectionStateComponent(props) {
|
|
5
|
+
var state = (0, mitosis_1.useStore)({
|
|
6
|
+
max: 42,
|
|
7
|
+
items: [42],
|
|
8
|
+
});
|
|
9
|
+
return (<mitosis_1.Show when={state.max}>
|
|
10
|
+
<mitosis_1.For each={state.items}>
|
|
11
|
+
{function (item) { return (<section {...props.attributes} style={{ maxWidth: item + state.max }}>
|
|
12
|
+
{props.children}
|
|
13
|
+
</section>); }}
|
|
14
|
+
</mitosis_1.For>
|
|
15
|
+
</mitosis_1.Show>);
|
|
16
|
+
}
|
|
17
|
+
exports.default = SectionStateComponent;
|
|
@@ -8,4 +8,4 @@ export interface FormSelectProps {
|
|
|
8
8
|
value?: string;
|
|
9
9
|
defaultValue?: string;
|
|
10
10
|
}
|
|
11
|
-
export default function SelectComponent(props: FormSelectProps): JSX.Element;
|
|
11
|
+
export default function SelectComponent(props: FormSelectProps): import("@builder.io/mitosis/jsx-runtime").JSX.Element;
|
|
@@ -3,9 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
var mitosis_1 = require("@builder.io/mitosis");
|
|
4
4
|
var sdk_1 = require("@builder.io/sdk");
|
|
5
5
|
function SelectComponent(props) {
|
|
6
|
-
return (<select {...props.attributes} value={props.value} key={sdk_1.Builder.isEditing && props.defaultValue
|
|
7
|
-
? props.defaultValue
|
|
8
|
-
: 'default-key'} defaultValue={props.defaultValue} name={props.name}>
|
|
6
|
+
return (<select {...props.attributes} value={props.value} key={sdk_1.Builder.isEditing && props.defaultValue ? props.defaultValue : 'default-key'} defaultValue={props.defaultValue} name={props.name}>
|
|
9
7
|
<mitosis_1.For each={props.options}>
|
|
10
8
|
{function (option, index) { return (<option value={option.value} data-index={index}>
|
|
11
9
|
{option.name || option.value}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function MyComponent(props: any): JSX.Element;
|
|
1
|
+
export default function MyComponent(props: any): import("@builder.io/mitosis/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function MyComponent(props: any): JSX.Element;
|
|
1
|
+
export default function MyComponent(props: any): import("@builder.io/mitosis/jsx-runtime").JSX.Element;
|
|
@@ -2,5 +2,5 @@ declare type SmileReviewsProps = {
|
|
|
2
2
|
productId: string;
|
|
3
3
|
apiKey: string;
|
|
4
4
|
};
|
|
5
|
-
export default function SmileReviews(props: SmileReviewsProps): JSX.Element;
|
|
5
|
+
export default function SmileReviews(props: SmileReviewsProps): import("@builder.io/mitosis/jsx-runtime").JSX.Element;
|
|
6
6
|
export {};
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
var mitosis_1 = require("@builder.io/mitosis");
|
|
4
4
|
(0, mitosis_1.useMetadata)({ isAttachedToShadowDom: true });
|
|
5
5
|
function SmileReviews(props) {
|
|
6
|
-
var state = (0, mitosis_1.
|
|
6
|
+
var state = (0, mitosis_1.useStore)({
|
|
7
7
|
reviews: [],
|
|
8
8
|
name: 'test',
|
|
9
9
|
showReviewPrompt: false,
|
|
@@ -17,9 +17,7 @@ function SmileReviews(props) {
|
|
|
17
17
|
});
|
|
18
18
|
});
|
|
19
19
|
return (<div data-user={state.name}>
|
|
20
|
-
<button onClick={function () { return (state.showReviewPrompt = true); }}>
|
|
21
|
-
Write a review
|
|
22
|
-
</button>
|
|
20
|
+
<button onClick={function () { return (state.showReviewPrompt = true); }}>Write a review</button>
|
|
23
21
|
<mitosis_1.Show when={state.showReviewPrompt}>
|
|
24
22
|
<input placeholder="Email"/>
|
|
25
23
|
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
var mitosis_1 = require("@builder.io/mitosis");
|
|
7
|
+
var content_slot_jsx_raw_1 = __importDefault(require("./content-slot-jsx.raw"));
|
|
8
|
+
function SlotCode(props) {
|
|
9
|
+
return (<div>
|
|
10
|
+
<content_slot_jsx_raw_1.default>
|
|
11
|
+
<mitosis_1.Slot testing={<div>Hello</div>}></mitosis_1.Slot>
|
|
12
|
+
</content_slot_jsx_raw_1.default>
|
|
13
|
+
</div>);
|
|
14
|
+
}
|
|
15
|
+
exports.default = SlotCode;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
var content_slot_jsx_raw_1 = __importDefault(require("./content-slot-jsx.raw"));
|
|
7
|
+
function SlotCode(props) {
|
|
8
|
+
return (<div>
|
|
9
|
+
<content_slot_jsx_raw_1.default slotTesting={<div>Hello</div>}/>
|
|
10
|
+
</div>);
|
|
11
|
+
}
|
|
12
|
+
exports.default = SlotCode;
|
|
@@ -2,5 +2,5 @@ declare type SmileReviewsProps = {
|
|
|
2
2
|
productId: string;
|
|
3
3
|
apiKey: string;
|
|
4
4
|
};
|
|
5
|
-
export default function SmileReviews(props: SmileReviewsProps): JSX.Element;
|
|
5
|
+
export default function SmileReviews(props: SmileReviewsProps): import("@builder.io/mitosis/jsx-runtime").JSX.Element;
|
|
6
6
|
export {};
|
|
@@ -4,7 +4,7 @@ var mitosis_1 = require("@builder.io/mitosis");
|
|
|
4
4
|
var lodash_1 = require("lodash");
|
|
5
5
|
var lodash_2 = require("lodash");
|
|
6
6
|
function SmileReviews(props) {
|
|
7
|
-
var state = (0, mitosis_1.
|
|
7
|
+
var state = (0, mitosis_1.useStore)({
|
|
8
8
|
reviews: [],
|
|
9
9
|
name: 'test',
|
|
10
10
|
showReviewPrompt: false,
|
|
@@ -24,9 +24,7 @@ function SmileReviews(props) {
|
|
|
24
24
|
});
|
|
25
25
|
});
|
|
26
26
|
return (<div data-user={state.name}>
|
|
27
|
-
<button onClick={function () { return (state.showReviewPrompt = true); }}>
|
|
28
|
-
Write a review
|
|
29
|
-
</button>
|
|
27
|
+
<button onClick={function () { return (state.showReviewPrompt = true); }}>Write a review</button>
|
|
30
28
|
<mitosis_1.Show when={state.showReviewPrompt}>
|
|
31
29
|
<input placeholder="Email"/>
|
|
32
30
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
var sdk_1 = require("@builder.io/sdk");
|
|
4
|
+
var mitosis_1 = require("@builder.io/mitosis");
|
|
4
5
|
function Text(props) {
|
|
5
6
|
var _a, _b, _c, _d, _e, _f;
|
|
6
7
|
var allowEditingText = sdk_1.Builder.isBrowser &&
|
|
@@ -9,9 +10,10 @@ function Text(props) {
|
|
|
9
10
|
!(((_b = (_a = props.builderBlock) === null || _a === void 0 ? void 0 : _a.bindings) === null || _b === void 0 ? void 0 : _b['component.options.text']) ||
|
|
10
11
|
((_d = (_c = props.builderBlock) === null || _c === void 0 ? void 0 : _c.bindings) === null || _d === void 0 ? void 0 : _d['options.text']) ||
|
|
11
12
|
((_f = (_e = props.builderBlock) === null || _e === void 0 ? void 0 : _e.bindings) === null || _f === void 0 ? void 0 : _f['text']));
|
|
13
|
+
var state = (0, mitosis_1.useStore)({ name: 'Decadef20' });
|
|
12
14
|
// TODO: Add back dynamic `direction` CSS prop when we add support for some
|
|
13
15
|
// sort of dynamic CSS
|
|
14
16
|
// css={{ direction: props.rtlMode ? 'rtl' : 'ltr' }}
|
|
15
|
-
return (<div contentEditable={allowEditingText || undefined} innerHTML={props.text || props.content || ''}/>);
|
|
17
|
+
return (<div contentEditable={allowEditingText || undefined} data-name={{ test: state.name || 'any name' }} innerHTML={props.text || props.content || state.name || '<p class="text-lg">my name</p>'}/>);
|
|
16
18
|
}
|
|
17
19
|
exports.default = Text;
|
|
@@ -16,6 +16,6 @@ function Video(props) {
|
|
|
16
16
|
return (<video {...props.attributes} style={__assign(__assign({ width: '100%', height: '100%' }, (_a = props.attributes) === null || _a === void 0 ? void 0 : _a.style), { objectFit: props.fit, objectPosition: props.position,
|
|
17
17
|
// Hack to get object fit to work as expected and
|
|
18
18
|
// not have the video overflow
|
|
19
|
-
borderRadius: 1 })} preload="none" key={props.video || 'no-src'} poster={props.posterImage}
|
|
19
|
+
borderRadius: 1 })} preload="none" key={props.video || 'no-src'} poster={props.posterImage} autoplay={props.autoPlay} muted={props.muted} controls={props.controls} loop={props.loop}/>);
|
|
20
20
|
}
|
|
21
21
|
exports.default = Video;
|
|
@@ -6,9 +6,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
var _1_1 = __importDefault(require("@dummy/1"));
|
|
7
7
|
var _2_1 = __importDefault(require("@dummy/2"));
|
|
8
8
|
var mitosis_1 = require("@builder.io/mitosis");
|
|
9
|
-
function ComponentWithContext() {
|
|
9
|
+
function ComponentWithContext(props) {
|
|
10
10
|
var foo = (0, mitosis_1.useContext)(_1_1.default);
|
|
11
|
-
(0, mitosis_1.setContext)(_1_1.default, {
|
|
11
|
+
(0, mitosis_1.setContext)(_1_1.default, {
|
|
12
|
+
foo: 'bar',
|
|
13
|
+
content: function () {
|
|
14
|
+
return props.content;
|
|
15
|
+
},
|
|
16
|
+
});
|
|
12
17
|
return (<_2_1.default.Provider value={{ bar: 'baz' }}>
|
|
13
18
|
<>{foo.value}</>
|
|
14
19
|
</_2_1.default.Provider>);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function MyBasicComponent(): import("@builder.io/mitosis/jsx-runtime").JSX.Element;
|