@embeddable.com/sdk-core 3.13.7-next.0 → 3.14.0-next.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.
@@ -0,0 +1,7 @@
1
+ import * as vite from "vite";
2
+ import { ResolvedEmbeddableConfig } from "./defineConfig";
3
+ declare const _default: (ctx: ResolvedEmbeddableConfig) => Promise<{
4
+ themeWatcher: vite.Rollup.RollupWatcher | undefined;
5
+ lifecycleWatcher: vite.Rollup.RollupWatcher | undefined;
6
+ }>;
7
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: () => Promise<void>;
2
+ export default _default;
@@ -1,5 +1,6 @@
1
1
  import { RollupOptions } from "rollup";
2
2
  import { z } from "zod";
3
+ import { ComponentLibraryConfig } from "@embeddable.com/sdk-utils";
3
4
  export type Region = "EU" | "US" | "legacy-US";
4
5
  export type EmbeddableConfig = {
5
6
  plugins: (() => {
@@ -7,6 +8,7 @@ export type EmbeddableConfig = {
7
8
  build: (config: EmbeddableConfig) => Promise<unknown>;
8
9
  cleanup: (config: EmbeddableConfig) => Promise<unknown>;
9
10
  validate: (config: EmbeddableConfig) => Promise<unknown>;
11
+ buildPackage: (config: EmbeddableConfig) => Promise<unknown>;
10
12
  })[];
11
13
  pushModels?: boolean;
12
14
  pushComponents?: boolean;
@@ -29,6 +31,9 @@ export type EmbeddableConfig = {
29
31
  };
30
32
  rollupOptions?: RollupOptions;
31
33
  region?: Region;
34
+ componentLibraries?: string[] | ComponentLibraryConfig[];
35
+ customizationFile?: string;
36
+ lifecycleHooksFile?: string;
32
37
  };
33
38
  declare const PLUGIN_NAME: "sdk-react";
34
39
  export type PluginName = typeof PLUGIN_NAME;
@@ -51,6 +56,9 @@ export type ResolvedEmbeddableConfig = {
51
56
  archiveFile: string;
52
57
  errorFallbackComponent?: string;
53
58
  bundleHash?: string;
59
+ customizationFile: string;
60
+ lifecycleHooksFile: string;
61
+ componentLibraries: string[] | ComponentLibraryConfig[];
54
62
  viteConfig: {
55
63
  resolve?: {
56
64
  alias?: Record<string, string>;
@@ -72,7 +80,7 @@ export type ResolvedEmbeddableConfig = {
72
80
  rollbarAccessToken: string;
73
81
  plugins: EmbeddableConfig["plugins"];
74
82
  buildTime: [number, number];
75
- dev: {
83
+ dev?: {
76
84
  watch: boolean;
77
85
  logger: any;
78
86
  sys: any;
@@ -104,6 +112,21 @@ export declare const embeddableConfigSchema: z.ZodObject<{
104
112
  presetsSrc: z.ZodOptional<z.ZodString>;
105
113
  componentsSrc: z.ZodOptional<z.ZodString>;
106
114
  globalCss: z.ZodOptional<z.ZodString>;
115
+ customizationFile: z.ZodOptional<z.ZodString>;
116
+ lifecycleHooksFile: z.ZodOptional<z.ZodString>;
117
+ componentLibraries: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodArray<z.ZodObject<{
118
+ name: z.ZodString;
119
+ include: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
120
+ exclude: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
121
+ }, "strip", z.ZodTypeAny, {
122
+ name: string;
123
+ include?: string[] | undefined;
124
+ exclude?: string[] | undefined;
125
+ }, {
126
+ name: string;
127
+ include?: string[] | undefined;
128
+ exclude?: string[] | undefined;
129
+ }>, "many">]>>;
107
130
  viteConfig: z.ZodOptional<z.ZodObject<{
108
131
  resolve: z.ZodOptional<z.ZodObject<{
109
132
  alias: z.ZodRecord<z.ZodString, z.ZodString>;
@@ -139,6 +162,13 @@ export declare const embeddableConfigSchema: z.ZodObject<{
139
162
  presetsSrc?: string | undefined;
140
163
  componentsSrc?: string | undefined;
141
164
  globalCss?: string | undefined;
165
+ customizationFile?: string | undefined;
166
+ lifecycleHooksFile?: string | undefined;
167
+ componentLibraries?: string[] | {
168
+ name: string;
169
+ include?: string[] | undefined;
170
+ exclude?: string[] | undefined;
171
+ }[] | undefined;
142
172
  viteConfig?: {
143
173
  resolve?: {
144
174
  alias: Record<string, string>;
@@ -162,6 +192,13 @@ export declare const embeddableConfigSchema: z.ZodObject<{
162
192
  presetsSrc?: string | undefined;
163
193
  componentsSrc?: string | undefined;
164
194
  globalCss?: string | undefined;
195
+ customizationFile?: string | undefined;
196
+ lifecycleHooksFile?: string | undefined;
197
+ componentLibraries?: string[] | {
198
+ name: string;
199
+ include?: string[] | undefined;
200
+ exclude?: string[] | undefined;
201
+ }[] | undefined;
165
202
  viteConfig?: {
166
203
  resolve?: {
167
204
  alias: Record<string, string>;
@@ -194,6 +231,9 @@ declare const _default: (config: EmbeddableConfig) => {
194
231
  };
195
232
  };
196
233
  rollupOptions: RollupOptions;
234
+ componentLibraries: string[] | ComponentLibraryConfig[];
235
+ customizationFile: string;
236
+ lifecycleHooksFile: string;
197
237
  };
198
238
  outputOptions: {
199
239
  typesEntryPointFilename: string;
@@ -218,6 +258,7 @@ declare const _default: (config: EmbeddableConfig) => {
218
258
  build: (config: EmbeddableConfig) => Promise<unknown>;
219
259
  cleanup: (config: EmbeddableConfig) => Promise<unknown>;
220
260
  validate: (config: EmbeddableConfig) => Promise<unknown>;
261
+ buildPackage: (config: EmbeddableConfig) => Promise<unknown>;
221
262
  })[];
222
263
  };
223
264
  export default _default;
package/lib/index.d.ts CHANGED
@@ -3,4 +3,5 @@ export { default as login } from "./login";
3
3
  export { default as push } from "./push";
4
4
  export { default as dev } from "./dev";
5
5
  export { default as defineConfig } from "./defineConfig";
6
+ export { default as buildPackage } from "./buildPackage";
6
7
  export type { ResolvedEmbeddableConfig } from "./defineConfig";