@tinacms/app 0.0.11 → 0.0.13

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/index.js CHANGED
@@ -2,8 +2,22 @@ var __create = Object.create;
2
2
  var __defProp = Object.defineProperty;
3
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
6
  var __getProtoOf = Object.getPrototypeOf;
6
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
9
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10
+ var __spreadValues = (a, b) => {
11
+ for (var prop in b || (b = {}))
12
+ if (__hasOwnProp.call(b, prop))
13
+ __defNormalProp(a, prop, b[prop]);
14
+ if (__getOwnPropSymbols)
15
+ for (var prop of __getOwnPropSymbols(b)) {
16
+ if (__propIsEnum.call(b, prop))
17
+ __defNormalProp(a, prop, b[prop]);
18
+ }
19
+ return a;
20
+ };
7
21
  var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
22
  var __export = (target, all) => {
9
23
  __markAsModule(target);
@@ -29,36 +43,313 @@ __export(exports, {
29
43
  var import_plugin_react = __toModule(require("@vitejs/plugin-react"));
30
44
  var import_fs_extra = __toModule(require("fs-extra"));
31
45
  var import_vite = __toModule(require("vite"));
46
+ var import_path2 = __toModule(require("path"));
47
+
48
+ // src/tailwind.ts
49
+ var import_tailwindcss = __toModule(require("tailwindcss"));
50
+ var import_postcss_nested = __toModule(require("postcss-nested/index.js"));
51
+ var import_nesting = __toModule(require("tailwindcss/nesting/index.js"));
52
+ var import_defaultTheme = __toModule(require("tailwindcss/defaultTheme.js"));
53
+ var import_typography = __toModule(require("@tailwindcss/typography"));
54
+ var import_line_clamp = __toModule(require("@tailwindcss/line-clamp"));
55
+ var import_aspect_ratio = __toModule(require("@tailwindcss/aspect-ratio"));
32
56
  var import_path = __toModule(require("path"));
57
+ var viteTina = () => {
58
+ return {
59
+ name: "vite-plugin-tina",
60
+ config: () => {
61
+ const plugins = [];
62
+ const tw = (0, import_tailwindcss.default)({
63
+ important: ".tina-tailwind",
64
+ theme: {
65
+ columns: {
66
+ auto: "auto",
67
+ 1: "1",
68
+ 2: "2",
69
+ 3: "3",
70
+ 4: "4",
71
+ 5: "5",
72
+ 6: "6",
73
+ 7: "7",
74
+ 8: "8",
75
+ 9: "9",
76
+ 10: "10",
77
+ 11: "11",
78
+ 12: "12",
79
+ "3xs": "256px",
80
+ "2xs": "288px",
81
+ xs: "320px",
82
+ sm: "384px",
83
+ md: "448px",
84
+ lg: "512px",
85
+ xl: "576px",
86
+ "2xl": "672px",
87
+ "3xl": "768px",
88
+ "4xl": "896px",
89
+ "5xl": "1024px",
90
+ "6xl": "1152px",
91
+ "7xl": "1280px"
92
+ },
93
+ spacing: {
94
+ px: "1px",
95
+ 0: "0px",
96
+ 0.5: "2px",
97
+ 1: "4px",
98
+ 1.5: "6px",
99
+ 2: "8px",
100
+ 2.5: "10px",
101
+ 3: "12px",
102
+ 3.5: "14px",
103
+ 4: "16px",
104
+ 5: "20px",
105
+ 6: "24px",
106
+ 7: "28px",
107
+ 8: "32px",
108
+ 9: "36px",
109
+ 10: "40px",
110
+ 11: "44px",
111
+ 12: "48px",
112
+ 14: "56px",
113
+ 16: "64px",
114
+ 18: "72px",
115
+ 20: "80px",
116
+ 24: "96px",
117
+ 28: "114px",
118
+ 32: "128px",
119
+ 36: "144px",
120
+ 40: "160px",
121
+ 44: "176px",
122
+ 48: "192px",
123
+ 52: "208px",
124
+ 56: "224px",
125
+ 60: "240px",
126
+ 64: "256px",
127
+ 72: "288px",
128
+ 80: "320px",
129
+ 96: "384px"
130
+ },
131
+ borderRadius: {
132
+ none: "0px",
133
+ sm: "2px",
134
+ DEFAULT: "4px",
135
+ md: "6px",
136
+ lg: "8px",
137
+ xl: "12px",
138
+ "2xl": "16px",
139
+ "3xl": "24px",
140
+ full: "9999px"
141
+ },
142
+ borderWidth: {
143
+ DEFAULT: "1px",
144
+ 0: "0",
145
+ 2: "2px",
146
+ 3: "3px",
147
+ 4: "4px",
148
+ 6: "6px",
149
+ 8: "8px"
150
+ },
151
+ fontSize: {
152
+ xs: ["13px", { lineHeight: "1.33" }],
153
+ sm: ["14px", { lineHeight: "1.43" }],
154
+ base: ["16px", { lineHeight: "1.5" }],
155
+ md: ["16px", { lineHeight: "1.5" }],
156
+ lg: ["18px", { lineHeight: "1.55" }],
157
+ xl: ["20px", { lineHeight: "1.4" }],
158
+ "2xl": ["24px", { lineHeight: "1.33" }],
159
+ "3xl": ["30px", { lineHeight: "1.2" }],
160
+ "4xl": ["36px", { lineHeight: "1.1" }],
161
+ "5xl": ["48px", { lineHeight: "1" }],
162
+ "6xl": ["60px", { lineHeight: "1" }],
163
+ "7xl": ["72px", { lineHeight: "1" }],
164
+ "8xl": ["96px", { lineHeight: "1" }],
165
+ "9xl": ["128px", { lineHeight: "1" }]
166
+ },
167
+ opacity: {
168
+ 0: "0",
169
+ 5: ".05",
170
+ 7: ".07",
171
+ 10: ".1",
172
+ 15: ".15",
173
+ 20: ".2",
174
+ 25: ".25",
175
+ 30: ".3",
176
+ 40: ".4",
177
+ 50: ".5",
178
+ 60: ".6",
179
+ 70: ".7",
180
+ 75: ".75",
181
+ 80: ".8",
182
+ 90: ".9",
183
+ 100: "1"
184
+ },
185
+ zIndex: {
186
+ "-1": "-1",
187
+ base: "9000",
188
+ panel: "9400",
189
+ menu: "9800",
190
+ chrome: "10200",
191
+ overlay: "10600",
192
+ modal: "10800",
193
+ 0: "0",
194
+ 10: "10",
195
+ 20: "20",
196
+ 30: "30",
197
+ 40: "40",
198
+ 25: "25",
199
+ 50: "50",
200
+ 75: "75",
201
+ 100: "100",
202
+ auto: "auto"
203
+ },
204
+ extend: {
205
+ scale: {
206
+ 97: ".97",
207
+ 103: "1.03"
208
+ },
209
+ transitionDuration: {
210
+ 0: "0ms",
211
+ 2e3: "2000ms"
212
+ },
213
+ boxShadow: {
214
+ xs: "0 0 0 1px rgba(0, 0, 0, 0.05)",
215
+ outline: "0 0 0 3px rgba(66, 153, 225, 0.5)"
216
+ },
217
+ colors: {
218
+ blue: {
219
+ 50: "#DCEEFF",
220
+ 100: "#B4DBFF",
221
+ 200: "#85C5FE",
222
+ 300: "#4EABFE",
223
+ 400: "#2296fe",
224
+ 500: "#0084FF",
225
+ 600: "#0574e4",
226
+ 700: "#0D5DBD",
227
+ 800: "#144696",
228
+ 900: "#1D2C6C",
229
+ 1e3: "#241748"
230
+ },
231
+ gray: {
232
+ 50: "#F6F6F9",
233
+ 100: "#EDECF3",
234
+ 150: "#E6E3EF",
235
+ 200: "#E1DDEC",
236
+ 250: "#C9C5D5",
237
+ 300: "#b2adbe",
238
+ 400: "#918c9e",
239
+ 500: "#716c7f",
240
+ 600: "#565165",
241
+ 700: "#433e52",
242
+ 800: "#363145",
243
+ 900: "#252336",
244
+ 1e3: "#1c1b2e"
245
+ },
246
+ orange: {
247
+ 400: "#EB6337",
248
+ 500: "#EC4815",
249
+ 600: "#DC4419"
250
+ }
251
+ },
252
+ fontFamily: {
253
+ sans: ["Inter", ...import_defaultTheme.default.fontFamily.sans]
254
+ },
255
+ lineHeight: {
256
+ 3: "12px",
257
+ 4: "16px",
258
+ 5: "20px",
259
+ 6: "24px",
260
+ 7: "28px",
261
+ 8: "32px",
262
+ 9: "36px",
263
+ 10: "40px"
264
+ },
265
+ maxWidth: {
266
+ form: "900px"
267
+ }
268
+ }
269
+ },
270
+ content: [
271
+ import_path.default.join(__dirname, "../appFiles/src/**/*.{vue,js,ts,jsx,tsx,svelte}")
272
+ ],
273
+ plugins: [
274
+ (0, import_typography.default)({ className: "tina-prose" }),
275
+ import_line_clamp.default,
276
+ import_aspect_ratio.default
277
+ ]
278
+ });
279
+ plugins.push(import_nesting.default);
280
+ plugins.push(import_postcss_nested.default);
281
+ plugins.push(tw);
282
+ return {
283
+ css: {
284
+ postcss: {
285
+ plugins
286
+ }
287
+ }
288
+ };
289
+ }
290
+ };
291
+ };
292
+
293
+ // src/index.ts
294
+ var import_esbuild = __toModule(require("esbuild"));
295
+ var server;
33
296
  var viteBuild = async ({
34
297
  rootPath,
35
298
  outputFolder,
36
299
  publicFolder,
37
- local
300
+ local,
301
+ apiUrl
38
302
  }) => {
39
- const root = import_path.default.resolve(__dirname, "..", "appFiles");
40
- const pathToConfig = import_path.default.join(rootPath, ".tina", "config");
41
- const outDir = import_path.default.join(rootPath, publicFolder, outputFolder);
303
+ const prebuildPath = import_path2.default.resolve(__dirname, "assets");
304
+ const pathToConfig = import_path2.default.join(rootPath, ".tina", "config");
305
+ const packageJSONFilePath = import_path2.default.join(rootPath, "package.json");
306
+ const outDir = import_path2.default.join(rootPath, publicFolder, outputFolder);
42
307
  await import_fs_extra.default.emptyDir(outDir);
43
308
  await import_fs_extra.default.ensureDir(outDir);
44
- await import_fs_extra.default.writeFile(import_path.default.join(rootPath, publicFolder, outputFolder, ".gitignore"), `index.html
309
+ await import_fs_extra.default.writeFile(import_path2.default.join(rootPath, publicFolder, outputFolder, ".gitignore"), `index.html
45
310
  assets/
46
311
  vite.svg`);
312
+ const packageJSON = JSON.parse(import_fs_extra.default.readFileSync(packageJSONFilePath).toString() || "{}");
313
+ const define = {};
314
+ const deps = (packageJSON == null ? void 0 : packageJSON.dependencies) || [];
315
+ const peerDeps = (packageJSON == null ? void 0 : packageJSON.peerDependencies) || [];
316
+ const devDeps = (packageJSON == null ? void 0 : packageJSON.devDependencies) || [];
317
+ const external = Object.keys(__spreadValues(__spreadValues(__spreadValues({}, deps), peerDeps), devDeps));
318
+ const out = import_path2.default.join(rootPath, ".tina", "__generated__", "out.jsx");
319
+ await (0, import_esbuild.build)({
320
+ bundle: true,
321
+ platform: "browser",
322
+ target: ["es2020"],
323
+ entryPoints: [pathToConfig],
324
+ format: "esm",
325
+ treeShaking: true,
326
+ outfile: out,
327
+ external: [...external, "./node_modules/*"],
328
+ loader: loaders,
329
+ define
330
+ });
47
331
  const base = `/${outputFolder}/`;
332
+ const MONOREPO_DEV = process.env.MONOREPO_DEV;
333
+ const root = MONOREPO_DEV ? import_path2.default.join(__dirname, "../appFiles") : outDir;
48
334
  const config = {
49
335
  root,
50
336
  base,
51
337
  mode: local ? "development" : "production",
52
- plugins: [(0, import_plugin_react.default)()],
338
+ plugins: [(0, import_plugin_react.default)(), viteTina()],
53
339
  define: {
54
- "process.env": {}
340
+ "process.env": {},
341
+ __API_URL__: `"${apiUrl}"`
55
342
  },
56
343
  server: {
57
- strictPort: true
344
+ strictPort: true,
345
+ port: 5173,
346
+ fs: {
347
+ strict: false
348
+ }
58
349
  },
59
350
  resolve: {
60
351
  alias: {
61
- TINA_IMPORT: pathToConfig
352
+ TINA_IMPORT: out
62
353
  }
63
354
  },
64
355
  build: {
@@ -68,7 +359,52 @@ vite.svg`);
68
359
  },
69
360
  logLevel: "silent"
70
361
  };
71
- await (0, import_vite.build)(config);
362
+ if (local) {
363
+ const indexDev = await import_fs_extra.default.readFileSync(import_path2.default.join(__dirname, "index.dev.html")).toString();
364
+ if (MONOREPO_DEV) {
365
+ console.warn("MONOREPO_DEV mode, vite root is @tinacms/app");
366
+ await import_fs_extra.default.outputFileSync(import_path2.default.join(outDir, "index.html"), indexDev.replace(`INSERT_OUTPUT_FOLDER_NAME`, outputFolder).replace("assets/out.es.js", "src/main.tsx"));
367
+ } else {
368
+ await import_fs_extra.default.outputFileSync(import_path2.default.join(outDir, "index.html"), indexDev.replace(`INSERT_OUTPUT_FOLDER_NAME`, outputFolder));
369
+ await import_fs_extra.default.copySync(prebuildPath, import_path2.default.join(outDir, "assets"));
370
+ }
371
+ if (server) {
372
+ await server.close();
373
+ }
374
+ server = await (0, import_vite.createServer)(config);
375
+ await server.listen();
376
+ await server.printUrls();
377
+ } else {
378
+ await import_fs_extra.default.copyFileSync(import_path2.default.join(__dirname, "index.html"), import_path2.default.join(outDir, "index.html"));
379
+ await import_fs_extra.default.copySync(prebuildPath, import_path2.default.join(outDir, "assets"));
380
+ await (0, import_vite.build)(config);
381
+ await import_fs_extra.default.rmSync(out);
382
+ }
383
+ };
384
+ var loaders = {
385
+ ".aac": "file",
386
+ ".css": "file",
387
+ ".eot": "file",
388
+ ".flac": "file",
389
+ ".gif": "file",
390
+ ".jpeg": "file",
391
+ ".jpg": "file",
392
+ ".json": "json",
393
+ ".mp3": "file",
394
+ ".mp4": "file",
395
+ ".ogg": "file",
396
+ ".otf": "file",
397
+ ".png": "file",
398
+ ".svg": "file",
399
+ ".ttf": "file",
400
+ ".wav": "file",
401
+ ".webm": "file",
402
+ ".webp": "file",
403
+ ".woff": "file",
404
+ ".woff2": "file",
405
+ ".js": "jsx",
406
+ ".jsx": "jsx",
407
+ ".tsx": "tsx"
72
408
  };
73
409
  // Annotate the CommonJS export names for ESM import in node:
74
410
  0 && (module.exports = {
@@ -0,0 +1 @@
1
+ export * from "../src/prebuild"
@@ -0,0 +1,302 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
+ var __reExport = (target, module2, desc) => {
9
+ if (module2 && typeof module2 === "object" || typeof module2 === "function") {
10
+ for (let key of __getOwnPropNames(module2))
11
+ if (!__hasOwnProp.call(target, key) && key !== "default")
12
+ __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
13
+ }
14
+ return target;
15
+ };
16
+ var __toModule = (module2) => {
17
+ return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", module2 && module2.__esModule && "default" in module2 ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
18
+ };
19
+
20
+ // src/prebuild.ts
21
+ var import_plugin_react = __toModule(require("@vitejs/plugin-react"));
22
+ var import_vite = __toModule(require("vite"));
23
+ var import_path2 = __toModule(require("path"));
24
+ var import_fs_extra = __toModule(require("fs-extra"));
25
+
26
+ // src/tailwind.ts
27
+ var import_tailwindcss = __toModule(require("tailwindcss"));
28
+ var import_postcss_nested = __toModule(require("postcss-nested/index.js"));
29
+ var import_nesting = __toModule(require("tailwindcss/nesting/index.js"));
30
+ var import_defaultTheme = __toModule(require("tailwindcss/defaultTheme.js"));
31
+ var import_typography = __toModule(require("@tailwindcss/typography"));
32
+ var import_line_clamp = __toModule(require("@tailwindcss/line-clamp"));
33
+ var import_aspect_ratio = __toModule(require("@tailwindcss/aspect-ratio"));
34
+ var import_path = __toModule(require("path"));
35
+ var viteTina = () => {
36
+ return {
37
+ name: "vite-plugin-tina",
38
+ config: () => {
39
+ const plugins = [];
40
+ const tw = (0, import_tailwindcss.default)({
41
+ important: ".tina-tailwind",
42
+ theme: {
43
+ columns: {
44
+ auto: "auto",
45
+ 1: "1",
46
+ 2: "2",
47
+ 3: "3",
48
+ 4: "4",
49
+ 5: "5",
50
+ 6: "6",
51
+ 7: "7",
52
+ 8: "8",
53
+ 9: "9",
54
+ 10: "10",
55
+ 11: "11",
56
+ 12: "12",
57
+ "3xs": "256px",
58
+ "2xs": "288px",
59
+ xs: "320px",
60
+ sm: "384px",
61
+ md: "448px",
62
+ lg: "512px",
63
+ xl: "576px",
64
+ "2xl": "672px",
65
+ "3xl": "768px",
66
+ "4xl": "896px",
67
+ "5xl": "1024px",
68
+ "6xl": "1152px",
69
+ "7xl": "1280px"
70
+ },
71
+ spacing: {
72
+ px: "1px",
73
+ 0: "0px",
74
+ 0.5: "2px",
75
+ 1: "4px",
76
+ 1.5: "6px",
77
+ 2: "8px",
78
+ 2.5: "10px",
79
+ 3: "12px",
80
+ 3.5: "14px",
81
+ 4: "16px",
82
+ 5: "20px",
83
+ 6: "24px",
84
+ 7: "28px",
85
+ 8: "32px",
86
+ 9: "36px",
87
+ 10: "40px",
88
+ 11: "44px",
89
+ 12: "48px",
90
+ 14: "56px",
91
+ 16: "64px",
92
+ 18: "72px",
93
+ 20: "80px",
94
+ 24: "96px",
95
+ 28: "114px",
96
+ 32: "128px",
97
+ 36: "144px",
98
+ 40: "160px",
99
+ 44: "176px",
100
+ 48: "192px",
101
+ 52: "208px",
102
+ 56: "224px",
103
+ 60: "240px",
104
+ 64: "256px",
105
+ 72: "288px",
106
+ 80: "320px",
107
+ 96: "384px"
108
+ },
109
+ borderRadius: {
110
+ none: "0px",
111
+ sm: "2px",
112
+ DEFAULT: "4px",
113
+ md: "6px",
114
+ lg: "8px",
115
+ xl: "12px",
116
+ "2xl": "16px",
117
+ "3xl": "24px",
118
+ full: "9999px"
119
+ },
120
+ borderWidth: {
121
+ DEFAULT: "1px",
122
+ 0: "0",
123
+ 2: "2px",
124
+ 3: "3px",
125
+ 4: "4px",
126
+ 6: "6px",
127
+ 8: "8px"
128
+ },
129
+ fontSize: {
130
+ xs: ["13px", { lineHeight: "1.33" }],
131
+ sm: ["14px", { lineHeight: "1.43" }],
132
+ base: ["16px", { lineHeight: "1.5" }],
133
+ md: ["16px", { lineHeight: "1.5" }],
134
+ lg: ["18px", { lineHeight: "1.55" }],
135
+ xl: ["20px", { lineHeight: "1.4" }],
136
+ "2xl": ["24px", { lineHeight: "1.33" }],
137
+ "3xl": ["30px", { lineHeight: "1.2" }],
138
+ "4xl": ["36px", { lineHeight: "1.1" }],
139
+ "5xl": ["48px", { lineHeight: "1" }],
140
+ "6xl": ["60px", { lineHeight: "1" }],
141
+ "7xl": ["72px", { lineHeight: "1" }],
142
+ "8xl": ["96px", { lineHeight: "1" }],
143
+ "9xl": ["128px", { lineHeight: "1" }]
144
+ },
145
+ opacity: {
146
+ 0: "0",
147
+ 5: ".05",
148
+ 7: ".07",
149
+ 10: ".1",
150
+ 15: ".15",
151
+ 20: ".2",
152
+ 25: ".25",
153
+ 30: ".3",
154
+ 40: ".4",
155
+ 50: ".5",
156
+ 60: ".6",
157
+ 70: ".7",
158
+ 75: ".75",
159
+ 80: ".8",
160
+ 90: ".9",
161
+ 100: "1"
162
+ },
163
+ zIndex: {
164
+ "-1": "-1",
165
+ base: "9000",
166
+ panel: "9400",
167
+ menu: "9800",
168
+ chrome: "10200",
169
+ overlay: "10600",
170
+ modal: "10800",
171
+ 0: "0",
172
+ 10: "10",
173
+ 20: "20",
174
+ 30: "30",
175
+ 40: "40",
176
+ 25: "25",
177
+ 50: "50",
178
+ 75: "75",
179
+ 100: "100",
180
+ auto: "auto"
181
+ },
182
+ extend: {
183
+ scale: {
184
+ 97: ".97",
185
+ 103: "1.03"
186
+ },
187
+ transitionDuration: {
188
+ 0: "0ms",
189
+ 2e3: "2000ms"
190
+ },
191
+ boxShadow: {
192
+ xs: "0 0 0 1px rgba(0, 0, 0, 0.05)",
193
+ outline: "0 0 0 3px rgba(66, 153, 225, 0.5)"
194
+ },
195
+ colors: {
196
+ blue: {
197
+ 50: "#DCEEFF",
198
+ 100: "#B4DBFF",
199
+ 200: "#85C5FE",
200
+ 300: "#4EABFE",
201
+ 400: "#2296fe",
202
+ 500: "#0084FF",
203
+ 600: "#0574e4",
204
+ 700: "#0D5DBD",
205
+ 800: "#144696",
206
+ 900: "#1D2C6C",
207
+ 1e3: "#241748"
208
+ },
209
+ gray: {
210
+ 50: "#F6F6F9",
211
+ 100: "#EDECF3",
212
+ 150: "#E6E3EF",
213
+ 200: "#E1DDEC",
214
+ 250: "#C9C5D5",
215
+ 300: "#b2adbe",
216
+ 400: "#918c9e",
217
+ 500: "#716c7f",
218
+ 600: "#565165",
219
+ 700: "#433e52",
220
+ 800: "#363145",
221
+ 900: "#252336",
222
+ 1e3: "#1c1b2e"
223
+ },
224
+ orange: {
225
+ 400: "#EB6337",
226
+ 500: "#EC4815",
227
+ 600: "#DC4419"
228
+ }
229
+ },
230
+ fontFamily: {
231
+ sans: ["Inter", ...import_defaultTheme.default.fontFamily.sans]
232
+ },
233
+ lineHeight: {
234
+ 3: "12px",
235
+ 4: "16px",
236
+ 5: "20px",
237
+ 6: "24px",
238
+ 7: "28px",
239
+ 8: "32px",
240
+ 9: "36px",
241
+ 10: "40px"
242
+ },
243
+ maxWidth: {
244
+ form: "900px"
245
+ }
246
+ }
247
+ },
248
+ content: [
249
+ import_path.default.join(__dirname, "../appFiles/src/**/*.{vue,js,ts,jsx,tsx,svelte}")
250
+ ],
251
+ plugins: [
252
+ (0, import_typography.default)({ className: "tina-prose" }),
253
+ import_line_clamp.default,
254
+ import_aspect_ratio.default
255
+ ]
256
+ });
257
+ plugins.push(import_nesting.default);
258
+ plugins.push(import_postcss_nested.default);
259
+ plugins.push(tw);
260
+ return {
261
+ css: {
262
+ postcss: {
263
+ plugins
264
+ }
265
+ }
266
+ };
267
+ }
268
+ };
269
+ };
270
+
271
+ // src/prebuild.ts
272
+ var prebuild = async () => {
273
+ const outDir = import_path2.default.join(__dirname, "../dist/assets");
274
+ const outDevHTML = import_path2.default.join(__dirname, "../dist/index.dev.html");
275
+ await import_fs_extra.default.copyFileSync(import_path2.default.join(__dirname, "../appFiles/index.dev.html"), outDevHTML);
276
+ const outHTML = import_path2.default.join(__dirname, "../dist/index.html");
277
+ await import_fs_extra.default.copyFileSync(import_path2.default.join(__dirname, "../appFiles/index.html"), outHTML);
278
+ const entry = import_path2.default.join(__dirname, "../appFiles/src/main.tsx");
279
+ const libConfig = {
280
+ plugins: [(0, import_plugin_react.default)(), viteTina()],
281
+ define: {
282
+ __API_URL__: `__API_URL__`
283
+ },
284
+ build: {
285
+ minify: false,
286
+ sourcemap: false,
287
+ rollupOptions: {
288
+ external: "TINA_IMPORT"
289
+ },
290
+ outDir,
291
+ emptyOutDir: true,
292
+ lib: {
293
+ entry,
294
+ formats: ["es"],
295
+ fileName: "out"
296
+ }
297
+ },
298
+ logLevel: "silent"
299
+ };
300
+ await (0, import_vite.build)(libConfig);
301
+ };
302
+ prebuild();