@builder.io/sdk-qwik 0.0.7 → 0.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/README.md +65 -2
  2. package/lib/index.97024df8.js +80165 -0
  3. package/lib/index.d8c1e37f.cjs +80165 -0
  4. package/lib/index.qwik.cjs +2465 -0
  5. package/lib/index.qwik.mjs +2465 -0
  6. package/package.json +3 -3
  7. package/src/blocks/button/button.jsx +0 -175
  8. package/src/blocks/columns/columns.jsx +27 -197
  9. package/src/blocks/custom-code/custom-code.jsx +16 -75
  10. package/src/blocks/embed/embed.jsx +20 -87
  11. package/src/blocks/form/builder-blocks.jsx +0 -75
  12. package/src/blocks/form/form.jsx +57 -536
  13. package/src/blocks/fragment/fragment.jsx +8 -56
  14. package/src/blocks/image/image.jsx +49 -493
  15. package/src/blocks/img/img.jsx +15 -72
  16. package/src/blocks/input/input.jsx +17 -83
  17. package/src/blocks/raw-text/raw-text.jsx +9 -50
  18. package/src/blocks/section/section.jsx +17 -94
  19. package/src/blocks/select/select.jsx +20 -145
  20. package/src/blocks/submit-button/submit-button.jsx +8 -84
  21. package/src/blocks/symbol/symbol.jsx +60 -194
  22. package/src/blocks/text/text.jsx +4 -43
  23. package/src/blocks/textarea/textarea.jsx +12 -62
  24. package/src/blocks/video/video.jsx +21 -71
  25. package/src/components/render-block/block-styles.jsx +0 -114
  26. package/src/components/render-block/render-block.jsx +0 -514
  27. package/src/components/render-block/render-component.jsx +0 -211
  28. package/src/components/render-block/render-repeated-block.jsx +0 -67
  29. package/src/components/render-blocks.jsx +40 -334
  30. package/src/components/render-content/components/render-styles.jsx +0 -50
  31. package/src/components/render-content/render-content.jsx +96 -374
  32. package/src/components/render-inlined-styles.jsx +0 -116
  33. package/src/scripts/init-editing.js +4 -5
  34. package/types.d.ts +7 -12
  35. package/root.json +0 -1176
@@ -23,119 +23,3 @@ export const RenderInlinedStyles = component$((props) => {
23
23
  );
24
24
  });
25
25
  export default RenderInlinedStyles;
26
- export const COMPONENT = {
27
- "@type": "@builder.io/mitosis/component",
28
- imports: [
29
- {
30
- imports: {
31
- TARGET: "TARGET",
32
- },
33
- path: "../constants/target.js",
34
- },
35
- ],
36
- exports: {},
37
- inputs: [],
38
- meta: {},
39
- refs: {},
40
- state: {
41
- injectedStyleScript:
42
- "@builder.io/mitosis/method:get injectedStyleScript() {\n return `<${tagName(props,state)}>${props.styles}</${tagName(props,state)}>`;\n}",
43
- tagName:
44
- "@builder.io/mitosis/method:get tagName() {\n // NOTE: we have to obfusctate the name of the tag due to a limitation in the svelte-preprocessor plugin.\n // https://github.com/sveltejs/vite-plugin-svelte/issues/315#issuecomment-1109000027\n return 'sty' + 'le';\n}",
45
- },
46
- children: [
47
- {
48
- "@type": "@builder.io/mitosis/node",
49
- name: "Show",
50
- meta: {
51
- else: {
52
- "@type": "@builder.io/mitosis/node",
53
- name: "state.tagName",
54
- meta: {},
55
- scope: {},
56
- properties: {},
57
- bindings: {},
58
- children: [
59
- {
60
- "@type": "@builder.io/mitosis/node",
61
- name: "div",
62
- meta: {},
63
- scope: {},
64
- properties: {},
65
- bindings: {
66
- _text: {
67
- code: "props.styles",
68
- },
69
- },
70
- children: [],
71
- },
72
- ],
73
- },
74
- },
75
- scope: {},
76
- properties: {},
77
- bindings: {
78
- when: {
79
- code: "TARGET === 'svelte'",
80
- },
81
- },
82
- children: [
83
- {
84
- "@type": "@builder.io/mitosis/node",
85
- name: "div",
86
- meta: {},
87
- scope: {},
88
- properties: {
89
- _text: "\n ",
90
- },
91
- bindings: {},
92
- children: [],
93
- },
94
- {
95
- "@type": "@builder.io/mitosis/node",
96
- name: "div",
97
- meta: {},
98
- scope: {},
99
- properties: {
100
- _text: "\n ",
101
- },
102
- bindings: {},
103
- children: [],
104
- },
105
- {
106
- "@type": "@builder.io/mitosis/node",
107
- name: "div",
108
- meta: {},
109
- scope: {},
110
- properties: {},
111
- bindings: {
112
- innerHTML: {
113
- code: "injectedStyleScript(props,state)",
114
- },
115
- },
116
- children: [],
117
- },
118
- {
119
- "@type": "@builder.io/mitosis/node",
120
- name: "div",
121
- meta: {},
122
- scope: {},
123
- properties: {
124
- _text: "\n ",
125
- },
126
- bindings: {},
127
- children: [],
128
- },
129
- ],
130
- },
131
- ],
132
- hooks: {},
133
- context: {
134
- get: {},
135
- set: {},
136
- },
137
- name: "RenderInlinedStyles",
138
- subComponents: [],
139
- interfaces: ["interface Props {\n styles: string;\n}"],
140
- propsTypeRef: "Props",
141
- };
@@ -1,6 +1,5 @@
1
1
  import { TARGET } from "../constants/target.js";
2
2
  import { isBrowser } from "../functions/is-browser.js";
3
- import { isEditing } from "../functions/is-editing.js";
4
3
  import { register } from "../functions/register.js";
5
4
  const registerInsertMenu = () => {
6
5
  register("insertMenu", {
@@ -74,7 +73,7 @@ const setupBrowserForEditing = () => {
74
73
  });
75
74
  }
76
75
  };
77
- if (isEditing()) {
78
- registerInsertMenu();
79
- setupBrowserForEditing();
80
- }
76
+ export {
77
+ registerInsertMenu,
78
+ setupBrowserForEditing
79
+ };
package/types.d.ts CHANGED
@@ -1,13 +1,8 @@
1
- type Dictionary<T> = Record<string, T>;
2
- type BuilderContent = any;
3
- type BuilderBlock = any;
4
- type RegisteredComponent = any;
5
- type RegisteredComponents = any;
6
- declare const builder: { env: 'dev'; apiKey: string };
7
- // TODO(misko): HACKS to be removed
8
- declare const get: (obj: any, key: string) => any;
9
- declare const set: (obj: any, key: string, value: any) => void;
10
- interface CSSProperties {
11
- flexDirection: any;
1
+ declare module '@builder.io/sdk-qwik' {
2
+ const getContent: (options: {
3
+ model: string;
4
+ apiKey: string;
5
+ userAttributes: Record<string, string>;
6
+ }) => Promise<any>;
7
+ const RenderContent: any;
12
8
  }
13
- declare const BuilderBlocks: (props: any) => any;