@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
|
@@ -4,31 +4,37 @@ export declare type MitosisNode = {
|
|
|
4
4
|
name: string;
|
|
5
5
|
meta: JSONObject;
|
|
6
6
|
/**
|
|
7
|
-
* Key-value store of
|
|
7
|
+
* Key-value store of string values for DOM attributes.
|
|
8
8
|
* ```js
|
|
9
9
|
* {
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* width: 100,
|
|
10
|
+
* defaultValue: 'initial text',
|
|
11
|
+
* width: '100px',
|
|
13
12
|
* }
|
|
14
13
|
* ```
|
|
15
14
|
*/
|
|
15
|
+
scope: {
|
|
16
|
+
[key: string]: Array<string>;
|
|
17
|
+
};
|
|
16
18
|
properties: {
|
|
17
19
|
[key: string]: string | undefined;
|
|
18
20
|
};
|
|
19
21
|
/**
|
|
20
|
-
* Key-value store of
|
|
22
|
+
* Key-value store of expression values for DOM attributes. These are always represented as strings.
|
|
21
23
|
*
|
|
22
24
|
* ```js
|
|
23
25
|
* {
|
|
24
|
-
* disabled: state.isDisabled,
|
|
25
|
-
* defaultValue: `${props.text} + ' initial'
|
|
26
|
-
* width: props.width * 10,
|
|
26
|
+
* disabled: "state.isDisabled",
|
|
27
|
+
* defaultValue: "`${props.text} + ' initial'`",
|
|
28
|
+
* width: "props.width * 10",
|
|
29
|
+
* height: "100",
|
|
27
30
|
* }
|
|
28
31
|
* ```
|
|
29
32
|
*/
|
|
30
33
|
bindings: {
|
|
31
|
-
[key: string]:
|
|
34
|
+
[key: string]: {
|
|
35
|
+
code: string;
|
|
36
|
+
arguments?: string[];
|
|
37
|
+
} | undefined;
|
|
32
38
|
};
|
|
33
39
|
children: MitosisNode[];
|
|
34
40
|
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { MitosisComponent } from './mitosis-component';
|
|
2
|
+
import { Plugin } from './plugins';
|
|
3
|
+
export interface TranspilerArgs {
|
|
4
|
+
path?: string;
|
|
5
|
+
component: MitosisComponent;
|
|
6
|
+
}
|
|
7
|
+
export declare type Transpiler = (args: TranspilerArgs) => string;
|
|
8
|
+
export interface BaseTranspilerOptions {
|
|
9
|
+
experimental?: {
|
|
10
|
+
[key: string]: any;
|
|
11
|
+
};
|
|
12
|
+
prettier?: boolean;
|
|
13
|
+
plugins?: Plugin[];
|
|
14
|
+
}
|
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
import { h, qrl,
|
|
1
|
+
import { Fragment, h, qrl, withScopedStylesQrl } from "@builder.io/qwik";
|
|
2
2
|
export const MyComponent_styles = `.csw5022{display:flex;flex-direction:column;position:relative;flex-shrink:0;box-sizing:border-box;margin-top:20px;align-items:stretch}.csanagh{margin-top:10px;position:relative;display:flex;align-items:stretch;flex-direction:column;padding-bottom:10px}.c4qyc1p{position:relative;display:flex;align-items:stretch;flex-direction:column;margin-top:10px;padding-bottom:10px}.crwdrpw{text-align:left;display:flex;flex-direction:column}.ctcw2m4{padding-top:50px;text-align:left;display:flex;flex-direction:column;padding-bottom:50px}`;
|
|
3
|
-
export const
|
|
4
|
-
|
|
3
|
+
export const MyComponent_onMount = (state) => {
|
|
4
|
+
if (!state.__INIT__) {
|
|
5
|
+
state.__INIT__ = true;
|
|
6
|
+
typeof __STATE__ === "object" &&
|
|
7
|
+
Object.assign(state, __STATE__[state.serverStateId]);
|
|
8
|
+
undefined;
|
|
9
|
+
}
|
|
10
|
+
withScopedStylesQrl(qrl("./low.js", "MyComponent_styles", []));
|
|
5
11
|
return (
|
|
6
12
|
<div
|
|
7
13
|
gridRowWidth="25%"
|
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
import { componentQrl, qrl
|
|
2
|
-
export const MyComponent_onMount = (state) => {
|
|
3
|
-
typeof __STATE__ === "object" &&
|
|
4
|
-
Object.assign(state, __STATE__[state.serverStateId]);
|
|
5
|
-
withScopedStylesQrl(qrl("./low.js", "MyComponent_styles", []));
|
|
6
|
-
return qrl("./low.js", "MyComponent_onRender", [state]);
|
|
7
|
-
};
|
|
1
|
+
import { componentQrl, qrl } from "@builder.io/qwik";
|
|
8
2
|
export const MyComponent = componentQrl(
|
|
9
|
-
qrl("./
|
|
3
|
+
qrl("./low.js", "MyComponent_onMount", [])
|
|
10
4
|
);
|
|
@@ -1,32 +1,36 @@
|
|
|
1
|
-
import { h, qrl,
|
|
1
|
+
import { Fragment, h, qrl, withScopedStylesQrl } from "@builder.io/qwik";
|
|
2
2
|
export const MyComponent_styles = `.cvdfnp5{display:flex;flex-direction:column;position:relative;flex-shrink:0;box-sizing:border-box;margin-top:0px;padding-left:20px;padding-right:20px;padding-top:50px;padding-bottom:50px;width:100vw;margin-left:calc(50% - 50vw)}.cz5wnof{width:100%;align-self:stretch;flex-grow:1;box-sizing:border-box;max-width:1200px;display:flex;flex-direction:column;align-items:stretch;margin-left:auto;margin-right:auto}.cdrk993{text-align:center}`;
|
|
3
|
-
export const
|
|
4
|
-
|
|
3
|
+
export const MyComponent_onMount = (state) => {
|
|
4
|
+
if (!state.__INIT__) {
|
|
5
|
+
state.__INIT__ = true;
|
|
6
|
+
typeof __STATE__ === "object" &&
|
|
7
|
+
Object.assign(state, __STATE__[state.serverStateId]);
|
|
8
|
+
undefined;
|
|
9
|
+
}
|
|
10
|
+
withScopedStylesQrl(qrl("./low.js", "MyComponent_styles", []));
|
|
5
11
|
return (
|
|
6
12
|
<div class="cvdfnp5" maxWidth={1200}>
|
|
7
13
|
<section class="cz5wnof">
|
|
8
|
-
{(state.simpleList.results || []).map(
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
<div
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}.bind(state)
|
|
29
|
-
)}
|
|
14
|
+
{(state.simpleList.results || []).map((item) => {
|
|
15
|
+
var state = Object.assign({}, this, {
|
|
16
|
+
resultsItem: item == null ? {} : item,
|
|
17
|
+
});
|
|
18
|
+
return (
|
|
19
|
+
<div class="cdrk993">
|
|
20
|
+
<div
|
|
21
|
+
class="builder-text"
|
|
22
|
+
innerHTML={(() => {
|
|
23
|
+
try {
|
|
24
|
+
var _virtual_index = state.resultsItem.data.title;
|
|
25
|
+
return _virtual_index;
|
|
26
|
+
} catch (err) {
|
|
27
|
+
console.warn("Builder code error", err);
|
|
28
|
+
}
|
|
29
|
+
})()}
|
|
30
|
+
></div>
|
|
31
|
+
</div>
|
|
32
|
+
);
|
|
33
|
+
})}
|
|
30
34
|
</section>
|
|
31
35
|
</div>
|
|
32
36
|
);
|
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
import { componentQrl, qrl
|
|
2
|
-
export const MyComponent_onMount = (state) => {
|
|
3
|
-
typeof __STATE__ === "object" &&
|
|
4
|
-
Object.assign(state, __STATE__[state.serverStateId]);
|
|
5
|
-
withScopedStylesQrl(qrl("./low.js", "MyComponent_styles", []));
|
|
6
|
-
return qrl("./low.js", "MyComponent_onRender", [state]);
|
|
7
|
-
};
|
|
1
|
+
import { componentQrl, qrl } from "@builder.io/qwik";
|
|
8
2
|
export const MyComponent = componentQrl(
|
|
9
|
-
qrl("./
|
|
3
|
+
qrl("./low.js", "MyComponent_onMount", [])
|
|
10
4
|
);
|
|
@@ -3,22 +3,18 @@ import {
|
|
|
3
3
|
componentQrl,
|
|
4
4
|
h,
|
|
5
5
|
qrl,
|
|
6
|
-
useLexicalScope,
|
|
7
6
|
withScopedStylesQrl,
|
|
8
7
|
} from "@builder.io/qwik";
|
|
9
8
|
export const MyComponent_styles = `.cvk52jt{display:flex;flex-direction:column;position:relative;flex-shrink:0;box-sizing:border-box;margin-top:20px;min-height:20px;min-width:20px;overflow:hidden}.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
9
|
export const MyComponent_onMount = (state) => {
|
|
11
|
-
if (state.
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
if (!state.__INIT__) {
|
|
11
|
+
state.__INIT__ = true;
|
|
12
|
+
if (!state.hasOwnProperty("myState")) state.myState = "initialValue";
|
|
13
|
+
typeof __STATE__ === "object" &&
|
|
14
|
+
Object.assign(state, __STATE__[state.serverStateId]);
|
|
15
|
+
undefined;
|
|
16
|
+
}
|
|
14
17
|
withScopedStylesQrl(qrl("./med.js", "MyComponent_styles", []));
|
|
15
|
-
return qrl("./med.js", "MyComponent_onRender", [state]);
|
|
16
|
-
};
|
|
17
|
-
export const MyComponent = componentQrl(
|
|
18
|
-
qrl("./med.js", "MyComponent_onMount", [])
|
|
19
|
-
);
|
|
20
|
-
export const MyComponent_onRender = () => {
|
|
21
|
-
const state = useLexicalScope()[0];
|
|
22
18
|
return h(
|
|
23
19
|
Fragment,
|
|
24
20
|
null,
|
|
@@ -55,6 +51,9 @@ export const MyComponent_onRender = () => {
|
|
|
55
51
|
)
|
|
56
52
|
);
|
|
57
53
|
};
|
|
54
|
+
export const MyComponent = componentQrl(
|
|
55
|
+
qrl("./med.js", "MyComponent_onMount", [])
|
|
56
|
+
);
|
|
58
57
|
export const Image = function Image(props) {
|
|
59
58
|
var _a;
|
|
60
59
|
var jsx = props.children || [];
|
|
@@ -81,12 +80,15 @@ export const Image = function Image(props) {
|
|
|
81
80
|
srcset: undefined,
|
|
82
81
|
};
|
|
83
82
|
if (isBuilderIoImage) {
|
|
84
|
-
|
|
83
|
+
var webpImage_1 = updateQueryParam(image, "format", "webp");
|
|
85
84
|
var srcset = ["100", "200", "400", "800", "1200", "1600", "2000"]
|
|
86
85
|
.concat(props.srcsetSizes ? String(props.srcsetSizes).split(" ") : [])
|
|
87
86
|
.map(function (size) {
|
|
88
|
-
return
|
|
87
|
+
return (
|
|
88
|
+
updateQueryParam(webpImage_1, "width", size) + " " + size + "w"
|
|
89
|
+
);
|
|
89
90
|
})
|
|
91
|
+
.concat([image])
|
|
90
92
|
.join(",");
|
|
91
93
|
imgProps.srcset = srcset;
|
|
92
94
|
jsx = jsx = [
|
|
@@ -3,22 +3,18 @@ import {
|
|
|
3
3
|
componentQrl,
|
|
4
4
|
h,
|
|
5
5
|
qrl,
|
|
6
|
-
useLexicalScope,
|
|
7
6
|
withScopedStylesQrl,
|
|
8
7
|
} from "@builder.io/qwik";
|
|
9
8
|
export const MyComponent_styles = `.cvk52jt{display:flex;flex-direction:column;position:relative;flex-shrink:0;box-sizing:border-box;margin-top:20px;min-height:20px;min-width:20px;overflow:hidden}.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
9
|
export const MyComponent_onMount = (state) => {
|
|
11
|
-
if (state.
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
if (!state.__INIT__) {
|
|
11
|
+
state.__INIT__ = true;
|
|
12
|
+
if (!state.hasOwnProperty("myState")) state.myState = "initialValue";
|
|
13
|
+
typeof __STATE__ === "object" &&
|
|
14
|
+
Object.assign(state, __STATE__[state.serverStateId]);
|
|
15
|
+
undefined;
|
|
16
|
+
}
|
|
14
17
|
withScopedStylesQrl(qrl("./med.js", "MyComponent_styles", []));
|
|
15
|
-
return qrl("./med.js", "MyComponent_onRender", [state]);
|
|
16
|
-
};
|
|
17
|
-
export const MyComponent = componentQrl(
|
|
18
|
-
qrl("./med.js", "MyComponent_onMount", [])
|
|
19
|
-
);
|
|
20
|
-
export const MyComponent_onRender = () => {
|
|
21
|
-
const state = useLexicalScope()[0];
|
|
22
18
|
return h(
|
|
23
19
|
Fragment,
|
|
24
20
|
null,
|
|
@@ -55,6 +51,9 @@ export const MyComponent_onRender = () => {
|
|
|
55
51
|
)
|
|
56
52
|
);
|
|
57
53
|
};
|
|
54
|
+
export const MyComponent = componentQrl(
|
|
55
|
+
qrl("./med.js", "MyComponent_onMount", [])
|
|
56
|
+
);
|
|
58
57
|
export const Image = function Image(props) {
|
|
59
58
|
var _a;
|
|
60
59
|
var jsx = props.children || [];
|
|
@@ -81,12 +80,15 @@ export const Image = function Image(props) {
|
|
|
81
80
|
srcset: undefined,
|
|
82
81
|
};
|
|
83
82
|
if (isBuilderIoImage) {
|
|
84
|
-
|
|
83
|
+
var webpImage_1 = updateQueryParam(image, "format", "webp");
|
|
85
84
|
var srcset = ["100", "200", "400", "800", "1200", "1600", "2000"]
|
|
86
85
|
.concat(props.srcsetSizes ? String(props.srcsetSizes).split(" ") : [])
|
|
87
86
|
.map(function (size) {
|
|
88
|
-
return
|
|
87
|
+
return (
|
|
88
|
+
updateQueryParam(webpImage_1, "width", size) + " " + size + "w"
|
|
89
|
+
);
|
|
89
90
|
})
|
|
91
|
+
.concat([image])
|
|
90
92
|
.join(",");
|
|
91
93
|
imgProps.srcset = srcset;
|
|
92
94
|
jsx = jsx = [
|
|
@@ -1,9 +1,18 @@
|
|
|
1
|
+
const Fragment = require("@builder.io/qwik").Fragment;
|
|
1
2
|
const h = require("@builder.io/qwik").h;
|
|
2
3
|
const qrl = require("@builder.io/qwik").qrl;
|
|
3
|
-
const
|
|
4
|
+
const withScopedStylesQrl = require("@builder.io/qwik").withScopedStylesQrl;
|
|
4
5
|
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}`;
|
|
5
|
-
exports.
|
|
6
|
-
|
|
6
|
+
exports.MyComponent_onMount = (state) => {
|
|
7
|
+
if (!state.__INIT__) {
|
|
8
|
+
state.__INIT__ = true;
|
|
9
|
+
if (!state.hasOwnProperty("title")) state.title = '"Default title value"';
|
|
10
|
+
if (!state.hasOwnProperty("hiliteTitle")) state.hiliteTitle = true;
|
|
11
|
+
typeof __STATE__ === "object" &&
|
|
12
|
+
Object.assign(state, __STATE__[state.serverStateId]);
|
|
13
|
+
undefined;
|
|
14
|
+
}
|
|
15
|
+
withScopedStylesQrl(qrl("./low.js", "MyComponent_styles", []));
|
|
7
16
|
return h(
|
|
8
17
|
"div",
|
|
9
18
|
{
|
|
@@ -1,12 +1,3 @@
|
|
|
1
1
|
const componentQrl = require("@builder.io/qwik").componentQrl;
|
|
2
2
|
const qrl = require("@builder.io/qwik").qrl;
|
|
3
|
-
|
|
4
|
-
exports.MyComponent_onMount = (state) => {
|
|
5
|
-
if (state.title === undefined) state.title = '"Default title value"';
|
|
6
|
-
if (state.hiliteTitle === undefined) state.hiliteTitle = true;
|
|
7
|
-
typeof __STATE__ === "object" &&
|
|
8
|
-
Object.assign(state, __STATE__[state.serverStateId]);
|
|
9
|
-
withScopedStylesQrl(qrl("./low.js", "MyComponent_styles", []));
|
|
10
|
-
return qrl("./low.js", "MyComponent_onRender", [state]);
|
|
11
|
-
};
|
|
12
|
-
exports.MyComponent = componentQrl(qrl("./med.js", "MyComponent_onMount", []));
|
|
3
|
+
exports.MyComponent = componentQrl(qrl("./low.js", "MyComponent_onMount", []));
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import { CoreButton } from "./med.js";
|
|
2
|
-
import { h, qrl,
|
|
2
|
+
import { Fragment, h, qrl, withScopedStylesQrl } from "@builder.io/qwik";
|
|
3
3
|
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}`;
|
|
4
|
-
export const
|
|
5
|
-
|
|
4
|
+
export const MyComponent_onMount = (state) => {
|
|
5
|
+
if (!state.__INIT__) {
|
|
6
|
+
state.__INIT__ = true;
|
|
7
|
+
typeof __STATE__ === "object" &&
|
|
8
|
+
Object.assign(state, __STATE__[state.serverStateId]);
|
|
9
|
+
undefined;
|
|
10
|
+
}
|
|
11
|
+
withScopedStylesQrl(qrl("./low.js", "MyComponent_styles", []));
|
|
6
12
|
return h(CoreButton, {
|
|
7
13
|
text: "Click me!",
|
|
8
14
|
class: "c9nzze9",
|
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
import { componentQrl, h, qrl
|
|
2
|
-
export const MyComponent_onMount = (state) => {
|
|
3
|
-
typeof __STATE__ === "object" &&
|
|
4
|
-
Object.assign(state, __STATE__[state.serverStateId]);
|
|
5
|
-
withScopedStylesQrl(qrl("./low.js", "MyComponent_styles", []));
|
|
6
|
-
return qrl("./low.js", "MyComponent_onRender", [state]);
|
|
7
|
-
};
|
|
1
|
+
import { componentQrl, h, qrl } from "@builder.io/qwik";
|
|
8
2
|
export const MyComponent = componentQrl(
|
|
9
|
-
qrl("./
|
|
3
|
+
qrl("./low.js", "MyComponent_onMount", [])
|
|
10
4
|
);
|
|
11
5
|
export const CoreButton = function CoreButton(props) {
|
|
12
6
|
var hasLink = !!props.link;
|
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
import { ComponentD187055AF171488FAD843ACF045D6BF7 } from "./med.js";
|
|
2
|
-
import { Fragment, h, qrl,
|
|
2
|
+
import { Fragment, h, qrl, withScopedStylesQrl } from "@builder.io/qwik";
|
|
3
3
|
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}`;
|
|
4
|
-
export const
|
|
5
|
-
|
|
4
|
+
export const ComponentD187055AF171488FAD843ACF045D6BF7_onMount = (state) => {
|
|
5
|
+
if (!state.__INIT__) {
|
|
6
|
+
state.__INIT__ = true;
|
|
7
|
+
if (!state.hasOwnProperty("title")) state.title = "default-title";
|
|
8
|
+
typeof __STATE__ === "object" &&
|
|
9
|
+
Object.assign(state, __STATE__[state.serverStateId]);
|
|
10
|
+
undefined;
|
|
11
|
+
}
|
|
12
|
+
withScopedStylesQrl(
|
|
13
|
+
qrl("./low.js", "ComponentD187055AF171488FAD843ACF045D6BF7_styles", [])
|
|
14
|
+
);
|
|
6
15
|
return (
|
|
7
16
|
<div class="cj49hqu">
|
|
8
17
|
<div class="cjrqfb1">
|
|
@@ -22,8 +31,42 @@ export const ComponentD187055AF171488FAD843ACF045D6BF7_onRender = () => {
|
|
|
22
31
|
);
|
|
23
32
|
};
|
|
24
33
|
export const MyComponent_styles = `.c713ty2{display:flex;flex-direction:column;position:relative;flex-shrink:0;box-sizing:border-box;margin-top:20px}`;
|
|
25
|
-
export const
|
|
26
|
-
|
|
34
|
+
export const MyComponent_onMount = (state) => {
|
|
35
|
+
if (!state.__INIT__) {
|
|
36
|
+
state.__INIT__ = true;
|
|
37
|
+
typeof __STATE__ === "object" &&
|
|
38
|
+
Object.assign(state, __STATE__[state.serverStateId]);
|
|
39
|
+
(() => {
|
|
40
|
+
/*
|
|
41
|
+
* Global objects available:
|
|
42
|
+
*
|
|
43
|
+
* state - builder state object - learn about state https://www.builder.io/c/docs/guides/state-and-actions
|
|
44
|
+
* context - builder context object - learn about state https://github.com/BuilderIO/builder/tree/main/packages/react#passing-data-and-functions-down
|
|
45
|
+
* fetch - Fetch API - https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API'
|
|
46
|
+
* Builder - Builder object - useful values include: Builder.isServer, Builder.isBrowser, Builder.isPreviewing, Builder.isEditing
|
|
47
|
+
*
|
|
48
|
+
* visit https://www.builder.io/c/docs/guides/custom-code
|
|
49
|
+
* for more information on writing custom code
|
|
50
|
+
*/
|
|
51
|
+
async function main() {
|
|
52
|
+
if (Builder.isServer) {
|
|
53
|
+
// Place any code here you want to only run on the server. Any
|
|
54
|
+
// data fetched on the server will be available to re-hydrate on the client
|
|
55
|
+
// if added to the state object
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
if (Builder.isBrowser) {
|
|
59
|
+
// Place code that you only want to run in the browser (client side only) here
|
|
60
|
+
// For example, anything that uses document/window access or DOM manipulation
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
state.something = "works!";
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
return main();
|
|
67
|
+
})();
|
|
68
|
+
}
|
|
69
|
+
withScopedStylesQrl(qrl("./low.js", "MyComponent_styles", []));
|
|
27
70
|
return (
|
|
28
71
|
<>
|
|
29
72
|
<div class="c713ty2">
|
|
@@ -1,53 +1,7 @@
|
|
|
1
|
-
import { componentQrl, qrl
|
|
2
|
-
export const ComponentD187055AF171488FAD843ACF045D6BF7_onMount = (state) => {
|
|
3
|
-
if (state.title === undefined) state.title = "default-title";
|
|
4
|
-
typeof __STATE__ === "object" &&
|
|
5
|
-
Object.assign(state, __STATE__[state.serverStateId]);
|
|
6
|
-
withScopedStylesQrl(
|
|
7
|
-
qrl("./low.js", "ComponentD187055AF171488FAD843ACF045D6BF7_styles", [])
|
|
8
|
-
);
|
|
9
|
-
return qrl("./low.js", "ComponentD187055AF171488FAD843ACF045D6BF7_onRender", [
|
|
10
|
-
state,
|
|
11
|
-
]);
|
|
12
|
-
};
|
|
1
|
+
import { componentQrl, qrl } from "@builder.io/qwik";
|
|
13
2
|
export const ComponentD187055AF171488FAD843ACF045D6BF7 = componentQrl(
|
|
14
|
-
qrl("./
|
|
3
|
+
qrl("./low.js", "ComponentD187055AF171488FAD843ACF045D6BF7_onMount", [])
|
|
15
4
|
);
|
|
16
|
-
export const MyComponent_onMount = (state) => {
|
|
17
|
-
typeof __STATE__ === "object" &&
|
|
18
|
-
Object.assign(state, __STATE__[state.serverStateId]);
|
|
19
|
-
(() => {
|
|
20
|
-
/*
|
|
21
|
-
* Global objects available:
|
|
22
|
-
*
|
|
23
|
-
* state - builder state object - learn about state https://www.builder.io/c/docs/guides/state-and-actions
|
|
24
|
-
* context - builder context object - learn about state https://github.com/BuilderIO/builder/tree/main/packages/react#passing-data-and-functions-down
|
|
25
|
-
* fetch - Fetch API - https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API'
|
|
26
|
-
* Builder - Builder object - useful values include: Builder.isServer, Builder.isBrowser, Builder.isPreviewing, Builder.isEditing
|
|
27
|
-
*
|
|
28
|
-
* visit https://www.builder.io/c/docs/guides/custom-code
|
|
29
|
-
* for more information on writing custom code
|
|
30
|
-
*/
|
|
31
|
-
async function main() {
|
|
32
|
-
if (Builder.isServer) {
|
|
33
|
-
// Place any code here you want to only run on the server. Any
|
|
34
|
-
// data fetched on the server will be available to re-hydrate on the client
|
|
35
|
-
// if added to the state object
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
if (Builder.isBrowser) {
|
|
39
|
-
// Place code that you only want to run in the browser (client side only) here
|
|
40
|
-
// For example, anything that uses document/window access or DOM manipulation
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
state.something = "works!";
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
return main();
|
|
47
|
-
})();
|
|
48
|
-
withScopedStylesQrl(qrl("./low.js", "MyComponent_styles", []));
|
|
49
|
-
return qrl("./low.js", "MyComponent_onRender", [state]);
|
|
50
|
-
};
|
|
51
5
|
export const MyComponent = componentQrl(
|
|
52
|
-
qrl("./
|
|
6
|
+
qrl("./low.js", "MyComponent_onMount", [])
|
|
53
7
|
);
|
|
@@ -2,19 +2,17 @@ const Fragment = require("@builder.io/qwik").Fragment;
|
|
|
2
2
|
const componentQrl = require("@builder.io/qwik").componentQrl;
|
|
3
3
|
const h = require("@builder.io/qwik").h;
|
|
4
4
|
const qrl = require("@builder.io/qwik").qrl;
|
|
5
|
-
const useLexicalScope = require("@builder.io/qwik").useLexicalScope;
|
|
6
5
|
const withScopedStylesQrl = require("@builder.io/qwik").withScopedStylesQrl;
|
|
7
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}.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
7
|
exports.MyComponent_onMount = (state) => {
|
|
9
|
-
if (state.
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
if (!state.__INIT__) {
|
|
9
|
+
state.__INIT__ = true;
|
|
10
|
+
if (!state.hasOwnProperty("data")) state.data = 0;
|
|
11
|
+
typeof __STATE__ === "object" &&
|
|
12
|
+
Object.assign(state, __STATE__[state.serverStateId]);
|
|
13
|
+
undefined;
|
|
14
|
+
}
|
|
12
15
|
withScopedStylesQrl(qrl("./med.js", "MyComponent_styles", []));
|
|
13
|
-
return qrl("./med.js", "MyComponent_onRender", [state]);
|
|
14
|
-
};
|
|
15
|
-
exports.MyComponent = componentQrl(qrl("./med.js", "MyComponent_onMount", []));
|
|
16
|
-
exports.MyComponent_onRender = () => {
|
|
17
|
-
const state = useLexicalScope()[0];
|
|
18
16
|
return (
|
|
19
17
|
<>
|
|
20
18
|
<div class="cjrqfb1">
|
|
@@ -38,6 +36,7 @@ exports.MyComponent_onRender = () => {
|
|
|
38
36
|
</>
|
|
39
37
|
);
|
|
40
38
|
};
|
|
39
|
+
exports.MyComponent = componentQrl(qrl("./med.js", "MyComponent_onMount", []));
|
|
41
40
|
const CoreButton = (exports.CoreButton = function CoreButton(props) {
|
|
42
41
|
var hasLink = !!props.link;
|
|
43
42
|
var hProps = {
|
|
File without changes
|
|
@@ -0,0 +1,46 @@
|
|
|
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 withScopedStylesQrl = require("@builder.io/qwik").withScopedStylesQrl;
|
|
6
|
+
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}}`;
|
|
7
|
+
exports.Component000012_onMount = (state) => {
|
|
8
|
+
if (!state.__INIT__) {
|
|
9
|
+
state.__INIT__ = true;
|
|
10
|
+
if (!state.hasOwnProperty("offset")) state.offset = "0";
|
|
11
|
+
if (!state.hasOwnProperty("limit")) state.limit = 3;
|
|
12
|
+
if (!state.hasOwnProperty("blogCategory"))
|
|
13
|
+
state.blogCategory = {
|
|
14
|
+
"@type": "@builder.io/core:Reference",
|
|
15
|
+
id: "",
|
|
16
|
+
model: "",
|
|
17
|
+
};
|
|
18
|
+
typeof __STATE__ === "object" &&
|
|
19
|
+
Object.assign(state, __STATE__[state.serverStateId]);
|
|
20
|
+
undefined;
|
|
21
|
+
}
|
|
22
|
+
withScopedStylesQrl(qrl("./low.js", "Component000012_styles", []));
|
|
23
|
+
return h(
|
|
24
|
+
"div",
|
|
25
|
+
{ class: "cv6ku2d" },
|
|
26
|
+
(state.hits || []).map((item) => {
|
|
27
|
+
var state = Object.assign({}, this, {
|
|
28
|
+
hitsItem: item == null ? {} : item,
|
|
29
|
+
});
|
|
30
|
+
return h(
|
|
31
|
+
"div",
|
|
32
|
+
{ class: "c3j7e6c" },
|
|
33
|
+
h(Component000013, {
|
|
34
|
+
altText: "",
|
|
35
|
+
serverStateId: "woo8b6",
|
|
36
|
+
title: state.hitsItem.name,
|
|
37
|
+
linkUrl: state.hitsItem.url,
|
|
38
|
+
subCategory: state.hitsItem.blogSubcategory,
|
|
39
|
+
imageUrl: state.hitsItem.heroImage,
|
|
40
|
+
publicationDate: state.hitsItem.createdDate,
|
|
41
|
+
heroImageAltText: state.hitsItem.heroImageAltText,
|
|
42
|
+
})
|
|
43
|
+
);
|
|
44
|
+
})
|
|
45
|
+
);
|
|
46
|
+
};
|
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
import { h, qrl,
|
|
1
|
+
import { Fragment, h, qrl, withScopedStylesQrl } from "@builder.io/qwik";
|
|
2
2
|
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}`;
|
|
3
|
-
export const
|
|
4
|
-
|
|
3
|
+
export const MyComponent_onMount = (state) => {
|
|
4
|
+
if (!state.__INIT__) {
|
|
5
|
+
state.__INIT__ = true;
|
|
6
|
+
typeof __STATE__ === "object" &&
|
|
7
|
+
Object.assign(state, __STATE__[state.serverStateId]);
|
|
8
|
+
undefined;
|
|
9
|
+
}
|
|
10
|
+
withScopedStylesQrl(qrl("./low.js", "MyComponent_styles", []));
|
|
5
11
|
return (
|
|
6
12
|
<div class="crt27f8">
|
|
7
13
|
<p>
|
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
import { componentQrl, qrl
|
|
2
|
-
export const MyComponent_onMount = (state) => {
|
|
3
|
-
typeof __STATE__ === "object" &&
|
|
4
|
-
Object.assign(state, __STATE__[state.serverStateId]);
|
|
5
|
-
withScopedStylesQrl(qrl("./low.js", "MyComponent_styles", []));
|
|
6
|
-
return qrl("./low.js", "MyComponent_onRender", [state]);
|
|
7
|
-
};
|
|
1
|
+
import { componentQrl, qrl } from "@builder.io/qwik";
|
|
8
2
|
export const MyComponent = componentQrl(
|
|
9
|
-
qrl("./
|
|
3
|
+
qrl("./low.js", "MyComponent_onMount", [])
|
|
10
4
|
);
|
|
File without changes
|