nuxt-og-image 6.4.10 → 6.5.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 (40) hide show
  1. package/dist/chunks/tw4.cjs +92 -24
  2. package/dist/chunks/tw4.mjs +90 -22
  3. package/dist/chunks/uno.cjs +4 -5
  4. package/dist/chunks/uno.mjs +2 -3
  5. package/dist/devtools/200.html +1 -1
  6. package/dist/devtools/404.html +1 -1
  7. package/dist/devtools/_nuxt/{xchQSBmS.js → BFE1I-6y.js} +1 -1
  8. package/dist/devtools/_nuxt/{BvRoxQk1.js → BeokGQcV.js} +1 -1
  9. package/dist/devtools/_nuxt/{DCbfjjTH.js → CAvCRPq5.js} +6 -6
  10. package/dist/devtools/_nuxt/{XfZAlXlq.js → D0mxCJKN.js} +1 -1
  11. package/dist/devtools/_nuxt/{DmRGXzI6.js → DNGiVUg5.js} +1 -1
  12. package/dist/devtools/_nuxt/{DMzvbO0X.js → DdjB2us_.js} +1 -1
  13. package/dist/devtools/_nuxt/DevtoolsSection.DithqiRs.css +1 -0
  14. package/dist/devtools/_nuxt/DevtoolsSnippet.Bi7K9LD7.css +1 -0
  15. package/dist/devtools/_nuxt/{BUobo_a8.js → TwxRLlMM.js} +1 -1
  16. package/dist/devtools/_nuxt/builds/latest.json +1 -1
  17. package/dist/devtools/_nuxt/builds/meta/4e19b9f7-298b-4c14-85e9-238c217158cb.json +1 -0
  18. package/dist/devtools/_nuxt/{entry.CvRWYJ1U.css → entry.D10ZDedD.css} +1 -1
  19. package/dist/devtools/_nuxt/{pages.BtQWqso7.css → pages.sZ4TsxJx.css} +1 -1
  20. package/dist/devtools/_nuxt/renderer-select.DomsjmoH.css +1 -0
  21. package/dist/devtools/debug/index.html +1 -1
  22. package/dist/devtools/docs/index.html +1 -1
  23. package/dist/devtools/index.html +1 -1
  24. package/dist/devtools/templates/index.html +1 -1
  25. package/dist/module.cjs +2 -1
  26. package/dist/module.json +1 -1
  27. package/dist/module.mjs +2 -1
  28. package/dist/runtime/server/og-image/font-source.d.ts +6 -0
  29. package/dist/runtime/server/og-image/font-source.js +2 -1
  30. package/dist/runtime/server/og-image/takumi/renderer.js +5 -2
  31. package/dist/runtime/types.d.ts +2 -0
  32. package/dist/shared/{nuxt-og-image.C2Ejsw_g.mjs → nuxt-og-image.CBAJqzNe.mjs} +324 -24
  33. package/dist/shared/{nuxt-og-image.BDOahTU5.cjs → nuxt-og-image.DVJCoUpz.cjs} +326 -24
  34. package/package.json +3 -3
  35. package/dist/chunks/css-provider.cjs +0 -108
  36. package/dist/chunks/css-provider.mjs +0 -102
  37. package/dist/devtools/_nuxt/DevtoolsSection.GitthLOC.css +0 -1
  38. package/dist/devtools/_nuxt/DevtoolsSnippet.U7uM2TTz.css +0 -1
  39. package/dist/devtools/_nuxt/builds/meta/dc070c1e-9f70-4119-bc66-db0dd8a0649d.json +0 -1
  40. package/dist/devtools/_nuxt/renderer-select.vw2MbfFR.css +0 -1
@@ -4,8 +4,7 @@ const promises = require('node:fs/promises');
4
4
  const node_url = require('node:url');
5
5
  const exsolve = require('exsolve');
6
6
  const pathe = require('pathe');
7
- const cssProvider = require('./css-provider.cjs');
8
- const module$1 = require('../shared/nuxt-og-image.BDOahTU5.cjs');
7
+ const module$1 = require('../shared/nuxt-og-image.DVJCoUpz.cjs');
9
8
  require('node:fs');
10
9
  require('@nuxt/kit');
11
10
  require('defu');
@@ -104,7 +103,7 @@ function createStylesheetLoader(baseDir) {
104
103
  return { path: id, base, content: "" };
105
104
  };
106
105
  }
107
- function buildNuxtUiVars(vars, nuxtUiColors) {
106
+ function buildNuxtUiVars(vars, nuxtUiColors, theme) {
108
107
  const colors = twColors;
109
108
  const shades = [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950];
110
109
  for (const [semantic, colorName] of Object.entries(nuxtUiColors)) {
@@ -119,21 +118,35 @@ function buildNuxtUiVars(vars, nuxtUiColors) {
119
118
  }
120
119
  const neutral = nuxtUiColors.neutral || "slate";
121
120
  const neutralColors = colors[neutral];
122
- const semanticVars = {
123
- // Dark mode text colors (inverted from light mode)
121
+ const semanticVars = theme === "light" ? {
122
+ "--ui-text-dimmed": neutralColors?.[400] || "",
123
+ "--ui-text-muted": neutralColors?.[500] || "",
124
+ "--ui-text-toned": neutralColors?.[600] || "",
125
+ "--ui-text": neutralColors?.[700] || "",
126
+ "--ui-text-highlighted": neutralColors?.[900] || "",
127
+ "--ui-text-inverted": "#ffffff",
128
+ "--ui-bg": "#ffffff",
129
+ "--ui-bg-muted": neutralColors?.[50] || "",
130
+ "--ui-bg-elevated": neutralColors?.[100] || "",
131
+ "--ui-bg-accented": neutralColors?.[200] || "",
132
+ "--ui-bg-inverted": neutralColors?.[900] || "",
133
+ "--ui-border": neutralColors?.[200] || "",
134
+ "--ui-border-muted": neutralColors?.[200] || "",
135
+ "--ui-border-accented": neutralColors?.[300] || "",
136
+ "--ui-border-inverted": neutralColors?.[900] || ""
137
+ } : {
138
+ // Dark mode (default for OG images, also explicit theme === 'dark')
124
139
  "--ui-text-dimmed": neutralColors?.[500] || "",
125
140
  "--ui-text-muted": neutralColors?.[400] || "",
126
141
  "--ui-text-toned": neutralColors?.[300] || "",
127
142
  "--ui-text": neutralColors?.[200] || "",
128
143
  "--ui-text-highlighted": "#ffffff",
129
144
  "--ui-text-inverted": neutralColors?.[900] || "",
130
- // Dark mode backgrounds
131
145
  "--ui-bg": neutralColors?.[900] || "",
132
146
  "--ui-bg-muted": neutralColors?.[800] || "",
133
147
  "--ui-bg-elevated": neutralColors?.[800] || "",
134
148
  "--ui-bg-accented": neutralColors?.[700] || "",
135
149
  "--ui-bg-inverted": "#ffffff",
136
- // Dark mode borders
137
150
  "--ui-border": neutralColors?.[800] || "",
138
151
  "--ui-border-muted": neutralColors?.[700] || "",
139
152
  "--ui-border-accented": neutralColors?.[700] || "",
@@ -147,16 +160,19 @@ function buildNuxtUiVars(vars, nuxtUiColors) {
147
160
  let cachedCompiler = null;
148
161
  let cachedCssPath = null;
149
162
  let cachedVars = null;
163
+ let cachedExtractedVars = null;
150
164
  let pendingCompiler = null;
151
165
  const resolvedStyleCache = /* @__PURE__ */ new Map();
152
166
  function clearTw4UserVarsCache() {
153
167
  cachedVars = null;
168
+ cachedExtractedVars = null;
154
169
  resolvedStyleCache.clear();
155
170
  }
156
171
  function clearTw4Cache() {
157
172
  cachedCompiler = null;
158
173
  cachedCssPath = null;
159
174
  cachedVars = null;
175
+ cachedExtractedVars = null;
160
176
  pendingCompiler = null;
161
177
  resolvedStyleCache.clear();
162
178
  }
@@ -179,6 +195,13 @@ async function getCompiler(cssPath, nuxtUiColors) {
179
195
  cachedCompiler = compiler;
180
196
  cachedCssPath = cssPath;
181
197
  cachedVars = vars;
198
+ cachedExtractedVars = {
199
+ rootVars: /* @__PURE__ */ new Map(),
200
+ qualifiedRules: [],
201
+ universalVars: /* @__PURE__ */ new Map(),
202
+ propertyInitials: /* @__PURE__ */ new Map(),
203
+ perClassVars: /* @__PURE__ */ new Map()
204
+ };
182
205
  resolvedStyleCache.clear();
183
206
  return { compiler, vars };
184
207
  })();
@@ -188,7 +211,7 @@ async function getCompiler(cssPath, nuxtUiColors) {
188
211
  });
189
212
  return p;
190
213
  }
191
- async function parseCssOutput(rawCss, vars) {
214
+ async function parseCssOutput(rawCss, vars, extractedAccum) {
192
215
  const css = await module$1.simplifyCss(rawCss);
193
216
  for (const [name, value] of module$1.extractCssVars(css)) {
194
217
  if (!vars.has(name))
@@ -199,6 +222,30 @@ async function parseCssOutput(rawCss, vars) {
199
222
  vars.set(name, value);
200
223
  }
201
224
  const perClassVars = module$1.extractPerClassVars(css);
225
+ if (extractedAccum) {
226
+ const fresh = await module$1.extractVarsFromCss(css);
227
+ for (const [n, v] of fresh.rootVars) {
228
+ if (!extractedAccum.rootVars.has(n))
229
+ extractedAccum.rootVars.set(n, v);
230
+ }
231
+ extractedAccum.qualifiedRules.push(...fresh.qualifiedRules);
232
+ for (const [n, v] of fresh.universalVars) {
233
+ if (!extractedAccum.universalVars.has(n))
234
+ extractedAccum.universalVars.set(n, v);
235
+ }
236
+ for (const [n, v] of fresh.propertyInitials) {
237
+ if (!extractedAccum.propertyInitials.has(n))
238
+ extractedAccum.propertyInitials.set(n, v);
239
+ }
240
+ for (const [name, classVars] of fresh.perClassVars) {
241
+ const existing = extractedAccum.perClassVars.get(name);
242
+ if (existing) {
243
+ for (const [k, v] of classVars) existing.set(k, v);
244
+ } else {
245
+ extractedAccum.perClassVars.set(name, new Map(classVars));
246
+ }
247
+ }
248
+ }
202
249
  const classes = module$1.extractClassStyles(css, { skipPrefixes: ["--"], merge: true });
203
250
  return { classes, perClassVars };
204
251
  }
@@ -284,34 +331,51 @@ async function buildGradient(classes, vars) {
284
331
  }
285
332
  return null;
286
333
  }
287
- async function resolveClassesToStyles(classes, options, context) {
334
+ function buildThemeVars(baseVars, extracted, theme, nuxtUiColors) {
335
+ const vars = new Map(baseVars);
336
+ if (nuxtUiColors)
337
+ buildNuxtUiVars(vars, nuxtUiColors, theme);
338
+ if (extracted) {
339
+ const themeRootAttrs = { "data-theme": theme };
340
+ const themeVars = module$1.resolveExtractedVars(extracted, themeRootAttrs);
341
+ for (const [n, v] of themeVars)
342
+ vars.set(n, v);
343
+ }
344
+ return vars;
345
+ }
346
+ async function resolveClassesToStyles(classes, options, context, theme) {
288
347
  const { compiler, vars } = await getCompiler(options.cssPath, options.nuxtUiColors);
289
- const uncached = classes.filter((c) => !resolvedStyleCache.has(c));
348
+ const cacheKeyFor = (cls) => theme ? `${cls}|${theme}` : cls;
349
+ const uncached = classes.filter((c) => !resolvedStyleCache.has(cacheKeyFor(c)));
290
350
  if (uncached.length > 0) {
291
351
  const outputCss = compiler.build(uncached);
292
- const { classes: parsedClasses, perClassVars } = await parseCssOutput(outputCss, vars);
352
+ const { classes: parsedClasses, perClassVars } = await parseCssOutput(outputCss, vars, cachedExtractedVars || void 0);
353
+ const resolveVarsForClass = theme ? buildThemeVars(vars, cachedExtractedVars, theme, options.nuxtUiColors) : vars;
293
354
  for (const [className, rawStyles] of parsedClasses) {
294
355
  const classVars = perClassVars.get(className);
295
- const mergedVars = classVars ? new Map([...vars, ...classVars]) : vars;
356
+ const mergedVars = classVars ? new Map([...resolveVarsForClass, ...classVars]) : resolveVarsForClass;
296
357
  const styles = await module$1.postProcessStyles(rawStyles, mergedVars, void 0, context);
358
+ const cacheKey = cacheKeyFor(className);
297
359
  if (!styles && className.startsWith("bg-gradient-")) {
298
- resolvedStyleCache.set(className, rawStyles);
360
+ resolvedStyleCache.set(cacheKey, rawStyles);
299
361
  } else {
300
- resolvedStyleCache.set(className, styles);
362
+ resolvedStyleCache.set(cacheKey, styles);
301
363
  }
302
364
  }
303
365
  for (const c of uncached) {
304
- if (!resolvedStyleCache.has(c))
305
- resolvedStyleCache.set(c, null);
366
+ const key = cacheKeyFor(c);
367
+ if (!resolvedStyleCache.has(key))
368
+ resolvedStyleCache.set(key, null);
306
369
  }
307
370
  }
308
371
  const result = {};
309
372
  for (const cls of classes) {
310
- const resolved = resolvedStyleCache.get(cls);
373
+ const resolved = resolvedStyleCache.get(cacheKeyFor(cls));
311
374
  if (resolved)
312
375
  result[cls] = resolved;
313
376
  }
314
- const gradient = await buildGradient(classes, vars);
377
+ const gradientVars = theme ? buildThemeVars(vars, cachedExtractedVars, theme, options.nuxtUiColors) : vars;
378
+ const gradient = await buildGradient(classes, gradientVars);
315
379
  if (gradient) {
316
380
  result[gradient.gradientClass] = { "background-image": gradient.value };
317
381
  for (const colorClass of gradient.colorClasses) {
@@ -381,19 +445,20 @@ function createTw4Provider(options) {
381
445
  }
382
446
  return {
383
447
  name: "tailwind",
384
- async resolveClassesToStyles(classes, context) {
448
+ async resolveClassesToStyles(classes, context, rootAttrs) {
385
449
  await init();
386
450
  if (!cssPath)
387
451
  return {};
388
- const baseClasses = cssProvider.extractVariantBaseClasses(classes);
452
+ const baseClasses = module$1.extractVariantBaseClasses(classes);
389
453
  const classesToResolve = [.../* @__PURE__ */ new Set([...classes, ...baseClasses])];
390
454
  const nuxtUiColors = await options.loadNuxtUiColors();
455
+ const theme = rootAttrs?.["data-theme"] === "light" || rootAttrs?.["data-theme"] === "dark" ? rootAttrs["data-theme"] : void 0;
391
456
  const tw4Resolved = await resolveClassesToStyles(classesToResolve, {
392
457
  cssPath,
393
458
  nuxtUiColors
394
- }, context);
459
+ }, context, theme);
395
460
  const resolvedMap = new Map(Object.entries(tw4Resolved));
396
- return cssProvider.resolveVariantPrefixes(classes, resolvedMap);
461
+ return module$1.resolveVariantPrefixes(classes, resolvedMap);
397
462
  },
398
463
  async extractMetadata() {
399
464
  await init();
@@ -402,13 +467,16 @@ function createTw4Provider(options) {
402
467
  const nuxtUiColors = await options.loadNuxtUiColors();
403
468
  return extractTw4Metadata({ cssPath, nuxtUiColors });
404
469
  },
405
- async getVars() {
470
+ async getVars(rootAttrs) {
406
471
  await init();
407
472
  if (!cssPath)
408
473
  return /* @__PURE__ */ new Map();
409
474
  const nuxtUiColors = await options.loadNuxtUiColors();
410
475
  const { vars } = await getCompiler(cssPath, nuxtUiColors);
411
- return vars;
476
+ const theme = rootAttrs?.["data-theme"] === "light" || rootAttrs?.["data-theme"] === "dark" ? rootAttrs["data-theme"] : void 0;
477
+ if (!theme)
478
+ return vars;
479
+ return buildThemeVars(vars, cachedExtractedVars, theme, nuxtUiColors);
412
480
  },
413
481
  clearUserVarsCache: clearTw4UserVarsCache,
414
482
  clearCache: clearTw4Cache
@@ -2,8 +2,7 @@ import { readFile } from 'node:fs/promises';
2
2
  import { pathToFileURL } from 'node:url';
3
3
  import { resolveModulePath } from 'exsolve';
4
4
  import { dirname, join } from 'pathe';
5
- import { extractVariantBaseClasses, resolveVariantPrefixes } from './css-provider.mjs';
6
- import { g as resolveVarsDeep, s as simplifyCss, p as postProcessStyles, l as loadLightningCss, e as extractCssVars, b as extractUniversalVars, c as extractPerClassVars, d as extractClassStyles } from '../shared/nuxt-og-image.C2Ejsw_g.mjs';
5
+ import { e as extractVariantBaseClasses, r as resolveVariantPrefixes, h as resolveExtractedVars, i as resolveVarsDeep, s as simplifyCss, p as postProcessStyles, l as loadLightningCss, a as extractCssVars, c as extractUniversalVars, d as extractPerClassVars, g as extractVarsFromCss, f as extractClassStyles } from '../shared/nuxt-og-image.CBAJqzNe.mjs';
7
6
  import 'node:fs';
8
7
  import '@nuxt/kit';
9
8
  import 'defu';
@@ -102,7 +101,7 @@ function createStylesheetLoader(baseDir) {
102
101
  return { path: id, base, content: "" };
103
102
  };
104
103
  }
105
- function buildNuxtUiVars(vars, nuxtUiColors) {
104
+ function buildNuxtUiVars(vars, nuxtUiColors, theme) {
106
105
  const colors = twColors;
107
106
  const shades = [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950];
108
107
  for (const [semantic, colorName] of Object.entries(nuxtUiColors)) {
@@ -117,21 +116,35 @@ function buildNuxtUiVars(vars, nuxtUiColors) {
117
116
  }
118
117
  const neutral = nuxtUiColors.neutral || "slate";
119
118
  const neutralColors = colors[neutral];
120
- const semanticVars = {
121
- // Dark mode text colors (inverted from light mode)
119
+ const semanticVars = theme === "light" ? {
120
+ "--ui-text-dimmed": neutralColors?.[400] || "",
121
+ "--ui-text-muted": neutralColors?.[500] || "",
122
+ "--ui-text-toned": neutralColors?.[600] || "",
123
+ "--ui-text": neutralColors?.[700] || "",
124
+ "--ui-text-highlighted": neutralColors?.[900] || "",
125
+ "--ui-text-inverted": "#ffffff",
126
+ "--ui-bg": "#ffffff",
127
+ "--ui-bg-muted": neutralColors?.[50] || "",
128
+ "--ui-bg-elevated": neutralColors?.[100] || "",
129
+ "--ui-bg-accented": neutralColors?.[200] || "",
130
+ "--ui-bg-inverted": neutralColors?.[900] || "",
131
+ "--ui-border": neutralColors?.[200] || "",
132
+ "--ui-border-muted": neutralColors?.[200] || "",
133
+ "--ui-border-accented": neutralColors?.[300] || "",
134
+ "--ui-border-inverted": neutralColors?.[900] || ""
135
+ } : {
136
+ // Dark mode (default for OG images, also explicit theme === 'dark')
122
137
  "--ui-text-dimmed": neutralColors?.[500] || "",
123
138
  "--ui-text-muted": neutralColors?.[400] || "",
124
139
  "--ui-text-toned": neutralColors?.[300] || "",
125
140
  "--ui-text": neutralColors?.[200] || "",
126
141
  "--ui-text-highlighted": "#ffffff",
127
142
  "--ui-text-inverted": neutralColors?.[900] || "",
128
- // Dark mode backgrounds
129
143
  "--ui-bg": neutralColors?.[900] || "",
130
144
  "--ui-bg-muted": neutralColors?.[800] || "",
131
145
  "--ui-bg-elevated": neutralColors?.[800] || "",
132
146
  "--ui-bg-accented": neutralColors?.[700] || "",
133
147
  "--ui-bg-inverted": "#ffffff",
134
- // Dark mode borders
135
148
  "--ui-border": neutralColors?.[800] || "",
136
149
  "--ui-border-muted": neutralColors?.[700] || "",
137
150
  "--ui-border-accented": neutralColors?.[700] || "",
@@ -145,16 +158,19 @@ function buildNuxtUiVars(vars, nuxtUiColors) {
145
158
  let cachedCompiler = null;
146
159
  let cachedCssPath = null;
147
160
  let cachedVars = null;
161
+ let cachedExtractedVars = null;
148
162
  let pendingCompiler = null;
149
163
  const resolvedStyleCache = /* @__PURE__ */ new Map();
150
164
  function clearTw4UserVarsCache() {
151
165
  cachedVars = null;
166
+ cachedExtractedVars = null;
152
167
  resolvedStyleCache.clear();
153
168
  }
154
169
  function clearTw4Cache() {
155
170
  cachedCompiler = null;
156
171
  cachedCssPath = null;
157
172
  cachedVars = null;
173
+ cachedExtractedVars = null;
158
174
  pendingCompiler = null;
159
175
  resolvedStyleCache.clear();
160
176
  }
@@ -177,6 +193,13 @@ async function getCompiler(cssPath, nuxtUiColors) {
177
193
  cachedCompiler = compiler;
178
194
  cachedCssPath = cssPath;
179
195
  cachedVars = vars;
196
+ cachedExtractedVars = {
197
+ rootVars: /* @__PURE__ */ new Map(),
198
+ qualifiedRules: [],
199
+ universalVars: /* @__PURE__ */ new Map(),
200
+ propertyInitials: /* @__PURE__ */ new Map(),
201
+ perClassVars: /* @__PURE__ */ new Map()
202
+ };
180
203
  resolvedStyleCache.clear();
181
204
  return { compiler, vars };
182
205
  })();
@@ -186,7 +209,7 @@ async function getCompiler(cssPath, nuxtUiColors) {
186
209
  });
187
210
  return p;
188
211
  }
189
- async function parseCssOutput(rawCss, vars) {
212
+ async function parseCssOutput(rawCss, vars, extractedAccum) {
190
213
  const css = await simplifyCss(rawCss);
191
214
  for (const [name, value] of extractCssVars(css)) {
192
215
  if (!vars.has(name))
@@ -197,6 +220,30 @@ async function parseCssOutput(rawCss, vars) {
197
220
  vars.set(name, value);
198
221
  }
199
222
  const perClassVars = extractPerClassVars(css);
223
+ if (extractedAccum) {
224
+ const fresh = await extractVarsFromCss(css);
225
+ for (const [n, v] of fresh.rootVars) {
226
+ if (!extractedAccum.rootVars.has(n))
227
+ extractedAccum.rootVars.set(n, v);
228
+ }
229
+ extractedAccum.qualifiedRules.push(...fresh.qualifiedRules);
230
+ for (const [n, v] of fresh.universalVars) {
231
+ if (!extractedAccum.universalVars.has(n))
232
+ extractedAccum.universalVars.set(n, v);
233
+ }
234
+ for (const [n, v] of fresh.propertyInitials) {
235
+ if (!extractedAccum.propertyInitials.has(n))
236
+ extractedAccum.propertyInitials.set(n, v);
237
+ }
238
+ for (const [name, classVars] of fresh.perClassVars) {
239
+ const existing = extractedAccum.perClassVars.get(name);
240
+ if (existing) {
241
+ for (const [k, v] of classVars) existing.set(k, v);
242
+ } else {
243
+ extractedAccum.perClassVars.set(name, new Map(classVars));
244
+ }
245
+ }
246
+ }
200
247
  const classes = extractClassStyles(css, { skipPrefixes: ["--"], merge: true });
201
248
  return { classes, perClassVars };
202
249
  }
@@ -282,34 +329,51 @@ async function buildGradient(classes, vars) {
282
329
  }
283
330
  return null;
284
331
  }
285
- async function resolveClassesToStyles(classes, options, context) {
332
+ function buildThemeVars(baseVars, extracted, theme, nuxtUiColors) {
333
+ const vars = new Map(baseVars);
334
+ if (nuxtUiColors)
335
+ buildNuxtUiVars(vars, nuxtUiColors, theme);
336
+ if (extracted) {
337
+ const themeRootAttrs = { "data-theme": theme };
338
+ const themeVars = resolveExtractedVars(extracted, themeRootAttrs);
339
+ for (const [n, v] of themeVars)
340
+ vars.set(n, v);
341
+ }
342
+ return vars;
343
+ }
344
+ async function resolveClassesToStyles(classes, options, context, theme) {
286
345
  const { compiler, vars } = await getCompiler(options.cssPath, options.nuxtUiColors);
287
- const uncached = classes.filter((c) => !resolvedStyleCache.has(c));
346
+ const cacheKeyFor = (cls) => theme ? `${cls}|${theme}` : cls;
347
+ const uncached = classes.filter((c) => !resolvedStyleCache.has(cacheKeyFor(c)));
288
348
  if (uncached.length > 0) {
289
349
  const outputCss = compiler.build(uncached);
290
- const { classes: parsedClasses, perClassVars } = await parseCssOutput(outputCss, vars);
350
+ const { classes: parsedClasses, perClassVars } = await parseCssOutput(outputCss, vars, cachedExtractedVars || void 0);
351
+ const resolveVarsForClass = theme ? buildThemeVars(vars, cachedExtractedVars, theme, options.nuxtUiColors) : vars;
291
352
  for (const [className, rawStyles] of parsedClasses) {
292
353
  const classVars = perClassVars.get(className);
293
- const mergedVars = classVars ? new Map([...vars, ...classVars]) : vars;
354
+ const mergedVars = classVars ? new Map([...resolveVarsForClass, ...classVars]) : resolveVarsForClass;
294
355
  const styles = await postProcessStyles(rawStyles, mergedVars, void 0, context);
356
+ const cacheKey = cacheKeyFor(className);
295
357
  if (!styles && className.startsWith("bg-gradient-")) {
296
- resolvedStyleCache.set(className, rawStyles);
358
+ resolvedStyleCache.set(cacheKey, rawStyles);
297
359
  } else {
298
- resolvedStyleCache.set(className, styles);
360
+ resolvedStyleCache.set(cacheKey, styles);
299
361
  }
300
362
  }
301
363
  for (const c of uncached) {
302
- if (!resolvedStyleCache.has(c))
303
- resolvedStyleCache.set(c, null);
364
+ const key = cacheKeyFor(c);
365
+ if (!resolvedStyleCache.has(key))
366
+ resolvedStyleCache.set(key, null);
304
367
  }
305
368
  }
306
369
  const result = {};
307
370
  for (const cls of classes) {
308
- const resolved = resolvedStyleCache.get(cls);
371
+ const resolved = resolvedStyleCache.get(cacheKeyFor(cls));
309
372
  if (resolved)
310
373
  result[cls] = resolved;
311
374
  }
312
- const gradient = await buildGradient(classes, vars);
375
+ const gradientVars = theme ? buildThemeVars(vars, cachedExtractedVars, theme, options.nuxtUiColors) : vars;
376
+ const gradient = await buildGradient(classes, gradientVars);
313
377
  if (gradient) {
314
378
  result[gradient.gradientClass] = { "background-image": gradient.value };
315
379
  for (const colorClass of gradient.colorClasses) {
@@ -379,17 +443,18 @@ function createTw4Provider(options) {
379
443
  }
380
444
  return {
381
445
  name: "tailwind",
382
- async resolveClassesToStyles(classes, context) {
446
+ async resolveClassesToStyles(classes, context, rootAttrs) {
383
447
  await init();
384
448
  if (!cssPath)
385
449
  return {};
386
450
  const baseClasses = extractVariantBaseClasses(classes);
387
451
  const classesToResolve = [.../* @__PURE__ */ new Set([...classes, ...baseClasses])];
388
452
  const nuxtUiColors = await options.loadNuxtUiColors();
453
+ const theme = rootAttrs?.["data-theme"] === "light" || rootAttrs?.["data-theme"] === "dark" ? rootAttrs["data-theme"] : void 0;
389
454
  const tw4Resolved = await resolveClassesToStyles(classesToResolve, {
390
455
  cssPath,
391
456
  nuxtUiColors
392
- }, context);
457
+ }, context, theme);
393
458
  const resolvedMap = new Map(Object.entries(tw4Resolved));
394
459
  return resolveVariantPrefixes(classes, resolvedMap);
395
460
  },
@@ -400,13 +465,16 @@ function createTw4Provider(options) {
400
465
  const nuxtUiColors = await options.loadNuxtUiColors();
401
466
  return extractTw4Metadata({ cssPath, nuxtUiColors });
402
467
  },
403
- async getVars() {
468
+ async getVars(rootAttrs) {
404
469
  await init();
405
470
  if (!cssPath)
406
471
  return /* @__PURE__ */ new Map();
407
472
  const nuxtUiColors = await options.loadNuxtUiColors();
408
473
  const { vars } = await getCompiler(cssPath, nuxtUiColors);
409
- return vars;
474
+ const theme = rootAttrs?.["data-theme"] === "light" || rootAttrs?.["data-theme"] === "dark" ? rootAttrs["data-theme"] : void 0;
475
+ if (!theme)
476
+ return vars;
477
+ return buildThemeVars(vars, cachedExtractedVars, theme, nuxtUiColors);
410
478
  },
411
479
  clearUserVarsCache: clearTw4UserVarsCache,
412
480
  clearCache: clearTw4Cache
@@ -3,9 +3,7 @@
3
3
  const promises = require('node:fs/promises');
4
4
  const defu = require('defu');
5
5
  const logger_js = require('../../dist/runtime/logger.js');
6
- const cssProvider = require('./css-provider.cjs');
7
- const module$1 = require('../shared/nuxt-og-image.BDOahTU5.cjs');
8
- require('exsolve');
6
+ const module$1 = require('../shared/nuxt-og-image.DVJCoUpz.cjs');
9
7
  require('node:fs');
10
8
  require('node:url');
11
9
  require('@nuxt/kit');
@@ -31,6 +29,7 @@ require('@vue/compiler-sfc');
31
29
  require('ofetch');
32
30
  require('ultrahtml');
33
31
  require('../../dist/runtime/server/og-image/core/transforms/emojis/emoji-utils.js');
32
+ require('exsolve');
34
33
  require('../shared/nuxt-og-image.CMYbz66P.cjs');
35
34
  require('magicast');
36
35
  require('magicast/helpers');
@@ -122,7 +121,7 @@ function createUnoProvider(options) {
122
121
  async resolveClassesToStyles(classes, context, rootAttrs) {
123
122
  if (classes.length === 0)
124
123
  return {};
125
- const baseClasses = cssProvider.extractVariantBaseClasses(classes);
124
+ const baseClasses = module$1.extractVariantBaseClasses(classes);
126
125
  const classesToGenerate = [.../* @__PURE__ */ new Set([...classes, ...baseClasses])];
127
126
  const gen = await getGenerator();
128
127
  const { css } = await gen.generate(classesToGenerate);
@@ -156,7 +155,7 @@ function createUnoProvider(options) {
156
155
  if (styles)
157
156
  resolvedBaseStyles.set(className, styles);
158
157
  }
159
- return cssProvider.resolveVariantPrefixes(classes, resolvedBaseStyles);
158
+ return module$1.resolveVariantPrefixes(classes, resolvedBaseStyles);
160
159
  },
161
160
  async extractMetadata() {
162
161
  const gen = await getGenerator();
@@ -1,9 +1,7 @@
1
1
  import { readFile } from 'node:fs/promises';
2
2
  import { defu } from 'defu';
3
3
  import { logger } from '../../dist/runtime/logger.js';
4
- import { extractVariantBaseClasses, resolveVariantPrefixes } from './css-provider.mjs';
5
- import { s as simplifyCss, e as extractCssVars, a as extractPropertyInitialValues, b as extractUniversalVars, c as extractPerClassVars, d as extractClassStyles, p as postProcessStyles, f as extractVarsFromCss, r as resolveExtractedVars } from '../shared/nuxt-og-image.C2Ejsw_g.mjs';
6
- import 'exsolve';
4
+ import { e as extractVariantBaseClasses, s as simplifyCss, a as extractCssVars, b as extractPropertyInitialValues, c as extractUniversalVars, d as extractPerClassVars, f as extractClassStyles, p as postProcessStyles, r as resolveVariantPrefixes, g as extractVarsFromCss, h as resolveExtractedVars } from '../shared/nuxt-og-image.CBAJqzNe.mjs';
7
5
  import 'node:fs';
8
6
  import 'node:url';
9
7
  import '@nuxt/kit';
@@ -29,6 +27,7 @@ import '@vue/compiler-sfc';
29
27
  import 'ofetch';
30
28
  import 'ultrahtml';
31
29
  import '../../dist/runtime/server/og-image/core/transforms/emojis/emoji-utils.js';
30
+ import 'exsolve';
32
31
  import '../shared/nuxt-og-image.CJa2KCie.mjs';
33
32
  import 'magicast';
34
33
  import 'magicast/helpers';
@@ -1 +1 @@
1
- <!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><script type="importmap">{"imports":{"#entry":"/__nuxt-og-image/_nuxt/DCbfjjTH.js"}}</script><link rel="stylesheet" href="/__nuxt-og-image/_nuxt/entry.CvRWYJ1U.css" crossorigin><link rel="stylesheet" href="/__nuxt-og-image/_nuxt/renderer-select.vw2MbfFR.css" crossorigin><link rel="stylesheet" href="/__nuxt-og-image/_nuxt/DevtoolsSection.GitthLOC.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/DCbfjjTH.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/CP0tQR2M.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/D-SbM8XJ.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/DWbsyffp.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/Dd8dEdTA.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/BFnUFv7a.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/BvRoxQk1.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/DmRGXzI6.js"><script type="module" src="/__nuxt-og-image/_nuxt/DCbfjjTH.js" crossorigin></script><script>"use strict";(()=>{const t=window,e=document.documentElement,c=["dark","light"],n=getStorageValue("localStorage","nuxt-color-mode")||"system";let i=n==="system"?u():n;const r=e.getAttribute("data-color-mode-forced");r&&(i=r),l(i),t["__NUXT_COLOR_MODE__"]={preference:n,value:i,getColorScheme:u,addColorScheme:l,removeColorScheme:d};function l(o){const s=""+o+"",a="";e.classList?e.classList.add(s):e.className+=" "+s,a&&e.setAttribute("data-"+a,o)}function d(o){const s=""+o+"",a="";e.classList?e.classList.remove(s):e.className=e.className.replace(new RegExp(s,"g"),""),a&&e.removeAttribute("data-"+a)}function f(o){return t.matchMedia("(prefers-color-scheme"+o+")")}function u(){if(t.matchMedia&&f("").media!=="not all"){for(const o of c)if(f(":"+o).matches)return o}return"light"}})();function getStorageValue(t,e){switch(t){case"localStorage":return window.localStorage.getItem(e);case"sessionStorage":return window.sessionStorage.getItem(e);case"cookie":return getCookie(e);default:return null}}function getCookie(t){const c=("; "+window.document.cookie).split("; "+t+"=");if(c.length===2)return c.pop()?.split(";").shift()}</script></head><body><div id="__nuxt" class="isolate"></div><div id="teleports"></div><script>window.__NUXT_SITE_CONFIG__={_priority:{env:-15,url:-3},env:"production",url:"https:\u002F\u002Fnuxtseo.com"}</script><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-og-image",buildId:"dc070c1e-9f70-4119-bc66-db0dd8a0649d",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1777703113540,false]</script></body></html>
1
+ <!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><script type="importmap">{"imports":{"#entry":"/__nuxt-og-image/_nuxt/CAvCRPq5.js"}}</script><link rel="stylesheet" href="/__nuxt-og-image/_nuxt/entry.D10ZDedD.css" crossorigin><link rel="stylesheet" href="/__nuxt-og-image/_nuxt/renderer-select.DomsjmoH.css" crossorigin><link rel="stylesheet" href="/__nuxt-og-image/_nuxt/DevtoolsSection.DithqiRs.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/CAvCRPq5.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/CP0tQR2M.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/D-SbM8XJ.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/DWbsyffp.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/Dd8dEdTA.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/BFnUFv7a.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/BeokGQcV.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/DNGiVUg5.js"><script type="module" src="/__nuxt-og-image/_nuxt/CAvCRPq5.js" crossorigin></script><script>"use strict";(()=>{const t=window,e=document.documentElement,c=["dark","light"],n=getStorageValue("localStorage","nuxt-color-mode")||"system";let i=n==="system"?u():n;const r=e.getAttribute("data-color-mode-forced");r&&(i=r),l(i),t["__NUXT_COLOR_MODE__"]={preference:n,value:i,getColorScheme:u,addColorScheme:l,removeColorScheme:d};function l(o){const s=""+o+"",a="";e.classList?e.classList.add(s):e.className+=" "+s,a&&e.setAttribute("data-"+a,o)}function d(o){const s=""+o+"",a="";e.classList?e.classList.remove(s):e.className=e.className.replace(new RegExp(s,"g"),""),a&&e.removeAttribute("data-"+a)}function f(o){return t.matchMedia("(prefers-color-scheme"+o+")")}function u(){if(t.matchMedia&&f("").media!=="not all"){for(const o of c)if(f(":"+o).matches)return o}return"light"}})();function getStorageValue(t,e){switch(t){case"localStorage":return window.localStorage.getItem(e);case"sessionStorage":return window.sessionStorage.getItem(e);case"cookie":return getCookie(e);default:return null}}function getCookie(t){const c=("; "+window.document.cookie).split("; "+t+"=");if(c.length===2)return c.pop()?.split(";").shift()}</script></head><body><div id="__nuxt" class="isolate"></div><div id="teleports"></div><script>window.__NUXT_SITE_CONFIG__={_priority:{env:-15,url:-3},env:"production",url:"https:\u002F\u002Fnuxtseo.com"}</script><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-og-image",buildId:"4e19b9f7-298b-4c14-85e9-238c217158cb",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1777967598149,false]</script></body></html>
@@ -1 +1 @@
1
- <!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><script type="importmap">{"imports":{"#entry":"/__nuxt-og-image/_nuxt/DCbfjjTH.js"}}</script><link rel="stylesheet" href="/__nuxt-og-image/_nuxt/entry.CvRWYJ1U.css" crossorigin><link rel="stylesheet" href="/__nuxt-og-image/_nuxt/renderer-select.vw2MbfFR.css" crossorigin><link rel="stylesheet" href="/__nuxt-og-image/_nuxt/DevtoolsSection.GitthLOC.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/DCbfjjTH.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/CP0tQR2M.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/D-SbM8XJ.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/DWbsyffp.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/Dd8dEdTA.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/BFnUFv7a.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/BvRoxQk1.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/DmRGXzI6.js"><script type="module" src="/__nuxt-og-image/_nuxt/DCbfjjTH.js" crossorigin></script><script>"use strict";(()=>{const t=window,e=document.documentElement,c=["dark","light"],n=getStorageValue("localStorage","nuxt-color-mode")||"system";let i=n==="system"?u():n;const r=e.getAttribute("data-color-mode-forced");r&&(i=r),l(i),t["__NUXT_COLOR_MODE__"]={preference:n,value:i,getColorScheme:u,addColorScheme:l,removeColorScheme:d};function l(o){const s=""+o+"",a="";e.classList?e.classList.add(s):e.className+=" "+s,a&&e.setAttribute("data-"+a,o)}function d(o){const s=""+o+"",a="";e.classList?e.classList.remove(s):e.className=e.className.replace(new RegExp(s,"g"),""),a&&e.removeAttribute("data-"+a)}function f(o){return t.matchMedia("(prefers-color-scheme"+o+")")}function u(){if(t.matchMedia&&f("").media!=="not all"){for(const o of c)if(f(":"+o).matches)return o}return"light"}})();function getStorageValue(t,e){switch(t){case"localStorage":return window.localStorage.getItem(e);case"sessionStorage":return window.sessionStorage.getItem(e);case"cookie":return getCookie(e);default:return null}}function getCookie(t){const c=("; "+window.document.cookie).split("; "+t+"=");if(c.length===2)return c.pop()?.split(";").shift()}</script></head><body><div id="__nuxt" class="isolate"></div><div id="teleports"></div><script>window.__NUXT_SITE_CONFIG__={_priority:{env:-15,url:-3},env:"production",url:"https:\u002F\u002Fnuxtseo.com"}</script><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-og-image",buildId:"dc070c1e-9f70-4119-bc66-db0dd8a0649d",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1777703113540,false]</script></body></html>
1
+ <!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><script type="importmap">{"imports":{"#entry":"/__nuxt-og-image/_nuxt/CAvCRPq5.js"}}</script><link rel="stylesheet" href="/__nuxt-og-image/_nuxt/entry.D10ZDedD.css" crossorigin><link rel="stylesheet" href="/__nuxt-og-image/_nuxt/renderer-select.DomsjmoH.css" crossorigin><link rel="stylesheet" href="/__nuxt-og-image/_nuxt/DevtoolsSection.DithqiRs.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/CAvCRPq5.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/CP0tQR2M.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/D-SbM8XJ.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/DWbsyffp.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/Dd8dEdTA.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/BFnUFv7a.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/BeokGQcV.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/DNGiVUg5.js"><script type="module" src="/__nuxt-og-image/_nuxt/CAvCRPq5.js" crossorigin></script><script>"use strict";(()=>{const t=window,e=document.documentElement,c=["dark","light"],n=getStorageValue("localStorage","nuxt-color-mode")||"system";let i=n==="system"?u():n;const r=e.getAttribute("data-color-mode-forced");r&&(i=r),l(i),t["__NUXT_COLOR_MODE__"]={preference:n,value:i,getColorScheme:u,addColorScheme:l,removeColorScheme:d};function l(o){const s=""+o+"",a="";e.classList?e.classList.add(s):e.className+=" "+s,a&&e.setAttribute("data-"+a,o)}function d(o){const s=""+o+"",a="";e.classList?e.classList.remove(s):e.className=e.className.replace(new RegExp(s,"g"),""),a&&e.removeAttribute("data-"+a)}function f(o){return t.matchMedia("(prefers-color-scheme"+o+")")}function u(){if(t.matchMedia&&f("").media!=="not all"){for(const o of c)if(f(":"+o).matches)return o}return"light"}})();function getStorageValue(t,e){switch(t){case"localStorage":return window.localStorage.getItem(e);case"sessionStorage":return window.sessionStorage.getItem(e);case"cookie":return getCookie(e);default:return null}}function getCookie(t){const c=("; "+window.document.cookie).split("; "+t+"=");if(c.length===2)return c.pop()?.split(";").shift()}</script></head><body><div id="__nuxt" class="isolate"></div><div id="teleports"></div><script>window.__NUXT_SITE_CONFIG__={_priority:{env:-15,url:-3},env:"production",url:"https:\u002F\u002Fnuxtseo.com"}</script><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-og-image",buildId:"4e19b9f7-298b-4c14-85e9-238c217158cb",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1777967598149,false]</script></body></html>
@@ -1,2 +1,2 @@
1
- import{C as e,K as t,T as n,Tt as r,U as i,_ as a,at as o,g as s,jt as c,u as l,v as u,y as d}from"./D-SbM8XJ.js";import{t as f}from"./Dd8dEdTA.js";import{t as p}from"./DmRGXzI6.js";import{t as m}from"./BUobo_a8.js";var h={class:`h-full max-h-full overflow-hidden space-y-5`},g={class:`space-y-2 p-3 bg-amber-500/10 rounded-lg border border-amber-500/20`},_=n({__name:`debug`,setup(n){let{globalDebug:_,debug:v}=f();return(n,f)=>{let y=p,b=m;return i(),d(`div`,h,[r(v)?.warnings?.length?(i(),a(y,{key:0,icon:`carbon:warning`,text:`Satori Warnings`},{default:o(()=>[s(`div`,g,[(i(!0),d(l,null,t(r(v).warnings,(e,t)=>(i(),d(`div`,{key:t,class:`text-sm text-amber-200 font-mono`},c(e),1))),128))])]),_:1})):u(``,!0),e(y,{icon:`carbon:settings`,text:`Compatibility`},{default:o(()=>[e(b,{code:JSON.stringify(r(_)?.compatibility||{},null,2),lang:`json`,label:`Compatibility`},null,8,[`code`])]),_:1}),e(y,{icon:`carbon:ibm-cloud-pak-manta-automated-data-lineage`,text:`vNodes`},{default:o(()=>[e(b,{code:JSON.stringify(r(v)?.vnodes||{},null,2),lang:`json`,label:`vNodes`},null,8,[`code`])]),_:1}),e(y,{icon:`carbon:ibm-cloud-pak-manta-automated-data-lineage`,text:`SVG`},{default:o(()=>[e(b,{code:r(v)?.svg?.replaceAll(`>`,`>
1
+ import{C as e,K as t,T as n,Tt as r,U as i,_ as a,at as o,g as s,jt as c,u as l,v as u,y as d}from"./D-SbM8XJ.js";import{t as f}from"./Dd8dEdTA.js";import{t as p}from"./DNGiVUg5.js";import{t as m}from"./TwxRLlMM.js";var h={class:`h-full max-h-full overflow-hidden space-y-5`},g={class:`space-y-2 p-3 bg-amber-500/10 rounded-lg border border-amber-500/20`},_=n({__name:`debug`,setup(n){let{globalDebug:_,debug:v}=f();return(n,f)=>{let y=p,b=m;return i(),d(`div`,h,[r(v)?.warnings?.length?(i(),a(y,{key:0,icon:`carbon:warning`,text:`Satori Warnings`},{default:o(()=>[s(`div`,g,[(i(!0),d(l,null,t(r(v).warnings,(e,t)=>(i(),d(`div`,{key:t,class:`text-sm text-amber-200 font-mono`},c(e),1))),128))])]),_:1})):u(``,!0),e(y,{icon:`carbon:settings`,text:`Compatibility`},{default:o(()=>[e(b,{code:JSON.stringify(r(_)?.compatibility||{},null,2),lang:`json`,label:`Compatibility`},null,8,[`code`])]),_:1}),e(y,{icon:`carbon:ibm-cloud-pak-manta-automated-data-lineage`,text:`vNodes`},{default:o(()=>[e(b,{code:JSON.stringify(r(v)?.vnodes||{},null,2),lang:`json`,label:`vNodes`},null,8,[`code`])]),_:1}),e(y,{icon:`carbon:ibm-cloud-pak-manta-automated-data-lineage`,text:`SVG`},{default:o(()=>[e(b,{code:r(v)?.svg?.replaceAll(`>`,`>
2
2
  `)||``,lang:`xml`,label:`SVG`},null,8,[`code`])]),_:1}),e(y,{icon:`carbon:settings`,text:`Runtime Config`},{default:o(()=>[e(b,{code:JSON.stringify(r(_)?.runtimeConfig||{},null,2),lang:`json`,label:`Runtime Config`},null,8,[`code`])]),_:1})])}}});export{_ as default};