builder.io 1.0.2 → 1.1.13-1
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/README.md +100 -1
- package/angular/index.cjs +1 -0
- package/angular/index.d.ts +1 -0
- package/angular/index.mjs +1 -0
- package/cli/index.cjs +1201 -0
- package/core/index.cjs +808 -0
- package/core/index.d.ts +1 -0
- package/core/index.mjs +808 -0
- package/figma/index.cjs +1 -0
- package/figma/index.d.ts +1 -0
- package/figma/index.mjs +1 -0
- package/figma/jsx-runtime/index.cjs +7 -0
- package/figma/jsx-runtime/index.d.ts +46 -0
- package/figma/jsx-runtime/index.js +7 -0
- package/figma/jsx-runtime/prop-types.d.ts +125 -0
- package/figma/jsx-runtime/react.d.ts +5221 -0
- package/next/index.cjs +36 -0
- package/next/index.d.ts +8 -0
- package/next/index.mjs +36 -0
- package/node/index.cjs +1 -0
- package/node/index.d.ts +1 -0
- package/node/index.mjs +1 -0
- package/package.json +28 -8
- package/remix/build.cjs +1 -0
- package/remix/index.cjs +3 -0
- package/remix/index.d.ts +1 -0
- package/remix/index.mjs +1 -0
- package/remix/server-build/index.cjs +99 -0
- package/remix/server-build/index.d.ts +1 -0
- package/remix/server-build/index.mjs +60 -0
- package/remix/server-build/package.json +6 -0
- package/server/index.cjs +249 -0
- package/server/index.d.ts +1 -0
- package/server/index.mjs +249 -0
- package/types/angular/index.d.ts +1 -0
- package/types/cli/builder-add/interface.d.ts +36 -0
- package/types/cli/builder-add/options.d.ts +7 -0
- package/types/cli/credentials.d.ts +41 -0
- package/types/cli/download.d.ts +10 -0
- package/types/cli/figma-publish.d.ts +22 -0
- package/types/cli/figma.d.ts +11 -0
- package/types/cli/generate.d.ts +53 -0
- package/types/cli/help.d.ts +1 -0
- package/types/cli/index.d.ts +2 -0
- package/types/cli/kv.d.ts +20 -0
- package/types/cli/prettier.d.ts +1 -0
- package/types/client/client-api.d.ts +11 -0
- package/types/client/edit-button/document-listeners.d.ts +2 -0
- package/types/client/edit-button/index.d.ts +8 -0
- package/types/client/index.d.ts +1 -0
- package/types/client/menu/index.d.ts +5 -0
- package/types/client/menu/pages/component-detail.d.ts +4 -0
- package/types/client/menu/pages/component-input.d.ts +3 -0
- package/types/client/menu/pages/component-list.d.ts +3 -0
- package/types/client/menu/pages/home.d.ts +1 -0
- package/types/client/menu/pages/settings.d.ts +1 -0
- package/types/client/menu/toggle/menu-toggle.d.ts +2 -0
- package/types/client/setup-ui/connected.d.ts +1 -0
- package/types/client/setup-ui/index.d.ts +1 -0
- package/types/client/setup-ui/overview.d.ts +4 -0
- package/types/client/tracking.d.ts +22 -0
- package/types/client/utils.d.ts +14 -0
- package/types/common/ast/app-dependencies.d.ts +4 -0
- package/types/common/ast/component-info.d.ts +8 -0
- package/types/common/ast/component-input-types.d.ts +24 -0
- package/types/common/ast/component-registry.d.ts +9 -0
- package/types/common/ast/convert-values.d.ts +11 -0
- package/types/common/ast/convert-values.unit.d.ts +1 -0
- package/types/common/ast/ensure-array-statement.d.ts +7 -0
- package/types/common/ast/ensure-array-statement.unit.d.ts +1 -0
- package/types/common/ast/ensure-comments.d.ts +1 -0
- package/types/common/ast/ensure-imports.d.ts +9 -0
- package/types/common/ast/ensure-imports.unit.d.ts +1 -0
- package/types/common/ast/exported-statements.d.ts +8 -0
- package/types/common/ast/exported-statements.unit.d.ts +1 -0
- package/types/common/ast/normalize-statements.d.ts +7 -0
- package/types/common/ast/normalize-statements.unit.d.ts +1 -0
- package/types/common/ast/remove-unused-imports.d.ts +3 -0
- package/types/common/ast/remove-unused-imports.unit.d.ts +1 -0
- package/types/common/ast/transform.d.ts +5 -0
- package/types/common/ast/utils.d.ts +26 -0
- package/types/common/ast/utils.unit.d.ts +1 -0
- package/types/common/builder/builder-api.d.ts +26 -0
- package/types/common/builder/builder-sdks.d.ts +9 -0
- package/types/common/builder/content-generation.d.ts +8 -0
- package/types/common/builder/content-ids.d.ts +3 -0
- package/types/common/cache.d.ts +3 -0
- package/types/common/constants.d.ts +14 -0
- package/types/common/dotenv.d.ts +6 -0
- package/types/common/fs.d.ts +4 -0
- package/types/common/mem-sys.d.ts +8 -0
- package/types/common/node-request.d.ts +7 -0
- package/types/common/path.d.ts +4 -0
- package/types/common/test-utils.d.ts +7 -0
- package/types/common/typescript.d.ts +9 -0
- package/types/common/utils.d.ts +17 -0
- package/types/common/utils.unit.d.ts +1 -0
- package/types/core/adapters/angular/angular-api-key.d.ts +10 -0
- package/types/core/adapters/angular/angular-api-key.unit.d.ts +1 -0
- package/types/core/adapters/angular/angular-app-module-imports.d.ts +3 -0
- package/types/core/adapters/angular/angular-app-module-imports.unit.d.ts +1 -0
- package/types/core/adapters/angular/angular-components.d.ts +18 -0
- package/types/core/adapters/angular/angular-components.unit.d.ts +1 -0
- package/types/core/adapters/angular/angular-ensure-builder-setup.d.ts +5 -0
- package/types/core/adapters/angular/angular-ensure-config-plugin.d.ts +9 -0
- package/types/core/adapters/angular/angular-ensure-config-plugin.unit.d.ts +1 -0
- package/types/core/adapters/angular/angular-registry-parse.d.ts +16 -0
- package/types/core/adapters/angular/angular-registry-parse.unit.d.ts +1 -0
- package/types/core/adapters/angular/angular-registry.d.ts +3 -0
- package/types/core/adapters/angular/angular-registry.unit.d.ts +1 -0
- package/types/core/adapters/angular/angular-test-utils.d.ts +6 -0
- package/types/core/adapters/angular/index.d.ts +13 -0
- package/types/core/adapters/next/index.d.ts +14 -0
- package/types/core/adapters/next/next-api-key.d.ts +4 -0
- package/types/core/adapters/next/next-component-info.d.ts +5 -0
- package/types/core/adapters/next/next-component-info.unit.d.ts +1 -0
- package/types/core/adapters/next/next-component-inputs.unit.d.ts +1 -0
- package/types/core/adapters/next/next-component-source-inputs.unit.d.ts +1 -0
- package/types/core/adapters/next/next-components.d.ts +4 -0
- package/types/core/adapters/next/next-ensure-builder-setup.d.ts +4 -0
- package/types/core/adapters/next/next-ensure-config-plugin.d.ts +3 -0
- package/types/core/adapters/next/next-ensure-config-plugin.unit.d.ts +1 -0
- package/types/core/adapters/next/next-registry-parse.d.ts +14 -0
- package/types/core/adapters/next/next-registry-parse.unit.d.ts +1 -0
- package/types/core/adapters/next/next-registry.d.ts +3 -0
- package/types/core/adapters/next/next-registry.unit.d.ts +1 -0
- package/types/core/adapters/next/next-test-utils.d.ts +16 -0
- package/types/core/adapters/qwik-city/index.d.ts +8 -0
- package/types/core/adapters/qwik-city/qwik-api-key.d.ts +4 -0
- package/types/core/adapters/qwik-city/qwik-component-source-inputs.d.ts +3 -0
- package/types/core/adapters/qwik-city/qwik-components.d.ts +15 -0
- package/types/core/adapters/qwik-city/qwik-components.unit.d.ts +1 -0
- package/types/core/adapters/qwik-city/qwik-ensure-builder-setup.d.ts +4 -0
- package/types/core/adapters/qwik-city/qwik-ensure-config-plugin.d.ts +2 -0
- package/types/core/adapters/qwik-city/qwik-registry-parse.d.ts +16 -0
- package/types/core/adapters/qwik-city/qwik-registry-parse.unit.d.ts +1 -0
- package/types/core/adapters/qwik-city/qwik-registry.d.ts +3 -0
- package/types/core/adapters/qwik-city/qwik-registry.unit.d.ts +1 -0
- package/types/core/adapters/qwik-city/qwik-test-utils.d.ts +6 -0
- package/types/core/adapters/qwik-city/qwik-ts-program.d.ts +2 -0
- package/types/core/adapters/react/index.d.ts +13 -0
- package/types/core/adapters/react/react-api-key.d.ts +6 -0
- package/types/core/adapters/react/react-builder-sdk-setup.d.ts +2 -0
- package/types/core/adapters/react/react-component-info.d.ts +5 -0
- package/types/core/adapters/react/react-components.d.ts +18 -0
- package/types/core/adapters/react/react-components.unit.d.ts +1 -0
- package/types/core/adapters/react/react-ensure-builder-setup.d.ts +4 -0
- package/types/core/adapters/react/react-registry-parse.d.ts +12 -0
- package/types/core/adapters/react/react-registry-parse.unit.d.ts +1 -0
- package/types/core/adapters/react/react-registry.d.ts +3 -0
- package/types/core/adapters/react/react-registry.unit.d.ts +1 -0
- package/types/core/adapters/react/react-test-utils.d.ts +6 -0
- package/types/core/adapters/react/react-ts-program.d.ts +2 -0
- package/types/core/adapters/remix/index.d.ts +12 -0
- package/types/core/adapters/remix/remix-api-key.d.ts +4 -0
- package/types/core/adapters/remix/remix-components.d.ts +4 -0
- package/types/core/adapters/remix/remix-ensure-builder-setup.d.ts +5 -0
- package/types/core/adapters/remix/remix-ensure-config-plugin.d.ts +3 -0
- package/types/core/adapters/remix/remix-ensure-config-plugin.unit.d.ts +1 -0
- package/types/core/adapters/remix/remix-registry-parse.d.ts +16 -0
- package/types/core/adapters/remix/remix-registry.d.ts +3 -0
- package/types/core/adapters/remix/remix-registry.unit.d.ts +1 -0
- package/types/core/adapters/remix/remix-test-utils.d.ts +6 -0
- package/types/core/adapters/vite/vite-ensure-config-plugin.d.ts +3 -0
- package/types/core/adapters/vite/vite-ensure-config-plugin.unit.d.ts +1 -0
- package/types/core/adapters/webpack/webpack-ensure-config-plugin.d.ts +3 -0
- package/types/core/client-script.d.ts +1 -0
- package/types/core/create-dev-tools.d.ts +2 -0
- package/types/core/detect-frameworks.d.ts +3 -0
- package/types/core/ensure-config-plugin.d.ts +3 -0
- package/types/core/import-export-registry.d.ts +3 -0
- package/types/core/index.d.ts +8 -0
- package/types/figma/index.d.ts +76 -0
- package/types/figma/jsx-runtime/index.d.cts +2 -0
- package/types/figma/jsx-runtime/index.d.ts +2 -0
- package/types/next/index.d.cts +4 -0
- package/types/next/index.d.mts +4 -0
- package/types/node/index.d.ts +2 -0
- package/types/node/node-sys.d.ts +11 -0
- package/types/remix/index-shim.d.cts +2 -0
- package/types/remix/index.d.ts +6 -0
- package/types/server/auth.d.ts +2 -0
- package/types/server/builder-connect.d.ts +3 -0
- package/types/server/client-script.d.ts +3 -0
- package/types/server/create-dev-tools-server.d.ts +2 -0
- package/types/server/dev-tools-api.d.ts +2 -0
- package/types/server/dev-tools-http-server.d.ts +2 -0
- package/types/server/index.d.ts +3 -0
- package/types/server/request-handler.d.ts +4 -0
- package/types/types.d.ts +415 -0
- package/types/vite/index.d.ts +7 -0
- package/types/webpack/index.d.ts +9 -0
- package/vite/index.cjs +3 -0
- package/vite/index.d.ts +1 -0
- package/vite/index.mjs +3 -0
- package/webpack/index.cjs +30 -0
- package/webpack/index.d.ts +1 -0
- package/webpack/index.mjs +30 -0
- package/index.js +0 -80
package/figma/index.cjs
ADDED
|
@@ -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){}
|
package/figma/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "../types/figma";
|
package/figma/index.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function n(e){}export{n as figmaMapping};
|
|
@@ -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,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;
|