builder.io 1.0.2-3 → 1.1.13-0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (199) hide show
  1. package/README.md +100 -1
  2. package/angular/index.cjs +1 -0
  3. package/angular/index.d.ts +1 -0
  4. package/angular/index.mjs +1 -0
  5. package/cli/index.cjs +1201 -0
  6. package/core/index.cjs +808 -0
  7. package/core/index.d.ts +1 -0
  8. package/core/index.mjs +808 -0
  9. package/figma/index.cjs +1 -0
  10. package/figma/index.d.ts +1 -0
  11. package/figma/index.mjs +1 -0
  12. package/figma/jsx-runtime/index.cjs +7 -0
  13. package/figma/jsx-runtime/index.d.ts +46 -0
  14. package/figma/jsx-runtime/index.js +7 -0
  15. package/figma/jsx-runtime/prop-types.d.ts +125 -0
  16. package/figma/jsx-runtime/react.d.ts +5221 -0
  17. package/next/index.cjs +36 -0
  18. package/next/index.d.ts +8 -0
  19. package/next/index.mjs +36 -0
  20. package/node/index.cjs +1 -0
  21. package/node/index.d.ts +1 -0
  22. package/node/index.mjs +1 -0
  23. package/package.json +28 -8
  24. package/remix/build.cjs +1 -0
  25. package/remix/index.cjs +3 -0
  26. package/remix/index.d.ts +1 -0
  27. package/remix/index.mjs +1 -0
  28. package/remix/server-build/index.cjs +99 -0
  29. package/remix/server-build/index.d.ts +1 -0
  30. package/remix/server-build/index.mjs +60 -0
  31. package/remix/server-build/package.json +6 -0
  32. package/server/index.cjs +249 -0
  33. package/server/index.d.ts +1 -0
  34. package/server/index.mjs +249 -0
  35. package/types/angular/index.d.ts +1 -0
  36. package/types/cli/builder-add/interface.d.ts +32 -0
  37. package/types/cli/builder-add/options.d.ts +7 -0
  38. package/types/cli/credentials.d.ts +41 -0
  39. package/types/cli/download.d.ts +10 -0
  40. package/types/cli/figma-publish.d.ts +22 -0
  41. package/types/cli/figma.d.ts +11 -0
  42. package/types/cli/generate.d.ts +53 -0
  43. package/types/cli/help.d.ts +1 -0
  44. package/types/cli/index.d.ts +2 -0
  45. package/types/cli/kv.d.ts +20 -0
  46. package/types/cli/prettier.d.ts +1 -0
  47. package/types/client/client-api.d.ts +11 -0
  48. package/types/client/edit-button/document-listeners.d.ts +2 -0
  49. package/types/client/edit-button/index.d.ts +8 -0
  50. package/types/client/index.d.ts +1 -0
  51. package/types/client/menu/index.d.ts +5 -0
  52. package/types/client/menu/pages/component-detail.d.ts +4 -0
  53. package/types/client/menu/pages/component-input.d.ts +3 -0
  54. package/types/client/menu/pages/component-list.d.ts +3 -0
  55. package/types/client/menu/pages/home.d.ts +1 -0
  56. package/types/client/menu/pages/settings.d.ts +1 -0
  57. package/types/client/menu/toggle/menu-toggle.d.ts +2 -0
  58. package/types/client/setup-ui/connected.d.ts +1 -0
  59. package/types/client/setup-ui/index.d.ts +1 -0
  60. package/types/client/setup-ui/overview.d.ts +4 -0
  61. package/types/client/tracking.d.ts +22 -0
  62. package/types/client/utils.d.ts +14 -0
  63. package/types/common/ast/app-dependencies.d.ts +4 -0
  64. package/types/common/ast/component-info.d.ts +8 -0
  65. package/types/common/ast/component-input-types.d.ts +24 -0
  66. package/types/common/ast/component-registry.d.ts +9 -0
  67. package/types/common/ast/convert-values.d.ts +11 -0
  68. package/types/common/ast/convert-values.unit.d.ts +1 -0
  69. package/types/common/ast/ensure-array-statement.d.ts +7 -0
  70. package/types/common/ast/ensure-array-statement.unit.d.ts +1 -0
  71. package/types/common/ast/ensure-comments.d.ts +1 -0
  72. package/types/common/ast/ensure-imports.d.ts +9 -0
  73. package/types/common/ast/ensure-imports.unit.d.ts +1 -0
  74. package/types/common/ast/exported-statements.d.ts +8 -0
  75. package/types/common/ast/exported-statements.unit.d.ts +1 -0
  76. package/types/common/ast/normalize-statements.d.ts +7 -0
  77. package/types/common/ast/normalize-statements.unit.d.ts +1 -0
  78. package/types/common/ast/remove-unused-imports.d.ts +3 -0
  79. package/types/common/ast/remove-unused-imports.unit.d.ts +1 -0
  80. package/types/common/ast/transform.d.ts +5 -0
  81. package/types/common/ast/utils.d.ts +26 -0
  82. package/types/common/ast/utils.unit.d.ts +1 -0
  83. package/types/common/builder/builder-api.d.ts +26 -0
  84. package/types/common/builder/builder-sdks.d.ts +9 -0
  85. package/types/common/builder/content-generation.d.ts +8 -0
  86. package/types/common/builder/content-ids.d.ts +3 -0
  87. package/types/common/cache.d.ts +3 -0
  88. package/types/common/constants.d.ts +14 -0
  89. package/types/common/dotenv.d.ts +6 -0
  90. package/types/common/fs.d.ts +4 -0
  91. package/types/common/mem-sys.d.ts +8 -0
  92. package/types/common/node-request.d.ts +7 -0
  93. package/types/common/path.d.ts +4 -0
  94. package/types/common/test-utils.d.ts +7 -0
  95. package/types/common/typescript.d.ts +9 -0
  96. package/types/common/utils.d.ts +17 -0
  97. package/types/common/utils.unit.d.ts +1 -0
  98. package/types/core/adapters/angular/angular-api-key.d.ts +10 -0
  99. package/types/core/adapters/angular/angular-api-key.unit.d.ts +1 -0
  100. package/types/core/adapters/angular/angular-app-module-imports.d.ts +3 -0
  101. package/types/core/adapters/angular/angular-app-module-imports.unit.d.ts +1 -0
  102. package/types/core/adapters/angular/angular-components.d.ts +18 -0
  103. package/types/core/adapters/angular/angular-components.unit.d.ts +1 -0
  104. package/types/core/adapters/angular/angular-ensure-builder-setup.d.ts +5 -0
  105. package/types/core/adapters/angular/angular-ensure-config-plugin.d.ts +9 -0
  106. package/types/core/adapters/angular/angular-ensure-config-plugin.unit.d.ts +1 -0
  107. package/types/core/adapters/angular/angular-registry-parse.d.ts +16 -0
  108. package/types/core/adapters/angular/angular-registry-parse.unit.d.ts +1 -0
  109. package/types/core/adapters/angular/angular-registry.d.ts +3 -0
  110. package/types/core/adapters/angular/angular-registry.unit.d.ts +1 -0
  111. package/types/core/adapters/angular/angular-test-utils.d.ts +6 -0
  112. package/types/core/adapters/angular/index.d.ts +13 -0
  113. package/types/core/adapters/next/index.d.ts +14 -0
  114. package/types/core/adapters/next/next-api-key.d.ts +4 -0
  115. package/types/core/adapters/next/next-component-info.d.ts +5 -0
  116. package/types/core/adapters/next/next-component-info.unit.d.ts +1 -0
  117. package/types/core/adapters/next/next-component-inputs.unit.d.ts +1 -0
  118. package/types/core/adapters/next/next-component-source-inputs.unit.d.ts +1 -0
  119. package/types/core/adapters/next/next-components.d.ts +4 -0
  120. package/types/core/adapters/next/next-ensure-builder-setup.d.ts +4 -0
  121. package/types/core/adapters/next/next-ensure-config-plugin.d.ts +3 -0
  122. package/types/core/adapters/next/next-ensure-config-plugin.unit.d.ts +1 -0
  123. package/types/core/adapters/next/next-registry-parse.d.ts +14 -0
  124. package/types/core/adapters/next/next-registry-parse.unit.d.ts +1 -0
  125. package/types/core/adapters/next/next-registry.d.ts +3 -0
  126. package/types/core/adapters/next/next-registry.unit.d.ts +1 -0
  127. package/types/core/adapters/next/next-test-utils.d.ts +16 -0
  128. package/types/core/adapters/qwik-city/index.d.ts +8 -0
  129. package/types/core/adapters/qwik-city/qwik-api-key.d.ts +4 -0
  130. package/types/core/adapters/qwik-city/qwik-component-source-inputs.d.ts +3 -0
  131. package/types/core/adapters/qwik-city/qwik-components.d.ts +15 -0
  132. package/types/core/adapters/qwik-city/qwik-components.unit.d.ts +1 -0
  133. package/types/core/adapters/qwik-city/qwik-ensure-builder-setup.d.ts +4 -0
  134. package/types/core/adapters/qwik-city/qwik-ensure-config-plugin.d.ts +2 -0
  135. package/types/core/adapters/qwik-city/qwik-registry-parse.d.ts +16 -0
  136. package/types/core/adapters/qwik-city/qwik-registry-parse.unit.d.ts +1 -0
  137. package/types/core/adapters/qwik-city/qwik-registry.d.ts +3 -0
  138. package/types/core/adapters/qwik-city/qwik-registry.unit.d.ts +1 -0
  139. package/types/core/adapters/qwik-city/qwik-test-utils.d.ts +6 -0
  140. package/types/core/adapters/qwik-city/qwik-ts-program.d.ts +2 -0
  141. package/types/core/adapters/react/index.d.ts +13 -0
  142. package/types/core/adapters/react/react-api-key.d.ts +6 -0
  143. package/types/core/adapters/react/react-builder-sdk-setup.d.ts +2 -0
  144. package/types/core/adapters/react/react-component-info.d.ts +5 -0
  145. package/types/core/adapters/react/react-components.d.ts +18 -0
  146. package/types/core/adapters/react/react-components.unit.d.ts +1 -0
  147. package/types/core/adapters/react/react-ensure-builder-setup.d.ts +4 -0
  148. package/types/core/adapters/react/react-registry-parse.d.ts +12 -0
  149. package/types/core/adapters/react/react-registry-parse.unit.d.ts +1 -0
  150. package/types/core/adapters/react/react-registry.d.ts +3 -0
  151. package/types/core/adapters/react/react-registry.unit.d.ts +1 -0
  152. package/types/core/adapters/react/react-test-utils.d.ts +6 -0
  153. package/types/core/adapters/react/react-ts-program.d.ts +2 -0
  154. package/types/core/adapters/remix/index.d.ts +12 -0
  155. package/types/core/adapters/remix/remix-api-key.d.ts +4 -0
  156. package/types/core/adapters/remix/remix-components.d.ts +4 -0
  157. package/types/core/adapters/remix/remix-ensure-builder-setup.d.ts +5 -0
  158. package/types/core/adapters/remix/remix-ensure-config-plugin.d.ts +3 -0
  159. package/types/core/adapters/remix/remix-ensure-config-plugin.unit.d.ts +1 -0
  160. package/types/core/adapters/remix/remix-registry-parse.d.ts +16 -0
  161. package/types/core/adapters/remix/remix-registry.d.ts +3 -0
  162. package/types/core/adapters/remix/remix-registry.unit.d.ts +1 -0
  163. package/types/core/adapters/remix/remix-test-utils.d.ts +6 -0
  164. package/types/core/adapters/vite/vite-ensure-config-plugin.d.ts +3 -0
  165. package/types/core/adapters/vite/vite-ensure-config-plugin.unit.d.ts +1 -0
  166. package/types/core/adapters/webpack/webpack-ensure-config-plugin.d.ts +3 -0
  167. package/types/core/client-script.d.ts +1 -0
  168. package/types/core/create-dev-tools.d.ts +2 -0
  169. package/types/core/detect-frameworks.d.ts +3 -0
  170. package/types/core/ensure-config-plugin.d.ts +3 -0
  171. package/types/core/import-export-registry.d.ts +3 -0
  172. package/types/core/index.d.ts +8 -0
  173. package/types/figma/index.d.ts +76 -0
  174. package/types/figma/jsx-runtime/index.d.cts +2 -0
  175. package/types/figma/jsx-runtime/index.d.ts +2 -0
  176. package/types/next/index.d.cts +4 -0
  177. package/types/next/index.d.mts +4 -0
  178. package/types/node/index.d.ts +2 -0
  179. package/types/node/node-sys.d.ts +11 -0
  180. package/types/remix/index-shim.d.cts +2 -0
  181. package/types/remix/index.d.ts +6 -0
  182. package/types/server/auth.d.ts +2 -0
  183. package/types/server/builder-connect.d.ts +3 -0
  184. package/types/server/client-script.d.ts +3 -0
  185. package/types/server/create-dev-tools-server.d.ts +2 -0
  186. package/types/server/dev-tools-api.d.ts +2 -0
  187. package/types/server/dev-tools-http-server.d.ts +2 -0
  188. package/types/server/index.d.ts +3 -0
  189. package/types/server/request-handler.d.ts +4 -0
  190. package/types/types.d.ts +411 -0
  191. package/types/vite/index.d.ts +7 -0
  192. package/types/webpack/index.d.ts +9 -0
  193. package/vite/index.cjs +3 -0
  194. package/vite/index.d.ts +1 -0
  195. package/vite/index.mjs +3 -0
  196. package/webpack/index.cjs +30 -0
  197. package/webpack/index.d.ts +1 -0
  198. package/webpack/index.mjs +30 -0
  199. package/index.js +0 -80
@@ -0,0 +1 @@
1
+ "use strict";var t=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var o=Object.prototype.hasOwnProperty;var m=(n,e)=>{for(var a in e)t(n,a,{get:e[a],enumerable:!0})},s=(n,e,a,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of g(e))!o.call(n,i)&&i!==a&&t(n,i,{get:()=>e[i],enumerable:!(r=p(e,i))||r.enumerable});return n};var d=n=>s(t({},"__esModule",{value:!0}),n);var y={};m(y,{figmaMapping:()=>F});module.exports=d(y);function F(n){}
@@ -0,0 +1 @@
1
+ export * from "../types/figma";
@@ -0,0 +1 @@
1
+ function n(e){}export{n as figmaMapping};
@@ -0,0 +1,7 @@
1
+ exports.jsx = function jsx() {
2
+ return null;
3
+ };
4
+
5
+ exports.jsxs = function jsxs() {
6
+ return null;
7
+ };
@@ -0,0 +1,46 @@
1
+ // Expose `JSX` namespace in `global` namespace
2
+ import * as React from "./react";
3
+ export { Fragment } from "./react";
4
+
5
+ export namespace JSX {
6
+ interface Element extends React.JSX.Element {}
7
+ interface ElementClass extends React.JSX.ElementClass {}
8
+ interface ElementAttributesProperty
9
+ extends React.JSX.ElementAttributesProperty {}
10
+ interface ElementChildrenAttribute
11
+ extends React.JSX.ElementChildrenAttribute {}
12
+ type LibraryManagedAttributes<C, P> = React.JSX.LibraryManagedAttributes<
13
+ C,
14
+ P
15
+ >;
16
+ interface IntrinsicAttributes extends React.JSX.IntrinsicAttributes {
17
+ children?: any;
18
+ }
19
+ interface IntrinsicClassAttributes<T>
20
+ extends React.JSX.IntrinsicClassAttributes<T> {
21
+ children?: any;
22
+ }
23
+ interface IntrinsicElements extends React.JSX.IntrinsicElements {}
24
+ }
25
+
26
+ /**
27
+ * Create a React element.
28
+ *
29
+ * You should not use this function directly. Use JSX and a transpiler instead.
30
+ */
31
+ export function jsx(
32
+ type: React.ElementType,
33
+ props: unknown,
34
+ key?: React.Key
35
+ ): React.ReactElement;
36
+
37
+ /**
38
+ * Create a React element.
39
+ *
40
+ * You should not use this function directly. Use JSX and a transpiler instead.
41
+ */
42
+ export function jsxs(
43
+ type: React.ElementType,
44
+ props: unknown,
45
+ key?: React.Key
46
+ ): React.ReactElement;
@@ -0,0 +1,7 @@
1
+ export function jsx() {
2
+ return null;
3
+ }
4
+
5
+ export function jsxs() {
6
+ return null;
7
+ }
@@ -0,0 +1,125 @@
1
+ export type ReactComponentLike =
2
+ | string
3
+ | ((props: any, context?: any) => any)
4
+ | (new (props: any, context?: any) => any);
5
+
6
+ export interface ReactElementLike {
7
+ type: ReactComponentLike;
8
+ props: any;
9
+ key: string | null;
10
+ }
11
+
12
+ export interface ReactNodeArray extends Iterable<ReactNodeLike> {}
13
+
14
+ export type ReactNodeLike =
15
+ | ReactElementLike
16
+ | ReactNodeArray
17
+ | string
18
+ | number
19
+ | boolean
20
+ | null
21
+ | undefined;
22
+
23
+ export const nominalTypeHack: unique symbol;
24
+
25
+ export type IsOptional<T> = undefined extends T ? true : false;
26
+
27
+ export type RequiredKeys<V> = {
28
+ [K in keyof V]-?: Exclude<V[K], undefined> extends Validator<infer T>
29
+ ? IsOptional<T> extends true
30
+ ? never
31
+ : K
32
+ : never;
33
+ }[keyof V];
34
+ export type OptionalKeys<V> = Exclude<keyof V, RequiredKeys<V>>;
35
+ export type InferPropsInner<V> = { [K in keyof V]-?: InferType<V[K]> };
36
+
37
+ export interface Validator<T> {
38
+ (
39
+ props: { [key: string]: any },
40
+ propName: string,
41
+ componentName: string,
42
+ location: string,
43
+ propFullName: string
44
+ ): Error | null;
45
+ [nominalTypeHack]?:
46
+ | {
47
+ type: T;
48
+ }
49
+ | undefined;
50
+ }
51
+
52
+ export interface Requireable<T> extends Validator<T | undefined | null> {
53
+ isRequired: Validator<NonNullable<T>>;
54
+ }
55
+
56
+ export type ValidationMap<T> = { [K in keyof T]?: Validator<T[K]> };
57
+
58
+ /**
59
+ * Like {@link ValidationMap} but treats `undefined`, `null` and optional properties the same.
60
+ * This type is only added as a migration path in React 19 where this type was removed from React.
61
+ * Runtime and compile time types would mismatch since you could see `undefined` at runtime when your types don't expect this type.
62
+ */
63
+ export type WeakValidationMap<T> = {
64
+ [K in keyof T]?: null extends T[K]
65
+ ? Validator<T[K] | null | undefined>
66
+ : undefined extends T[K]
67
+ ? Validator<T[K] | null | undefined>
68
+ : Validator<T[K]>;
69
+ };
70
+
71
+ export type InferType<V> = V extends Validator<infer T> ? T : any;
72
+ export type InferProps<V> = InferPropsInner<Pick<V, RequiredKeys<V>>> &
73
+ Partial<InferPropsInner<Pick<V, OptionalKeys<V>>>>;
74
+
75
+ export const any: Requireable<any>;
76
+ export const array: Requireable<any[]>;
77
+ export const bool: Requireable<boolean>;
78
+ export const func: Requireable<(...args: any[]) => any>;
79
+ export const number: Requireable<number>;
80
+ export const object: Requireable<object>;
81
+ export const string: Requireable<string>;
82
+ export const node: Requireable<ReactNodeLike>;
83
+ export const element: Requireable<ReactElementLike>;
84
+ export const symbol: Requireable<symbol>;
85
+ export const elementType: Requireable<ReactComponentLike>;
86
+ export function instanceOf<T>(
87
+ expectedClass: new (...args: any[]) => T
88
+ ): Requireable<T>;
89
+ export function oneOf<T>(types: readonly T[]): Requireable<T>;
90
+ export function oneOfType<T extends Validator<any>>(
91
+ types: T[]
92
+ ): Requireable<NonNullable<InferType<T>>>;
93
+ export function arrayOf<T>(type: Validator<T>): Requireable<T[]>;
94
+ export function objectOf<T>(
95
+ type: Validator<T>
96
+ ): Requireable<{ [K in keyof any]: T }>;
97
+ export function shape<P extends ValidationMap<any>>(
98
+ type: P
99
+ ): Requireable<InferProps<P>>;
100
+ export function exact<P extends ValidationMap<any>>(
101
+ type: P
102
+ ): Requireable<Required<InferProps<P>>>;
103
+
104
+ /**
105
+ * Assert that the values match with the type specs.
106
+ * Error messages are memorized and will only be shown once.
107
+ *
108
+ * @param typeSpecs Map of name to a ReactPropType
109
+ * @param values Runtime values that need to be type-checked
110
+ * @param location e.g. "prop", "context", "child context"
111
+ * @param componentName Name of the component for error messages
112
+ * @param getStack Returns the component stack
113
+ */
114
+ export function checkPropTypes(
115
+ typeSpecs: any,
116
+ values: any,
117
+ location: string,
118
+ componentName: string,
119
+ getStack?: () => any
120
+ ): void;
121
+
122
+ /**
123
+ * Only available if NODE_ENV=production
124
+ */
125
+ export function resetWarningCache(): void;