@builder.io/mitosis 0.0.56-99 → 0.0.58
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__/data/blocks/content-slot-jsx.raw.jsx +4 -1
- package/dist/src/__tests__/data/blocks/form.raw.jsx +5 -5
- package/dist/src/__tests__/data/blocks/onUpdateWithDeps.raw.d.ts +5 -1
- package/dist/src/__tests__/data/blocks/onUpdateWithDeps.raw.jsx +3 -3
- package/dist/src/__tests__/data/jsx-json.spec.d.ts +2 -0
- package/dist/src/__tests__/data/jsx-json.spec.js +10226 -0
- package/dist/src/__tests__/shared.d.ts +7 -2
- package/dist/src/__tests__/shared.js +66 -9
- package/dist/src/constants/method-literal-prefix.d.ts +0 -1
- package/dist/src/constants/method-literal-prefix.js +0 -3
- package/dist/src/generators/angular.d.ts +2 -2
- package/dist/src/generators/angular.js +14 -6
- package/dist/src/generators/builder.d.ts +4 -11
- package/dist/src/generators/builder.js +3 -2
- package/dist/src/generators/context/qwik.js +1 -1
- package/dist/src/generators/context/svelte.d.ts +3 -0
- package/dist/src/generators/context/svelte.js +3 -0
- package/dist/src/generators/helpers/functions.d.ts +2 -0
- package/dist/src/generators/helpers/functions.js +28 -0
- package/dist/src/generators/html.d.ts +3 -3
- package/dist/src/generators/html.js +9 -7
- package/dist/src/generators/liquid.d.ts +2 -2
- package/dist/src/generators/liquid.js +4 -4
- package/dist/src/generators/lit/generate.d.ts +2 -2
- package/dist/src/generators/lit/generate.js +3 -2
- package/dist/src/generators/marko/generate.d.ts +2 -2
- package/dist/src/generators/marko/generate.js +10 -8
- package/dist/src/generators/mitosis.d.ts +3 -4
- package/dist/src/generators/mitosis.js +3 -2
- package/dist/src/generators/qwik/component-generator.d.ts +2 -2
- package/dist/src/generators/qwik/component-generator.js +68 -64
- package/dist/src/generators/qwik/component.d.ts +0 -1
- package/dist/src/generators/qwik/component.js +22 -19
- package/dist/src/generators/qwik/directives.d.ts +1 -0
- package/dist/src/generators/qwik/directives.js +11 -14
- package/dist/src/generators/qwik/jsx.d.ts +1 -1
- package/dist/src/generators/qwik/jsx.js +9 -5
- package/dist/src/generators/qwik/src-generator.js +11 -3
- package/dist/src/generators/qwik/stable-serialize.d.ts +6 -0
- package/dist/src/generators/qwik/stable-serialize.js +51 -0
- package/dist/src/generators/react/generator.d.ts +6 -0
- package/dist/src/generators/{react.js → react/generator.js} +58 -150
- package/dist/src/generators/react/helpers.d.ts +2 -0
- package/dist/src/generators/react/helpers.js +14 -0
- package/dist/src/generators/react/index.d.ts +2 -0
- package/dist/src/generators/react/index.js +18 -0
- package/dist/src/generators/react/state.d.ts +9 -0
- package/dist/src/generators/react/state.js +107 -0
- package/dist/src/generators/react/types.d.ts +10 -0
- package/dist/src/{types/string-map.js → generators/react/types.js} +0 -0
- package/dist/src/generators/react-native.d.ts +2 -2
- package/dist/src/generators/solid/index.d.ts +3 -0
- package/dist/src/generators/{solid.js → solid/index.js} +80 -40
- package/dist/src/generators/solid/state.d.ts +19 -0
- package/dist/src/generators/solid/state.js +144 -0
- package/dist/src/generators/solid/types.d.ts +6 -0
- package/dist/src/generators/solid/types.js +2 -0
- package/dist/src/generators/stencil/generate.d.ts +2 -2
- package/dist/src/generators/stencil/generate.js +5 -2
- package/dist/src/generators/svelte.d.ts +6 -7
- package/dist/src/generators/svelte.js +43 -40
- package/dist/src/generators/swift-ui.d.ts +3 -5
- package/dist/src/generators/swift-ui.js +3 -2
- package/dist/src/generators/template.d.ts +2 -2
- package/dist/src/generators/template.js +3 -2
- package/dist/src/generators/vue.d.ts +5 -3
- package/dist/src/generators/vue.js +256 -113
- package/dist/src/helpers/babel-transform.d.ts +3 -1
- package/dist/src/helpers/babel-transform.js +52 -56
- package/dist/src/helpers/get-bindings.js +3 -5
- package/dist/src/helpers/get-props.js +14 -1
- package/dist/src/helpers/get-state-object-string.js +24 -21
- package/dist/src/helpers/getters-to-functions.js +1 -11
- package/dist/src/helpers/map-refs.js +25 -25
- package/dist/src/helpers/nodes/for.d.ts +4 -0
- package/dist/src/helpers/nodes/for.js +13 -0
- package/dist/src/helpers/nullable.d.ts +2 -0
- package/dist/src/helpers/nullable.js +7 -0
- package/dist/src/helpers/patterns.d.ts +2 -0
- package/dist/src/helpers/patterns.js +5 -1
- package/dist/src/helpers/render-imports.js +3 -3
- package/dist/src/helpers/replace-identifiers.d.ts +5 -0
- package/dist/src/helpers/{replace-idenifiers.js → replace-identifiers.js} +2 -1
- package/dist/src/helpers/slots.d.ts +2 -0
- package/dist/src/helpers/slots.js +15 -1
- package/dist/src/helpers/state.d.ts +0 -2
- package/dist/src/helpers/state.js +1 -10
- package/dist/src/helpers/strip-state-and-props-refs.d.ts +1 -1
- package/dist/src/helpers/strip-state-and-props-refs.js +43 -31
- package/dist/src/helpers/styles/helpers.d.ts +3 -2
- package/dist/src/index.d.ts +0 -2
- package/dist/src/index.js +0 -2
- package/dist/src/parsers/angular.js +2 -2
- package/dist/src/parsers/builder.d.ts +2 -2
- package/dist/src/parsers/builder.js +61 -43
- package/dist/src/parsers/constants/outdated-prefixes.d.ts +10 -0
- package/dist/src/parsers/constants/outdated-prefixes.js +13 -0
- package/dist/src/parsers/context.js +2 -2
- package/dist/src/parsers/helpers/state.d.ts +3 -0
- package/dist/src/parsers/helpers/state.js +30 -0
- package/dist/src/parsers/jsx/component-types.d.ts +1 -1
- package/dist/src/parsers/jsx/component-types.js +15 -2
- package/dist/src/parsers/jsx/context.js +1 -1
- package/dist/src/parsers/jsx/element-parser.d.ts +6 -0
- package/dist/src/parsers/jsx/element-parser.js +243 -0
- package/dist/src/parsers/jsx/exports.d.ts +3 -0
- package/dist/src/parsers/jsx/exports.js +78 -0
- package/dist/src/parsers/jsx/function-parser.d.ts +7 -0
- package/dist/src/parsers/jsx/function-parser.js +291 -0
- package/dist/src/parsers/jsx/helpers.d.ts +2 -0
- package/dist/src/parsers/jsx/helpers.js +30 -1
- package/dist/src/parsers/jsx/imports.d.ts +7 -0
- package/dist/src/parsers/jsx/imports.js +65 -0
- package/dist/src/parsers/jsx/index.d.ts +1 -1
- package/dist/src/parsers/jsx/index.js +1 -2
- package/dist/src/parsers/jsx/jsx.js +29 -516
- package/dist/src/parsers/jsx/state.d.ts +2 -3
- package/dist/src/parsers/jsx/state.js +15 -22
- package/dist/src/plugins/compile-away-builder-components.js +6 -0
- package/dist/src/symbols/symbol-processor.js +3 -0
- package/dist/src/targets.d.ts +21 -28
- package/dist/src/targets.js +2 -2
- package/dist/src/types/config.d.ts +11 -1
- package/dist/src/types/mitosis-component.d.ts +12 -6
- package/dist/src/types/mitosis-component.js +11 -0
- package/dist/src/types/mitosis-context.d.ts +2 -2
- package/dist/src/types/mitosis-node.d.ts +14 -5
- package/dist/src/types/mitosis-node.js +3 -0
- package/dist/src/types/transpiler.d.ts +6 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +9 -9
- package/dist/src/__tests__/angular.test.d.ts +0 -1
- package/dist/src/__tests__/angular.test.js +0 -10
- package/dist/src/__tests__/builder.test.d.ts +0 -1
- package/dist/src/__tests__/builder.test.js +0 -235
- package/dist/src/__tests__/context.test.d.ts +0 -1
- package/dist/src/__tests__/context.test.js +0 -35
- package/dist/src/__tests__/hash-code.test.d.ts +0 -1
- package/dist/src/__tests__/hash-code.test.js +0 -11
- package/dist/src/__tests__/html.test.d.ts +0 -1
- package/dist/src/__tests__/html.test.js +0 -7
- package/dist/src/__tests__/liquid.test.d.ts +0 -1
- package/dist/src/__tests__/liquid.test.js +0 -7
- package/dist/src/__tests__/lit.test.d.ts +0 -1
- package/dist/src/__tests__/lit.test.js +0 -7
- package/dist/src/__tests__/marko.test.d.ts +0 -1
- package/dist/src/__tests__/marko.test.js +0 -14
- package/dist/src/__tests__/parse-jsx.test.d.ts +0 -1
- package/dist/src/__tests__/parse-jsx.test.js +0 -37
- package/dist/src/__tests__/qwik/convert-method-to-function.test.d.ts +0 -1
- package/dist/src/__tests__/qwik/convert-method-to-function.test.js +0 -37
- package/dist/src/__tests__/qwik/src-generator.test.d.ts +0 -1
- package/dist/src/__tests__/qwik/src-generator.test.js +0 -65
- package/dist/src/__tests__/qwik.directive.test.d.ts +0 -1
- package/dist/src/__tests__/qwik.directive.test.js +0 -108
- package/dist/src/__tests__/qwik.test.d.ts +0 -1
- package/dist/src/__tests__/qwik.test.js +0 -465
- package/dist/src/__tests__/react-native.test.d.ts +0 -1
- package/dist/src/__tests__/react-native.test.js +0 -7
- package/dist/src/__tests__/react.test.d.ts +0 -1
- package/dist/src/__tests__/react.test.js +0 -20
- package/dist/src/__tests__/solid.test.d.ts +0 -1
- package/dist/src/__tests__/solid.test.js +0 -10
- package/dist/src/__tests__/stencil.test.d.ts +0 -1
- package/dist/src/__tests__/stencil.test.js +0 -7
- package/dist/src/__tests__/styles.test.d.ts +0 -1
- package/dist/src/__tests__/styles.test.js +0 -23
- package/dist/src/__tests__/svelte.test.d.ts +0 -1
- package/dist/src/__tests__/svelte.test.js +0 -7
- package/dist/src/__tests__/vue.test.d.ts +0 -1
- package/dist/src/__tests__/vue.test.js +0 -7
- package/dist/src/__tests__/webcomponent.test.d.ts +0 -1
- package/dist/src/__tests__/webcomponent.test.js +0 -15
- package/dist/src/constants/function-literal-prefix.d.ts +0 -1
- package/dist/src/constants/function-literal-prefix.js +0 -4
- package/dist/src/generators/react.d.ts +0 -14
- package/dist/src/generators/solid.d.ts +0 -5
- package/dist/src/helpers/babel-transform.test.d.ts +0 -1
- package/dist/src/helpers/babel-transform.test.js +0 -7
- package/dist/src/helpers/generic-format.test.d.ts +0 -1
- package/dist/src/helpers/generic-format.test.js +0 -8
- package/dist/src/helpers/map-to-attributes.d.ts +0 -2
- package/dist/src/helpers/map-to-attributes.js +0 -19
- package/dist/src/helpers/map-to-css.d.ts +0 -2
- package/dist/src/helpers/map-to-css.js +0 -16
- package/dist/src/helpers/parse-reactive-script.d.ts +0 -7
- package/dist/src/helpers/parse-reactive-script.js +0 -87
- package/dist/src/helpers/remove-surrounding-block.test.d.ts +0 -1
- package/dist/src/helpers/remove-surrounding-block.test.js +0 -9
- package/dist/src/helpers/render-imports.test.d.ts +0 -1
- package/dist/src/helpers/render-imports.test.js +0 -33
- package/dist/src/helpers/replace-idenifiers.d.ts +0 -1
- package/dist/src/helpers/styles/collect-css.test.d.ts +0 -1
- package/dist/src/helpers/styles/collect-css.test.js +0 -18
- package/dist/src/parsers/html.d.ts +0 -0
- package/dist/src/parsers/html.js +0 -2
- package/dist/src/parsers/liquid.d.ts +0 -70
- package/dist/src/parsers/liquid.js +0 -2538
- package/dist/src/types/string-map.d.ts +0 -3
- package/dist/test/qwik/Accordion/high.jsx +0 -0
- package/dist/test/qwik/Accordion/low.jsx +0 -240
- package/dist/test/qwik/Accordion/med.jsx +0 -4
- package/dist/test/qwik/For/high.jsx +0 -0
- package/dist/test/qwik/For/low.jsx +0 -52
- package/dist/test/qwik/For/med.jsx +0 -4
- package/dist/test/qwik/Image/high.js +0 -9
- package/dist/test/qwik/Image/low.js +0 -0
- package/dist/test/qwik/Image/med.js +0 -155
- package/dist/test/qwik/Image.slow/high.js +0 -9
- package/dist/test/qwik/Image.slow/low.js +0 -0
- package/dist/test/qwik/Image.slow/med.js +0 -155
- package/dist/test/qwik/bindings/high.cjs +0 -0
- package/dist/test/qwik/bindings/low.cjs +0 -45
- package/dist/test/qwik/bindings/med.cjs +0 -3
- package/dist/test/qwik/button/high.js +0 -3
- package/dist/test/qwik/button/low.js +0 -25
- package/dist/test/qwik/button/med.js +0 -31
- package/dist/test/qwik/component/bindings/high.jsx +0 -0
- package/dist/test/qwik/component/bindings/low.jsx +0 -104
- package/dist/test/qwik/component/bindings/med.jsx +0 -7
- package/dist/test/qwik/component/component/inputs/high.cjsx +0 -9
- package/dist/test/qwik/component/component/inputs/low.cjsx +0 -0
- package/dist/test/qwik/component/component/inputs/med.cjsx +0 -68
- package/dist/test/qwik/for-loop.bindings/high.cjs +0 -0
- package/dist/test/qwik/for-loop.bindings/low.cjs +0 -56
- package/dist/test/qwik/for-loop.bindings/med.cjs +0 -5
- package/dist/test/qwik/hello_world/stylesheet/high.jsx +0 -0
- package/dist/test/qwik/hello_world/stylesheet/low.jsx +0 -26
- package/dist/test/qwik/hello_world/stylesheet/med.jsx +0 -4
- package/dist/test/qwik/mount/high.cjs +0 -0
- package/dist/test/qwik/mount/low.cjs +0 -47
- package/dist/test/qwik/mount/med.cjs +0 -3
- package/dist/test/qwik/page-with-symbol/high.js +0 -0
- package/dist/test/qwik/page-with-symbol/low.js +0 -33
- package/dist/test/qwik/page-with-symbol/med.js +0 -4
- package/dist/test/qwik/show-hide/high.jsx +0 -9
- package/dist/test/qwik/show-hide/low.jsx +0 -0
- package/dist/test/qwik/show-hide/med.jsx +0 -181
- package/dist/test/qwik/svg/high.js +0 -0
- package/dist/test/qwik/svg/low.js +0 -30
- package/dist/test/qwik/svg/med.js +0 -4
- package/dist/test/qwik/todo/Todo.cjs/high.cjs +0 -19
- package/dist/test/qwik/todo/Todo.cjs/low.cjs +0 -0
- package/dist/test/qwik/todo/Todo.cjs/med.cjs +0 -51
- package/dist/test/qwik/todo/Todo.js/high.js +0 -19
- package/dist/test/qwik/todo/Todo.js/low.js +0 -0
- package/dist/test/qwik/todo/Todo.js/med.js +0 -47
- package/dist/test/qwik/todo/Todo.tsx/high.tsx +0 -19
- package/dist/test/qwik/todo/Todo.tsx/low.tsx +0 -0
- package/dist/test/qwik/todo/Todo.tsx/med.tsx +0 -43
- package/dist/test/qwik/todos/Todo.tsx/high.tsx +0 -7
- package/dist/test/qwik/todos/Todo.tsx/low.tsx +0 -32
- package/dist/test/qwik/todos/Todo.tsx/med.tsx +0 -4
- package/dist/tsconfig.tsbuildinfo +0 -1
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
const Fragment = require("@builder.io/qwik").Fragment;
|
|
2
|
-
const h = require("@builder.io/qwik").h;
|
|
3
|
-
const qrl = require("@builder.io/qwik").qrl;
|
|
4
|
-
const useStore = require("@builder.io/qwik").useStore;
|
|
5
|
-
const withScopedStylesQrl = require("@builder.io/qwik").withScopedStylesQrl;
|
|
6
|
-
exports.MyComponent_styles = `.cjrqfb1{display:flex;flex-direction:column;position:relative;flex-shrink:0;box-sizing:border-box;margin-top:20px;line-height:normal;height:auto;text-align:center}`;
|
|
7
|
-
exports.MyComponent_onMount = (props) => {
|
|
8
|
-
const state = useStore(() => {
|
|
9
|
-
const state = Object.assign(
|
|
10
|
-
{},
|
|
11
|
-
props,
|
|
12
|
-
typeof __STATE__ === "object" ? __STATE__[props.serverStateId] : undefined
|
|
13
|
-
);
|
|
14
|
-
if (!state.hasOwnProperty("title")) state.title = '"Default title value"';
|
|
15
|
-
if (!state.hasOwnProperty("hiliteTitle")) state.hiliteTitle = true;
|
|
16
|
-
return state;
|
|
17
|
-
});
|
|
18
|
-
withScopedStylesQrl(qrl("./low.js", "MyComponent_styles", []));
|
|
19
|
-
return h(
|
|
20
|
-
"div",
|
|
21
|
-
{
|
|
22
|
-
class: "cjrqfb1",
|
|
23
|
-
style: {
|
|
24
|
-
backgroundColor: (() => {
|
|
25
|
-
try {
|
|
26
|
-
return state.hilitTitle ? "red" : "gray";
|
|
27
|
-
} catch (err) {
|
|
28
|
-
console.warn("Builder code error", err);
|
|
29
|
-
}
|
|
30
|
-
})(),
|
|
31
|
-
},
|
|
32
|
-
},
|
|
33
|
-
h("div", {
|
|
34
|
-
class: "builder-text",
|
|
35
|
-
dangerouslySetInnerHTML: (() => {
|
|
36
|
-
try {
|
|
37
|
-
var _virtual_index = state.title;
|
|
38
|
-
return _virtual_index;
|
|
39
|
-
} catch (err) {
|
|
40
|
-
console.warn("Builder code error", err);
|
|
41
|
-
}
|
|
42
|
-
})(),
|
|
43
|
-
})
|
|
44
|
-
);
|
|
45
|
-
};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { CoreButton } from "./med.js";
|
|
2
|
-
import {
|
|
3
|
-
Fragment,
|
|
4
|
-
h,
|
|
5
|
-
qrl,
|
|
6
|
-
useStore,
|
|
7
|
-
withScopedStylesQrl,
|
|
8
|
-
} from "@builder.io/qwik";
|
|
9
|
-
export const MyComponent_styles = `.c9nzze9{display:flex;flex-direction:column;position:relative;flex-shrink:0;box-sizing:border-box;margin-top:20px;appearance:none;padding-top:15px;padding-bottom:15px;padding-left:25px;padding-right:25px;background-color:#3898EC;color:white;border-radius:4px;text-align:center;cursor:pointer}`;
|
|
10
|
-
export const MyComponent_onMount = (props) => {
|
|
11
|
-
const state = useStore(() => {
|
|
12
|
-
const state = Object.assign(
|
|
13
|
-
{},
|
|
14
|
-
props,
|
|
15
|
-
typeof __STATE__ === "object" ? __STATE__[props.serverStateId] : undefined
|
|
16
|
-
);
|
|
17
|
-
return state;
|
|
18
|
-
});
|
|
19
|
-
withScopedStylesQrl(qrl("./low.js", "MyComponent_styles", []));
|
|
20
|
-
return h(CoreButton, {
|
|
21
|
-
text: "Click me!",
|
|
22
|
-
class: "c9nzze9",
|
|
23
|
-
onClick$: qrl("./high.js", "MyComponent_onClick_0", [state]),
|
|
24
|
-
});
|
|
25
|
-
};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { componentQrl, h, qrl } from "@builder.io/qwik";
|
|
2
|
-
export const MyComponent = componentQrl(
|
|
3
|
-
qrl("./low.js", "MyComponent_onMount", [])
|
|
4
|
-
);
|
|
5
|
-
export const CoreButton = function CoreButton(props) {
|
|
6
|
-
var hasLink = !!props.link;
|
|
7
|
-
var hProps = {
|
|
8
|
-
dangerouslySetInnerHTML: props.text || "",
|
|
9
|
-
href: props.link,
|
|
10
|
-
target: props.openInNewTab ? "_blank" : "_self",
|
|
11
|
-
class: props.class,
|
|
12
|
-
};
|
|
13
|
-
return h(
|
|
14
|
-
hasLink ? "a" : props.tagName$ || "span",
|
|
15
|
-
__passThroughProps__(hProps, props)
|
|
16
|
-
);
|
|
17
|
-
};
|
|
18
|
-
export const __passThroughProps__ = function __passThroughProps__(
|
|
19
|
-
dstProps,
|
|
20
|
-
srcProps
|
|
21
|
-
) {
|
|
22
|
-
for (var key in srcProps) {
|
|
23
|
-
if (
|
|
24
|
-
Object.prototype.hasOwnProperty.call(srcProps, key) &&
|
|
25
|
-
((key.startsWith("on") && key.endsWith("$")) || key == "style")
|
|
26
|
-
) {
|
|
27
|
-
dstProps[key] = srcProps[key];
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
return dstProps;
|
|
31
|
-
};
|
|
File without changes
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
import { ComponentD187055AF171488FAD843ACF045D6BF7 } from "./med.js";
|
|
2
|
-
import {
|
|
3
|
-
Fragment,
|
|
4
|
-
h,
|
|
5
|
-
qrl,
|
|
6
|
-
useStore,
|
|
7
|
-
withScopedStylesQrl,
|
|
8
|
-
} from "@builder.io/qwik";
|
|
9
|
-
export const ComponentD187055AF171488FAD843ACF045D6BF7_styles = `.cj49hqu{display:flex;flex-direction:column;position:relative;flex-shrink:0;box-sizing:border-box;margin-top:20px;height:auto;background-color:rgba(227, 227, 227, 1);border-radius:5px;border-style:solid;border-color:rgb(0, 0, 0);border-width:1px;padding-bottom:30px}.cjrqfb1{display:flex;flex-direction:column;position:relative;flex-shrink:0;box-sizing:border-box;margin-top:20px;line-height:normal;height:auto;text-align:center}`;
|
|
10
|
-
export const ComponentD187055AF171488FAD843ACF045D6BF7_onMount = (props) => {
|
|
11
|
-
const state = useStore(() => {
|
|
12
|
-
const state = Object.assign(
|
|
13
|
-
{},
|
|
14
|
-
props,
|
|
15
|
-
typeof __STATE__ === "object" ? __STATE__[props.serverStateId] : undefined
|
|
16
|
-
);
|
|
17
|
-
if (!state.hasOwnProperty("title")) state.title = "default-title";
|
|
18
|
-
return state;
|
|
19
|
-
});
|
|
20
|
-
withScopedStylesQrl(
|
|
21
|
-
qrl("./low.js", "ComponentD187055AF171488FAD843ACF045D6BF7_styles", [])
|
|
22
|
-
);
|
|
23
|
-
return (
|
|
24
|
-
<div
|
|
25
|
-
builder-id="builder-139a8479536b4c4f9c2738e724ed0952"
|
|
26
|
-
class="cj49hqu builder-block"
|
|
27
|
-
>
|
|
28
|
-
<div class="cjrqfb1">
|
|
29
|
-
<div
|
|
30
|
-
class="builder-text"
|
|
31
|
-
dangerouslySetInnerHTML={(() => {
|
|
32
|
-
try {
|
|
33
|
-
var _virtual_index = state.title;
|
|
34
|
-
return _virtual_index;
|
|
35
|
-
} catch (err) {
|
|
36
|
-
console.warn("Builder code error", err);
|
|
37
|
-
}
|
|
38
|
-
})()}
|
|
39
|
-
></div>
|
|
40
|
-
</div>
|
|
41
|
-
</div>
|
|
42
|
-
);
|
|
43
|
-
};
|
|
44
|
-
export const MyComponent_styles = `.c713ty2{display:flex;flex-direction:column;position:relative;flex-shrink:0;box-sizing:border-box;margin-top:20px}`;
|
|
45
|
-
export const MyComponent_onMount = (props) => {
|
|
46
|
-
const state = useStore(() => {
|
|
47
|
-
const state = Object.assign(
|
|
48
|
-
{},
|
|
49
|
-
props,
|
|
50
|
-
typeof __STATE__ === "object" ? __STATE__[props.serverStateId] : undefined
|
|
51
|
-
);
|
|
52
|
-
/*
|
|
53
|
-
* Global objects available:
|
|
54
|
-
*
|
|
55
|
-
* state - builder state object - learn about state https://www.builder.io/c/docs/guides/state-and-actions
|
|
56
|
-
* context - builder context object - learn about state https://github.com/BuilderIO/builder/tree/main/packages/react#passing-data-and-functions-down
|
|
57
|
-
* fetch - Fetch API - https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API'
|
|
58
|
-
* Builder - Builder object - useful values include: Builder.isServer, Builder.isBrowser, Builder.isPreviewing, Builder.isEditing
|
|
59
|
-
*
|
|
60
|
-
* visit https://www.builder.io/c/docs/guides/custom-code
|
|
61
|
-
* for more information on writing custom code
|
|
62
|
-
*/
|
|
63
|
-
async function main() {
|
|
64
|
-
if (Builder.isServer) {
|
|
65
|
-
// Place any code here you want to only run on the server. Any
|
|
66
|
-
// data fetched on the server will be available to re-hydrate on the client
|
|
67
|
-
// if added to the state object
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
if (Builder.isBrowser) {
|
|
71
|
-
// Place code that you only want to run in the browser (client side only) here
|
|
72
|
-
// For example, anything that uses document/window access or DOM manipulation
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
state.something = "works!";
|
|
76
|
-
}
|
|
77
|
-
return state;
|
|
78
|
-
});
|
|
79
|
-
withScopedStylesQrl(qrl("./low.js", "MyComponent_styles", []));
|
|
80
|
-
return (
|
|
81
|
-
<>
|
|
82
|
-
<div
|
|
83
|
-
builder-id="builder-50b2438beaa4498b985eb9d8a7659afa"
|
|
84
|
-
class="c713ty2 builder-block"
|
|
85
|
-
>
|
|
86
|
-
<ComponentD187055AF171488FAD843ACF045D6BF7
|
|
87
|
-
builder-id="builder-l6nwek"
|
|
88
|
-
title="First title from parent"
|
|
89
|
-
serverStateId="w8x6w6"
|
|
90
|
-
></ComponentD187055AF171488FAD843ACF045D6BF7>
|
|
91
|
-
</div>
|
|
92
|
-
<div
|
|
93
|
-
builder-id="builder-33f427415bef4725b0c9fcd4fed325f2"
|
|
94
|
-
class="c713ty2 builder-block"
|
|
95
|
-
>
|
|
96
|
-
<ComponentD187055AF171488FAD843ACF045D6BF7
|
|
97
|
-
builder-id="builder-1iryyq"
|
|
98
|
-
title="Second title from parent"
|
|
99
|
-
serverStateId="w8x6w6"
|
|
100
|
-
></ComponentD187055AF171488FAD843ACF045D6BF7>
|
|
101
|
-
</div>
|
|
102
|
-
</>
|
|
103
|
-
);
|
|
104
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { componentQrl, qrl } from "@builder.io/qwik";
|
|
2
|
-
export const ComponentD187055AF171488FAD843ACF045D6BF7 = componentQrl(
|
|
3
|
-
qrl("./low.js", "ComponentD187055AF171488FAD843ACF045D6BF7_onMount", [])
|
|
4
|
-
);
|
|
5
|
-
export const MyComponent = componentQrl(
|
|
6
|
-
qrl("./low.js", "MyComponent_onMount", [])
|
|
7
|
-
);
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
const useLexicalScope = require("@builder.io/qwik").useLexicalScope;
|
|
2
|
-
exports.MyComponent_onClick_0 = (event) => {
|
|
3
|
-
const state = useLexicalScope()[0];
|
|
4
|
-
try {
|
|
5
|
-
return (state.data = state.data + 1);
|
|
6
|
-
} catch (err) {
|
|
7
|
-
console.warn("Builder code error", err);
|
|
8
|
-
}
|
|
9
|
-
};
|
|
File without changes
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
const Fragment = require("@builder.io/qwik").Fragment;
|
|
2
|
-
const componentQrl = require("@builder.io/qwik").componentQrl;
|
|
3
|
-
const h = require("@builder.io/qwik").h;
|
|
4
|
-
const qrl = require("@builder.io/qwik").qrl;
|
|
5
|
-
const useStore = require("@builder.io/qwik").useStore;
|
|
6
|
-
const withScopedStylesQrl = require("@builder.io/qwik").withScopedStylesQrl;
|
|
7
|
-
exports.MyComponent_styles = `.cjrqfb1{display:flex;flex-direction:column;position:relative;flex-shrink:0;box-sizing:border-box;margin-top:20px;line-height:normal;height:auto;text-align:center}.c9nzze9{display:flex;flex-direction:column;position:relative;flex-shrink:0;box-sizing:border-box;margin-top:20px;appearance:none;padding-top:15px;padding-bottom:15px;padding-left:25px;padding-right:25px;background-color:#3898EC;color:white;border-radius:4px;text-align:center;cursor:pointer}`;
|
|
8
|
-
exports.MyComponent_onMount = (props) => {
|
|
9
|
-
const state = useStore(() => {
|
|
10
|
-
const state = Object.assign(
|
|
11
|
-
{},
|
|
12
|
-
props,
|
|
13
|
-
typeof __STATE__ === "object" ? __STATE__[props.serverStateId] : undefined
|
|
14
|
-
);
|
|
15
|
-
if (!state.hasOwnProperty("data")) state.data = 0;
|
|
16
|
-
return state;
|
|
17
|
-
});
|
|
18
|
-
withScopedStylesQrl(qrl("./med.js", "MyComponent_styles", []));
|
|
19
|
-
return (
|
|
20
|
-
<>
|
|
21
|
-
<div class="cjrqfb1">
|
|
22
|
-
<div
|
|
23
|
-
class="builder-text"
|
|
24
|
-
dangerouslySetInnerHTML={(() => {
|
|
25
|
-
try {
|
|
26
|
-
var _virtual_index = state.data;
|
|
27
|
-
return _virtual_index;
|
|
28
|
-
} catch (err) {
|
|
29
|
-
console.warn("Builder code error", err);
|
|
30
|
-
}
|
|
31
|
-
})()}
|
|
32
|
-
></div>
|
|
33
|
-
</div>
|
|
34
|
-
<CoreButton
|
|
35
|
-
builder-id="builder-6f8fe6a1d2284f2890ae97657eed084a"
|
|
36
|
-
text="Something else"
|
|
37
|
-
class="c9nzze9 builder-block"
|
|
38
|
-
onClick$={qrl("./high.js", "MyComponent_onClick_0", [state])}
|
|
39
|
-
></CoreButton>
|
|
40
|
-
</>
|
|
41
|
-
);
|
|
42
|
-
};
|
|
43
|
-
exports.MyComponent = componentQrl(qrl("./med.js", "MyComponent_onMount", []));
|
|
44
|
-
const CoreButton = (exports.CoreButton = function CoreButton(props) {
|
|
45
|
-
var hasLink = !!props.link;
|
|
46
|
-
var hProps = {
|
|
47
|
-
dangerouslySetInnerHTML: props.text || "",
|
|
48
|
-
href: props.link,
|
|
49
|
-
target: props.openInNewTab ? "_blank" : "_self",
|
|
50
|
-
class: props.class,
|
|
51
|
-
};
|
|
52
|
-
return h(
|
|
53
|
-
hasLink ? "a" : props.tagName$ || "span",
|
|
54
|
-
__passThroughProps__(hProps, props)
|
|
55
|
-
);
|
|
56
|
-
});
|
|
57
|
-
const __passThroughProps__ = (exports.__passThroughProps__ =
|
|
58
|
-
function __passThroughProps__(dstProps, srcProps) {
|
|
59
|
-
for (var key in srcProps) {
|
|
60
|
-
if (
|
|
61
|
-
Object.prototype.hasOwnProperty.call(srcProps, key) &&
|
|
62
|
-
((key.startsWith("on") && key.endsWith("$")) || key == "style")
|
|
63
|
-
) {
|
|
64
|
-
dstProps[key] = srcProps[key];
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
return dstProps;
|
|
68
|
-
});
|
|
File without changes
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
const Component000013 = require("./med.js").Component000013;
|
|
2
|
-
const Fragment = require("@builder.io/qwik").Fragment;
|
|
3
|
-
const h = require("@builder.io/qwik").h;
|
|
4
|
-
const qrl = require("@builder.io/qwik").qrl;
|
|
5
|
-
const useStore = require("@builder.io/qwik").useStore;
|
|
6
|
-
const withScopedStylesQrl = require("@builder.io/qwik").withScopedStylesQrl;
|
|
7
|
-
exports.Component000012_styles = `.cv6ku2d{display:flex;flex-direction:row;position:relative;flex-shrink:0;box-sizing:border-box;margin-top:20px;padding-bottom:30px;flex-wrap:wrap;width:calc(100%+3vw);height:100%;min-height:100%;margin-left:-1.5vw;margin-right:-1.5vw}.c3j7e6c{display:flex;flex-direction:column;position:relative;flex-shrink:0;box-sizing:border-box;margin-top:20px;width:33.3%}@media (max-width: 991px){.cv6ku2d{width:100%;margin-left:auto;margin-right:auto}}@media (max-width: 640px){.cv6ku2d{display:flex;flex-direction:column;align-items:stretch}}@media (max-width: 640px){.c3j7e6c{width:98%;margin-left:auto;margin-right:auto;margin-top:-10px}}`;
|
|
8
|
-
exports.Component000012_onMount = (props) => {
|
|
9
|
-
const state = useStore(() => {
|
|
10
|
-
const state = Object.assign(
|
|
11
|
-
{},
|
|
12
|
-
props,
|
|
13
|
-
typeof __STATE__ === "object" ? __STATE__[props.serverStateId] : undefined
|
|
14
|
-
);
|
|
15
|
-
if (!state.hasOwnProperty("offset")) state.offset = "0";
|
|
16
|
-
if (!state.hasOwnProperty("limit")) state.limit = 3;
|
|
17
|
-
if (!state.hasOwnProperty("blogCategory"))
|
|
18
|
-
state.blogCategory = {
|
|
19
|
-
"@type": "@builder.io/core:Reference",
|
|
20
|
-
id: "",
|
|
21
|
-
model: "",
|
|
22
|
-
};
|
|
23
|
-
return state;
|
|
24
|
-
});
|
|
25
|
-
withScopedStylesQrl(qrl("./low.js", "Component000012_styles", []));
|
|
26
|
-
return h(
|
|
27
|
-
"div",
|
|
28
|
-
{
|
|
29
|
-
"builder-id": "builder-d2b6ee30433348ffa51a17334b8b6c73",
|
|
30
|
-
class: "cv6ku2d builder-block",
|
|
31
|
-
},
|
|
32
|
-
(state.hits || []).map((item) => {
|
|
33
|
-
var state = Object.assign({}, this, {
|
|
34
|
-
hitsItem: item == null ? {} : item,
|
|
35
|
-
});
|
|
36
|
-
return h(
|
|
37
|
-
"div",
|
|
38
|
-
{
|
|
39
|
-
"builder-id": "builder-cc43bc95cde743a59b269cb0157b99cd",
|
|
40
|
-
class: "c3j7e6c",
|
|
41
|
-
},
|
|
42
|
-
h(Component000013, {
|
|
43
|
-
"builder-id": "builder-cx8eewmyu3",
|
|
44
|
-
altText: "",
|
|
45
|
-
serverStateId: "woo8b6",
|
|
46
|
-
title: state.hitsItem.name,
|
|
47
|
-
linkUrl: state.hitsItem.url,
|
|
48
|
-
subCategory: state.hitsItem.blogSubcategory,
|
|
49
|
-
imageUrl: state.hitsItem.heroImage,
|
|
50
|
-
publicationDate: state.hitsItem.createdDate,
|
|
51
|
-
heroImageAltText: state.hitsItem.heroImageAltText,
|
|
52
|
-
})
|
|
53
|
-
);
|
|
54
|
-
})
|
|
55
|
-
);
|
|
56
|
-
};
|
|
File without changes
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Fragment,
|
|
3
|
-
h,
|
|
4
|
-
qrl,
|
|
5
|
-
useStore,
|
|
6
|
-
withScopedStylesQrl,
|
|
7
|
-
} from "@builder.io/qwik";
|
|
8
|
-
export const MyComponent_styles = `.crt27f8{display:flex;flex-direction:column;position:relative;flex-shrink:0;box-sizing:border-box;margin-top:123px;line-height:normal;height:auto;text-align:center;margin-left:auto;margin-right:auto}`;
|
|
9
|
-
export const MyComponent_onMount = (props) => {
|
|
10
|
-
const state = useStore(() => {
|
|
11
|
-
const state = Object.assign(
|
|
12
|
-
{},
|
|
13
|
-
props,
|
|
14
|
-
typeof __STATE__ === "object" ? __STATE__[props.serverStateId] : undefined
|
|
15
|
-
);
|
|
16
|
-
return state;
|
|
17
|
-
});
|
|
18
|
-
withScopedStylesQrl(qrl("./low.js", "MyComponent_styles", []));
|
|
19
|
-
return (
|
|
20
|
-
<div class="crt27f8">
|
|
21
|
-
<p>
|
|
22
|
-
Hello <span class="names">World</span>
|
|
23
|
-
</p>
|
|
24
|
-
</div>
|
|
25
|
-
);
|
|
26
|
-
};
|
|
File without changes
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
const Fragment = require("@builder.io/qwik").Fragment;
|
|
2
|
-
const h = require("@builder.io/qwik").h;
|
|
3
|
-
const qrl = require("@builder.io/qwik").qrl;
|
|
4
|
-
const useStore = require("@builder.io/qwik").useStore;
|
|
5
|
-
const withScopedStylesQrl = require("@builder.io/qwik").withScopedStylesQrl;
|
|
6
|
-
exports.MyComponent_styles = `.cjrqfb1{display:flex;flex-direction:column;position:relative;flex-shrink:0;box-sizing:border-box;margin-top:20px;line-height:normal;height:auto;text-align:center}`;
|
|
7
|
-
exports.MyComponent_onMount = (props) => {
|
|
8
|
-
const state = useStore(() => {
|
|
9
|
-
const state = Object.assign(
|
|
10
|
-
{},
|
|
11
|
-
props,
|
|
12
|
-
typeof __STATE__ === "object" ? __STATE__[props.serverStateId] : undefined
|
|
13
|
-
);
|
|
14
|
-
if (!state.hasOwnProperty("title")) state.title = '"Default title value"';
|
|
15
|
-
if (!state.hasOwnProperty("hiliteTitle")) state.hiliteTitle = true;
|
|
16
|
-
var _virtual_index = 1234;
|
|
17
|
-
_virtual_index;
|
|
18
|
-
return state;
|
|
19
|
-
});
|
|
20
|
-
withScopedStylesQrl(qrl("./low.js", "MyComponent_styles", []));
|
|
21
|
-
return h(
|
|
22
|
-
"div",
|
|
23
|
-
{
|
|
24
|
-
class: "cjrqfb1",
|
|
25
|
-
style: {
|
|
26
|
-
backgroundColor: (() => {
|
|
27
|
-
try {
|
|
28
|
-
return state.hilitTitle ? "red" : "gray";
|
|
29
|
-
} catch (err) {
|
|
30
|
-
console.warn("Builder code error", err);
|
|
31
|
-
}
|
|
32
|
-
})(),
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
h("div", {
|
|
36
|
-
class: "builder-text",
|
|
37
|
-
dangerouslySetInnerHTML: (() => {
|
|
38
|
-
try {
|
|
39
|
-
var _virtual_index = state.title;
|
|
40
|
-
return _virtual_index;
|
|
41
|
-
} catch (err) {
|
|
42
|
-
console.warn("Builder code error", err);
|
|
43
|
-
}
|
|
44
|
-
})(),
|
|
45
|
-
})
|
|
46
|
-
);
|
|
47
|
-
};
|
|
File without changes
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { Symbol1 } from "./med.js";
|
|
2
|
-
import {
|
|
3
|
-
Fragment,
|
|
4
|
-
h,
|
|
5
|
-
qrl,
|
|
6
|
-
useStore,
|
|
7
|
-
withScopedStylesQrl,
|
|
8
|
-
} from "@builder.io/qwik";
|
|
9
|
-
export const MyComponent_styles = `.c713ty2{display:flex;flex-direction:column;position:relative;flex-shrink:0;box-sizing:border-box;margin-top:20px}.cxvcn5v{display:flex;flex-direction:column;position:relative;flex-shrink:0;box-sizing:border-box;margin-top:20px;line-height:normal;height:auto;text-align:center;padding-top:1em;padding-bottom:1em;font-weight:700;font-size:24px}`;
|
|
10
|
-
export const MyComponent_onMount = (props) => {
|
|
11
|
-
const state = useStore(() => {
|
|
12
|
-
const state = Object.assign(
|
|
13
|
-
{},
|
|
14
|
-
props,
|
|
15
|
-
typeof __STATE__ === "object" ? __STATE__[props.serverStateId] : undefined
|
|
16
|
-
);
|
|
17
|
-
return state;
|
|
18
|
-
});
|
|
19
|
-
withScopedStylesQrl(qrl("./low.js", "MyComponent_styles", []));
|
|
20
|
-
return h(
|
|
21
|
-
Fragment,
|
|
22
|
-
null,
|
|
23
|
-
h(Symbol1, {
|
|
24
|
-
class: "c713ty2",
|
|
25
|
-
symbol: {
|
|
26
|
-
model: "page",
|
|
27
|
-
entry: "36da1052e57e47f084ea8b1fbde248e4",
|
|
28
|
-
data: {},
|
|
29
|
-
},
|
|
30
|
-
}),
|
|
31
|
-
h("div", { class: "cxvcn5v" }, "<p>Main Text</p>")
|
|
32
|
-
);
|
|
33
|
-
};
|
|
File without changes
|