elements-kit 0.27.13 → 0.27.15

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.
@@ -1,3 +1,4 @@
1
+ import "node:module";
1
2
  //#region \0rolldown/runtime.js
2
3
  var __defProp = Object.defineProperty;
3
4
  var __exportAll = (all, no_symbols) => {
@@ -7,6 +7,7 @@ interface AstroRendererConfig {
7
7
  interface AstroConfigSetupApi {
8
8
  addRenderer(renderer: AstroRendererConfig): void;
9
9
  updateConfig(config: Record<string, unknown>): unknown;
10
+ config?: unknown;
10
11
  }
11
12
  interface ElementsKitAstroIntegration {
12
13
  name: string;
@@ -1,6 +1,32 @@
1
1
  import elementsKitHmr from "./vite.mjs";
2
+ import { createRequire } from "node:module";
3
+ import path from "node:path";
4
+ import { fileURLToPath } from "node:url";
2
5
  //#region src/integrations/astro.ts
3
6
  /**
7
+ * The JSX transform config, under the key the installed Vite actually reads.
8
+ *
9
+ * Vite 8 (and rolldown-vite) transform with Oxc: `esbuild` options are ignored
10
+ * there, and setting both keys warns. Older Vite only understands `esbuild`.
11
+ * Vite is resolved from the project root — under isolated installs it is not
12
+ * reachable from this package's own directory.
13
+ */
14
+ function jsxTransformConfig(root) {
15
+ const from = root instanceof URL ? fileURLToPath(root) : typeof root === "string" ? root : process.cwd();
16
+ let oxc = false;
17
+ try {
18
+ const vite = createRequire(path.join(from, "noop.js"))("vite/package.json");
19
+ oxc = vite.name === "rolldown-vite" || Number.parseInt(vite.version ?? "", 10) >= 8;
20
+ } catch {}
21
+ return oxc ? { oxc: { jsx: {
22
+ runtime: "automatic",
23
+ importSource: "elements-kit"
24
+ } } } : { esbuild: {
25
+ jsx: "automatic",
26
+ jsxImportSource: "elements-kit"
27
+ } };
28
+ }
29
+ /**
4
30
  * Astro integration: use elements-kit components as Astro islands.
5
31
  *
6
32
  * Registers the elements-kit renderer pair — server rendering via
@@ -35,17 +61,14 @@ import elementsKitHmr from "./vite.mjs";
35
61
  function elementsKit() {
36
62
  return {
37
63
  name: "elements-kit",
38
- hooks: { "astro:config:setup": ({ addRenderer, updateConfig }) => {
64
+ hooks: { "astro:config:setup": ({ addRenderer, updateConfig, config }) => {
39
65
  addRenderer({
40
66
  name: "elements-kit",
41
67
  clientEntrypoint: "elements-kit/integrations/astro-client",
42
68
  serverEntrypoint: "elements-kit/integrations/astro-server"
43
69
  });
44
70
  updateConfig({ vite: {
45
- esbuild: {
46
- jsx: "automatic",
47
- jsxImportSource: "elements-kit"
48
- },
71
+ ...jsxTransformConfig(config?.root),
49
72
  optimizeDeps: { include: [
50
73
  "elements-kit",
51
74
  "elements-kit/jsx-runtime",
@@ -414,7 +414,7 @@
414
414
 
415
415
  .testimonial > blockquote {
416
416
  font-family: var(--font-heading);
417
- font-size: var(--font-size-6);
417
+ font-size: var(--font-size-5);
418
418
  letter-spacing: var(--letter-spacing-9);
419
419
  text-wrap: pretty;
420
420
  color: var(--neutral-11);
@@ -429,6 +429,12 @@
429
429
  }
430
430
  }
431
431
 
432
+ @media (min-width: 64rem) {
433
+ .testimonial > blockquote {
434
+ font-size: var(--font-size-8);
435
+ }
436
+ }
437
+
432
438
  .testimonial > blockquote em {
433
439
  color: var(--neutral-12);
434
440
  font-style: normal;
@@ -436,13 +442,19 @@
436
442
 
437
443
  .testimonial > blockquote:before {
438
444
  content: "“";
439
- font-size: calc(96px * var(--scaling, 1));
445
+ font-size: calc(60px * var(--scaling, 1));
440
446
  color: var(--accent-9);
441
447
  font-weight: 700;
442
448
  line-height: 1;
443
449
  display: block;
444
450
  }
445
451
 
452
+ @media (min-width: 48rem) {
453
+ .testimonial > blockquote:before {
454
+ font-size: calc(96px * var(--scaling, 1));
455
+ }
456
+ }
457
+
446
458
  .testimonial > blockquote:after {
447
459
  content: "”";
448
460
  }
@@ -1,4 +1,4 @@
1
- import { t as __exportAll } from "../../chunk-CfYAbeIz.mjs";
1
+ import { t as __exportAll } from "../../chunk-BpYLSNr0.mjs";
2
2
  import { c as batch, l as computed, u as effect, x as signal } from "../../lib-Dw0g-vex.mjs";
3
3
  import { reactive, resolve } from "../../signals/index.mjs";
4
4
  import { t as scope } from "../../scope-B1kDu4YX.mjs";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "elements-kit",
3
3
  "type": "module",
4
- "version": "0.27.13",
4
+ "version": "0.27.15",
5
5
  "description": "A lightweight reactive UI library that transforms native HTMLElements into reactive components with signals. Ideal for framework-agnostic applications and web components.",
6
6
  "keywords": [
7
7
  "webcomponents",