@payfit/unity-themes 2.55.22 → 2.55.23

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 (52) hide show
  1. package/dist/esm/scripts/style-dictionary-config.d.ts +14 -0
  2. package/package.json +12 -3
  3. package/skills/unity-themes/SKILL.md +41 -0
  4. package/src/agent-references/manifest.json +16 -0
  5. package/src/agent-references/tokens-catalog.json +13891 -0
  6. package/dist/esm/scripts/agent-references/color-reference.d.ts +0 -37
  7. package/src/agent-references/README.mdx +0 -25
  8. package/src/agent-references/primitive-colors.mdx +0 -18
  9. package/src/agent-references/semantic-border-colors.mdx +0 -16
  10. package/src/agent-references/semantic-content-colors.mdx +0 -16
  11. package/src/agent-references/semantic-surface-colors.mdx +0 -16
  12. package/src/agent-references/semantic-utility-colors.mdx +0 -16
  13. package/src/components/unity-theme-provider.stories.tsx +0 -532
  14. package/src/components/unity-theme-provider.test.tsx +0 -150
  15. package/src/components/unity-theme-provider.tsx +0 -72
  16. package/src/index.ts +0 -15
  17. package/src/scripts/actions/append-animations.ts +0 -73
  18. package/src/scripts/actions/compose-multi-theme.ts +0 -59
  19. package/src/scripts/agent-references/color-reference.test.ts +0 -140
  20. package/src/scripts/agent-references/color-reference.ts +0 -348
  21. package/src/scripts/build.ts +0 -420
  22. package/src/scripts/file-headers/unity.ts +0 -31
  23. package/src/scripts/formats/processors/grid-processor.test.ts +0 -378
  24. package/src/scripts/formats/processors/grid-processor.ts +0 -64
  25. package/src/scripts/formats/processors/typography-processor.test.ts +0 -111
  26. package/src/scripts/formats/processors/typography-processor.ts +0 -48
  27. package/src/scripts/formats/unity-theme.test.ts +0 -329
  28. package/src/scripts/formats/unity-theme.ts +0 -54
  29. package/src/scripts/formats/utils.test.ts +0 -264
  30. package/src/scripts/formats/utils.ts +0 -15
  31. package/src/scripts/transforms/oklch.test.ts +0 -166
  32. package/src/scripts/transforms/oklch.ts +0 -19
  33. package/src/scripts/transforms/tailwind-animation-token.test.ts +0 -108
  34. package/src/scripts/transforms/tailwind-animation-token.ts +0 -51
  35. package/src/scripts/transforms/tailwind-color-token.test.ts +0 -304
  36. package/src/scripts/transforms/tailwind-color-token.ts +0 -17
  37. package/src/scripts/transforms/tailwind-grid-token.test.ts +0 -114
  38. package/src/scripts/transforms/tailwind-grid-token.ts +0 -27
  39. package/src/scripts/transforms/tailwind-spacing-token.test.ts +0 -315
  40. package/src/scripts/transforms/tailwind-spacing-token.ts +0 -24
  41. package/src/scripts/transforms/tailwind-text-token.test.ts +0 -328
  42. package/src/scripts/transforms/tailwind-text-token.ts +0 -30
  43. package/src/scripts/transforms/tailwind-typography-token.test.ts +0 -55
  44. package/src/scripts/transforms/tailwind-typography-token.ts +0 -20
  45. package/src/scripts/types.ts +0 -30
  46. package/src/scripts/utils/prefix-transform.test.ts +0 -137
  47. package/src/scripts/utils/prefix-transform.ts +0 -16
  48. package/src/utils/cn.ts +0 -109
  49. package/src/utils/merge-config.ts +0 -194
  50. package/src/utils/tailwind-merge.test.ts +0 -462
  51. package/src/utils/tailwind-merge.ts +0 -77
  52. package/src/utils/tailwind-variants.ts +0 -53
@@ -0,0 +1,14 @@
1
+ import { default as StyleDictionary } from 'style-dictionary';
2
+ export declare const sharedTransforms: string[];
3
+ export declare const sharedLogConfig: {
4
+ readonly warnings: "warn";
5
+ readonly verbosity: "verbose";
6
+ readonly errors: {
7
+ readonly brokenReferences: "throw";
8
+ };
9
+ };
10
+ export declare const createThemeStyleDictionary: ({ projectRoot, theme, }: {
11
+ projectRoot: string;
12
+ theme: "legacy" | "rebrand";
13
+ }) => StyleDictionary;
14
+ export default StyleDictionary;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@payfit/unity-themes",
3
- "version": "2.55.22",
3
+ "version": "2.55.23",
4
4
  "main": "./dist/esm/index.js",
5
5
  "types": "./dist/esm/index.d.ts",
6
6
  "style": "./dist/css/unity.css",
@@ -8,11 +8,17 @@
8
8
  "files": [
9
9
  "dist",
10
10
  "tokens",
11
- "src"
11
+ "skills",
12
+ "src/agent-references"
12
13
  ],
13
14
  "storybook": {
14
15
  "url": "https://unity-theme.payfit.io/"
15
16
  },
17
+ "intent": {
18
+ "version": 1,
19
+ "repo": "PayFit/hr-apps",
20
+ "docs": "../../../../apps/shared/docsite/src/content/docs"
21
+ },
16
22
  "exports": {
17
23
  ".": {
18
24
  "import": {
@@ -83,5 +89,8 @@
83
89
  "tailwind-merge": "3.6.0",
84
90
  "tailwind-variants": "3.2.2",
85
91
  "tailwindcss": "4.3.3"
86
- }
92
+ },
93
+ "keywords": [
94
+ "tanstack-intent"
95
+ ]
87
96
  }
@@ -0,0 +1,41 @@
1
+ ---
2
+ name: unity-themes
3
+ description: >
4
+ Use when selecting a Unity design token, resolving a token reference or CSS
5
+ variable, or writing uy: utility classes. Search the canonical token catalog
6
+ first and use the generated class blueprints only for class syntax.
7
+ metadata:
8
+ type: core
9
+ library: '@payfit/unity-themes'
10
+ ---
11
+
12
+ ## Source order
13
+
14
+ 1. Read [src/agent-references/tokens-catalog.json](../../src/agent-references/tokens-catalog.json) for exact catalog names, CSS variables, token families, resolved legacy/rebrand values, and references.
15
+ 2. If the match is ambiguous or the raw definition is needed, inspect the DTCG files under `tokens/`.
16
+ 3. For utility-class syntax and common blueprints, inspect the generated projections under `src/storybook-mcp/` (for example `semantic-surface-colors.mdx`). These files are optimized guides, not the canonical token index.
17
+
18
+ Targeted lookup example:
19
+
20
+ ```sh
21
+ jq '.tokens[] | select(.name | test("border-neutral"; "i"))' \
22
+ libs/shared/unity/themes/src/agent-references/tokens-catalog.json
23
+ ```
24
+
25
+ ## Standard operating procedure
26
+
27
+ 1. Classify the request as a token name, CSS variable, generated class, resolved value, or design-intent question.
28
+ 2. Search the entire catalog and compare exact semantic matches before considering primitives.
29
+ 3. Use the catalog's `name` and `cssVariable`; do not reconstruct names from the DTCG path when a transform may have changed them.
30
+ 4. Preserve token references. Inspect `values.legacy` and `values.rebrand` to understand theme-specific resolution, and inspect `references` when explaining an alias.
31
+ 5. For classes, use the generated `src/storybook-mcp` blueprint for the relevant family and substitute only a catalog-confirmed token name. Do not enumerate or invent the complete class space.
32
+ 6. Prefer semantic tokens for product UI. Use primitives only when the intent has no semantic equivalent or the user explicitly asks for a raw palette value.
33
+ 7. Keep the `uy:` prefix on every Unity utility class and use `uyMerge`/`uyTv` from `@payfit/unity-themes` when composing classes or variants.
34
+
35
+ ```tsx
36
+ <div className="uy:bg-surface-primary uy:text-content-primary" />
37
+ ```
38
+
39
+ Never assume that a plausible Tailwind name exists. If it is not represented by the catalog or an applicable blueprint, keep searching or state that no confirmed class was found.
40
+
41
+ Prefer semantic tokens over primitive values and use the `uy:` prefix for Tailwind utilities. Do not invent utility names or expand the full class space; consult the catalog and use the semantic family that matches the element's role.
@@ -0,0 +1,16 @@
1
+ {
2
+ "package": "@payfit/unity-themes",
3
+ "generatedBy": "@payfit/nx-tools:sync-unity-agent-references",
4
+ "references": [
5
+ {
6
+ "id": "tokens",
7
+ "title": "Unity raw token catalog",
8
+ "description": "Style Dictionary-resolved Unity tokens with transformed names, CSS variables, and DTCG reference metadata.",
9
+ "format": "json",
10
+ "path": "./tokens-catalog.json",
11
+ "contentType": "application/json",
12
+ "useFor": ["token lookup", "theme selection", "styling"],
13
+ "sources": ["tokens/**/*.json", "src/scripts/style-dictionary-config.ts"]
14
+ }
15
+ ]
16
+ }