@wtfalch/design 0.1.0 → 0.3.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.
@@ -0,0 +1,18 @@
1
+ /**
2
+ * valet's entry: the package, as valet.
3
+ *
4
+ * Everything the main entry exports, and on top of it `Brand`, `THEMES`,
5
+ * `DEFAULT_THEME` and `applyTheme` bound to valet -- a local export shadows
6
+ * the same name from `export *`. A site is one product, so it imports this
7
+ * and `@wtfalch/design/valet.css` and nothing of anyone else's.
8
+ */
9
+ export * from './index';
10
+ export declare const product: import("./products").Product;
11
+ export declare const Brand: (props: {
12
+ name?: import("./index").BrandName;
13
+ title?: string;
14
+ className?: string;
15
+ }) => import("react").JSX.Element;
16
+ export declare const THEMES: Record<string, import("./themes").Theme>;
17
+ export declare const DEFAULT_THEME: string;
18
+ export declare const applyTheme: (theme?: string | import("./themes").Theme, el?: HTMLElement) => void;
package/dist/valet.js ADDED
@@ -0,0 +1,17 @@
1
+ /**
2
+ * valet's entry: the package, as valet.
3
+ *
4
+ * Everything the main entry exports, and on top of it `Brand`, `THEMES`,
5
+ * `DEFAULT_THEME` and `applyTheme` bound to valet -- a local export shadows
6
+ * the same name from `export *`. A site is one product, so it imports this
7
+ * and `@wtfalch/design/valet.css` and nothing of anyone else's.
8
+ */
9
+ export * from './index';
10
+ import { bindProduct } from './products';
11
+ import { valet } from './products/valet';
12
+ const bound = bindProduct(valet);
13
+ export const product = bound.product;
14
+ export const Brand = bound.Brand;
15
+ export const THEMES = bound.THEMES;
16
+ export const DEFAULT_THEME = bound.DEFAULT_THEME;
17
+ export const applyTheme = bound.applyTheme;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@wtfalch/design",
3
- "version": "0.1.0",
4
- "description": "The tf design system: themeable components on a fixed token vocabulary.",
3
+ "version": "0.3.0",
4
+ "description": "wtfalch's design system: themeable components on a fixed token vocabulary.",
5
5
  "keywords": [
6
6
  "design-system",
7
7
  "react",
@@ -35,9 +35,19 @@
35
35
  "types": "./dist/index.d.ts",
36
36
  "default": "./dist/index.js"
37
37
  },
38
+ "./tf": {
39
+ "types": "./dist/tf.d.ts",
40
+ "default": "./dist/tf.js"
41
+ },
42
+ "./valet": {
43
+ "types": "./dist/valet.d.ts",
44
+ "default": "./dist/valet.js"
45
+ },
46
+ "./tf.css": "./dist/tf.css",
47
+ "./valet.css": "./dist/valet.css",
38
48
  "./themes": {
39
- "types": "./dist/themes.d.ts",
40
- "default": "./dist/themes.js"
49
+ "types": "./dist/themes/index.d.ts",
50
+ "default": "./dist/themes/index.js"
41
51
  },
42
52
  "./tokens.css": "./dist/tokens.css",
43
53
  "./styles.css": "./dist/styles/index.css"
@@ -67,7 +77,7 @@
67
77
  "vitest": "^4.1.6"
68
78
  },
69
79
  "scripts": {
70
- "build": "rm -rf dist && tsc -p tsconfig.build.json && node scripts/copy-css.mjs",
80
+ "build": "rm -rf dist && tsc -p tsconfig.build.json && node scripts/copy-css.mjs && node scripts/build-products.mjs",
71
81
  "typecheck": "tsc --noEmit",
72
82
  "test": "vitest run"
73
83
  }