@tinacms/app 0.0.21 → 0.0.23

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/prebuild.js DELETED
@@ -1,302 +0,0 @@
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();