@asd14/vblocks 6.2.0 → 6.4.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 (34) hide show
  1. package/README.md +101 -43
  2. package/bin/vblocks +4 -0
  3. package/bin/vblocks.d/build +9 -0
  4. package/bin/vblocks.d/eject +6 -1
  5. package/bin/vblocks.d/init +9 -0
  6. package/bin/vblocks.d/lib/guard.sh +64 -0
  7. package/bin/vblocks.d/lib/help.sh +26 -0
  8. package/bin/vblocks.d/lib/log.sh +178 -0
  9. package/bin/vblocks.d/lib/validation.sh +101 -0
  10. package/bin/vblocks.d/serve +9 -0
  11. package/bin/vblocks.d/vblocks.sh +9 -9
  12. package/bin/vblocks.d/webpack.sh +2 -0
  13. package/defaults/webpack.config.js +19 -0
  14. package/package.json +12 -10
  15. package/template/_common/app/.env.example +5 -0
  16. package/template/_common/app/src/index.tsx +27 -0
  17. package/template/_common/plumbing/package.json +1 -1
  18. package/template/_common/post-init-app.sh +9 -0
  19. package/template/plain/app/src/index.app.tsx +3 -0
  20. package/template/xyflow/app/src/details.tsx +1 -1
  21. package/template/xyflow/app/src/diagram.tsx +1 -1
  22. package/template/xyflow/app/src/{index.tsx → index.app.tsx} +6 -14
  23. package/template/xyflow/app/src/index.css +1 -0
  24. package/template/xyflow/post-init-app.sh +2 -2
  25. package/template/xyflow-tabs/app/src/{index.tsx → index.app.tsx} +5 -15
  26. package/template/xyflow-tabs/app/src/index.css +1 -0
  27. package/template/xyflow-tabs/app/src/pages/build/details.tsx +1 -1
  28. package/template/xyflow-tabs/app/src/pages/build/diagram.tsx +2 -2
  29. package/template/xyflow-tabs/app/src/pages/serve/details.tsx +1 -1
  30. package/template/xyflow-tabs/app/src/pages/serve/diagram.tsx +2 -2
  31. package/template/xyflow-tabs/post-init-app.sh +2 -2
  32. package/types/client.d.ts +16 -0
  33. package/bin/vblocks.d/lib.sh +0 -569
  34. package/template/plain/app/src/index.tsx +0 -11
@@ -0,0 +1,101 @@
1
+ #!/bin/sh
2
+
3
+ # NAME
4
+ # validation.sh - Tell if a value has a shape, eg. a slug or a geometry
5
+ #
6
+ # SYNOPSIS
7
+ # . "$_SCRIPT_DIR/../lib/validation.sh"
8
+ #
9
+ # DESCRIPTION
10
+ # Needs log.sh. A script sources it before this file.
11
+
12
+ # _is <type> <value>
13
+ #
14
+ # Tell if <value> has the shape of <type>.
15
+ #
16
+ # positive-integer 0-9, no leading zero
17
+ # non-negative-integer 0, or a positive-integer
18
+ # version 0-9 in groups, one dot between two groups, eg.
19
+ # 1.13.4
20
+ # slug A-Za-z0-9_-, starts with a letter or a digit
21
+ # identifier A-Za-z0-9_, cannot start with a digit
22
+ # folgezettel a-z0-9, starts with 1-9, a run of digits never
23
+ # starts with 0, eg. 1b3. 1b03 and 1b3 would name
24
+ # one place
25
+ # geometry "<x>,<y> <width>x<height>", the shape grim, slurp
26
+ # and wf-recorder read, eg. "-10,0 800x600". x and
27
+ # y are integers, width and height positive
28
+ #
29
+ # RETURNS
30
+ # 0 <value> has the shape
31
+ # 1 <value> does not have it, or is empty
32
+ #
33
+ # EXIT
34
+ # 3 <type> is not a type above and <value> is not empty, or the call
35
+ # does not have two positionals
36
+ _is() {
37
+ [ "$#" -eq 2 ] || _fail 3 "_is needs <type> <value>"
38
+ [ -n "$2" ] || return 1
39
+
40
+ # Reject with a negated class, which checks every character.
41
+ # [A-Za-z_][A-Za-z0-9_]* checks two characters and accepts "ab; rm -rf /".
42
+ # Inside a class, put "-" last and "]" first.
43
+ case "$1" in
44
+ positive-integer)
45
+ # 0* rejects zero and every leading zero with it, so no arithmetic runs
46
+ # and a 20-digit value cannot abort the shell with "Illegal number".
47
+ case "$2" in
48
+ *[!0-9]* | 0*) return 1 ;;
49
+ esac
50
+ ;;
51
+ non-negative-integer)
52
+ # 0?* rejects a leading zero. Shell arithmetic reads 010 as octal 8
53
+ case "$2" in
54
+ *[!0-9]* | 0?*) return 1 ;;
55
+ esac
56
+ ;;
57
+ version)
58
+ case "$2" in
59
+ *[!0-9.]* | .* | *. | *..*) return 1 ;;
60
+ esac
61
+ ;;
62
+ slug)
63
+ case "$2" in
64
+ *[!A-Za-z0-9_-]* | [_-]*) return 1 ;;
65
+ esac
66
+ ;;
67
+ identifier)
68
+ case "$2" in
69
+ *[!A-Za-z0-9_]* | [0-9]*) return 1 ;;
70
+ esac
71
+ ;;
72
+ folgezettel)
73
+ case "$2" in
74
+ *[!0-9a-z]* | [!1-9]* | *[a-z]0*) return 1 ;;
75
+ esac
76
+ ;;
77
+ geometry)
78
+ case "$2" in
79
+ *[!0-9,x\ -]* | *,*,* | *" "*" "* | *x*x*) return 1 ;;
80
+ *,*" "*x*) ;;
81
+ *) return 1 ;;
82
+ esac
83
+
84
+ # "-10,0 800x600": x, y, then the size
85
+ lib_is_x=${2%%,*}
86
+ lib_is_y=${2#*,}
87
+ lib_is_y=${lib_is_y%% *}
88
+ lib_is_size=${2##* }
89
+ _is non-negative-integer "${lib_is_x#-}" \
90
+ && _is non-negative-integer "${lib_is_y#-}" \
91
+ && _is positive-integer "${lib_is_size%%x*}" \
92
+ && _is positive-integer "${lib_is_size#*x}" \
93
+ || return 1
94
+ ;;
95
+ *)
96
+ _fail 3 -v type "$1" "Unknown type"
97
+ ;;
98
+ esac
99
+
100
+ return 0
101
+ }
@@ -54,6 +54,15 @@
54
54
  set -eu
55
55
 
56
56
  _SCRIPT_DIR=$(dirname "$0")
57
+ # tools/update-lib downloads lib/ from posix-utils, never edit it here
58
+ # shellcheck source=lib/log.sh
59
+ . "$_SCRIPT_DIR/lib/log.sh"
60
+ # shellcheck source=lib/validation.sh
61
+ . "$_SCRIPT_DIR/lib/validation.sh"
62
+ # shellcheck source=lib/guard.sh
63
+ . "$_SCRIPT_DIR/lib/guard.sh"
64
+ # shellcheck source=lib/help.sh
65
+ . "$_SCRIPT_DIR/lib/help.sh"
57
66
  # shellcheck source=vblocks.sh
58
67
  . "$_SCRIPT_DIR/vblocks.sh"
59
68
  # shellcheck source=webpack.sh
@@ -1,26 +1,26 @@
1
1
  #!/bin/sh
2
2
 
3
3
  # vblocks.sh - What every command of vblocks shares:
4
- # - lib.sh, the folders, the styles of the output and the header
4
+ # - the folders, the styles of the output and the header
5
+ #
6
+ # Needs lib/log.sh. The command needs to source it before this file.
5
7
 
6
8
  # The caller sets _SCRIPT_DIR to the folder of vblocks.sh, then sources it
7
9
  : "${_SCRIPT_DIR:?the caller sets _SCRIPT_DIR before it sources vblocks.sh}"
8
10
 
9
11
  _VB_DIR=$(dirname "$(dirname "$_SCRIPT_DIR")")
10
12
 
11
- # tools/update-lib downloads lib.sh from @asd14/posix-utils. Never edit lib.sh
12
- # here
13
- # shellcheck source=lib.sh
14
- . "$_SCRIPT_DIR/lib.sh"
15
-
16
13
  # _log reads LOG_NAMESPACE, LOG_LEVEL and NO_LOG_TIME.
17
14
  #
18
15
  # - NO_LOG_TIME drops the time, which adds no fact to a message
19
16
  # - Send each stderr message through _ok, _info, _warn or _fail
20
17
  # - Only the header, the summaries and `help` print on their own
21
- LOG_NAMESPACE="vblocks"
22
- LOG_LEVEL="info"
23
- NO_LOG_TIME="true"
18
+ # shellcheck disable=SC2034 # lib/log.sh, which the command sources, reads them
19
+ {
20
+ LOG_NAMESPACE="vblocks"
21
+ LOG_LEVEL="info"
22
+ NO_LOG_TIME="true"
23
+ }
24
24
 
25
25
  # `cd` follows an exported CDPATH and prints the folder it picked, which
26
26
  # `$(cd ... && pwd)` would capture
@@ -2,6 +2,8 @@
2
2
 
3
3
  # webpack.sh - The primitives of serve and build: the --mode and --log-level
4
4
  # guards, the defaults, the summary and the Webpack run
5
+ #
6
+ # Needs lib/log.sh and vblocks.sh. The command needs to source it before this file.
5
7
 
6
8
  # ╭───
7
9
  # │ Domain primitives
@@ -270,6 +270,11 @@ const STATS_BY_LOG_LEVEL = /** @type {const} */ ({
270
270
  verbose: "verbose",
271
271
  })
272
272
 
273
+ /**
274
+ * The query that imports a file as text, as in Vite, eg. `./file.tsx?raw`
275
+ */
276
+ const RAW_QUERY = /[?&]raw(?:&|$)/
277
+
273
278
  /**
274
279
  * @typedef {Object} VBlocksProps
275
280
  *
@@ -349,9 +354,15 @@ export default (
349
354
 
350
355
  module: {
351
356
  rules: [
357
+ // If `?raw`, return the file contents and skip every other rule
358
+ {
359
+ resourceQuery: RAW_QUERY,
360
+ type: "asset/source",
361
+ },
352
362
  {
353
363
  test: /\.(ts|tsx)$/,
354
364
  exclude: /node_modules/,
365
+ resourceQuery: { not: [RAW_QUERY] },
355
366
  use: {
356
367
  loader: "swc-loader",
357
368
  options: swcConfig,
@@ -360,6 +371,7 @@ export default (
360
371
  {
361
372
  test: /\.mdx?$/,
362
373
  exclude: /node_modules/,
374
+ resourceQuery: { not: [RAW_QUERY] },
363
375
  use: [
364
376
  { loader: "swc-loader", options: swcConfig },
365
377
  { loader: "@mdx-js/loader" },
@@ -367,6 +379,7 @@ export default (
367
379
  },
368
380
  {
369
381
  test: /\.module\.css$/,
382
+ resourceQuery: { not: [RAW_QUERY] },
370
383
  use: getCssLoaders({
371
384
  classScope: "local",
372
385
  isProduction,
@@ -376,6 +389,7 @@ export default (
376
389
  {
377
390
  test: /\.css$/,
378
391
  exclude: /\.module\.css$/,
392
+ resourceQuery: { not: [RAW_QUERY] },
379
393
  use: getCssLoaders({
380
394
  classScope: "global",
381
395
  isProduction,
@@ -384,6 +398,7 @@ export default (
384
398
  },
385
399
  {
386
400
  test: /\.(jpg|gif|png|svg)$/,
401
+ resourceQuery: { not: [RAW_QUERY] },
387
402
  ...(isSingle
388
403
  ? { type: "asset/inline" }
389
404
  : {
@@ -397,6 +412,7 @@ export default (
397
412
  },
398
413
  {
399
414
  test: /\.(woff|woff2|ttf|eot)$/,
415
+ resourceQuery: { not: [RAW_QUERY] },
400
416
  ...(isSingle
401
417
  ? { type: "asset/inline" }
402
418
  : {
@@ -512,6 +528,9 @@ export default (
512
528
 
513
529
  resolve: {
514
530
  extensions: [".tsx", ".ts", ".jsx", ".js"],
531
+ // A TypeScript import names the file tsc emits, eg. `./button.js` for
532
+ // `button.tsx`. Find the source behind it, as Vite does
533
+ extensionAlias: { ".js": [".ts", ".tsx", ".js"] },
515
534
  alias: {
516
535
  "@self": `${entryDir}/src`,
517
536
  // React Refresh imports the dev server's client. Use the one VBlocks runs
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "@asd14/vblocks",
4
- "version": "6.2.0",
4
+ "version": "6.4.0",
5
5
  "description": "Zero-config React builds, as a static site or a single HTML file",
6
6
  "keywords": [
7
7
  "react",
@@ -64,7 +64,7 @@
64
64
  "@asd14/fancy-logger": "^2.0.0",
65
65
  "@mdx-js/loader": "^3.1.1",
66
66
  "@pmmmwh/react-refresh-webpack-plugin": "^0.6.3",
67
- "@swc/helpers": "^0.5.23",
67
+ "@swc/helpers": "^0.5.24",
68
68
  "browserslist": "^4.29.5",
69
69
  "copy-webpack-plugin": "^14.0.0",
70
70
  "css-loader": "^7.1.5",
@@ -74,30 +74,32 @@
74
74
  "mini-css-extract-plugin": "^2.10.2",
75
75
  "postcss": "^8.5.32",
76
76
  "postcss-loader": "^8.2.1",
77
- "postcss-preset-env": "^11.6.1",
77
+ "postcss-preset-env": "^11.6.2",
78
78
  "react-refresh": "^0.19.0",
79
79
  "swc-loader": "^0.2.7",
80
80
  "webpack": "^5.112.2",
81
- "webpack-bundle-analyzer": "^5.4.0",
82
- "webpack-cli": "^7.2.3",
81
+ "webpack-bundle-analyzer": "^5.4.2",
82
+ "webpack-cli": "^7.3.1",
83
83
  "webpack-dev-server": "^6.1.0"
84
84
  },
85
85
  "devDependencies": {
86
- "@asd14/eslint-config": "^16.2.0",
86
+ "@asd14/eslint-config": "^16.3.0",
87
87
  "@asd14/prettier-config": "^1.5.0",
88
88
  "@asd14/semantic-release-config": "^1.1.0",
89
- "@asd14/ts-config": "^1.6.0",
89
+ "@asd14/ts-config": "^2.0.0",
90
90
  "@commitlint/cli": "^21.2.4",
91
91
  "@commitlint/config-conventional": "^21.2.4",
92
- "@tailwindcss/postcss": "^4.3.3",
92
+ "@tailwindcss/postcss": "^4.3.5",
93
93
  "@types/dotenv-webpack": "^7.0.8",
94
94
  "@types/react": "^19.3.0",
95
+ "@types/react-dom": "^19",
95
96
  "@types/webpack-bundle-analyzer": "^4.7.0",
96
- "@xyflow/react": "^12.12.0",
97
+ "@xyflow/react": "^12.12.1",
98
+ "agentation": "^3.1.2",
97
99
  "eslint": "^9.39.5",
98
100
  "prettier": "^3.9.10",
99
101
  "semantic-release": "^25.0.9",
100
- "tailwindcss": "^4.3.3",
102
+ "tailwindcss": "^4.3.5",
101
103
  "typescript": "^6.0.3"
102
104
  },
103
105
  "peerDependencies": {
@@ -0,0 +1,5 @@
1
+ # Copy this file to .env, then set the values. Never commit .env
2
+
3
+ # The URL of the agentation-mcp server. If unset, the Agentation toolbar keeps
4
+ # its notes only in the browser, and you copy them by hand
5
+ # AGENTATION_ENDPOINT=http://localhost:4747
@@ -0,0 +1,27 @@
1
+ import { Agentation } from "agentation"
2
+ import { createRoot } from "react-dom/client"
3
+
4
+ import { App } from "./index.app.tsx"
5
+
6
+ const root = document.querySelector("#root")
7
+
8
+ if (!root) {
9
+ throw new Error("index.html has no #root element")
10
+ }
11
+
12
+ // Webpack writes NODE_ENV into the bundle at build time. A production build
13
+ // drops this branch, and the Agentation toolbar with it
14
+ createRoot(root).render(
15
+ process.env["NODE_ENV"] === "development" ? (
16
+ <>
17
+ {/* Agentation finds React by this attribute. #root has no fiber
18
+ (agentation#225) */}
19
+ <div data-reactroot="" style={{ display: "contents" }}>
20
+ <App />
21
+ </div>
22
+ <Agentation endpoint={process.env["AGENTATION_ENDPOINT"]} />
23
+ </>
24
+ ) : (
25
+ <App />
26
+ )
27
+ )
@@ -14,7 +14,7 @@
14
14
  "react-dom": "^19"
15
15
  },
16
16
  "devDependencies": {
17
- "@asd14/ts-config": "^1.6.0",
17
+ "@asd14/ts-config": "^2.0.0",
18
18
  "@asd14/vblocks": "*",
19
19
  "@types/react": "^19",
20
20
  "@types/react-dom": "^19",
@@ -0,0 +1,9 @@
1
+ #!/bin/sh
2
+
3
+ # Runs in the app folder, after `vblocks init` copies the app files. npm commands
4
+ # write in the nearest package.json, ie. project root
5
+
6
+ set -eu
7
+
8
+ # src/index.tsx renders the Agentation toolbar in development
9
+ npm pkg set "devDependencies.agentation=^3"
@@ -0,0 +1,3 @@
1
+ const App = () => <h1>Hello World!</h1>
2
+
3
+ export { App }
@@ -1,4 +1,4 @@
1
- import { diagramEdges, diagramNodes } from "./diagram"
1
+ import { diagramEdges, diagramNodes } from "./diagram.tsx"
2
2
 
3
3
  const findLabel = (nodeId: string) =>
4
4
  diagramNodes.find(node => node.id === nodeId)?.data.label ?? nodeId
@@ -17,7 +17,7 @@ import {
17
17
  type OnSelectionChangeFunc,
18
18
  } from "@xyflow/react"
19
19
 
20
- import { CELL_SIZE, toPixels } from "./utils/grid"
20
+ import { CELL_SIZE, toPixels } from "./utils/grid.ts"
21
21
 
22
22
  type StepNode = Node<{ label: string; detail: string }, "step">
23
23
 
@@ -1,11 +1,7 @@
1
1
  import { useState } from "react"
2
- import { createRoot } from "react-dom/client"
3
2
 
4
- import { Details } from "./details"
5
- import { Diagram } from "./diagram"
6
-
7
- import "@xyflow/react/dist/style.css"
8
- import "./index.css"
3
+ import { Details } from "./details.tsx"
4
+ import { Diagram } from "./diagram.tsx"
9
5
 
10
6
  const App = () => {
11
7
  const [selectedId, setSelectedId] = useState<string>()
@@ -14,7 +10,9 @@ const App = () => {
14
10
  <div className="grid h-screen grid-rows-[auto_1fr] bg-stone-50 text-stone-900">
15
11
  <header className="border-b border-stone-200 bg-white px-6 py-3">
16
12
  <h1 className="text-lg font-semibold">VBlocks</h1>
17
- <p className="text-sm text-stone-500">How build turns src/ into a page</p>
13
+ <p className="text-sm text-stone-500">
14
+ How build turns src/ into a page
15
+ </p>
18
16
  </header>
19
17
 
20
18
  <div className="grid min-h-0 grid-cols-[1fr_20rem]">
@@ -34,10 +32,4 @@ const App = () => {
34
32
  )
35
33
  }
36
34
 
37
- const root = document.querySelector("#root")
38
-
39
- if (!root) {
40
- throw new Error("index.html has no #root element")
41
- }
42
-
43
- createRoot(root).render(<App />)
35
+ export { App }
@@ -1,3 +1,4 @@
1
1
  /* Scan only this app. With `--prefix`, you run VBlocks from the project folder,
2
2
  where Tailwind would also scan every other app */
3
3
  @import "tailwindcss" source(".");
4
+ @import "@xyflow/react/dist/style.css";
@@ -1,7 +1,7 @@
1
1
  #!/bin/sh
2
2
 
3
- # Runs in the app folder, after `vblocks init` copies the app files. npm writes
4
- # the nearest package.json, the project root's
3
+ # Runs in the app folder, after `vblocks init` copies the app files. npm commands
4
+ # write in the nearest package.json, ie. project root
5
5
 
6
6
  set -eu
7
7
 
@@ -1,13 +1,9 @@
1
1
  import { useState } from "react"
2
- import { createRoot } from "react-dom/client"
3
2
 
4
- import { BuildDetails } from "./pages/build/details"
5
- import { BuildDiagram } from "./pages/build/diagram"
6
- import { ServeDetails } from "./pages/serve/details"
7
- import { ServeDiagram } from "./pages/serve/diagram"
8
-
9
- import "@xyflow/react/dist/style.css"
10
- import "./index.css"
3
+ import { BuildDetails } from "./pages/build/details.tsx"
4
+ import { BuildDiagram } from "./pages/build/diagram.tsx"
5
+ import { ServeDetails } from "./pages/serve/details.tsx"
6
+ import { ServeDiagram } from "./pages/serve/diagram.tsx"
11
7
 
12
8
  /**
13
9
  * The tabs of the diagram. For a new tab, add a folder in `pages/` with a
@@ -81,10 +77,4 @@ const App = () => {
81
77
  )
82
78
  }
83
79
 
84
- const root = document.querySelector("#root")
85
-
86
- if (!root) {
87
- throw new Error("index.html has no #root element")
88
- }
89
-
90
- createRoot(root).render(<App />)
80
+ export { App }
@@ -1,3 +1,4 @@
1
1
  /* Scan only this app. With `--prefix`, you run VBlocks from the project folder,
2
2
  where Tailwind would also scan every other app */
3
3
  @import "tailwindcss" source(".");
4
+ @import "@xyflow/react/dist/style.css";
@@ -1,4 +1,4 @@
1
- import { buildEdges, buildNodes } from "./diagram"
1
+ import { buildEdges, buildNodes } from "./diagram.tsx"
2
2
 
3
3
  const findLabel = (nodeId: string) =>
4
4
  buildNodes.find(node => node.id === nodeId)?.data.label ?? nodeId
@@ -17,9 +17,9 @@ import {
17
17
  type OnSelectionChangeFunc,
18
18
  } from "@xyflow/react"
19
19
 
20
- import { CELL_SIZE, toPixels } from "@self/utils/grid"
20
+ import { CELL_SIZE, toPixels } from "@self/utils/grid.ts"
21
21
 
22
- import { ZoomLevel } from "@self/ui/zoom-level"
22
+ import { ZoomLevel } from "@self/ui/zoom-level.tsx"
23
23
 
24
24
  type StepNode = Node<{ label: string; detail: string }, "step">
25
25
 
@@ -1,4 +1,4 @@
1
- import { serveEdges, serveNodes } from "./diagram"
1
+ import { serveEdges, serveNodes } from "./diagram.tsx"
2
2
 
3
3
  type ServeDetailsProps = {
4
4
  selectedId: string
@@ -15,9 +15,9 @@ import {
15
15
  type OnSelectionChangeFunc,
16
16
  } from "@xyflow/react"
17
17
 
18
- import { CELL_SIZE, toPixels } from "@self/utils/grid"
18
+ import { CELL_SIZE, toPixels } from "@self/utils/grid.ts"
19
19
 
20
- import { ZoomLevel } from "@self/ui/zoom-level"
20
+ import { ZoomLevel } from "@self/ui/zoom-level.tsx"
21
21
 
22
22
  type PhaseNode = Node<
23
23
  { label: string; detail: string; delay?: string },
@@ -1,7 +1,7 @@
1
1
  #!/bin/sh
2
2
 
3
- # Runs in the app folder, after `vblocks init` copies the app files. npm writes
4
- # the nearest package.json, the project root's
3
+ # Runs in the app folder, after `vblocks init` copies the app files. npm commands
4
+ # write in the nearest package.json, ie. project root
5
5
 
6
6
  set -eu
7
7
 
package/types/client.d.ts CHANGED
@@ -93,6 +93,22 @@ declare module "*.mdx" {
93
93
  export default MDXContent
94
94
  }
95
95
 
96
+ /**
97
+ * The text of the file, as Vite's `?raw` gives it. No loader changes it.
98
+ *
99
+ * @example
100
+ * import { Variants } from "./variants.js"
101
+ * import variantsSource from "./variants.tsx?raw"
102
+ *
103
+ * <Variants />
104
+ * <pre>{variantsSource}</pre>
105
+ */
106
+ declare module "*?raw" {
107
+ const source: string
108
+
109
+ export default source
110
+ }
111
+
96
112
  /**
97
113
  * The `.env` variables Webpack writes into the bundle. The browser has no
98
114
  * other part of Node's `process`.