@fayz-ai/ui 0.5.0 → 0.6.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,30 @@
1
+ 'use strict';
2
+
3
+ var chunk2P7T6QQK_cjs = require('./chunk-2P7T6QQK.cjs');
4
+
5
+ // src/tailwind.ts
6
+ var SDK_PACKAGES = ["ui", "saas", "storefront", "portal"];
7
+ var GLOB = "/src/**/*.{ts,tsx}";
8
+ function fayzTailwind(opts = {}) {
9
+ const sdk = opts.sdkDir ?? "../../fayz-sdk";
10
+ return {
11
+ presets: [chunk2P7T6QQK_cjs.fayzUiPreset],
12
+ darkMode: "class",
13
+ content: [
14
+ "./index.html",
15
+ "./src/**/*.{ts,tsx}",
16
+ // Published / sandbox: SDK installed in node_modules (packages ship src/).
17
+ ...SDK_PACKAGES.map((p) => `./node_modules/@fayz-ai/${p}${GLOB}`),
18
+ "./node_modules/@fayz-ai/plugin-*/src/**/*.{ts,tsx}",
19
+ // Local dev: SDK as a sibling checkout (matches nothing in production).
20
+ ...SDK_PACKAGES.map((p) => `${sdk}/packages/${p}${GLOB}`),
21
+ `${sdk}/plugins/*/src/**/*.{ts,tsx}`,
22
+ ...opts.content ?? []
23
+ ],
24
+ plugins: []
25
+ };
26
+ }
27
+
28
+ exports.fayzTailwind = fayzTailwind;
29
+ //# sourceMappingURL=tailwind.cjs.map
30
+ //# sourceMappingURL=tailwind.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/tailwind.ts"],"names":["fayzUiPreset"],"mappings":";;;;;AAWA,IAAM,YAAA,GAAe,CAAC,IAAA,EAAM,MAAA,EAAQ,cAAc,QAAQ,CAAA;AAC1D,IAAM,IAAA,GAAO,oBAAA;AAYN,SAAS,YAAA,CAAa,IAAA,GAA4B,EAAC,EAAW;AACnE,EAAA,MAAM,GAAA,GAAM,KAAK,MAAA,IAAU,gBAAA;AAC3B,EAAA,OAAO;AAAA,IACL,OAAA,EAAS,CAACA,8BAAsB,CAAA;AAAA,IAChC,QAAA,EAAU,OAAA;AAAA,IACV,OAAA,EAAS;AAAA,MACP,cAAA;AAAA,MACA,qBAAA;AAAA;AAAA,MAEA,GAAG,aAAa,GAAA,CAAI,CAAC,MAAM,CAAA,wBAAA,EAA2B,CAAC,CAAA,EAAG,IAAI,CAAA,CAAE,CAAA;AAAA,MAChE,oDAAA;AAAA;AAAA,MAEA,GAAG,YAAA,CAAa,GAAA,CAAI,CAAC,CAAA,KAAM,CAAA,EAAG,GAAG,CAAA,UAAA,EAAa,CAAC,CAAA,EAAG,IAAI,CAAA,CAAE,CAAA;AAAA,MACxD,GAAG,GAAG,CAAA,4BAAA,CAAA;AAAA,MACN,GAAI,IAAA,CAAK,OAAA,IAAW;AAAC,KACvB;AAAA,IACA,SAAS;AAAC,GACZ;AACF","file":"tailwind.cjs","sourcesContent":["import type { Config } from 'tailwindcss'\nimport { fayzUiPreset } from './theme/preset'\n\nexport interface FayzTailwindOptions {\n /** Extra app-specific content globs, appended after the SDK globs. */\n content?: string[]\n /** SDK source location relative to the app root (default ../../fayz-sdk). */\n sdkDir?: string\n}\n\n// SDK packages whose source ships Tailwind class names the app renders.\nconst SDK_PACKAGES = ['ui', 'saas', 'storefront', 'portal'] as const\nconst GLOB = '/src/**/*.{ts,tsx}'\n\n/**\n * Shared Tailwind config for Fayz dogfood apps. Applies the Fayz UI preset and\n * scans the SDK shell/UI/plugin source for class names — from node_modules (the\n * Fayz editor sandbox / published) and a sibling `../../fayz-sdk` checkout (local\n * dev). Whichever exists is scanned; missing globs are ignored. Apps no longer\n * hand-maintain content globs or the relative-vs-npm preset import.\n *\n * import { fayzTailwind } from '@fayz-ai/ui/tailwind'\n * export default fayzTailwind()\n */\nexport function fayzTailwind(opts: FayzTailwindOptions = {}): Config {\n const sdk = opts.sdkDir ?? '../../fayz-sdk'\n return {\n presets: [fayzUiPreset as Config],\n darkMode: 'class',\n content: [\n './index.html',\n './src/**/*.{ts,tsx}',\n // Published / sandbox: SDK installed in node_modules (packages ship src/).\n ...SDK_PACKAGES.map((p) => `./node_modules/@fayz-ai/${p}${GLOB}`),\n './node_modules/@fayz-ai/plugin-*/src/**/*.{ts,tsx}',\n // Local dev: SDK as a sibling checkout (matches nothing in production).\n ...SDK_PACKAGES.map((p) => `${sdk}/packages/${p}${GLOB}`),\n `${sdk}/plugins/*/src/**/*.{ts,tsx}`,\n ...(opts.content ?? []),\n ],\n plugins: [],\n }\n}\n"]}
@@ -0,0 +1,19 @@
1
+ import type { Config } from 'tailwindcss';
2
+ export interface FayzTailwindOptions {
3
+ /** Extra app-specific content globs, appended after the SDK globs. */
4
+ content?: string[];
5
+ /** SDK source location relative to the app root (default ../../fayz-sdk). */
6
+ sdkDir?: string;
7
+ }
8
+ /**
9
+ * Shared Tailwind config for Fayz dogfood apps. Applies the Fayz UI preset and
10
+ * scans the SDK shell/UI/plugin source for class names — from node_modules (the
11
+ * Fayz editor sandbox / published) and a sibling `../../fayz-sdk` checkout (local
12
+ * dev). Whichever exists is scanned; missing globs are ignored. Apps no longer
13
+ * hand-maintain content globs or the relative-vs-npm preset import.
14
+ *
15
+ * import { fayzTailwind } from '@fayz-ai/ui/tailwind'
16
+ * export default fayzTailwind()
17
+ */
18
+ export declare function fayzTailwind(opts?: FayzTailwindOptions): Config;
19
+ //# sourceMappingURL=tailwind.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tailwind.d.ts","sourceRoot":"","sources":["../src/tailwind.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAGzC,MAAM,WAAW,mBAAmB;IAClC,sEAAsE;IACtE,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;IAClB,6EAA6E;IAC7E,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAMD;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAAC,IAAI,GAAE,mBAAwB,GAAG,MAAM,CAkBnE"}
@@ -0,0 +1,28 @@
1
+ import { fayzUiPreset } from './chunk-IWBXYV4U.js';
2
+
3
+ // src/tailwind.ts
4
+ var SDK_PACKAGES = ["ui", "saas", "storefront", "portal"];
5
+ var GLOB = "/src/**/*.{ts,tsx}";
6
+ function fayzTailwind(opts = {}) {
7
+ const sdk = opts.sdkDir ?? "../../fayz-sdk";
8
+ return {
9
+ presets: [fayzUiPreset],
10
+ darkMode: "class",
11
+ content: [
12
+ "./index.html",
13
+ "./src/**/*.{ts,tsx}",
14
+ // Published / sandbox: SDK installed in node_modules (packages ship src/).
15
+ ...SDK_PACKAGES.map((p) => `./node_modules/@fayz-ai/${p}${GLOB}`),
16
+ "./node_modules/@fayz-ai/plugin-*/src/**/*.{ts,tsx}",
17
+ // Local dev: SDK as a sibling checkout (matches nothing in production).
18
+ ...SDK_PACKAGES.map((p) => `${sdk}/packages/${p}${GLOB}`),
19
+ `${sdk}/plugins/*/src/**/*.{ts,tsx}`,
20
+ ...opts.content ?? []
21
+ ],
22
+ plugins: []
23
+ };
24
+ }
25
+
26
+ export { fayzTailwind };
27
+ //# sourceMappingURL=tailwind.js.map
28
+ //# sourceMappingURL=tailwind.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/tailwind.ts"],"names":[],"mappings":";;;AAWA,IAAM,YAAA,GAAe,CAAC,IAAA,EAAM,MAAA,EAAQ,cAAc,QAAQ,CAAA;AAC1D,IAAM,IAAA,GAAO,oBAAA;AAYN,SAAS,YAAA,CAAa,IAAA,GAA4B,EAAC,EAAW;AACnE,EAAA,MAAM,GAAA,GAAM,KAAK,MAAA,IAAU,gBAAA;AAC3B,EAAA,OAAO;AAAA,IACL,OAAA,EAAS,CAAC,YAAsB,CAAA;AAAA,IAChC,QAAA,EAAU,OAAA;AAAA,IACV,OAAA,EAAS;AAAA,MACP,cAAA;AAAA,MACA,qBAAA;AAAA;AAAA,MAEA,GAAG,aAAa,GAAA,CAAI,CAAC,MAAM,CAAA,wBAAA,EAA2B,CAAC,CAAA,EAAG,IAAI,CAAA,CAAE,CAAA;AAAA,MAChE,oDAAA;AAAA;AAAA,MAEA,GAAG,YAAA,CAAa,GAAA,CAAI,CAAC,CAAA,KAAM,CAAA,EAAG,GAAG,CAAA,UAAA,EAAa,CAAC,CAAA,EAAG,IAAI,CAAA,CAAE,CAAA;AAAA,MACxD,GAAG,GAAG,CAAA,4BAAA,CAAA;AAAA,MACN,GAAI,IAAA,CAAK,OAAA,IAAW;AAAC,KACvB;AAAA,IACA,SAAS;AAAC,GACZ;AACF","file":"tailwind.js","sourcesContent":["import type { Config } from 'tailwindcss'\nimport { fayzUiPreset } from './theme/preset'\n\nexport interface FayzTailwindOptions {\n /** Extra app-specific content globs, appended after the SDK globs. */\n content?: string[]\n /** SDK source location relative to the app root (default ../../fayz-sdk). */\n sdkDir?: string\n}\n\n// SDK packages whose source ships Tailwind class names the app renders.\nconst SDK_PACKAGES = ['ui', 'saas', 'storefront', 'portal'] as const\nconst GLOB = '/src/**/*.{ts,tsx}'\n\n/**\n * Shared Tailwind config for Fayz dogfood apps. Applies the Fayz UI preset and\n * scans the SDK shell/UI/plugin source for class names — from node_modules (the\n * Fayz editor sandbox / published) and a sibling `../../fayz-sdk` checkout (local\n * dev). Whichever exists is scanned; missing globs are ignored. Apps no longer\n * hand-maintain content globs or the relative-vs-npm preset import.\n *\n * import { fayzTailwind } from '@fayz-ai/ui/tailwind'\n * export default fayzTailwind()\n */\nexport function fayzTailwind(opts: FayzTailwindOptions = {}): Config {\n const sdk = opts.sdkDir ?? '../../fayz-sdk'\n return {\n presets: [fayzUiPreset as Config],\n darkMode: 'class',\n content: [\n './index.html',\n './src/**/*.{ts,tsx}',\n // Published / sandbox: SDK installed in node_modules (packages ship src/).\n ...SDK_PACKAGES.map((p) => `./node_modules/@fayz-ai/${p}${GLOB}`),\n './node_modules/@fayz-ai/plugin-*/src/**/*.{ts,tsx}',\n // Local dev: SDK as a sibling checkout (matches nothing in production).\n ...SDK_PACKAGES.map((p) => `${sdk}/packages/${p}${GLOB}`),\n `${sdk}/plugins/*/src/**/*.{ts,tsx}`,\n ...(opts.content ?? []),\n ],\n plugins: [],\n }\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fayz-ai/ui",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "description": "Fayz SDK UI — Radix + Tailwind component library with CRUD engine and layout shells",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -43,6 +43,12 @@
43
43
  "types": "./dist/preset.d.ts",
44
44
  "import": "./dist/preset.js",
45
45
  "require": "./dist/preset.cjs"
46
+ },
47
+ "./tailwind": {
48
+ "source": "./src/tailwind.ts",
49
+ "types": "./dist/tailwind.d.ts",
50
+ "import": "./dist/tailwind.js",
51
+ "require": "./dist/tailwind.cjs"
46
52
  }
47
53
  },
48
54
  "files": [
@@ -75,8 +81,8 @@
75
81
  "sonner": "^1.5.0",
76
82
  "tailwind-merge": "^2.4.0",
77
83
  "zustand": "^4.5.0",
78
- "@fayz-ai/core": "^0.5.0",
79
- "@fayz-ai/auth": "^0.5.0"
84
+ "@fayz-ai/core": "^0.6.0",
85
+ "@fayz-ai/auth": "^0.6.0"
80
86
  },
81
87
  "devDependencies": {
82
88
  "@types/react": "^18.3.0",
@@ -0,0 +1,43 @@
1
+ import type { Config } from 'tailwindcss'
2
+ import { fayzUiPreset } from './theme/preset'
3
+
4
+ export interface FayzTailwindOptions {
5
+ /** Extra app-specific content globs, appended after the SDK globs. */
6
+ content?: string[]
7
+ /** SDK source location relative to the app root (default ../../fayz-sdk). */
8
+ sdkDir?: string
9
+ }
10
+
11
+ // SDK packages whose source ships Tailwind class names the app renders.
12
+ const SDK_PACKAGES = ['ui', 'saas', 'storefront', 'portal'] as const
13
+ const GLOB = '/src/**/*.{ts,tsx}'
14
+
15
+ /**
16
+ * Shared Tailwind config for Fayz dogfood apps. Applies the Fayz UI preset and
17
+ * scans the SDK shell/UI/plugin source for class names — from node_modules (the
18
+ * Fayz editor sandbox / published) and a sibling `../../fayz-sdk` checkout (local
19
+ * dev). Whichever exists is scanned; missing globs are ignored. Apps no longer
20
+ * hand-maintain content globs or the relative-vs-npm preset import.
21
+ *
22
+ * import { fayzTailwind } from '@fayz-ai/ui/tailwind'
23
+ * export default fayzTailwind()
24
+ */
25
+ export function fayzTailwind(opts: FayzTailwindOptions = {}): Config {
26
+ const sdk = opts.sdkDir ?? '../../fayz-sdk'
27
+ return {
28
+ presets: [fayzUiPreset as Config],
29
+ darkMode: 'class',
30
+ content: [
31
+ './index.html',
32
+ './src/**/*.{ts,tsx}',
33
+ // Published / sandbox: SDK installed in node_modules (packages ship src/).
34
+ ...SDK_PACKAGES.map((p) => `./node_modules/@fayz-ai/${p}${GLOB}`),
35
+ './node_modules/@fayz-ai/plugin-*/src/**/*.{ts,tsx}',
36
+ // Local dev: SDK as a sibling checkout (matches nothing in production).
37
+ ...SDK_PACKAGES.map((p) => `${sdk}/packages/${p}${GLOB}`),
38
+ `${sdk}/plugins/*/src/**/*.{ts,tsx}`,
39
+ ...(opts.content ?? []),
40
+ ],
41
+ plugins: [],
42
+ }
43
+ }