@webtides/element-library 0.1.2 → 0.2.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.
package/CHANGELOG.md CHANGED
@@ -12,6 +12,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this
12
12
 
13
13
  ## Unreleased
14
14
 
15
+ ## [0.2.0] - 2026-06-10
16
+
17
+ ### Packaging
18
+
19
+ - Added: a new `@webtides/element-library/catalog` export — the recommended way to consume this library under **server-side rendering** with `@webtides/element-js-ssr-renderer`. `catalog.js` is a generated, bundler-traceable `Catalog` (`{ "el-button": () => import("./src/components/button/button.js"), … }`) covering all 26 components. Because it ships **inside the package**, its specifiers are package-internal relative paths that resolve in any consumer's bundle regardless of `node_modules` layout, so SSR works on every target (plain Node, Nitro, edge/Workers, webpack, Vite) with no consumer codegen and no hand-written import map: `import catalog from "@webtides/element-library/catalog"` then pass it to the renderer's `resolve`. Distinct from `./all` (a client-side side-effect bundle that registers every component for hydration) — the catalog defines nothing and runs no `define()`, it only tells the SSR renderer how to load each class. Regenerated automatically on release via the `prepack` hook (and on demand with `npm run gen:catalog`), so it can never drift from the components; a Node SSR smoke test (`npm run test:catalog`, run in CI) verifies a known tag still resolves to its class through the renderer.
20
+
15
21
  ## [0.1.2] - 2026-06-04
16
22
 
17
23
  ### Packaging
package/catalog.js ADDED
@@ -0,0 +1,35 @@
1
+ // Generated by @webtides/element-js-ssr-renderer — do not edit by hand.
2
+ // Source: manifest custom-elements.json (26 components)
3
+ // A static, bundler-traceable Catalog. Pass it straight to `resolve` — no wrapper:
4
+ // import catalog from "./catalog.js";
5
+ // elementSSR({ resolve: catalog });
6
+
7
+ /** @type {import("@webtides/element-js-ssr-renderer").Catalog} */
8
+ export default {
9
+ "el-accordion": () => import("./src/components/accordion/accordion.js"),
10
+ "el-accordion-group": () => import("./src/components/accordion-group/accordion-group.js"),
11
+ "el-amount-field": () => import("./src/components/amount-field/amount-field.js"),
12
+ "el-button": () => import("./src/components/button/button.js"),
13
+ "el-carousel": () => import("./src/components/carousel/carousel.js"),
14
+ "el-checkbox-field": () => import("./src/components/checkbox-field/checkbox-field.js"),
15
+ "el-dialog": () => import("./src/components/dialog/dialog.js"),
16
+ "el-dropdown": () => import("./src/components/dropdown/dropdown.js"),
17
+ "el-form-field": () => import("./src/components/form-field/form-field.js"),
18
+ "el-input-field": () => import("./src/components/input-field/input-field.js"),
19
+ "el-lazy-src": () => import("./src/components/lazy-src/lazy-src.js"),
20
+ "el-notification": () => import("./src/components/notification/notification.js"),
21
+ "el-password-field": () => import("./src/components/password-field/password-field.js"),
22
+ "el-radio-field": () => import("./src/components/radio-field/radio-field.js"),
23
+ "el-scroll-to": () => import("./src/components/scroll-to/scroll-to.js"),
24
+ "el-scroll-to-top": () => import("./src/components/scroll-to-top/scroll-to-top.js"),
25
+ "el-select-field": () => import("./src/components/select-field/select-field.js"),
26
+ "el-slider": () => import("./src/components/slider/slider.js"),
27
+ "el-sticky": () => import("./src/components/sticky/sticky.js"),
28
+ "el-svg-use": () => import("./src/components/svg-use/svg-use.js"),
29
+ "el-switch-field": () => import("./src/components/switch-field/switch-field.js"),
30
+ "el-tab-group": () => import("./src/components/tab-group/tab-group.js"),
31
+ "el-tab-link": () => import("./src/components/tab-link/tab-link.js"),
32
+ "el-tab-panel": () => import("./src/components/tab-panel/tab-panel.js"),
33
+ "el-textarea-field": () => import("./src/components/textarea-field/textarea-field.js"),
34
+ "el-transition-classes": () => import("./src/components/transition-classes/transition-classes.js"),
35
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webtides/element-library",
3
- "version": "0.1.2",
3
+ "version": "0.2.0",
4
4
  "description": "A set of web components built with @webtides/element-js",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -15,6 +15,7 @@
15
15
  "types": "./types/all.d.ts",
16
16
  "default": "./all.js"
17
17
  },
18
+ "./catalog": "./catalog.js",
18
19
  "./*": {
19
20
  "types": "./types/src/components/*/*.d.ts",
20
21
  "default": "./src/components/*/*.js"
@@ -43,6 +44,7 @@
43
44
  "src/themes/*.css",
44
45
  "types/**/*.d.ts",
45
46
  "all.js",
47
+ "catalog.js",
46
48
  "index.js",
47
49
  "custom-elements.json",
48
50
  "web-types.json",
@@ -86,6 +88,7 @@
86
88
  "@vitest/browser-playwright": "^4.1.8",
87
89
  "@vitest/coverage-istanbul": "^4.1.8",
88
90
  "@vitest/ui": "^4.1.8",
91
+ "@webtides/element-js-ssr-renderer": "^0.1.0",
89
92
  "axe-core": "^4.12.0",
90
93
  "custom-element-jet-brains-integration": "^1.7.0",
91
94
  "eslint": "^10.4.1",
@@ -115,7 +118,9 @@
115
118
  "analyze": "cem analyze --config custom-elements-manifest.config.mjs --outdir .",
116
119
  "analyze:watch": "cem analyze --config custom-elements-manifest.config.mjs --outdir . --watch",
117
120
  "build:types": "tsc -p tsconfig.json",
118
- "prepack": "npm run analyze && npm run build:types",
121
+ "gen:catalog": "npx -y @webtides/element-js-ssr-renderer catalog --manifest custom-elements.json -o catalog.js && prettier --write catalog.js",
122
+ "test:catalog": "npm run gen:catalog && node test/catalog.smoke.mjs",
123
+ "prepack": "npm run analyze && npm run build:types && npm run gen:catalog",
119
124
  "prepare": "husky && npm run analyze && npm run build:types"
120
125
  },
121
126
  "lint-staged": {
package/web-types.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
3
3
  "name": "@webtides/element-library",
4
- "version": "0.1.2",
4
+ "version": "0.2.0",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {