@frontfriend/tailwind 2.5.3 → 2.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.
- package/dist/cli.js +45 -43
- package/dist/index.js +3 -3
- package/dist/index.js.map +3 -3
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +3 -3
- package/dist/runtime.js +1 -1
- package/dist/runtime.js.map +3 -3
- package/dist/types/index.d.ts +42 -0
- package/package.json +6 -7
package/dist/cli.js
CHANGED
|
@@ -1,73 +1,75 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
var
|
|
3
|
-
`)};var
|
|
2
|
+
var _=(t,i)=>()=>(i||t((i={exports:{}}).exports,i),i.exports);var q=_((K,E)=>{var P=require("fs"),N=require("path");function M(t={}){let i=t.projectRoot||process.cwd(),o=N.join(i,"node_modules",".cache","frontfriend","icons.json"),e=t.outputPath||N.join(i,"types","frontfriend.d.ts");P.existsSync(o)||(console.error('[FrontFriend] Error: icons.json not found. Please run "npx frontfriend init" first.'),process.exit(1));try{let m=function(a){for(let d of Object.values(a))typeof d=="string"?r.add(d):typeof d=="object"&&d!==null&&m(d)},F=function(a,d=" "){let S=[];for(let[D,c]of Object.entries(a))typeof c=="string"?S.push(`${d}${D}: '${c}';`):typeof c=="object"&&c!==null&&(S.push(`${d}${D}: {`),S.push(F(c,d+" ")),S.push(`${d}};`));return S.join(`
|
|
3
|
+
`)};var f=m,g=F;let l=JSON.parse(P.readFileSync(o,"utf-8")),r=new Set;m(l);let n=Array.from(r).map(a=>`'${a}'`).join(" | "),p=`// Generated by @frontfriend/tailwind
|
|
4
4
|
// DO NOT EDIT THIS FILE MANUALLY
|
|
5
5
|
|
|
6
6
|
import type { IconSetStructure } from '@frontfriend/tailwind';
|
|
7
7
|
|
|
8
8
|
declare module '@frontfriend/tailwind' {
|
|
9
9
|
// Icon names used in this project
|
|
10
|
-
export type ProjectIconName = ${
|
|
10
|
+
export type ProjectIconName = ${n||"string"};
|
|
11
11
|
|
|
12
12
|
// Typed iconSet structure with exact icon names
|
|
13
13
|
export interface TypedIconSet extends IconSetStructure {
|
|
14
|
-
${
|
|
14
|
+
${F(l)}
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
// Augment Vue component types with exact icon names
|
|
19
19
|
declare module '*/components/ui/icon/*.vue' {
|
|
20
|
-
export type IconName = ${
|
|
20
|
+
export type IconName = ${n||"string"};
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
declare module '@/components/ui/icon/*.vue' {
|
|
24
|
-
export type IconName = ${
|
|
24
|
+
export type IconName = ${n||"string"};
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
declare module '@/components/ui/icon' {
|
|
28
|
-
export type IconName = ${
|
|
28
|
+
export type IconName = ${n||"string"};
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
declare module '@/src/components/ui/icon' {
|
|
32
|
-
export type IconName = ${
|
|
32
|
+
export type IconName = ${n||"string"};
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
declare module '@/src/components/ui/icon/Icon.vue' {
|
|
36
|
-
export type IconName = ${
|
|
36
|
+
export type IconName = ${n||"string"};
|
|
37
37
|
}
|
|
38
|
-
`,$=
|
|
39
|
-
`);let
|
|
40
|
-
Please add "ff-id" to your frontfriend.config.js file`,"ff-id");console.log("\u{1F4CB} Configuration loaded"),console.log(` FF_ID: ${
|
|
41
|
-
`);let
|
|
42
|
-
`):
|
|
38
|
+
`,$=N.dirname(e);P.existsSync($)||P.mkdirSync($,{recursive:!0}),P.writeFileSync(e,p),console.log("[FrontFriend] \u2713 Generated types at",N.relative(i,e));let I=N.join(i,"tsconfig.json");if(P.existsSync(I)){let a=JSON.parse(P.readFileSync(I,"utf-8"));a.include||(a.include=[]);let d="types/**/*.d.ts";a.include.includes(d)||(a.include.push(d),P.writeFileSync(I,JSON.stringify(a,null,2)),console.log("[FrontFriend] \u2713 Updated tsconfig.json to include generated types"))}}catch(l){console.error("[FrontFriend] Error generating icon types:",l.message),process.exit(1)}}require.main===E&&M();E.exports={generateIconTypes:M}});var{Command:G}=require("commander"),O=require("./lib/core/config-loader"),U=require("./lib/core/cache-manager"),{APIClient:J}=require("./lib/core/api-client"),{ComponentDownloader:A}=require("./lib/core/component-downloader"),B=require("./lib/core/token-processor"),{ConfigError:R,APIError:H,CacheError:V}=require("./lib/core/errors"),{loadEnvLocal:Y}=require("./lib/core/env-utils"),L=require("path");Y();var b=new G;b.name("frontfriend").description("FrontFriend Tailwind CLI - Manage design tokens and cache").version("2.4.0");b.command("init").description("Initialize FrontFriend configuration and fetch from API").option("--force","Force refresh even if cache is valid").option("--verbose","Show detailed output including safelist size and token counts").action(async t=>{var i;try{console.log("\u{1F527} FrontFriend Setup"),console.log(`==================
|
|
39
|
+
`);let e=await new O().load();if(!e.ffId)throw new R(`ff-id not found in frontfriend.config.js
|
|
40
|
+
Please add "ff-id" to your frontfriend.config.js file`,"ff-id");console.log("\u{1F4CB} Configuration loaded"),console.log(` FF_ID: ${e.ffId}`),console.log(` App Root: ${e.appRoot}
|
|
41
|
+
`);let f=new U(e.appRoot);!t.force&&f.exists()&&f.isValid()&&(console.log("\u2705 Cache is valid and up to date"),console.log(" Use --force to refresh anyway"),process.exit(0)),console.log("\u{1F50D} Checking cache..."),t.force?console.log(` Force refresh requested
|
|
42
|
+
`):f.exists()?console.log(` Cache expired
|
|
43
43
|
`):console.log(` No cache found
|
|
44
|
-
`),console.log("\u{1F310} Fetching configuration...");let
|
|
45
|
-
`),console.log("\
|
|
46
|
-
`)
|
|
47
|
-
\u{
|
|
48
|
-
`)
|
|
49
|
-
|
|
50
|
-
`);let
|
|
51
|
-
`),console.log("\
|
|
52
|
-
|
|
53
|
-
`)
|
|
54
|
-
|
|
55
|
-
`);let
|
|
56
|
-
`);let
|
|
57
|
-
|
|
58
|
-
`);let
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
`
|
|
62
|
-
|
|
63
|
-
`)
|
|
64
|
-
|
|
65
|
-
\u{
|
|
66
|
-
\
|
|
67
|
-
\
|
|
68
|
-
\
|
|
69
|
-
|
|
70
|
-
\u{
|
|
71
|
-
\u{
|
|
72
|
-
\
|
|
44
|
+
`),console.log("\u{1F310} Fetching configuration...");let g=new J(e.ffId,{baseURL:e["api-url"]||e.apiUrl});(e["api-url"]||e.apiUrl)&&console.log(` Using API URL: ${e["api-url"]||e.apiUrl}`);let l=null;try{l=await g.fetchProcessedTokens()}catch(s){console.log(` \u26A0\uFE0F Failed to fetch pre-processed tokens: ${s.message}`)}if(l){if(console.log(" \u2713 Pre-processed tokens fetched from server"),console.log(` \u2713 Skipping local processing
|
|
45
|
+
`),(!((i=l.tokens)!=null&&i.fontFamily)||Object.keys(l.tokens.fontFamily).length===0)&&(console.log("\u26A0\uFE0F Warning: No font family utilities found"),console.log(" Font classes like font-primary and font-secondary will not be available"),l.globalTokens?console.log(` Global tokens are present - font processor may need to be updated
|
|
46
|
+
`):console.log(` Consider adding font family tokens to your design system
|
|
47
|
+
`)),console.log("\u{1F4BE} Saving cache..."),(process.env.FF_VERBOSE==="true"||t.verbose)&&console.log(` Safelist has ${l.safelist?l.safelist.length:0} items`),f.save(l),console.log(` \u2713 Cache saved successfully
|
|
48
|
+
`),console.log("\u2705 Setup complete!"),console.log(" Your FrontFriend configuration has been cached."),console.log(" The Tailwind plugin will now use this cached data."),e.types){console.log(`
|
|
49
|
+
\u{1F524} Generating TypeScript types...`);try{let{generateIconTypes:s}=q(),w=e.aliases&&e.aliases.types?L.join(e.appRoot,e.aliases.types,"frontfriend.d.ts"):void 0;s({projectRoot:e.appRoot,outputPath:w})}catch(s){console.log(" \u26A0\uFE0F Type generation failed:",s.message),console.log(' Enable type generation in frontfriend.config.js with "types": true')}}process.exit(0)}console.log(` \u2139\uFE0F Pre-processed tokens not available, falling back to local processing
|
|
50
|
+
`);let[r,m,F,n,p,$]=await Promise.all([g.fetchTokens(),g.fetchComponentsConfig(),g.fetchFonts(),g.fetchIcons(),g.fetchVersion(),g.fetchCustomCss()]);if(console.log(" \u2713 Tokens fetched"),r.global||r.colors||r.semantic||r.semanticDark){let s=[r.global?"global":null,r.colors?"colors":null,r.semantic?"semantic":null,r.semanticDark?"semanticDark":null].filter(Boolean).join(", ");console.log(` (Found: ${s})`)}console.log(" \u2713 Components config fetched"),console.log(" \u2713 Fonts fetched"),console.log(" \u2713 Icons fetched"),console.log(" \u2713 Version fetched"),console.log(` \u2713 Custom CSS fetched
|
|
51
|
+
`),console.log("\u2699\uFE0F Processing tokens...");let I=new B;console.log(" Processing raw token data...");let a=await I.process({colors:r.colors||r.global,semantic:r.semantic,semanticDark:r.semanticDark,fonts:F,globalTokens:r.global,animations:r.animations,version:p==null?void 0:p.version,ffId:e.ffId,customCss:$});console.log(" \u2713 Colors processed"),console.log(" \u2713 Semantic tokens processed"),a.fontFaces.length>0&&console.log(` \u2713 ${a.fontFaces.length} font faces processed`),Object.keys(a.animations).length>0&&console.log(` \u2713 ${Object.keys(a.animations).length} animations processed`),console.log(`
|
|
52
|
+
`);let d=I.extractClassesFromComponentsConfig(m),S=[...a.safelist||[],...d||[]],D=[...new Set(S)].sort(),c={tokens:a.utilities,variables:a.variables,semanticVariables:a.semanticVariables,semanticDarkVariables:a.semanticDarkVariables,fonts:a.fontFaces,icons:n,componentsConfig:m,keyframes:a.keyframes,animations:a.animations,safelist:D,version:p,metadata:a.metadata,custom:a.custom};if(console.log("\u{1F4BE} Saving cache..."),(process.env.FF_VERBOSE==="true"||t.verbose)&&(console.log(" Cache data summary:"),console.log(` - Tokens: ${Object.keys(c.tokens||{}).length} utilities`),console.log(` - Variables: ${Object.keys(c.variables||{}).length} CSS variables`),console.log(` - Semantic variables: ${Object.keys(c.semanticVariables||{}).length} semantic variables`),console.log(` - Font faces: ${(c.fonts||[]).length} fonts`),console.log(` - Safelist: ${(c.safelist||[]).length} safelist classes`)),f.save(c),console.log(` \u2713 Cache saved successfully
|
|
53
|
+
`),console.log("\u2705 Setup complete!"),console.log(" Your FrontFriend configuration has been cached."),console.log(" The Tailwind plugin will now use this cached data."),e.types){console.log(`
|
|
54
|
+
\u{1F524} Generating TypeScript types...`);try{let{generateIconTypes:s}=q(),w=e.aliases&&e.aliases.types?L.join(e.appRoot,e.aliases.types,"frontfriend.d.ts"):void 0;s({projectRoot:e.appRoot,outputPath:w})}catch(s){console.log(" \u26A0\uFE0F Type generation failed:",s.message),console.log(' Enable type generation in frontfriend.config.js with "types": true')}}process.exit(0)}catch(o){o instanceof R?console.error("\u274C Configuration Error:",o.message):o instanceof H?(console.error("\u274C API Error:",o.message),console.error(` Status: ${o.statusCode}`),console.error(` URL: ${o.url}`)):o instanceof V?(console.error("\u274C Cache Error:",o.message),console.error(` Operation: ${o.operation}`)):console.error("\u274C Setup failed:",o.message),process.exit(1)}});b.command("clean").description("Remove cached configuration").action(async()=>{try{console.log(`\u{1F9F9} Cleaning FrontFriend cache...
|
|
55
|
+
`);let i=new O().load(),o=new U(i.appRoot);o.exists()?(o.clear(),console.log("\u2705 Cache cleared successfully")):console.log("\u2139\uFE0F No cache found"),process.exit(0)}catch(t){t instanceof V?(console.error("\u274C Cache Error:",t.message),console.error(` Operation: ${t.operation}`)):console.error("\u274C Clean failed:",t.message),process.exit(1)}});b.command("status").description("Show cache status and configuration").action(async()=>{try{console.log("\u{1F4CA} FrontFriend Status"),console.log(`===================
|
|
56
|
+
`),console.log("Package:"),console.log(" Version: 2.4.0"),console.log("");let i=await new O().load();console.log("Configuration:"),console.log(` FF_ID: ${i.ffId||"Not set"}`),console.log(` App Root: ${i.appRoot}
|
|
57
|
+
`);let o=new U(i.appRoot),e=o.getCacheDir();if(console.log("Cache:"),console.log(` Directory: ${L.relative(process.cwd(),e)}`),o.exists()){console.log(` Status: ${o.isValid()?"\u2705 Valid":"\u26A0\uFE0F Expired"}`);let f=o.load();if(f&&f.metadata){let g=new Date(f.metadata.timestamp);console.log(` Created: ${g.toLocaleString()}`),console.log(` Format Version: ${f.metadata.version||"Unknown"}`)}}else console.log(" Status: \u274C Not found");process.exit(0)}catch(t){t instanceof R?console.error("\u274C Configuration Error:",t.message):t instanceof V?(console.error("\u274C Cache Error:",t.message),console.error(` Operation: ${t.operation}`)):console.error("\u274C Status check failed:",t.message),process.exit(1)}});b.command("download").description("Download components from registry").argument("<components...>",'component names to download (or "all" to download all components)').option("-f, --framework <framework>","Framework to download components for (react/vue)").option("-o, --output <path>","Output directory for components").option("--overwrite","Overwrite existing files").action(async(t,i)=>{try{console.log(`\u{1F4E6} Downloading components...
|
|
58
|
+
`);let e=await new O().load();if(!e.ffId)throw new R(`ff-id not found in frontfriend.config.js
|
|
59
|
+
Please add "ff-id" to your frontfriend.config.js file`,"ff-id");let f=new A({appRoot:e.appRoot,config:e,framework:i.framework,outputPath:i.output,overwrite:i.overwrite}),g=t;if(t.length===1&&t[0].toLowerCase()==="all"){let r=await f.getAllComponents(),m=await f.getCustomComponents();process.env.FF_DEBUG&&console.log(`Debug: Found ${m.length} custom components: ${m.join(", ")}`),r.length===0&&(console.error("\u274C Failed to fetch component list"),process.exit(1));let F=new Set(m),n=r.filter(p=>!F.has(p));g=[...m,...n],console.log("\u{1F4CB} Configuration"),console.log(` Framework: ${f.framework}`),console.log(` Output: ${f.outputPath}`),console.log(` Components: All ${g.length} components`),process.env.FF_DEBUG&&m.length>0&&console.log(` Debug: ${m.length} custom components will override standard ones`),console.log("")}else console.log("\u{1F4CB} Configuration"),console.log(` Framework: ${f.framework}`),console.log(` Output: ${f.outputPath}`),console.log(` Components: ${t.join(", ")}
|
|
60
|
+
`);let l=await f.downloadComponents(g);l.successful.length>0&&(console.log(`
|
|
61
|
+
\u2705 Download complete!`),console.log(` Downloaded: ${l.successful.length} components`)),l.failed.length>0&&(console.log(""),l.failed.forEach(r=>{r.error.includes("not found")?console.log(`\u274C ${r.error}`):console.log(`\u274C Failed to download ${r.component}: ${r.error}`)})),l.successful.length>0&&l.dependencies.length>0&&(console.log(`
|
|
62
|
+
\u{1F4E6} Install dependencies:`),console.log(` npm install ${l.dependencies.join(" ")}`)),l.successful.length===0&&l.failed.length>0&&process.exit(1),process.exit(0)}catch(o){o instanceof R?(console.error("\u274C Configuration Error:",o.message),o.missingKey&&console.error(` Missing key: ${o.missingKey}`)):console.error("\u274C Download failed:",o.message),process.exit(1)}});b.command("add").description("Add generated pages from Frontfriend platform").argument("<type>","Type of resource to add (page or project)").argument("<id>","ID of the resource").option("--name <name>","Component name for the page").option("--path <path>","Output path (overrides aliases.pages)").option("--force","Overwrite existing files").option("--pages <ids>","Specific page IDs for project (comma-separated)").option("--all","Add all pages from project").action(async(t,i,o)=>{var e,f,g,l,r,m;try{console.log(`\u{1F680} Frontfriend Add
|
|
63
|
+
`);let n=await new O().load();if(!n.ffId)throw new R(`ff-id not found in frontfriend.config.js
|
|
64
|
+
Please add "ff-id" to your frontfriend.config.js file`,"ff-id");let p=require("fs"),$=require("path"),I=require("https"),a=require("http"),{URL:d}=require("url"),S=c=>new Promise((s,w)=>{let v=new d(c),C=v.protocol==="https:",T=C?I:a,k={hostname:v.hostname,port:v.port||(C?443:80),path:v.pathname+v.search,method:"GET",headers:{Accept:"application/json"}};T.get(k,y=>{let h="";y.on("data",u=>h+=u),y.on("end",()=>{if(y.statusCode===200)try{s(JSON.parse(h))}catch{w(new Error("Invalid JSON response"))}else try{let u=JSON.parse(h);w(new Error(u.error||`HTTP ${y.statusCode}`))}catch{w(new Error(`HTTP ${y.statusCode}: ${h}`))}})}).on("error",w)}),D=n["api-url"]||n.apiUrl||"https://app.frontfriend.dev";if(t==="page"){console.log("\u{1F4CB} Configuration"),console.log(` FF_ID: ${n.ffId}`),console.log(` Page ID: ${i}`);let c=o.path||((e=n.aliases)==null?void 0:e.pages)||"src/pages";console.log(` Output: ${c}
|
|
65
|
+
`),console.log("\u{1F310} Fetching page...");let s=await S(`${D}/api/export/pages/${i}?ffId=${n.ffId}`);if(console.log(` \u2713 Page fetched: ${s.name}`),s.components&&s.components.length>0){console.log(`
|
|
66
|
+
\u{1F4E6} Checking UI components...`);let y=new A({appRoot:n.appRoot,config:n,framework:n.framework||"react"}),h=((g=(f=n.aliases)==null?void 0:f.ui)==null?void 0:g.replace("@/",""))||"src/components/ui",u=[];for(let x of s.components){let j=$.join(n.appRoot,h,x);p.existsSync(j)||p.existsSync(j+".tsx")||p.existsSync(j+".jsx")||p.existsSync(j+".vue")||u.push(x)}if(u.length>0){console.log(` Missing components: ${u.join(", ")}`),console.log(" Downloading missing components...");let x=await y.downloadComponents(u);x.successful.length>0&&console.log(` \u2713 Downloaded ${x.successful.length} components`)}else console.log(" \u2713 All required components present")}console.log(`
|
|
67
|
+
\u{1F4BE} Writing page file...`);let w=o.name?`${o.name}.tsx`:`${s.componentName}.tsx`,v=c.startsWith("@/")?c.replace("@/",""):c,C=$.join(n.appRoot,v,w);p.existsSync(C)&&!o.force&&(console.error(`
|
|
68
|
+
\u274C File already exists: ${C}`),console.error(" Use --force to overwrite"),process.exit(1));let T=$.dirname(C);p.existsSync(T)||p.mkdirSync(T,{recursive:!0}),p.writeFileSync(C,s.code),console.log(` \u2713 Created: ${$.relative(n.appRoot,C)}`),console.log(`
|
|
69
|
+
\u2705 Page added successfully!`),console.log(` Component: ${s.componentName}`),console.log(` Location: ${$.relative(n.appRoot,C)}`),console.log(`
|
|
70
|
+
\u{1F4DA} Import in your app:`);let k;c.startsWith("@/")?k=`${c}/${s.componentName}`:c.startsWith("src/")?k=`@/${c.substring(4)}/${s.componentName}`:k=`@/${c}/${s.componentName}`,console.log(` import ${s.componentName} from '${k}';`)}else if(t==="project"){!o.all&&!o.pages&&(console.error("\u274C Please specify --all or --pages <ids>"),process.exit(1)),console.log("\u{1F4CB} Configuration"),console.log(` FF_ID: ${n.ffId}`),console.log(` Project ID: ${i}`);let c=o.path||((l=n.aliases)==null?void 0:l.pages)||"src/pages";console.log(` Output: ${c}
|
|
71
|
+
`),console.log("\u{1F310} Fetching project pages...");let s=await S(`${D}/api/export/projects/${i}?ffId=${n.ffId}`);console.log(` \u2713 Project fetched: ${s.projectTitle}`),console.log(` \u2713 Found ${s.pages.length} pages`);let w=s.pages;if(o.pages){let y=o.pages.split(",").map(h=>h.trim());w=s.pages.filter(h=>y.includes(h.id)),console.log(` \u2713 Adding ${w.length} specific pages`)}if(s.components&&s.components.length>0){console.log(`
|
|
72
|
+
\u{1F4E6} Checking UI components...`);let y=new A({appRoot:n.appRoot,config:n,framework:n.framework||"react"}),h=((m=(r=n.aliases)==null?void 0:r.ui)==null?void 0:m.replace("@/",""))||"src/components/ui",u=[];for(let x of s.components){let j=$.join(n.appRoot,h,x);p.existsSync(j)||p.existsSync(j+".tsx")||p.existsSync(j+".jsx")||p.existsSync(j+".vue")||u.push(x)}if(u.length>0){console.log(` Missing components: ${u.join(", ")}`),console.log(" Downloading missing components...");let x=await y.downloadComponents(u);x.successful.length>0&&console.log(` \u2713 Downloaded ${x.successful.length} components`)}else console.log(" \u2713 All required components present")}console.log(`
|
|
73
|
+
\u{1F4BE} Writing page files...`);let v=c.startsWith("@/")?c.replace("@/",""):c,C=$.join(n.appRoot,v);p.existsSync(C)||p.mkdirSync(C,{recursive:!0});let T=0,k=0;for(let y of w){let h=`${y.componentName}.tsx`,u=$.join(C,h);if(p.existsSync(u)&&!o.force){console.log(` \u26A0\uFE0F Skipped (exists): ${h}`),k++;continue}p.writeFileSync(u,y.code),console.log(` \u2713 Created: ${h}`),T++}console.log(`
|
|
74
|
+
\u2705 Project pages added!`),console.log(` Added: ${T} pages`),k>0&&(console.log(` Skipped: ${k} pages (already exist)`),console.log(" Use --force to overwrite existing files"))}else console.error(`\u274C Unknown type: ${t}`),console.error(' Use "page" or "project"'),process.exit(1);process.exit(0)}catch(F){F instanceof R?console.error("\u274C Configuration Error:",F.message):console.error("\u274C Failed:",F.message),process.exit(1)}});b.parse(process.argv);process.argv.slice(2).length||(b.outputHelp(),process.exit(0));
|
|
73
75
|
//# sourceMappingURL=cli-temp.js.map
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var y=(e,
|
|
2
|
-
`);let r;for(;(r=B.exec(i))!=null;){let
|
|
3
|
-
`),a=a.replace(/\\r/g,"\r")),t[l]=a}return t}function z(e){e=e||{};let t=j(e);e.path=t;let i=d.configDotenv(e);if(!i.parsed){let o=new Error(`MISSING_DATA: Cannot parse ${t} for an unknown reason`);throw o.code="MISSING_DATA",o}let r=k(e).split(","),l=r.length,a;for(let o=0;o<l;o++)try{let u=r[o].trim(),n=X(i,u);a=d.decrypt(n.ciphertext,n.key);break}catch(u){if(o+1>=l)throw u}return d.parse(a)}function H(e){console.log(`[dotenv@${E}][WARN] ${e}`)}function w(e){console.log(`[dotenv@${E}][DEBUG] ${e}`)}function $(e){console.log(`[dotenv@${E}] ${e}`)}function k(e){return e&&e.DOTENV_KEY&&e.DOTENV_KEY.length>0?e.DOTENV_KEY:process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0?process.env.DOTENV_KEY:""}function X(e,t){let i;try{i=new URL(t)}catch(u){if(u.code==="ERR_INVALID_URL"){let n=new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development");throw n.code="INVALID_DOTENV_KEY",n}throw u}let r=i.password;if(!r){let u=new Error("INVALID_DOTENV_KEY: Missing key part");throw u.code="INVALID_DOTENV_KEY",u}let l=i.searchParams.get("environment");if(!l){let u=new Error("INVALID_DOTENV_KEY: Missing environment part");throw u.code="INVALID_DOTENV_KEY",u}let a=`DOTENV_VAULT_${l.toUpperCase()}`,o=e.parsed[a];if(!o){let u=new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${a} in your .env.vault file.`);throw u.code="NOT_FOUND_DOTENV_ENVIRONMENT",u}return{ciphertext:o,key:r}}function j(e){let t=null;if(e&&e.path&&e.path.length>0)if(Array.isArray(e.path))for(let i of e.path)_.existsSync(i)&&(t=i.endsWith(".vault")?i:`${i}.vault`);else t=e.path.endsWith(".vault")?e.path:`${e.path}.vault`;else t=b.resolve(process.cwd(),".env.vault");return _.existsSync(t)?t:null}function O(e){return e[0]==="~"?b.join(J.homedir(),e.slice(1)):e}function Z(e){let t=!!(e&&e.debug),i=e&&"quiet"in e?e.quiet:!0;(t||!i)&&$("Loading env from encrypted .env.vault");let r=d._parseVault(e),l=process.env;return e&&e.processEnv!=null&&(l=e.processEnv),d.populate(l,r,e),{parsed:r}}function ee(e){let t=b.resolve(process.cwd(),".env"),i="utf8",r=!!(e&&e.debug),l=e&&"quiet"in e?e.quiet:!0;e&&e.encoding?i=e.encoding:r&&w("No encoding is specified. UTF-8 is used by default");let a=[t];if(e&&e.path)if(!Array.isArray(e.path))a=[O(e.path)];else{a=[];for(let s of e.path)a.push(O(s))}let o,u={};for(let s of a)try{let c=d.parse(_.readFileSync(s,{encoding:i}));d.populate(u,c,e)}catch(c){r&&w(`Failed to load ${s} ${c.message}`),o=c}let n=process.env;if(e&&e.processEnv!=null&&(n=e.processEnv),d.populate(n,u,e),r||!l){let s=Object.keys(u).length,c=[];for(let f of a)try{let p=b.relative(process.cwd(),f);c.push(p)}catch(p){r&&w(`Failed to load ${f} ${p.message}`),o=p}$(`injecting env (${s}) from ${c.join(",")}`)}return o?{parsed:u,error:o}:{parsed:u}}function te(e){if(k(e).length===0)return d.configDotenv(e);let t=j(e);return t?d._configVault(e):(H(`You set DOTENV_KEY but you are missing a .env.vault file at ${t}. Did you forget to build it?`),d.configDotenv(e))}function ne(e,t){let i=Buffer.from(t.slice(-64),"hex"),r=Buffer.from(e,"base64"),l=r.subarray(0,12),a=r.subarray(-16);r=r.subarray(12,-16);try{let o=G.createDecipheriv("aes-256-gcm",i,l);return o.setAuthTag(a),`${o.update(r)}${o.final()}`}catch(o){let u=o instanceof RangeError,n=o.message==="Invalid key length",s=o.message==="Unsupported state or unable to authenticate data";if(u||n){let c=new Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)");throw c.code="INVALID_DOTENV_KEY",c}else if(s){let c=new Error("DECRYPTION_FAILED: Please check your DOTENV_KEY");throw c.code="DECRYPTION_FAILED",c}else throw o}}function re(e,t,i={}){let r=!!(i&&i.debug),l=!!(i&&i.override);if(typeof t!="object"){let a=new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");throw a.code="OBJECT_REQUIRED",a}for(let a of Object.keys(t))Object.prototype.hasOwnProperty.call(e,a)?(l===!0&&(e[a]=t[a]),r&&w(l===!0?`"${a}" is already defined and WAS overwritten`:`"${a}" is already defined and was NOT overwritten`)):e[a]=t[a]}var d={configDotenv:ee,_configVault:Z,_parseVault:z,config:te,decrypt:ne,parse:Q,populate:re};v.exports.configDotenv=d.configDotenv;v.exports._configVault=d._configVault;v.exports._parseVault=d._parseVault;v.exports.config=d.config;v.exports.decrypt=d.decrypt;v.exports.parse=d.parse;v.exports.populate=d.populate;v.exports=d});var S=y((ge,T)=>{var oe=require("path"),{fileExists:ie}=D();function ae(e=process.cwd()){let t=oe.join(e,".env.local");return ie(t)?(V().config({path:t}),console.log("\u{1F4C4} Loaded .env.local"),!0):!1}function se(e,t=void 0){return process.env[e]||t}function ce(e){return process.env[e]==="true"}T.exports={loadEnvLocal:ae,getEnvVar:se,isEnvTrue:ce}});var I=y((me,C)=>{C.exports=function(t){if(!t)return{};if(typeof t!="object")throw new Error("Config must be an object");return t}});var le=require("tailwindcss/plugin"),x;try{x=require("postcss")}catch{x=null}var g;if(typeof window>"u"&&typeof process<"u"&&process.versions&&process.versions.node){g=require("./lib/core/cache-manager");let{loadEnvLocal:e}=S();e()}function A(e){return Object.fromEntries(Object.entries(e).filter(([t])=>t!=="DEFAULT"))}var ue=le.withOptions(function(e={}){return function({addBase:t,addUtilities:i,theme:r,matchUtilities:l}){if(!g)return;let a=new g(process.cwd());if(!a.exists()){console.warn('[FrontFriend] No cache found. Please run "npx frontfriend init" first.');return}a.isValid()||console.warn('[FrontFriend] Cache is expired. Please run "npx frontfriend init" to refresh.');let o=a.load();if(!o){console.error("[FrontFriend] Failed to load cache.");return}let u={};if(o.variables)for(let[n,s]of Object.entries(o.variables))n.startsWith("--color-")&&!s.startsWith("hsl(")?u[n]=`hsl(${s})`:u[n]=s;if(o.semanticVariables)for(let[n,s]of Object.entries(o.semanticVariables))u[n]=s;if(t({":root":u}),o.semanticDarkVariables&&Object.keys(o.semanticDarkVariables).length>0&&(t({":root:not(.light)":o.semanticDarkVariables}),t({":root:not(.dark)":o.semanticVariables})),o.semanticVariables){let n={};for(let[s]of Object.entries(o.semanticVariables)){let c=s.match(/^--(bg|text|border|layer|overlay|icon)-(.+)$/);if(c){let[,f,p]=c,h=`.${f}-${p}`;f==="bg"||f==="layer"||f==="overlay"?n[h]={backgroundColor:`var(${s})`}:f==="text"?n[h]={color:`var(${s})`}:f==="border"?n[h]={borderColor:`var(${s})`}:f==="icon"&&(n[`.text-${f}-${p}`]={color:`var(${s})`},n[`.fill-${f}-${p}`]={fill:`var(${s})`})}}i(n)}if(o.tokens){if(o.tokens.backgroundColor){let n={};for(let[s,c]of Object.entries(o.tokens.backgroundColor))n[`.bg-${s}`]={backgroundColor:c};i(n)}if(o.tokens.textColor){let n={};for(let[s,c]of Object.entries(o.tokens.textColor))n[`.text-${s}`]={color:c};i(n)}if(o.tokens.borderColor){let n={};for(let[s,c]of Object.entries(o.tokens.borderColor))n[`.border-${s}`]={borderColor:c};i(n)}if(o.tokens.fill){let n={},s={};for(let[c,f]of Object.entries(o.tokens.fill))n[`.fill-${c}`]={fill:f},c.startsWith("icon-")&&(s[`.text-${c}`]={color:f});i(n),i(s)}if(o.tokens.fontFamily){let n={};for(let[s,c]of Object.entries(o.tokens.fontFamily))n[`.font-${s}`]={fontFamily:c};i(n)}}if(o.fonts&&o.fonts.length>0&&o.fonts.forEach(n=>{t({"@font-face":n})}),i({"@keyframes enter":r("keyframes.enter"),"@keyframes exit":r("keyframes.exit"),".animate-in":{animationName:"enter",animationDuration:r("animationDuration.DEFAULT"),"--tw-enter-opacity":"initial","--tw-enter-scale":"initial","--tw-enter-rotate":"initial","--tw-enter-translate-x":"initial","--tw-enter-translate-y":"initial"},".animate-out":{animationName:"exit",animationDuration:r("animationDuration.DEFAULT"),"--tw-exit-opacity":"initial","--tw-exit-scale":"initial","--tw-exit-rotate":"initial","--tw-exit-translate-x":"initial","--tw-exit-translate-y":"initial"}}),l({"fade-in":n=>({"--tw-enter-opacity":n}),"fade-out":n=>({"--tw-exit-opacity":n})},{values:r("animationOpacity")}),l({"zoom-in":n=>({"--tw-enter-scale":n}),"zoom-out":n=>({"--tw-exit-scale":n})},{values:r("animationScale")}),l({"spin-in":n=>({"--tw-enter-rotate":n}),"spin-out":n=>({"--tw-exit-rotate":n})},{values:r("animationRotate")}),l({"slide-in-from-top":n=>({"--tw-enter-translate-y":`-${n}`}),"slide-in-from-bottom":n=>({"--tw-enter-translate-y":n}),"slide-in-from-left":n=>({"--tw-enter-translate-x":`-${n}`}),"slide-in-from-right":n=>({"--tw-enter-translate-x":n}),"slide-out-to-top":n=>({"--tw-exit-translate-y":`-${n}`}),"slide-out-to-bottom":n=>({"--tw-exit-translate-y":n}),"slide-out-to-left":n=>({"--tw-exit-translate-x":`-${n}`}),"slide-out-to-right":n=>({"--tw-exit-translate-x":n})},{values:r("animationTranslate")}),l({duration:n=>({animationDuration:n})},{values:A(r("animationDuration"))}),l({delay:n=>({animationDelay:n})},{values:r("animationDelay")}),l({ease:n=>({animationTimingFunction:n})},{values:A(r("animationTimingFunction"))}),i({".running":{animationPlayState:"running"},".paused":{animationPlayState:"paused"}}),l({"fill-mode":n=>({animationFillMode:n})},{values:r("animationFillMode")}),l({direction:n=>({animationDirection:n})},{values:r("animationDirection")}),l({repeat:n=>({animationIterationCount:n})},{values:r("animationRepeat")}),o.custom&&o.custom.raw&&typeof o.custom.raw=="string"){let n=o.custom.raw.trim();if(!n){e.verbose&&console.warn("[FrontFriend] Empty custom CSS");return}if(!x){console.warn("[FrontFriend] PostCSS not available - custom CSS will not be added");return}try{let s=x.parse(n),c=[],f=[];s.each(p=>{if(p.type==="atrule"){c.push(p);return}if(p.type==="rule"){typeof p.selector=="string"&&p.selector.trim().startsWith(".")?f.push(p):c.push(p);return}p.type!=="comment"&&c.push(p)}),c.length>0&&t(c),f.length>0&&i(f),e.verbose&&console.log(`[FrontFriend] Added custom CSS: ${c.length} base rules, ${f.length} utility classes`)}catch(s){console.error("[FrontFriend] Failed to parse custom CSS:",s.message)}}e.verbose&&(console.log("[FrontFriend] Plugin loaded successfully"),console.log(`[FrontFriend] Colors: ${Object.keys(o.variables||{}).length}`),console.log(`[FrontFriend] Semantic vars: ${Object.keys(o.semanticVariables||{}).length}`),console.log(`[FrontFriend] Fonts: ${(o.fonts||[]).length}`),console.log(`[FrontFriend] Safelist classes: ${Array.isArray(o.safelist)?o.safelist.length:0}`))}},function(e={}){let t=null;if(g){let r=new g(process.cwd());t=r.exists()?r.load():null}let i=["./pages/**/*.{js,ts,jsx,tsx}","./components/**/*.{js,ts,jsx,tsx}","./app/**/*.{js,ts,jsx,tsx}","./src/**/*.{js,ts,jsx,tsx}","./stories/**/*.{js,ts,jsx,tsx}"];return e.verbose&&t&&(console.log("[FrontFriend] Cache loaded successfully"),t.safelist&&Array.isArray(t.safelist)&&console.log(`[FrontFriend] Loading ${t.safelist.length} classes for safelist`)),{theme:{extend:{colors:e.extendColors||{},animation:e.extendAnimations||{},spacing:{18:"4.5rem",88:"22rem",128:"32rem"},boxShadow:{"top-sm":"0 -1px 1px 0 rgba(0, 0, 0, 0.05)"},borderRadius:{"2xl":"1rem"},animationDelay:({theme:r})=>({...r("transitionDelay")}),animationDuration:({theme:r})=>({0:"0ms",...r("transitionDuration")}),animationTimingFunction:({theme:r})=>({...r("transitionTimingFunction")}),animationFillMode:{none:"none",forwards:"forwards",backwards:"backwards",both:"both"},animationDirection:{normal:"normal",reverse:"reverse",alternate:"alternate","alternate-reverse":"alternate-reverse"},animationOpacity:({theme:r})=>({DEFAULT:0,...r("opacity")}),animationTranslate:({theme:r})=>({DEFAULT:"100%",...r("translate")}),animationScale:({theme:r})=>({DEFAULT:0,...r("scale")}),animationRotate:({theme:r})=>({DEFAULT:"30deg",...r("rotate")}),animationRepeat:{0:"0",1:"1",infinite:"infinite"},keyframes:{enter:{from:{opacity:"var(--tw-enter-opacity, 1)",transform:"translate3d(var(--tw-enter-translate-x, 0), var(--tw-enter-translate-y, 0), 0) scale3d(var(--tw-enter-scale, 1), var(--tw-enter-scale, 1), var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))"}},exit:{to:{opacity:"var(--tw-exit-opacity, 1)",transform:"translate3d(var(--tw-exit-translate-x, 0), var(--tw-exit-translate-y, 0), 0) scale3d(var(--tw-exit-scale, 1), var(--tw-exit-scale, 1), var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))"}}}}},safelist:[...(t==null?void 0:t.safelist)||[],{pattern:/(text|fill)-icon-(neutral|positive|negative|warning|info|highlight|interactive|brand|inverse|onpositive|onnegative|onwarning|oninfo|onhighlight|oninteractive|onbrand)-(mid|strong|subtle|low)(-(neutral|hover|active|selected|disabled))?$/},{pattern:/^(layer-(below|surface|raised|popover|dialog|control)|overlay-(mid|strong|subtle|low))$/}],content:e.content||i}});module.exports=ue;Object.defineProperty(module.exports,"config",{get:function(){if(typeof __FF_CONFIG__<"u")return __FF_CONFIG__;if(typeof window<"u"&&window.__FF_CONFIG__)return window.__FF_CONFIG__;if(g)try{let e=new g(process.cwd());if(e.exists()){let t=e.load();if(t)return t.componentsConfig||null}}catch{}return null}});Object.defineProperty(module.exports,"iconSet",{get:function(){if(typeof __FF_ICONS__<"u")return __FF_ICONS__;if(typeof window<"u"&&window.__FF_ICONS__)return window.__FF_ICONS__;if(g)try{let e=new g(process.cwd());if(e.exists()){let t=e.load();if(t)return t.icons||null}}catch{}return null}});module.exports.ffdc=I();
|
|
1
|
+
var y=(e,n)=>()=>(n||e((n={exports:{}}).exports,n),n.exports);var D=y((de,F)=>{var m=require("fs");function L(e){try{let n=m.readFileSync(e,"utf8");return JSON.parse(n)}catch(n){if(n.code==="ENOENT")return null;throw n}}function q(e){try{return m.readFileSync(e,"utf8")}catch(n){if(n.code==="ENOENT")return null;throw n}}function P(e,n,i=2){let r=JSON.stringify(n,null,i);m.writeFileSync(e,r,"utf8")}function R(e,n){if(n==null||typeof n=="object"&&Object.keys(n).length===0||Array.isArray(n)&&n.length===0){let r=`module.exports = ${Array.isArray(n)?"[]":"{}"};`;m.writeFileSync(e,r,"utf8")}else{let i=`module.exports = ${JSON.stringify(n,null,2)};`;m.writeFileSync(e,i,"utf8")}}function K(e){return m.existsSync(e)}function Y(e){m.mkdirSync(e,{recursive:!0})}function M(e){m.rmSync(e,{recursive:!0,force:!0})}F.exports={readJsonFileSafe:L,readFileSafe:q,writeJsonFile:P,writeModuleExportsFile:R,fileExists:K,ensureDirectoryExists:Y,removeDirectory:M}});var N=y((pe,W)=>{W.exports={name:"dotenv",version:"16.6.1",description:"Loads environment variables from .env file",main:"lib/main.js",types:"lib/main.d.ts",exports:{".":{types:"./lib/main.d.ts",require:"./lib/main.js",default:"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},scripts:{"dts-check":"tsc --project tests/types/tsconfig.json",lint:"standard",pretest:"npm run lint && npm run dts-check",test:"tap run --allow-empty-coverage --disable-coverage --timeout=60000","test:coverage":"tap run --show-full-coverage --timeout=60000 --coverage-report=text --coverage-report=lcov",prerelease:"npm test",release:"standard-version"},repository:{type:"git",url:"git://github.com/motdotla/dotenv.git"},homepage:"https://github.com/motdotla/dotenv#readme",funding:"https://dotenvx.com",keywords:["dotenv","env",".env","environment","variables","config","settings"],readmeFilename:"README.md",license:"BSD-2-Clause",devDependencies:{"@types/node":"^18.11.3",decache:"^4.6.2",sinon:"^14.0.1",standard:"^17.0.0","standard-version":"^9.5.0",tap:"^19.2.0",typescript:"^4.8.4"},engines:{node:">=12"},browser:{fs:!1}}});var V=y((ve,v)=>{var _=require("fs"),b=require("path"),J=require("os"),G=require("crypto"),U=N(),E=U.version,B=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function Q(e){let n={},i=e.toString();i=i.replace(/\r\n?/mg,`
|
|
2
|
+
`);let r;for(;(r=B.exec(i))!=null;){let f=r[1],l=r[2]||"";l=l.trim();let o=l[0];l=l.replace(/^(['"`])([\s\S]*)\1$/mg,"$2"),o==='"'&&(l=l.replace(/\\n/g,`
|
|
3
|
+
`),l=l.replace(/\\r/g,"\r")),n[f]=l}return n}function z(e){e=e||{};let n=j(e);e.path=n;let i=d.configDotenv(e);if(!i.parsed){let o=new Error(`MISSING_DATA: Cannot parse ${n} for an unknown reason`);throw o.code="MISSING_DATA",o}let r=k(e).split(","),f=r.length,l;for(let o=0;o<f;o++)try{let c=r[o].trim(),t=X(i,c);l=d.decrypt(t.ciphertext,t.key);break}catch(c){if(o+1>=f)throw c}return d.parse(l)}function H(e){console.log(`[dotenv@${E}][WARN] ${e}`)}function h(e){console.log(`[dotenv@${E}][DEBUG] ${e}`)}function $(e){console.log(`[dotenv@${E}] ${e}`)}function k(e){return e&&e.DOTENV_KEY&&e.DOTENV_KEY.length>0?e.DOTENV_KEY:process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0?process.env.DOTENV_KEY:""}function X(e,n){let i;try{i=new URL(n)}catch(c){if(c.code==="ERR_INVALID_URL"){let t=new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development");throw t.code="INVALID_DOTENV_KEY",t}throw c}let r=i.password;if(!r){let c=new Error("INVALID_DOTENV_KEY: Missing key part");throw c.code="INVALID_DOTENV_KEY",c}let f=i.searchParams.get("environment");if(!f){let c=new Error("INVALID_DOTENV_KEY: Missing environment part");throw c.code="INVALID_DOTENV_KEY",c}let l=`DOTENV_VAULT_${f.toUpperCase()}`,o=e.parsed[l];if(!o){let c=new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${l} in your .env.vault file.`);throw c.code="NOT_FOUND_DOTENV_ENVIRONMENT",c}return{ciphertext:o,key:r}}function j(e){let n=null;if(e&&e.path&&e.path.length>0)if(Array.isArray(e.path))for(let i of e.path)_.existsSync(i)&&(n=i.endsWith(".vault")?i:`${i}.vault`);else n=e.path.endsWith(".vault")?e.path:`${e.path}.vault`;else n=b.resolve(process.cwd(),".env.vault");return _.existsSync(n)?n:null}function O(e){return e[0]==="~"?b.join(J.homedir(),e.slice(1)):e}function Z(e){let n=!!(e&&e.debug),i=e&&"quiet"in e?e.quiet:!0;(n||!i)&&$("Loading env from encrypted .env.vault");let r=d._parseVault(e),f=process.env;return e&&e.processEnv!=null&&(f=e.processEnv),d.populate(f,r,e),{parsed:r}}function ee(e){let n=b.resolve(process.cwd(),".env"),i="utf8",r=!!(e&&e.debug),f=e&&"quiet"in e?e.quiet:!0;e&&e.encoding?i=e.encoding:r&&h("No encoding is specified. UTF-8 is used by default");let l=[n];if(e&&e.path)if(!Array.isArray(e.path))l=[O(e.path)];else{l=[];for(let s of e.path)l.push(O(s))}let o,c={};for(let s of l)try{let a=d.parse(_.readFileSync(s,{encoding:i}));d.populate(c,a,e)}catch(a){r&&h(`Failed to load ${s} ${a.message}`),o=a}let t=process.env;if(e&&e.processEnv!=null&&(t=e.processEnv),d.populate(t,c,e),r||!f){let s=Object.keys(c).length,a=[];for(let u of l)try{let p=b.relative(process.cwd(),u);a.push(p)}catch(p){r&&h(`Failed to load ${u} ${p.message}`),o=p}$(`injecting env (${s}) from ${a.join(",")}`)}return o?{parsed:c,error:o}:{parsed:c}}function te(e){if(k(e).length===0)return d.configDotenv(e);let n=j(e);return n?d._configVault(e):(H(`You set DOTENV_KEY but you are missing a .env.vault file at ${n}. Did you forget to build it?`),d.configDotenv(e))}function ne(e,n){let i=Buffer.from(n.slice(-64),"hex"),r=Buffer.from(e,"base64"),f=r.subarray(0,12),l=r.subarray(-16);r=r.subarray(12,-16);try{let o=G.createDecipheriv("aes-256-gcm",i,f);return o.setAuthTag(l),`${o.update(r)}${o.final()}`}catch(o){let c=o instanceof RangeError,t=o.message==="Invalid key length",s=o.message==="Unsupported state or unable to authenticate data";if(c||t){let a=new Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)");throw a.code="INVALID_DOTENV_KEY",a}else if(s){let a=new Error("DECRYPTION_FAILED: Please check your DOTENV_KEY");throw a.code="DECRYPTION_FAILED",a}else throw o}}function re(e,n,i={}){let r=!!(i&&i.debug),f=!!(i&&i.override);if(typeof n!="object"){let l=new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");throw l.code="OBJECT_REQUIRED",l}for(let l of Object.keys(n))Object.prototype.hasOwnProperty.call(e,l)?(f===!0&&(e[l]=n[l]),r&&h(f===!0?`"${l}" is already defined and WAS overwritten`:`"${l}" is already defined and was NOT overwritten`)):e[l]=n[l]}var d={configDotenv:ee,_configVault:Z,_parseVault:z,config:te,decrypt:ne,parse:Q,populate:re};v.exports.configDotenv=d.configDotenv;v.exports._configVault=d._configVault;v.exports._parseVault=d._parseVault;v.exports.config=d.config;v.exports.decrypt=d.decrypt;v.exports.parse=d.parse;v.exports.populate=d.populate;v.exports=d});var S=y((ge,T)=>{var oe=require("path"),{fileExists:ie}=D();function se(e=process.cwd()){let n=oe.join(e,".env.local");return ie(n)?(V().config({path:n}),console.log("\u{1F4C4} Loaded .env.local"),!0):!1}function ae(e,n=void 0){return process.env[e]||n}function le(e){return process.env[e]==="true"}T.exports={loadEnvLocal:se,getEnvVar:ae,isEnvTrue:le}});var I=y((me,C)=>{C.exports=function(n){if(!n)return{};if(typeof n!="object")throw new Error("Config must be an object");return n}});var ce=require("tailwindcss/plugin"),x;try{x=require("postcss")}catch{x=null}var g;if(typeof window>"u"&&typeof process<"u"&&process.versions&&process.versions.node){g=require("./lib/core/cache-manager");let{loadEnvLocal:e}=S();e()}function A(e){return Object.fromEntries(Object.entries(e).filter(([n])=>n!=="DEFAULT"))}var fe=ce.withOptions(function(e={}){return function({addBase:n,addUtilities:i,theme:r,matchUtilities:f}){if(!g)return;let l=new g(process.cwd());if(!l.exists()){console.warn('[FrontFriend] No cache found. Please run "npx frontfriend init" first.');return}l.isValid()||console.warn('[FrontFriend] Cache is expired. Please run "npx frontfriend init" to refresh.');let o=l.load();if(!o){console.error("[FrontFriend] Failed to load cache.");return}let c={};if(o.variables)for(let[t,s]of Object.entries(o.variables))t.startsWith("--color-")&&!s.startsWith("hsl(")?c[t]=`hsl(${s})`:c[t]=s;if(o.semanticVariables)for(let[t,s]of Object.entries(o.semanticVariables))typeof s=="string"&&!s.startsWith("var(")&&!s.startsWith("hsl(")&&/^\d+\s+\d+%\s+\d+%/.test(s)?c[t]=`hsl(${s})`:c[t]=s;if(n({":root":c}),o.semanticDarkVariables&&Object.keys(o.semanticDarkVariables).length>0){let t={};for(let[s,a]of Object.entries(o.semanticDarkVariables))typeof a=="string"&&!a.startsWith("var(")&&!a.startsWith("hsl(")&&/^\d+\s+\d+%\s+\d+%/.test(a)?t[s]=`hsl(${a})`:t[s]=a;n({":root:not(.light)":t}),n({":root:not(.dark)":c})}if(o.semanticVariables){let t={};for(let[s]of Object.entries(o.semanticVariables)){let a=s.match(/^--(bg|text|border|layer|overlay|icon)-(.+)$/);if(a){let[,u,p]=a,w=`.${u}-${p}`;u==="bg"||u==="layer"||u==="overlay"?t[w]={backgroundColor:`var(${s})`}:u==="text"?t[w]={color:`var(${s})`}:u==="border"?t[w]={borderColor:`var(${s})`}:u==="icon"&&(t[`.text-${u}-${p}`]={color:`var(${s})`},t[`.fill-${u}-${p}`]={fill:`var(${s})`})}}i(t)}if(o.tokens){if(o.tokens.backgroundColor){let t={};for(let[s,a]of Object.entries(o.tokens.backgroundColor))t[`.bg-${s}`]={backgroundColor:a};i(t)}if(o.tokens.textColor){let t={};for(let[s,a]of Object.entries(o.tokens.textColor))t[`.text-${s}`]={color:a};i(t)}if(o.tokens.borderColor){let t={};for(let[s,a]of Object.entries(o.tokens.borderColor))t[`.border-${s}`]={borderColor:a};i(t)}if(o.tokens.fill){let t={},s={};for(let[a,u]of Object.entries(o.tokens.fill))t[`.fill-${a}`]={fill:u},a.startsWith("icon-")&&(s[`.text-${a}`]={color:u});i(t),i(s)}if(o.tokens.fontFamily){let t={};for(let[s,a]of Object.entries(o.tokens.fontFamily))t[`.font-${s}`]={fontFamily:a};i(t)}}if(o.fonts&&o.fonts.length>0&&o.fonts.forEach(t=>{n({"@font-face":t})}),i({"@keyframes enter":r("keyframes.enter"),"@keyframes exit":r("keyframes.exit"),".animate-in":{animationName:"enter",animationDuration:r("animationDuration.DEFAULT"),"--tw-enter-opacity":"initial","--tw-enter-scale":"initial","--tw-enter-rotate":"initial","--tw-enter-translate-x":"initial","--tw-enter-translate-y":"initial"},".animate-out":{animationName:"exit",animationDuration:r("animationDuration.DEFAULT"),"--tw-exit-opacity":"initial","--tw-exit-scale":"initial","--tw-exit-rotate":"initial","--tw-exit-translate-x":"initial","--tw-exit-translate-y":"initial"}}),f({"fade-in":t=>({"--tw-enter-opacity":t}),"fade-out":t=>({"--tw-exit-opacity":t})},{values:r("animationOpacity")}),f({"zoom-in":t=>({"--tw-enter-scale":t}),"zoom-out":t=>({"--tw-exit-scale":t})},{values:r("animationScale")}),f({"spin-in":t=>({"--tw-enter-rotate":t}),"spin-out":t=>({"--tw-exit-rotate":t})},{values:r("animationRotate")}),f({"slide-in-from-top":t=>({"--tw-enter-translate-y":`-${t}`}),"slide-in-from-bottom":t=>({"--tw-enter-translate-y":t}),"slide-in-from-left":t=>({"--tw-enter-translate-x":`-${t}`}),"slide-in-from-right":t=>({"--tw-enter-translate-x":t}),"slide-out-to-top":t=>({"--tw-exit-translate-y":`-${t}`}),"slide-out-to-bottom":t=>({"--tw-exit-translate-y":t}),"slide-out-to-left":t=>({"--tw-exit-translate-x":`-${t}`}),"slide-out-to-right":t=>({"--tw-exit-translate-x":t})},{values:r("animationTranslate")}),f({duration:t=>({animationDuration:t})},{values:A(r("animationDuration"))}),f({delay:t=>({animationDelay:t})},{values:r("animationDelay")}),f({ease:t=>({animationTimingFunction:t})},{values:A(r("animationTimingFunction"))}),i({".running":{animationPlayState:"running"},".paused":{animationPlayState:"paused"}}),f({"fill-mode":t=>({animationFillMode:t})},{values:r("animationFillMode")}),f({direction:t=>({animationDirection:t})},{values:r("animationDirection")}),f({repeat:t=>({animationIterationCount:t})},{values:r("animationRepeat")}),o.custom&&o.custom.raw&&typeof o.custom.raw=="string"){let t=o.custom.raw.trim();if(!t){e.verbose&&console.warn("[FrontFriend] Empty custom CSS");return}if(!x){console.warn("[FrontFriend] PostCSS not available - custom CSS will not be added");return}try{let s=x.parse(t),a=[],u=[];s.each(p=>{if(p.type==="atrule"){a.push(p);return}if(p.type==="rule"){typeof p.selector=="string"&&p.selector.trim().startsWith(".")?u.push(p):a.push(p);return}p.type!=="comment"&&a.push(p)}),a.length>0&&n(a),u.length>0&&i(u),e.verbose&&console.log(`[FrontFriend] Added custom CSS: ${a.length} base rules, ${u.length} utility classes`)}catch(s){console.error("[FrontFriend] Failed to parse custom CSS:",s.message)}}e.verbose&&(console.log("[FrontFriend] Plugin loaded successfully"),console.log(`[FrontFriend] Colors: ${Object.keys(o.variables||{}).length}`),console.log(`[FrontFriend] Semantic vars: ${Object.keys(o.semanticVariables||{}).length}`),console.log(`[FrontFriend] Fonts: ${(o.fonts||[]).length}`),console.log(`[FrontFriend] Safelist classes: ${Array.isArray(o.safelist)?o.safelist.length:0}`))}},function(e={}){let n=null;if(g){let r=new g(process.cwd());n=r.exists()?r.load():null}let i=["./pages/**/*.{js,ts,jsx,tsx}","./components/**/*.{js,ts,jsx,tsx}","./app/**/*.{js,ts,jsx,tsx}","./src/**/*.{js,ts,jsx,tsx}","./stories/**/*.{js,ts,jsx,tsx}"];return e.verbose&&n&&(console.log("[FrontFriend] Cache loaded successfully"),n.safelist&&Array.isArray(n.safelist)&&console.log(`[FrontFriend] Loading ${n.safelist.length} classes for safelist`)),{theme:{extend:{colors:e.extendColors||{},animation:e.extendAnimations||{},spacing:{18:"4.5rem",88:"22rem",128:"32rem"},boxShadow:{"top-sm":"0 -1px 1px 0 rgba(0, 0, 0, 0.05)"},borderRadius:{"2xl":"1rem"},animationDelay:({theme:r})=>({...r("transitionDelay")}),animationDuration:({theme:r})=>({0:"0ms",...r("transitionDuration")}),animationTimingFunction:({theme:r})=>({...r("transitionTimingFunction")}),animationFillMode:{none:"none",forwards:"forwards",backwards:"backwards",both:"both"},animationDirection:{normal:"normal",reverse:"reverse",alternate:"alternate","alternate-reverse":"alternate-reverse"},animationOpacity:({theme:r})=>({DEFAULT:0,...r("opacity")}),animationTranslate:({theme:r})=>({DEFAULT:"100%",...r("translate")}),animationScale:({theme:r})=>({DEFAULT:0,...r("scale")}),animationRotate:({theme:r})=>({DEFAULT:"30deg",...r("rotate")}),animationRepeat:{0:"0",1:"1",infinite:"infinite"},keyframes:{enter:{from:{opacity:"var(--tw-enter-opacity, 1)",transform:"translate3d(var(--tw-enter-translate-x, 0), var(--tw-enter-translate-y, 0), 0) scale3d(var(--tw-enter-scale, 1), var(--tw-enter-scale, 1), var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))"}},exit:{to:{opacity:"var(--tw-exit-opacity, 1)",transform:"translate3d(var(--tw-exit-translate-x, 0), var(--tw-exit-translate-y, 0), 0) scale3d(var(--tw-exit-scale, 1), var(--tw-exit-scale, 1), var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))"}}}}},safelist:[...(n==null?void 0:n.safelist)||[],{pattern:/(text|fill)-icon-(neutral|positive|negative|warning|info|highlight|interactive|brand|inverse|onpositive|onnegative|onwarning|oninfo|onhighlight|oninteractive|onbrand)-(mid|strong|subtle|low)(-(neutral|hover|active|selected|disabled))?$/},{pattern:/^(layer-(below|surface|raised|popover|dialog|control)|overlay-(mid|strong|subtle|low))$/}],content:e.content||i}});module.exports=fe;Object.defineProperty(module.exports,"config",{get:function(){if(typeof __FF_CONFIG__<"u")return __FF_CONFIG__;if(typeof window<"u"&&window.__FF_CONFIG__)return window.__FF_CONFIG__;if(g)try{let e=new g(process.cwd());if(e.exists()){let n=e.load();if(n)return n.componentsConfig||null}}catch{}return null}});Object.defineProperty(module.exports,"iconSet",{get:function(){if(typeof __FF_ICONS__<"u")return __FF_ICONS__;if(typeof window<"u"&&window.__FF_ICONS__)return window.__FF_ICONS__;if(g)try{let e=new g(process.cwd());if(e.exists()){let n=e.load();if(n)return n.icons||null}}catch{}return null}});module.exports.ffdc=I();
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../lib/core/file-utils.js", "../../../node_modules/.pnpm/dotenv@16.6.1/node_modules/dotenv/package.json", "../../../node_modules/.pnpm/dotenv@16.6.1/node_modules/dotenv/lib/main.js", "../lib/core/env-utils.js", "../ffdc.js", "../index.js"],
|
|
4
|
-
"sourcesContent": ["const fs = require('fs');\n\n/**\n * Read a JSON file safely, returning null if file doesn't exist\n * @param {string} filepath - Path to the JSON file\n * @returns {Object|null} Parsed JSON or null if file not found\n * @throws {Error} If JSON is invalid\n */\nfunction readJsonFileSafe(filepath) {\n try {\n const content = fs.readFileSync(filepath, 'utf8');\n return JSON.parse(content);\n } catch (error) {\n if (error.code === 'ENOENT') {\n return null; // File not found, return null like API would return 404\n }\n throw error;\n }\n}\n\n/**\n * Read a file safely, returning null if file doesn't exist\n * @param {string} filepath - Path to the file\n * @returns {string|null} File content or null if file not found\n * @throws {Error} For other file system errors\n */\nfunction readFileSafe(filepath) {\n try {\n return fs.readFileSync(filepath, 'utf8');\n } catch (error) {\n if (error.code === 'ENOENT') {\n return null; // File not found\n }\n throw error;\n }\n}\n\n/**\n * Write JSON data to a file with proper formatting\n * @param {string} filepath - Path to write the file\n * @param {Object} data - Data to write\n * @param {number} indent - Indentation level (default: 2)\n */\nfunction writeJsonFile(filepath, data, indent = 2) {\n const content = JSON.stringify(data, null, indent);\n fs.writeFileSync(filepath, content, 'utf8');\n}\n\n/**\n * Write module.exports file with JSON data\n * @param {string} filepath - Path to write the file\n * @param {Object} data - Data to export\n */\nfunction writeModuleExportsFile(filepath, data) {\n // Handle empty data cases\n if (data === null || data === undefined || \n (typeof data === 'object' && Object.keys(data).length === 0) ||\n (Array.isArray(data) && data.length === 0)) {\n const emptyContent = Array.isArray(data) ? '[]' : '{}';\n const content = `module.exports = ${emptyContent};`;\n fs.writeFileSync(filepath, content, 'utf8');\n } else {\n const content = `module.exports = ${JSON.stringify(data, null, 2)};`;\n fs.writeFileSync(filepath, content, 'utf8');\n }\n}\n\n/**\n * Check if a file exists\n * @param {string} filepath - Path to check\n * @returns {boolean} True if file exists\n */\nfunction fileExists(filepath) {\n return fs.existsSync(filepath);\n}\n\n/**\n * Create directory recursively\n * @param {string} dirpath - Directory path to create\n */\nfunction ensureDirectoryExists(dirpath) {\n fs.mkdirSync(dirpath, { recursive: true });\n}\n\n/**\n * Remove directory recursively\n * @param {string} dirpath - Directory path to remove\n */\nfunction removeDirectory(dirpath) {\n fs.rmSync(dirpath, { recursive: true, force: true });\n}\n\nmodule.exports = {\n readJsonFileSafe,\n readFileSafe,\n writeJsonFile,\n writeModuleExportsFile,\n fileExists,\n ensureDirectoryExists,\n removeDirectory\n};", "{\n \"name\": \"dotenv\",\n \"version\": \"16.6.1\",\n \"description\": \"Loads environment variables from .env file\",\n \"main\": \"lib/main.js\",\n \"types\": \"lib/main.d.ts\",\n \"exports\": {\n \".\": {\n \"types\": \"./lib/main.d.ts\",\n \"require\": \"./lib/main.js\",\n \"default\": \"./lib/main.js\"\n },\n \"./config\": \"./config.js\",\n \"./config.js\": \"./config.js\",\n \"./lib/env-options\": \"./lib/env-options.js\",\n \"./lib/env-options.js\": \"./lib/env-options.js\",\n \"./lib/cli-options\": \"./lib/cli-options.js\",\n \"./lib/cli-options.js\": \"./lib/cli-options.js\",\n \"./package.json\": \"./package.json\"\n },\n \"scripts\": {\n \"dts-check\": \"tsc --project tests/types/tsconfig.json\",\n \"lint\": \"standard\",\n \"pretest\": \"npm run lint && npm run dts-check\",\n \"test\": \"tap run --allow-empty-coverage --disable-coverage --timeout=60000\",\n \"test:coverage\": \"tap run --show-full-coverage --timeout=60000 --coverage-report=text --coverage-report=lcov\",\n \"prerelease\": \"npm test\",\n \"release\": \"standard-version\"\n },\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git://github.com/motdotla/dotenv.git\"\n },\n \"homepage\": \"https://github.com/motdotla/dotenv#readme\",\n \"funding\": \"https://dotenvx.com\",\n \"keywords\": [\n \"dotenv\",\n \"env\",\n \".env\",\n \"environment\",\n \"variables\",\n \"config\",\n \"settings\"\n ],\n \"readmeFilename\": \"README.md\",\n \"license\": \"BSD-2-Clause\",\n \"devDependencies\": {\n \"@types/node\": \"^18.11.3\",\n \"decache\": \"^4.6.2\",\n \"sinon\": \"^14.0.1\",\n \"standard\": \"^17.0.0\",\n \"standard-version\": \"^9.5.0\",\n \"tap\": \"^19.2.0\",\n \"typescript\": \"^4.8.4\"\n },\n \"engines\": {\n \"node\": \">=12\"\n },\n \"browser\": {\n \"fs\": false\n }\n}\n", "const fs = require('fs')\nconst path = require('path')\nconst os = require('os')\nconst crypto = require('crypto')\nconst packageJson = require('../package.json')\n\nconst version = packageJson.version\n\nconst LINE = /(?:^|^)\\s*(?:export\\s+)?([\\w.-]+)(?:\\s*=\\s*?|:\\s+?)(\\s*'(?:\\\\'|[^'])*'|\\s*\"(?:\\\\\"|[^\"])*\"|\\s*`(?:\\\\`|[^`])*`|[^#\\r\\n]+)?\\s*(?:#.*)?(?:$|$)/mg\n\n// Parse src into an Object\nfunction parse (src) {\n const obj = {}\n\n // Convert buffer to string\n let lines = src.toString()\n\n // Convert line breaks to same format\n lines = lines.replace(/\\r\\n?/mg, '\\n')\n\n let match\n while ((match = LINE.exec(lines)) != null) {\n const key = match[1]\n\n // Default undefined or null to empty string\n let value = (match[2] || '')\n\n // Remove whitespace\n value = value.trim()\n\n // Check if double quoted\n const maybeQuote = value[0]\n\n // Remove surrounding quotes\n value = value.replace(/^(['\"`])([\\s\\S]*)\\1$/mg, '$2')\n\n // Expand newlines if double quoted\n if (maybeQuote === '\"') {\n value = value.replace(/\\\\n/g, '\\n')\n value = value.replace(/\\\\r/g, '\\r')\n }\n\n // Add to object\n obj[key] = value\n }\n\n return obj\n}\n\nfunction _parseVault (options) {\n options = options || {}\n\n const vaultPath = _vaultPath(options)\n options.path = vaultPath // parse .env.vault\n const result = DotenvModule.configDotenv(options)\n if (!result.parsed) {\n const err = new Error(`MISSING_DATA: Cannot parse ${vaultPath} for an unknown reason`)\n err.code = 'MISSING_DATA'\n throw err\n }\n\n // handle scenario for comma separated keys - for use with key rotation\n // example: DOTENV_KEY=\"dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=prod,dotenv://:key_7890@dotenvx.com/vault/.env.vault?environment=prod\"\n const keys = _dotenvKey(options).split(',')\n const length = keys.length\n\n let decrypted\n for (let i = 0; i < length; i++) {\n try {\n // Get full key\n const key = keys[i].trim()\n\n // Get instructions for decrypt\n const attrs = _instructions(result, key)\n\n // Decrypt\n decrypted = DotenvModule.decrypt(attrs.ciphertext, attrs.key)\n\n break\n } catch (error) {\n // last key\n if (i + 1 >= length) {\n throw error\n }\n // try next key\n }\n }\n\n // Parse decrypted .env string\n return DotenvModule.parse(decrypted)\n}\n\nfunction _warn (message) {\n console.log(`[dotenv@${version}][WARN] ${message}`)\n}\n\nfunction _debug (message) {\n console.log(`[dotenv@${version}][DEBUG] ${message}`)\n}\n\nfunction _log (message) {\n console.log(`[dotenv@${version}] ${message}`)\n}\n\nfunction _dotenvKey (options) {\n // prioritize developer directly setting options.DOTENV_KEY\n if (options && options.DOTENV_KEY && options.DOTENV_KEY.length > 0) {\n return options.DOTENV_KEY\n }\n\n // secondary infra already contains a DOTENV_KEY environment variable\n if (process.env.DOTENV_KEY && process.env.DOTENV_KEY.length > 0) {\n return process.env.DOTENV_KEY\n }\n\n // fallback to empty string\n return ''\n}\n\nfunction _instructions (result, dotenvKey) {\n // Parse DOTENV_KEY. Format is a URI\n let uri\n try {\n uri = new URL(dotenvKey)\n } catch (error) {\n if (error.code === 'ERR_INVALID_URL') {\n const err = new Error('INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development')\n err.code = 'INVALID_DOTENV_KEY'\n throw err\n }\n\n throw error\n }\n\n // Get decrypt key\n const key = uri.password\n if (!key) {\n const err = new Error('INVALID_DOTENV_KEY: Missing key part')\n err.code = 'INVALID_DOTENV_KEY'\n throw err\n }\n\n // Get environment\n const environment = uri.searchParams.get('environment')\n if (!environment) {\n const err = new Error('INVALID_DOTENV_KEY: Missing environment part')\n err.code = 'INVALID_DOTENV_KEY'\n throw err\n }\n\n // Get ciphertext payload\n const environmentKey = `DOTENV_VAULT_${environment.toUpperCase()}`\n const ciphertext = result.parsed[environmentKey] // DOTENV_VAULT_PRODUCTION\n if (!ciphertext) {\n const err = new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${environmentKey} in your .env.vault file.`)\n err.code = 'NOT_FOUND_DOTENV_ENVIRONMENT'\n throw err\n }\n\n return { ciphertext, key }\n}\n\nfunction _vaultPath (options) {\n let possibleVaultPath = null\n\n if (options && options.path && options.path.length > 0) {\n if (Array.isArray(options.path)) {\n for (const filepath of options.path) {\n if (fs.existsSync(filepath)) {\n possibleVaultPath = filepath.endsWith('.vault') ? filepath : `${filepath}.vault`\n }\n }\n } else {\n possibleVaultPath = options.path.endsWith('.vault') ? options.path : `${options.path}.vault`\n }\n } else {\n possibleVaultPath = path.resolve(process.cwd(), '.env.vault')\n }\n\n if (fs.existsSync(possibleVaultPath)) {\n return possibleVaultPath\n }\n\n return null\n}\n\nfunction _resolveHome (envPath) {\n return envPath[0] === '~' ? path.join(os.homedir(), envPath.slice(1)) : envPath\n}\n\nfunction _configVault (options) {\n const debug = Boolean(options && options.debug)\n const quiet = options && 'quiet' in options ? options.quiet : true\n\n if (debug || !quiet) {\n _log('Loading env from encrypted .env.vault')\n }\n\n const parsed = DotenvModule._parseVault(options)\n\n let processEnv = process.env\n if (options && options.processEnv != null) {\n processEnv = options.processEnv\n }\n\n DotenvModule.populate(processEnv, parsed, options)\n\n return { parsed }\n}\n\nfunction configDotenv (options) {\n const dotenvPath = path.resolve(process.cwd(), '.env')\n let encoding = 'utf8'\n const debug = Boolean(options && options.debug)\n const quiet = options && 'quiet' in options ? options.quiet : true\n\n if (options && options.encoding) {\n encoding = options.encoding\n } else {\n if (debug) {\n _debug('No encoding is specified. UTF-8 is used by default')\n }\n }\n\n let optionPaths = [dotenvPath] // default, look for .env\n if (options && options.path) {\n if (!Array.isArray(options.path)) {\n optionPaths = [_resolveHome(options.path)]\n } else {\n optionPaths = [] // reset default\n for (const filepath of options.path) {\n optionPaths.push(_resolveHome(filepath))\n }\n }\n }\n\n // Build the parsed data in a temporary object (because we need to return it). Once we have the final\n // parsed data, we will combine it with process.env (or options.processEnv if provided).\n let lastError\n const parsedAll = {}\n for (const path of optionPaths) {\n try {\n // Specifying an encoding returns a string instead of a buffer\n const parsed = DotenvModule.parse(fs.readFileSync(path, { encoding }))\n\n DotenvModule.populate(parsedAll, parsed, options)\n } catch (e) {\n if (debug) {\n _debug(`Failed to load ${path} ${e.message}`)\n }\n lastError = e\n }\n }\n\n let processEnv = process.env\n if (options && options.processEnv != null) {\n processEnv = options.processEnv\n }\n\n DotenvModule.populate(processEnv, parsedAll, options)\n\n if (debug || !quiet) {\n const keysCount = Object.keys(parsedAll).length\n const shortPaths = []\n for (const filePath of optionPaths) {\n try {\n const relative = path.relative(process.cwd(), filePath)\n shortPaths.push(relative)\n } catch (e) {\n if (debug) {\n _debug(`Failed to load ${filePath} ${e.message}`)\n }\n lastError = e\n }\n }\n\n _log(`injecting env (${keysCount}) from ${shortPaths.join(',')}`)\n }\n\n if (lastError) {\n return { parsed: parsedAll, error: lastError }\n } else {\n return { parsed: parsedAll }\n }\n}\n\n// Populates process.env from .env file\nfunction config (options) {\n // fallback to original dotenv if DOTENV_KEY is not set\n if (_dotenvKey(options).length === 0) {\n return DotenvModule.configDotenv(options)\n }\n\n const vaultPath = _vaultPath(options)\n\n // dotenvKey exists but .env.vault file does not exist\n if (!vaultPath) {\n _warn(`You set DOTENV_KEY but you are missing a .env.vault file at ${vaultPath}. Did you forget to build it?`)\n\n return DotenvModule.configDotenv(options)\n }\n\n return DotenvModule._configVault(options)\n}\n\nfunction decrypt (encrypted, keyStr) {\n const key = Buffer.from(keyStr.slice(-64), 'hex')\n let ciphertext = Buffer.from(encrypted, 'base64')\n\n const nonce = ciphertext.subarray(0, 12)\n const authTag = ciphertext.subarray(-16)\n ciphertext = ciphertext.subarray(12, -16)\n\n try {\n const aesgcm = crypto.createDecipheriv('aes-256-gcm', key, nonce)\n aesgcm.setAuthTag(authTag)\n return `${aesgcm.update(ciphertext)}${aesgcm.final()}`\n } catch (error) {\n const isRange = error instanceof RangeError\n const invalidKeyLength = error.message === 'Invalid key length'\n const decryptionFailed = error.message === 'Unsupported state or unable to authenticate data'\n\n if (isRange || invalidKeyLength) {\n const err = new Error('INVALID_DOTENV_KEY: It must be 64 characters long (or more)')\n err.code = 'INVALID_DOTENV_KEY'\n throw err\n } else if (decryptionFailed) {\n const err = new Error('DECRYPTION_FAILED: Please check your DOTENV_KEY')\n err.code = 'DECRYPTION_FAILED'\n throw err\n } else {\n throw error\n }\n }\n}\n\n// Populate process.env with parsed values\nfunction populate (processEnv, parsed, options = {}) {\n const debug = Boolean(options && options.debug)\n const override = Boolean(options && options.override)\n\n if (typeof parsed !== 'object') {\n const err = new Error('OBJECT_REQUIRED: Please check the processEnv argument being passed to populate')\n err.code = 'OBJECT_REQUIRED'\n throw err\n }\n\n // Set process.env\n for (const key of Object.keys(parsed)) {\n if (Object.prototype.hasOwnProperty.call(processEnv, key)) {\n if (override === true) {\n processEnv[key] = parsed[key]\n }\n\n if (debug) {\n if (override === true) {\n _debug(`\"${key}\" is already defined and WAS overwritten`)\n } else {\n _debug(`\"${key}\" is already defined and was NOT overwritten`)\n }\n }\n } else {\n processEnv[key] = parsed[key]\n }\n }\n}\n\nconst DotenvModule = {\n configDotenv,\n _configVault,\n _parseVault,\n config,\n decrypt,\n parse,\n populate\n}\n\nmodule.exports.configDotenv = DotenvModule.configDotenv\nmodule.exports._configVault = DotenvModule._configVault\nmodule.exports._parseVault = DotenvModule._parseVault\nmodule.exports.config = DotenvModule.config\nmodule.exports.decrypt = DotenvModule.decrypt\nmodule.exports.parse = DotenvModule.parse\nmodule.exports.populate = DotenvModule.populate\n\nmodule.exports = DotenvModule\n", "const path = require('path');\nconst { fileExists } = require('./file-utils');\n\n/**\n * Load .env.local file if it exists in the current working directory\n * @param {string} cwd - Current working directory (defaults to process.cwd())\n * @returns {boolean} True if .env.local was loaded\n */\nfunction loadEnvLocal(cwd = process.cwd()) {\n const envLocalPath = path.join(cwd, '.env.local');\n \n if (fileExists(envLocalPath)) {\n require('dotenv').config({ path: envLocalPath });\n console.log('\uD83D\uDCC4 Loaded .env.local');\n return true;\n }\n \n return false;\n}\n\n/**\n * Get an environment variable with optional default value\n * @param {string} name - Environment variable name\n * @param {string} defaultValue - Default value if not set\n * @returns {string|undefined} Environment variable value or default\n */\nfunction getEnvVar(name, defaultValue = undefined) {\n return process.env[name] || defaultValue;\n}\n\n/**\n * Check if an environment variable is set to 'true'\n * @param {string} name - Environment variable name\n * @returns {boolean} True if the env var is set to 'true'\n */\nfunction isEnvTrue(name) {\n return process.env[name] === 'true';\n}\n\nmodule.exports = {\n loadEnvLocal,\n getEnvVar,\n isEnvTrue\n};", "// ffdc.js - Simple config accessor\n// No base64 decoding, just returns the config object directly\n\nmodule.exports = function ffdc(config) {\n if (!config) {\n return {};\n }\n \n if (typeof config !== 'object') {\n throw new Error('Config must be an object');\n }\n \n return config;\n};", "const plugin = require('tailwindcss/plugin');\n\n// PostCSS is a peer dependency of Tailwind, so it should be available\n// We'll try to require it, but handle the case where it's not available\nlet postcss;\ntry {\n postcss = require('postcss');\n} catch (e) {\n // PostCSS not available - custom CSS parsing will be disabled\n postcss = null;\n}\n\nlet CacheManager;\nif (typeof window === 'undefined' && typeof process !== 'undefined' && process.versions && process.versions.node) {\n CacheManager = require('./lib/core/cache-manager');\n const { loadEnvLocal } = require('./lib/core/env-utils');\n // Load .env.local if it exists\n loadEnvLocal();\n}\n\nfunction filterDefault(values) {\n return Object.fromEntries(\n Object.entries(values).filter(([key]) => key !== \"DEFAULT\"),\n );\n}\n\nconst pluginExport = plugin.withOptions(\n function (options = {}) {\n return function ({ addBase, addUtilities, theme, matchUtilities }) {\n // 1. Load cache with CacheManager\n if (!CacheManager) {\n // should get cache in browser here\n return;\n }\n\n const cacheManager = new CacheManager(process.cwd());\n\n if (!cacheManager.exists()) {\n console.warn('[FrontFriend] No cache found. Please run \"npx frontfriend init\" first.');\n return;\n }\n\n if (!cacheManager.isValid()) {\n console.warn('[FrontFriend] Cache is expired. Please run \"npx frontfriend init\" to refresh.');\n }\n\n const cache = cacheManager.load();\n if (!cache) {\n console.error('[FrontFriend] Failed to load cache.');\n return;\n }\n\n // 2. Add CSS variables to :root\n const rootVars = {};\n\n // Add color variables\n if (cache.variables) {\n // Wrap HSL values in hsl() function\n for (const [key, value] of Object.entries(cache.variables)) {\n // Check if it's a color variable (contains HSL values)\n if (key.startsWith('--color-') && !value.startsWith('hsl(')) {\n rootVars[key] = `hsl(${value})`;\n } else {\n rootVars[key] = value;\n }\n }\n }\n\n // Add semantic variables (light mode)\n if (cache.semanticVariables) {\n for (const [key, value] of Object.entries(cache.semanticVariables)) {\n // Semantic variables point to color variables using var()\n // so we don't need to wrap them in hsl()\n rootVars[key] = value;\n }\n }\n\n // Add root styles\n addBase({\n ':root': rootVars\n });\n\n // 3. Add dark mode support\n if (cache.semanticDarkVariables && Object.keys(cache.semanticDarkVariables).length > 0) {\n addBase({\n ':root:not(.light)': cache.semanticDarkVariables\n });\n addBase({\n ':root:not(.dark)': cache.semanticVariables\n });\n }\n\n\n // 4. Generate semantic color utilities from semantic variables\n if (cache.semanticVariables) {\n const semanticUtilities = {};\n\n // Process semantic variables into utility classes\n for (const [cssVar] of Object.entries(cache.semanticVariables)) {\n // Convert CSS variable to utility class name\n // --bg-brand-mid-default -> bg-brand-mid\n // --text-brand-strong -> text-brand-strong\n // --border-neutral-subtle-hover -> border-neutral-subtle-hover\n\n const match = cssVar.match(/^--(bg|text|border|layer|overlay|icon)-(.+)$/);\n if (match) {\n const [, prefix, name] = match;\n const className = `.${prefix}-${name}`;\n\n if (prefix === 'bg' || prefix === 'layer' || prefix === 'overlay') {\n semanticUtilities[className] = {\n backgroundColor: `var(${cssVar})`\n };\n } else if (prefix === 'text') {\n semanticUtilities[className] = {\n color: `var(${cssVar})`\n };\n } else if (prefix === 'border') {\n semanticUtilities[className] = {\n borderColor: `var(${cssVar})`\n };\n } else if (prefix === 'icon') {\n // Icon tokens map to both text color and fill\n semanticUtilities[`.text-${prefix}-${name}`] = {\n color: `var(${cssVar})`\n };\n semanticUtilities[`.fill-${prefix}-${name}`] = {\n fill: `var(${cssVar})`\n };\n }\n }\n }\n\n addUtilities(semanticUtilities);\n }\n\n // 5. Generate utilities from tokens (semantic-based utilities)\n if (cache.tokens) {\n // Background colors\n if (cache.tokens.backgroundColor) {\n const bgUtilities = {};\n for (const [name, value] of Object.entries(cache.tokens.backgroundColor)) {\n // The value already contains hsl() wrapper from the processor\n bgUtilities[`.bg-${name}`] = {\n backgroundColor: value\n };\n }\n addUtilities(bgUtilities);\n }\n\n // Text colors\n if (cache.tokens.textColor) {\n const textUtilities = {};\n for (const [name, value] of Object.entries(cache.tokens.textColor)) {\n textUtilities[`.text-${name}`] = {\n color: value\n };\n }\n addUtilities(textUtilities);\n }\n\n // Border colors\n if (cache.tokens.borderColor) {\n const borderUtilities = {};\n for (const [name, value] of Object.entries(cache.tokens.borderColor)) {\n borderUtilities[`.border-${name}`] = {\n borderColor: value\n };\n }\n addUtilities(borderUtilities);\n }\n\n // Fill colors (for SVG icons)\n if (cache.tokens.fill) {\n const fillUtilities = {};\n const textIconUtilities = {};\n for (const [name, value] of Object.entries(cache.tokens.fill)) {\n fillUtilities[`.fill-${name}`] = {\n fill: value\n };\n // Also create text-icon utilities for icon color classes\n if (name.startsWith('icon-')) {\n textIconUtilities[`.text-${name}`] = {\n color: value\n };\n }\n }\n addUtilities(fillUtilities);\n addUtilities(textIconUtilities);\n }\n\n // Font family utilities\n if (cache.tokens.fontFamily) {\n const fontUtilities = {};\n for (const [name, value] of Object.entries(cache.tokens.fontFamily)) {\n fontUtilities[`.font-${name}`] = {\n fontFamily: value\n };\n }\n addUtilities(fontUtilities);\n }\n }\n\n // 6. Add font faces\n if (cache.fonts && cache.fonts.length > 0) {\n // Convert font objects to Tailwind-compatible format\n cache.fonts.forEach(fontFace => {\n // Tailwind expects each @font-face as a separate rule\n addBase({\n '@font-face': fontFace\n });\n });\n }\n\n // 7. Add enter/exit animation utilities\n addUtilities({\n \"@keyframes enter\": theme(\"keyframes.enter\"),\n \"@keyframes exit\": theme(\"keyframes.exit\"),\n \".animate-in\": {\n animationName: \"enter\",\n animationDuration: theme(\"animationDuration.DEFAULT\"),\n \"--tw-enter-opacity\": \"initial\",\n \"--tw-enter-scale\": \"initial\",\n \"--tw-enter-rotate\": \"initial\",\n \"--tw-enter-translate-x\": \"initial\",\n \"--tw-enter-translate-y\": \"initial\",\n },\n \".animate-out\": {\n animationName: \"exit\",\n animationDuration: theme(\"animationDuration.DEFAULT\"),\n \"--tw-exit-opacity\": \"initial\",\n \"--tw-exit-scale\": \"initial\",\n \"--tw-exit-rotate\": \"initial\",\n \"--tw-exit-translate-x\": \"initial\",\n \"--tw-exit-translate-y\": \"initial\",\n },\n });\n\n // 10. Add animation match utilities\n matchUtilities(\n {\n \"fade-in\": (value) => ({ \"--tw-enter-opacity\": value }),\n \"fade-out\": (value) => ({ \"--tw-exit-opacity\": value }),\n },\n { values: theme(\"animationOpacity\") }\n );\n\n matchUtilities(\n {\n \"zoom-in\": (value) => ({ \"--tw-enter-scale\": value }),\n \"zoom-out\": (value) => ({ \"--tw-exit-scale\": value }),\n },\n { values: theme(\"animationScale\") }\n );\n\n matchUtilities(\n {\n \"spin-in\": (value) => ({ \"--tw-enter-rotate\": value }),\n \"spin-out\": (value) => ({ \"--tw-exit-rotate\": value }),\n },\n { values: theme(\"animationRotate\") }\n );\n\n matchUtilities(\n {\n \"slide-in-from-top\": (value) => ({\n \"--tw-enter-translate-y\": `-${value}`,\n }),\n \"slide-in-from-bottom\": (value) => ({\n \"--tw-enter-translate-y\": value,\n }),\n \"slide-in-from-left\": (value) => ({\n \"--tw-enter-translate-x\": `-${value}`,\n }),\n \"slide-in-from-right\": (value) => ({\n \"--tw-enter-translate-x\": value,\n }),\n \"slide-out-to-top\": (value) => ({\n \"--tw-exit-translate-y\": `-${value}`,\n }),\n \"slide-out-to-bottom\": (value) => ({\n \"--tw-exit-translate-y\": value,\n }),\n \"slide-out-to-left\": (value) => ({\n \"--tw-exit-translate-x\": `-${value}`,\n }),\n \"slide-out-to-right\": (value) => ({\n \"--tw-exit-translate-x\": value,\n }),\n },\n { values: theme(\"animationTranslate\") }\n );\n\n // 11. Add animation control utilities\n matchUtilities(\n { duration: (value) => ({ animationDuration: value }) },\n { values: filterDefault(theme(\"animationDuration\")) }\n );\n\n matchUtilities(\n { delay: (value) => ({ animationDelay: value }) },\n { values: theme(\"animationDelay\") }\n );\n\n matchUtilities(\n { ease: (value) => ({ animationTimingFunction: value }) },\n { values: filterDefault(theme(\"animationTimingFunction\")) }\n );\n\n addUtilities({\n \".running\": { animationPlayState: \"running\" },\n \".paused\": { animationPlayState: \"paused\" },\n });\n\n matchUtilities(\n { \"fill-mode\": (value) => ({ animationFillMode: value }) },\n { values: theme(\"animationFillMode\") }\n );\n\n matchUtilities(\n { direction: (value) => ({ animationDirection: value }) },\n { values: theme(\"animationDirection\") }\n );\n\n matchUtilities(\n { repeat: (value) => ({ animationIterationCount: value }) },\n { values: theme(\"animationRepeat\") }\n );\n\n // 12. Add custom CSS\n if (cache.custom && cache.custom.raw && typeof cache.custom.raw === 'string') {\n const rawCss = cache.custom.raw.trim();\n \n if (!rawCss) {\n if (options.verbose) {\n console.warn('[FrontFriend] Empty custom CSS');\n }\n return;\n }\n\n // Check if PostCSS is available\n if (!postcss) {\n console.warn('[FrontFriend] PostCSS not available - custom CSS will not be added');\n return;\n }\n\n try {\n // Parse the CSS using PostCSS to get an AST\n const root = postcss.parse(rawCss);\n \n // Split nodes into base and utilities layers\n const baseNodes = [];\n const utilityNodes = [];\n \n root.each((node) => {\n // @keyframes, @font-face, @media, etc. go to base\n if (node.type === 'atrule') {\n // Special handling for @keyframes and other at-rules\n baseNodes.push(node);\n return;\n }\n \n // Regular rules\n if (node.type === 'rule') {\n // Class selectors starting with . go to utilities\n const isClassSelector = \n typeof node.selector === 'string' && \n node.selector.trim().startsWith('.');\n \n if (isClassSelector) {\n utilityNodes.push(node);\n } else {\n // Element selectors, IDs, attribute selectors, etc. go to base\n baseNodes.push(node);\n }\n return;\n }\n \n // Comments and other nodes go to base\n if (node.type !== 'comment') {\n baseNodes.push(node);\n }\n });\n \n // Add nodes to their respective layers\n // Tailwind accepts PostCSS nodes directly\n if (baseNodes.length > 0) {\n addBase(baseNodes);\n }\n \n if (utilityNodes.length > 0) {\n addUtilities(utilityNodes);\n }\n \n if (options.verbose) {\n console.log(`[FrontFriend] Added custom CSS: ${baseNodes.length} base rules, ${utilityNodes.length} utility classes`);\n }\n } catch (error) {\n console.error('[FrontFriend] Failed to parse custom CSS:', error.message);\n // Don't throw - just log the error and continue\n }\n }\n\n // Log success\n if (options.verbose) {\n console.log('[FrontFriend] Plugin loaded successfully');\n console.log(`[FrontFriend] Colors: ${Object.keys(cache.variables || {}).length}`);\n console.log(`[FrontFriend] Semantic vars: ${Object.keys(cache.semanticVariables || {}).length}`);\n console.log(`[FrontFriend] Fonts: ${(cache.fonts || []).length}`);\n console.log(`[FrontFriend] Safelist classes: ${Array.isArray(cache.safelist) ? cache.safelist.length : 0}`);\n }\n };\n },\n function (options = {}) {\n // Return theme configuration\n let cache = null;\n if (CacheManager) {\n const cacheManager = new CacheManager(process.cwd());\n cache = cacheManager.exists() ? cacheManager.load() : null;\n }\n\n // Default content paths matching the current-plugin approach\n const defaultContent = [\n './pages/**/*.{js,ts,jsx,tsx}',\n './components/**/*.{js,ts,jsx,tsx}',\n './app/**/*.{js,ts,jsx,tsx}',\n './src/**/*.{js,ts,jsx,tsx}',\n './stories/**/*.{js,ts,jsx,tsx}'\n ];\n\n // Log cache loading\n if (options.verbose && cache) {\n console.log('[FrontFriend] Cache loaded successfully');\n if (cache.safelist && Array.isArray(cache.safelist)) {\n console.log(`[FrontFriend] Loading ${cache.safelist.length} classes for safelist`);\n }\n }\n\n return {\n theme: {\n extend: {\n // Extend colors if needed\n colors: options.extendColors || {},\n // Extend animations if needed\n animation: options.extendAnimations || {},\n // Add custom spacing values\n spacing: {\n '18': '4.5rem',\n '88': '22rem',\n '128': '32rem'\n },\n // Add custom box shadows\n boxShadow: {\n 'top-sm': '0 -1px 1px 0 rgba(0, 0, 0, 0.05)'\n },\n // Add border radius values\n borderRadius: {\n '2xl': '1rem'\n },\n // Animation extensions\n animationDelay: ({ theme }) => ({\n ...theme(\"transitionDelay\"),\n }),\n animationDuration: ({ theme }) => ({\n 0: \"0ms\",\n ...theme(\"transitionDuration\"),\n }),\n animationTimingFunction: ({ theme }) => ({\n ...theme(\"transitionTimingFunction\"),\n }),\n animationFillMode: {\n none: \"none\",\n forwards: \"forwards\",\n backwards: \"backwards\",\n both: \"both\",\n },\n animationDirection: {\n normal: \"normal\",\n reverse: \"reverse\",\n alternate: \"alternate\",\n \"alternate-reverse\": \"alternate-reverse\",\n },\n animationOpacity: ({ theme }) => ({\n DEFAULT: 0,\n ...theme(\"opacity\"),\n }),\n animationTranslate: ({ theme }) => ({\n DEFAULT: \"100%\",\n ...theme(\"translate\"),\n }),\n animationScale: ({ theme }) => ({\n DEFAULT: 0,\n ...theme(\"scale\"),\n }),\n animationRotate: ({ theme }) => ({\n DEFAULT: \"30deg\",\n ...theme(\"rotate\"),\n }),\n animationRepeat: {\n 0: \"0\",\n 1: \"1\",\n infinite: \"infinite\",\n },\n keyframes: {\n enter: {\n from: {\n opacity: \"var(--tw-enter-opacity, 1)\",\n transform:\n \"translate3d(var(--tw-enter-translate-x, 0), var(--tw-enter-translate-y, 0), 0) scale3d(var(--tw-enter-scale, 1), var(--tw-enter-scale, 1), var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))\",\n },\n },\n exit: {\n to: {\n opacity: \"var(--tw-exit-opacity, 1)\",\n transform:\n \"translate3d(var(--tw-exit-translate-x, 0), var(--tw-exit-translate-y, 0), 0) scale3d(var(--tw-exit-scale, 1), var(--tw-exit-scale, 1), var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))\",\n },\n },\n },\n }\n },\n // Include safelist from cache and additional classes\n safelist: [\n ...(cache?.safelist || []),\n {\n pattern: /(text|fill)-icon-(neutral|positive|negative|warning|info|highlight|interactive|brand|inverse|onpositive|onnegative|onwarning|oninfo|onhighlight|oninteractive|onbrand)-(mid|strong|subtle|low)(-(neutral|hover|active|selected|disabled))?$/,\n },\n {\n pattern: /^(layer-(below|surface|raised|popover|dialog|control)|overlay-(mid|strong|subtle|low))$/,\n },\n ],\n // Set content paths - merge options with defaults\n content: options.content || defaultContent\n };\n }\n);\n\n// Default export is the plugin\nmodule.exports = pluginExport;\n\n// Export components config and icons with getter functions\n// This allows dynamic resolution at runtime\n\n// Create getter for config\nObject.defineProperty(module.exports, 'config', {\n get: function () {\n // Check for webpack-injected global variable\n if (typeof __FF_CONFIG__ !== 'undefined') {\n return __FF_CONFIG__;\n }\n\n // Check if we're in a browser environment\n if (typeof window !== 'undefined' && window.__FF_CONFIG__) {\n return window.__FF_CONFIG__;\n }\n\n // Node.js: load from cache\n if (CacheManager) {\n try {\n const cacheManager = new CacheManager(process.cwd());\n if (cacheManager.exists()) {\n const cache = cacheManager.load();\n if (cache) {\n return cache.componentsConfig || null;\n }\n }\n } catch (error) {\n // Config not available\n }\n }\n\n return null;\n }\n});\n\n// Create getter for iconSet\nObject.defineProperty(module.exports, 'iconSet', {\n get: function () {\n // Check for webpack-injected global variable\n if (typeof __FF_ICONS__ !== 'undefined') {\n return __FF_ICONS__;\n }\n\n // Check if we're in a browser environment\n if (typeof window !== 'undefined' && window.__FF_ICONS__) {\n return window.__FF_ICONS__;\n }\n\n // Node.js: load from cache\n if (CacheManager) {\n try {\n const cacheManager = new CacheManager(process.cwd());\n if (cacheManager.exists()) {\n const cache = cacheManager.load();\n if (cache) {\n return cache.icons || null;\n }\n }\n } catch (error) {\n // Icons not available\n }\n }\n\n return null;\n }\n});\n\n// Export ffdc utility\nmodule.exports.ffdc = require('./ffdc.js');"],
|
|
5
|
-
"mappings": "8DAAA,IAAAA,EAAAC,EAAA,CAAAC,GAAAC,IAAA,KAAMC,EAAK,QAAQ,IAAI,EAQvB,SAASC,EAAiBC,EAAU,CAClC,GAAI,CACF,IAAMC,EAAUH,EAAG,aAAaE,EAAU,MAAM,EAChD,OAAO,KAAK,MAAMC,CAAO,CAC3B,OAASC,EAAO,CACd,GAAIA,EAAM,OAAS,SACjB,OAAO,KAET,MAAMA,CACR,CACF,CAQA,SAASC,EAAaH,EAAU,CAC9B,GAAI,CACF,OAAOF,EAAG,aAAaE,EAAU,MAAM,CACzC,OAASE,EAAO,CACd,GAAIA,EAAM,OAAS,SACjB,OAAO,KAET,MAAMA,CACR,CACF,CAQA,SAASE,EAAcJ,EAAUK,EAAMC,EAAS,EAAG,CACjD,IAAML,EAAU,KAAK,UAAUI,EAAM,KAAMC,CAAM,EACjDR,EAA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gBAAiB,CACf,EAAG,IACH,EAAG,IACH,SAAU,UACZ,EACA,UAAW,CACT,MAAO,CACL,KAAM,CACJ,QAAS,6BACT,UACE,wMACJ,CACF,EACA,KAAM,CACJ,GAAI,CACF,QAAS,4BACT,UACE,kMACJ,CACF,CACF,CACF,CACF,EAEA,SAAU,CACR,IAAIG,GAAA,YAAAA,EAAO,WAAY,CAAC,EACxB,CACE,QAAS,6OACX,EACA,CACE,QAAS,yFACX,CACF,EAEA,QAASN,EAAQ,SAAW4B,CAC9B,CACF,CACF,EAGA,OAAO,QAAU7B,GAMjB,OAAO,eAAe,OAAO,QAAS,SAAU,CAC9C,IAAK,UAAY,CAEf,GAAI,OAAO,cAAkB,IAC3B,OAAO,cAIT,GAAI,OAAO,OAAW,KAAe,OAAO,cAC1C,OAAO,OAAO,cAIhB,GAAIL,EACF,GAAI,CACF,IAAMW,EAAe,IAAIX,EAAa,QAAQ,IAAI,CAAC,EACnD,GAAIW,EAAa,OAAO,EAAG,CACzB,IAAMC,EAAQD,EAAa,KAAK,EAChC,GAAIC,EACF,OAAOA,EAAM,kBAAoB,IAErC,CACF,MAAgB,CAEhB,CAGF,OAAO,IACT,CACF,CAAC,EAGD,OAAO,eAAe,OAAO,QAAS,UAAW,CAC/C,IAAK,UAAY,CAEf,GAAI,OAAO,aAAiB,IAC1B,OAAO,aAIT,GAAI,OAAO,OAAW,KAAe,OAAO,aAC1C,OAAO,OAAO,aAIhB,GAAIZ,EACF,GAAI,CACF,IAAMW,EAAe,IAAIX,EAAa,QAAQ,IAAI,CAAC,EACnD,GAAIW,EAAa,OAAO,EAAG,CACzB,IAAMC,EAAQD,EAAa,KAAK,EAChC,GAAIC,EACF,OAAOA,EAAM,OAAS,IAE1B,CACF,MAAgB,CAEhB,CAGF,OAAO,IACT,CACF,CAAC,EAGD,OAAO,QAAQ,KAAO",
|
|
6
|
-
"names": ["require_file_utils", "__commonJSMin", "exports", "module", "fs", "readJsonFileSafe", "filepath", "content", "error", "readFileSafe", "writeJsonFile", "data", "indent", "writeModuleExportsFile", "fileExists", "ensureDirectoryExists", "dirpath", "removeDirectory", "require_package", "__commonJSMin", "exports", "module", "require_main", "__commonJSMin", "exports", "module", "fs", "path", "os", "crypto", "packageJson", "version", "LINE", "parse", "src", "obj", "lines", "match", "key", "value", "maybeQuote", "_parseVault", "options", "vaultPath", "_vaultPath", "result", "DotenvModule", "err", "keys", "_dotenvKey", "length", "decrypted", "i", "attrs", "_instructions", "error", "_warn", "message", "_debug", "_log", "dotenvKey", "uri", "environment", "environmentKey", "ciphertext", "possibleVaultPath", "filepath", "_resolveHome", "envPath", "_configVault", "debug", "quiet", "parsed", "processEnv", "configDotenv", "dotenvPath", "encoding", "optionPaths", "lastError", "parsedAll", "e", "keysCount", "shortPaths", "filePath", "relative", "config", "decrypt", "encrypted", "keyStr", "nonce", "authTag", "aesgcm", "isRange", "invalidKeyLength", "decryptionFailed", "populate", "override", "require_env_utils", "__commonJSMin", "exports", "module", "path", "fileExists", "loadEnvLocal", "cwd", "envLocalPath", "getEnvVar", "name", "defaultValue", "isEnvTrue", "require_ffdc", "__commonJSMin", "exports", "module", "config", "plugin", "postcss", "CacheManager", "loadEnvLocal", "filterDefault", "values", "key", "pluginExport", "options", "addBase", "addUtilities", "theme", "matchUtilities", "cacheManager", "cache", "rootVars", "value", "semanticUtilities", "cssVar", "match", "prefix", "name", "className", "bgUtilities", "textUtilities", "borderUtilities", "fillUtilities", "textIconUtilities", "fontUtilities", "fontFace", "rawCss", "root", "baseNodes", "utilityNodes", "node", "error", "defaultContent"]
|
|
4
|
+
"sourcesContent": ["const fs = require('fs');\n\n/**\n * Read a JSON file safely, returning null if file doesn't exist\n * @param {string} filepath - Path to the JSON file\n * @returns {Object|null} Parsed JSON or null if file not found\n * @throws {Error} If JSON is invalid\n */\nfunction readJsonFileSafe(filepath) {\n try {\n const content = fs.readFileSync(filepath, 'utf8');\n return JSON.parse(content);\n } catch (error) {\n if (error.code === 'ENOENT') {\n return null; // File not found, return null like API would return 404\n }\n throw error;\n }\n}\n\n/**\n * Read a file safely, returning null if file doesn't exist\n * @param {string} filepath - Path to the file\n * @returns {string|null} File content or null if file not found\n * @throws {Error} For other file system errors\n */\nfunction readFileSafe(filepath) {\n try {\n return fs.readFileSync(filepath, 'utf8');\n } catch (error) {\n if (error.code === 'ENOENT') {\n return null; // File not found\n }\n throw error;\n }\n}\n\n/**\n * Write JSON data to a file with proper formatting\n * @param {string} filepath - Path to write the file\n * @param {Object} data - Data to write\n * @param {number} indent - Indentation level (default: 2)\n */\nfunction writeJsonFile(filepath, data, indent = 2) {\n const content = JSON.stringify(data, null, indent);\n fs.writeFileSync(filepath, content, 'utf8');\n}\n\n/**\n * Write module.exports file with JSON data\n * @param {string} filepath - Path to write the file\n * @param {Object} data - Data to export\n */\nfunction writeModuleExportsFile(filepath, data) {\n // Handle empty data cases\n if (data === null || data === undefined || \n (typeof data === 'object' && Object.keys(data).length === 0) ||\n (Array.isArray(data) && data.length === 0)) {\n const emptyContent = Array.isArray(data) ? '[]' : '{}';\n const content = `module.exports = ${emptyContent};`;\n fs.writeFileSync(filepath, content, 'utf8');\n } else {\n const content = `module.exports = ${JSON.stringify(data, null, 2)};`;\n fs.writeFileSync(filepath, content, 'utf8');\n }\n}\n\n/**\n * Check if a file exists\n * @param {string} filepath - Path to check\n * @returns {boolean} True if file exists\n */\nfunction fileExists(filepath) {\n return fs.existsSync(filepath);\n}\n\n/**\n * Create directory recursively\n * @param {string} dirpath - Directory path to create\n */\nfunction ensureDirectoryExists(dirpath) {\n fs.mkdirSync(dirpath, { recursive: true });\n}\n\n/**\n * Remove directory recursively\n * @param {string} dirpath - Directory path to remove\n */\nfunction removeDirectory(dirpath) {\n fs.rmSync(dirpath, { recursive: true, force: true });\n}\n\nmodule.exports = {\n readJsonFileSafe,\n readFileSafe,\n writeJsonFile,\n writeModuleExportsFile,\n fileExists,\n ensureDirectoryExists,\n removeDirectory\n};", "{\n \"name\": \"dotenv\",\n \"version\": \"16.6.1\",\n \"description\": \"Loads environment variables from .env file\",\n \"main\": \"lib/main.js\",\n \"types\": \"lib/main.d.ts\",\n \"exports\": {\n \".\": {\n \"types\": \"./lib/main.d.ts\",\n \"require\": \"./lib/main.js\",\n \"default\": \"./lib/main.js\"\n },\n \"./config\": \"./config.js\",\n \"./config.js\": \"./config.js\",\n \"./lib/env-options\": \"./lib/env-options.js\",\n \"./lib/env-options.js\": \"./lib/env-options.js\",\n \"./lib/cli-options\": \"./lib/cli-options.js\",\n \"./lib/cli-options.js\": \"./lib/cli-options.js\",\n \"./package.json\": \"./package.json\"\n },\n \"scripts\": {\n \"dts-check\": \"tsc --project tests/types/tsconfig.json\",\n \"lint\": \"standard\",\n \"pretest\": \"npm run lint && npm run dts-check\",\n \"test\": \"tap run --allow-empty-coverage --disable-coverage --timeout=60000\",\n \"test:coverage\": \"tap run --show-full-coverage --timeout=60000 --coverage-report=text --coverage-report=lcov\",\n \"prerelease\": \"npm test\",\n \"release\": \"standard-version\"\n },\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git://github.com/motdotla/dotenv.git\"\n },\n \"homepage\": \"https://github.com/motdotla/dotenv#readme\",\n \"funding\": \"https://dotenvx.com\",\n \"keywords\": [\n \"dotenv\",\n \"env\",\n \".env\",\n \"environment\",\n \"variables\",\n \"config\",\n \"settings\"\n ],\n \"readmeFilename\": \"README.md\",\n \"license\": \"BSD-2-Clause\",\n \"devDependencies\": {\n \"@types/node\": \"^18.11.3\",\n \"decache\": \"^4.6.2\",\n \"sinon\": \"^14.0.1\",\n \"standard\": \"^17.0.0\",\n \"standard-version\": \"^9.5.0\",\n \"tap\": \"^19.2.0\",\n \"typescript\": \"^4.8.4\"\n },\n \"engines\": {\n \"node\": \">=12\"\n },\n \"browser\": {\n \"fs\": false\n }\n}\n", "const fs = require('fs')\nconst path = require('path')\nconst os = require('os')\nconst crypto = require('crypto')\nconst packageJson = require('../package.json')\n\nconst version = packageJson.version\n\nconst LINE = /(?:^|^)\\s*(?:export\\s+)?([\\w.-]+)(?:\\s*=\\s*?|:\\s+?)(\\s*'(?:\\\\'|[^'])*'|\\s*\"(?:\\\\\"|[^\"])*\"|\\s*`(?:\\\\`|[^`])*`|[^#\\r\\n]+)?\\s*(?:#.*)?(?:$|$)/mg\n\n// Parse src into an Object\nfunction parse (src) {\n const obj = {}\n\n // Convert buffer to string\n let lines = src.toString()\n\n // Convert line breaks to same format\n lines = lines.replace(/\\r\\n?/mg, '\\n')\n\n let match\n while ((match = LINE.exec(lines)) != null) {\n const key = match[1]\n\n // Default undefined or null to empty string\n let value = (match[2] || '')\n\n // Remove whitespace\n value = value.trim()\n\n // Check if double quoted\n const maybeQuote = value[0]\n\n // Remove surrounding quotes\n value = value.replace(/^(['\"`])([\\s\\S]*)\\1$/mg, '$2')\n\n // Expand newlines if double quoted\n if (maybeQuote === '\"') {\n value = value.replace(/\\\\n/g, '\\n')\n value = value.replace(/\\\\r/g, '\\r')\n }\n\n // Add to object\n obj[key] = value\n }\n\n return obj\n}\n\nfunction _parseVault (options) {\n options = options || {}\n\n const vaultPath = _vaultPath(options)\n options.path = vaultPath // parse .env.vault\n const result = DotenvModule.configDotenv(options)\n if (!result.parsed) {\n const err = new Error(`MISSING_DATA: Cannot parse ${vaultPath} for an unknown reason`)\n err.code = 'MISSING_DATA'\n throw err\n }\n\n // handle scenario for comma separated keys - for use with key rotation\n // example: DOTENV_KEY=\"dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=prod,dotenv://:key_7890@dotenvx.com/vault/.env.vault?environment=prod\"\n const keys = _dotenvKey(options).split(',')\n const length = keys.length\n\n let decrypted\n for (let i = 0; i < length; i++) {\n try {\n // Get full key\n const key = keys[i].trim()\n\n // Get instructions for decrypt\n const attrs = _instructions(result, key)\n\n // Decrypt\n decrypted = DotenvModule.decrypt(attrs.ciphertext, attrs.key)\n\n break\n } catch (error) {\n // last key\n if (i + 1 >= length) {\n throw error\n }\n // try next key\n }\n }\n\n // Parse decrypted .env string\n return DotenvModule.parse(decrypted)\n}\n\nfunction _warn (message) {\n console.log(`[dotenv@${version}][WARN] ${message}`)\n}\n\nfunction _debug (message) {\n console.log(`[dotenv@${version}][DEBUG] ${message}`)\n}\n\nfunction _log (message) {\n console.log(`[dotenv@${version}] ${message}`)\n}\n\nfunction _dotenvKey (options) {\n // prioritize developer directly setting options.DOTENV_KEY\n if (options && options.DOTENV_KEY && options.DOTENV_KEY.length > 0) {\n return options.DOTENV_KEY\n }\n\n // secondary infra already contains a DOTENV_KEY environment variable\n if (process.env.DOTENV_KEY && process.env.DOTENV_KEY.length > 0) {\n return process.env.DOTENV_KEY\n }\n\n // fallback to empty string\n return ''\n}\n\nfunction _instructions (result, dotenvKey) {\n // Parse DOTENV_KEY. Format is a URI\n let uri\n try {\n uri = new URL(dotenvKey)\n } catch (error) {\n if (error.code === 'ERR_INVALID_URL') {\n const err = new Error('INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development')\n err.code = 'INVALID_DOTENV_KEY'\n throw err\n }\n\n throw error\n }\n\n // Get decrypt key\n const key = uri.password\n if (!key) {\n const err = new Error('INVALID_DOTENV_KEY: Missing key part')\n err.code = 'INVALID_DOTENV_KEY'\n throw err\n }\n\n // Get environment\n const environment = uri.searchParams.get('environment')\n if (!environment) {\n const err = new Error('INVALID_DOTENV_KEY: Missing environment part')\n err.code = 'INVALID_DOTENV_KEY'\n throw err\n }\n\n // Get ciphertext payload\n const environmentKey = `DOTENV_VAULT_${environment.toUpperCase()}`\n const ciphertext = result.parsed[environmentKey] // DOTENV_VAULT_PRODUCTION\n if (!ciphertext) {\n const err = new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${environmentKey} in your .env.vault file.`)\n err.code = 'NOT_FOUND_DOTENV_ENVIRONMENT'\n throw err\n }\n\n return { ciphertext, key }\n}\n\nfunction _vaultPath (options) {\n let possibleVaultPath = null\n\n if (options && options.path && options.path.length > 0) {\n if (Array.isArray(options.path)) {\n for (const filepath of options.path) {\n if (fs.existsSync(filepath)) {\n possibleVaultPath = filepath.endsWith('.vault') ? filepath : `${filepath}.vault`\n }\n }\n } else {\n possibleVaultPath = options.path.endsWith('.vault') ? options.path : `${options.path}.vault`\n }\n } else {\n possibleVaultPath = path.resolve(process.cwd(), '.env.vault')\n }\n\n if (fs.existsSync(possibleVaultPath)) {\n return possibleVaultPath\n }\n\n return null\n}\n\nfunction _resolveHome (envPath) {\n return envPath[0] === '~' ? path.join(os.homedir(), envPath.slice(1)) : envPath\n}\n\nfunction _configVault (options) {\n const debug = Boolean(options && options.debug)\n const quiet = options && 'quiet' in options ? options.quiet : true\n\n if (debug || !quiet) {\n _log('Loading env from encrypted .env.vault')\n }\n\n const parsed = DotenvModule._parseVault(options)\n\n let processEnv = process.env\n if (options && options.processEnv != null) {\n processEnv = options.processEnv\n }\n\n DotenvModule.populate(processEnv, parsed, options)\n\n return { parsed }\n}\n\nfunction configDotenv (options) {\n const dotenvPath = path.resolve(process.cwd(), '.env')\n let encoding = 'utf8'\n const debug = Boolean(options && options.debug)\n const quiet = options && 'quiet' in options ? options.quiet : true\n\n if (options && options.encoding) {\n encoding = options.encoding\n } else {\n if (debug) {\n _debug('No encoding is specified. UTF-8 is used by default')\n }\n }\n\n let optionPaths = [dotenvPath] // default, look for .env\n if (options && options.path) {\n if (!Array.isArray(options.path)) {\n optionPaths = [_resolveHome(options.path)]\n } else {\n optionPaths = [] // reset default\n for (const filepath of options.path) {\n optionPaths.push(_resolveHome(filepath))\n }\n }\n }\n\n // Build the parsed data in a temporary object (because we need to return it). Once we have the final\n // parsed data, we will combine it with process.env (or options.processEnv if provided).\n let lastError\n const parsedAll = {}\n for (const path of optionPaths) {\n try {\n // Specifying an encoding returns a string instead of a buffer\n const parsed = DotenvModule.parse(fs.readFileSync(path, { encoding }))\n\n DotenvModule.populate(parsedAll, parsed, options)\n } catch (e) {\n if (debug) {\n _debug(`Failed to load ${path} ${e.message}`)\n }\n lastError = e\n }\n }\n\n let processEnv = process.env\n if (options && options.processEnv != null) {\n processEnv = options.processEnv\n }\n\n DotenvModule.populate(processEnv, parsedAll, options)\n\n if (debug || !quiet) {\n const keysCount = Object.keys(parsedAll).length\n const shortPaths = []\n for (const filePath of optionPaths) {\n try {\n const relative = path.relative(process.cwd(), filePath)\n shortPaths.push(relative)\n } catch (e) {\n if (debug) {\n _debug(`Failed to load ${filePath} ${e.message}`)\n }\n lastError = e\n }\n }\n\n _log(`injecting env (${keysCount}) from ${shortPaths.join(',')}`)\n }\n\n if (lastError) {\n return { parsed: parsedAll, error: lastError }\n } else {\n return { parsed: parsedAll }\n }\n}\n\n// Populates process.env from .env file\nfunction config (options) {\n // fallback to original dotenv if DOTENV_KEY is not set\n if (_dotenvKey(options).length === 0) {\n return DotenvModule.configDotenv(options)\n }\n\n const vaultPath = _vaultPath(options)\n\n // dotenvKey exists but .env.vault file does not exist\n if (!vaultPath) {\n _warn(`You set DOTENV_KEY but you are missing a .env.vault file at ${vaultPath}. Did you forget to build it?`)\n\n return DotenvModule.configDotenv(options)\n }\n\n return DotenvModule._configVault(options)\n}\n\nfunction decrypt (encrypted, keyStr) {\n const key = Buffer.from(keyStr.slice(-64), 'hex')\n let ciphertext = Buffer.from(encrypted, 'base64')\n\n const nonce = ciphertext.subarray(0, 12)\n const authTag = ciphertext.subarray(-16)\n ciphertext = ciphertext.subarray(12, -16)\n\n try {\n const aesgcm = crypto.createDecipheriv('aes-256-gcm', key, nonce)\n aesgcm.setAuthTag(authTag)\n return `${aesgcm.update(ciphertext)}${aesgcm.final()}`\n } catch (error) {\n const isRange = error instanceof RangeError\n const invalidKeyLength = error.message === 'Invalid key length'\n const decryptionFailed = error.message === 'Unsupported state or unable to authenticate data'\n\n if (isRange || invalidKeyLength) {\n const err = new Error('INVALID_DOTENV_KEY: It must be 64 characters long (or more)')\n err.code = 'INVALID_DOTENV_KEY'\n throw err\n } else if (decryptionFailed) {\n const err = new Error('DECRYPTION_FAILED: Please check your DOTENV_KEY')\n err.code = 'DECRYPTION_FAILED'\n throw err\n } else {\n throw error\n }\n }\n}\n\n// Populate process.env with parsed values\nfunction populate (processEnv, parsed, options = {}) {\n const debug = Boolean(options && options.debug)\n const override = Boolean(options && options.override)\n\n if (typeof parsed !== 'object') {\n const err = new Error('OBJECT_REQUIRED: Please check the processEnv argument being passed to populate')\n err.code = 'OBJECT_REQUIRED'\n throw err\n }\n\n // Set process.env\n for (const key of Object.keys(parsed)) {\n if (Object.prototype.hasOwnProperty.call(processEnv, key)) {\n if (override === true) {\n processEnv[key] = parsed[key]\n }\n\n if (debug) {\n if (override === true) {\n _debug(`\"${key}\" is already defined and WAS overwritten`)\n } else {\n _debug(`\"${key}\" is already defined and was NOT overwritten`)\n }\n }\n } else {\n processEnv[key] = parsed[key]\n }\n }\n}\n\nconst DotenvModule = {\n configDotenv,\n _configVault,\n _parseVault,\n config,\n decrypt,\n parse,\n populate\n}\n\nmodule.exports.configDotenv = DotenvModule.configDotenv\nmodule.exports._configVault = DotenvModule._configVault\nmodule.exports._parseVault = DotenvModule._parseVault\nmodule.exports.config = DotenvModule.config\nmodule.exports.decrypt = DotenvModule.decrypt\nmodule.exports.parse = DotenvModule.parse\nmodule.exports.populate = DotenvModule.populate\n\nmodule.exports = DotenvModule\n", "const path = require('path');\nconst { fileExists } = require('./file-utils');\n\n/**\n * Load .env.local file if it exists in the current working directory\n * @param {string} cwd - Current working directory (defaults to process.cwd())\n * @returns {boolean} True if .env.local was loaded\n */\nfunction loadEnvLocal(cwd = process.cwd()) {\n const envLocalPath = path.join(cwd, '.env.local');\n \n if (fileExists(envLocalPath)) {\n require('dotenv').config({ path: envLocalPath });\n console.log('\uD83D\uDCC4 Loaded .env.local');\n return true;\n }\n \n return false;\n}\n\n/**\n * Get an environment variable with optional default value\n * @param {string} name - Environment variable name\n * @param {string} defaultValue - Default value if not set\n * @returns {string|undefined} Environment variable value or default\n */\nfunction getEnvVar(name, defaultValue = undefined) {\n return process.env[name] || defaultValue;\n}\n\n/**\n * Check if an environment variable is set to 'true'\n * @param {string} name - Environment variable name\n * @returns {boolean} True if the env var is set to 'true'\n */\nfunction isEnvTrue(name) {\n return process.env[name] === 'true';\n}\n\nmodule.exports = {\n loadEnvLocal,\n getEnvVar,\n isEnvTrue\n};", "// ffdc.js - Simple config accessor\n// No base64 decoding, just returns the config object directly\n\nmodule.exports = function ffdc(config) {\n if (!config) {\n return {};\n }\n \n if (typeof config !== 'object') {\n throw new Error('Config must be an object');\n }\n \n return config;\n};", "const plugin = require('tailwindcss/plugin');\n\n// PostCSS is a peer dependency of Tailwind, so it should be available\n// We'll try to require it, but handle the case where it's not available\nlet postcss;\ntry {\n postcss = require('postcss');\n} catch (e) {\n // PostCSS not available - custom CSS parsing will be disabled\n postcss = null;\n}\n\nlet CacheManager;\nif (typeof window === 'undefined' && typeof process !== 'undefined' && process.versions && process.versions.node) {\n CacheManager = require('./lib/core/cache-manager');\n const { loadEnvLocal } = require('./lib/core/env-utils');\n // Load .env.local if it exists\n loadEnvLocal();\n}\n\nfunction filterDefault(values) {\n return Object.fromEntries(\n Object.entries(values).filter(([key]) => key !== \"DEFAULT\"),\n );\n}\n\nconst pluginExport = plugin.withOptions(\n function (options = {}) {\n return function ({ addBase, addUtilities, theme, matchUtilities }) {\n // 1. Load cache with CacheManager\n if (!CacheManager) {\n // should get cache in browser here\n return;\n }\n\n const cacheManager = new CacheManager(process.cwd());\n\n if (!cacheManager.exists()) {\n console.warn('[FrontFriend] No cache found. Please run \"npx frontfriend init\" first.');\n return;\n }\n\n if (!cacheManager.isValid()) {\n console.warn('[FrontFriend] Cache is expired. Please run \"npx frontfriend init\" to refresh.');\n }\n\n const cache = cacheManager.load();\n if (!cache) {\n console.error('[FrontFriend] Failed to load cache.');\n return;\n }\n\n // 2. Add CSS variables to :root\n const rootVars = {};\n\n // Add color variables\n if (cache.variables) {\n // Wrap HSL values in hsl() function\n for (const [key, value] of Object.entries(cache.variables)) {\n // Check if it's a color variable (contains HSL values)\n if (key.startsWith('--color-') && !value.startsWith('hsl(')) {\n rootVars[key] = `hsl(${value})`;\n } else {\n rootVars[key] = value;\n }\n }\n }\n\n // Add semantic variables (light mode)\n if (cache.semanticVariables) {\n for (const [key, value] of Object.entries(cache.semanticVariables)) {\n // Check if value contains HSL components (e.g., \"206 92% 5% / 0.9\")\n // These need to be wrapped in hsl() function\n if (typeof value === 'string' &&\n !value.startsWith('var(') &&\n !value.startsWith('hsl(') &&\n /^\\d+\\s+\\d+%\\s+\\d+%/.test(value)) {\n rootVars[key] = `hsl(${value})`;\n } else {\n // Semantic variables that point to other variables using var()\n // don't need wrapping\n rootVars[key] = value;\n }\n }\n }\n\n // Add root styles\n addBase({\n ':root': rootVars\n });\n\n // 3. Add dark mode support\n if (cache.semanticDarkVariables && Object.keys(cache.semanticDarkVariables).length > 0) {\n const darkVars = {};\n for (const [key, value] of Object.entries(cache.semanticDarkVariables)) {\n // Check if value contains HSL components\n if (typeof value === 'string' &&\n !value.startsWith('var(') &&\n !value.startsWith('hsl(') &&\n /^\\d+\\s+\\d+%\\s+\\d+%/.test(value)) {\n darkVars[key] = `hsl(${value})`;\n } else {\n darkVars[key] = value;\n }\n }\n\n addBase({\n ':root:not(.light)': darkVars\n });\n addBase({\n ':root:not(.dark)': rootVars\n });\n }\n\n\n // 4. Generate semantic color utilities from semantic variables\n if (cache.semanticVariables) {\n const semanticUtilities = {};\n\n // Process semantic variables into utility classes\n for (const [cssVar] of Object.entries(cache.semanticVariables)) {\n // Convert CSS variable to utility class name\n // --bg-brand-mid-default -> bg-brand-mid\n // --text-brand-strong -> text-brand-strong\n // --border-neutral-subtle-hover -> border-neutral-subtle-hover\n\n const match = cssVar.match(/^--(bg|text|border|layer|overlay|icon)-(.+)$/);\n if (match) {\n const [, prefix, name] = match;\n const className = `.${prefix}-${name}`;\n\n if (prefix === 'bg' || prefix === 'layer' || prefix === 'overlay') {\n semanticUtilities[className] = {\n backgroundColor: `var(${cssVar})`\n };\n } else if (prefix === 'text') {\n semanticUtilities[className] = {\n color: `var(${cssVar})`\n };\n } else if (prefix === 'border') {\n semanticUtilities[className] = {\n borderColor: `var(${cssVar})`\n };\n } else if (prefix === 'icon') {\n // Icon tokens map to both text color and fill\n semanticUtilities[`.text-${prefix}-${name}`] = {\n color: `var(${cssVar})`\n };\n semanticUtilities[`.fill-${prefix}-${name}`] = {\n fill: `var(${cssVar})`\n };\n }\n }\n }\n\n addUtilities(semanticUtilities);\n }\n\n // 5. Generate utilities from tokens (semantic-based utilities)\n if (cache.tokens) {\n // Background colors\n if (cache.tokens.backgroundColor) {\n const bgUtilities = {};\n for (const [name, value] of Object.entries(cache.tokens.backgroundColor)) {\n // The value already contains hsl() wrapper from the processor\n bgUtilities[`.bg-${name}`] = {\n backgroundColor: value\n };\n }\n addUtilities(bgUtilities);\n }\n\n // Text colors\n if (cache.tokens.textColor) {\n const textUtilities = {};\n for (const [name, value] of Object.entries(cache.tokens.textColor)) {\n textUtilities[`.text-${name}`] = {\n color: value\n };\n }\n addUtilities(textUtilities);\n }\n\n // Border colors\n if (cache.tokens.borderColor) {\n const borderUtilities = {};\n for (const [name, value] of Object.entries(cache.tokens.borderColor)) {\n borderUtilities[`.border-${name}`] = {\n borderColor: value\n };\n }\n addUtilities(borderUtilities);\n }\n\n // Fill colors (for SVG icons)\n if (cache.tokens.fill) {\n const fillUtilities = {};\n const textIconUtilities = {};\n for (const [name, value] of Object.entries(cache.tokens.fill)) {\n fillUtilities[`.fill-${name}`] = {\n fill: value\n };\n // Also create text-icon utilities for icon color classes\n if (name.startsWith('icon-')) {\n textIconUtilities[`.text-${name}`] = {\n color: value\n };\n }\n }\n addUtilities(fillUtilities);\n addUtilities(textIconUtilities);\n }\n\n // Font family utilities\n if (cache.tokens.fontFamily) {\n const fontUtilities = {};\n for (const [name, value] of Object.entries(cache.tokens.fontFamily)) {\n fontUtilities[`.font-${name}`] = {\n fontFamily: value\n };\n }\n addUtilities(fontUtilities);\n }\n }\n\n // 6. Add font faces\n if (cache.fonts && cache.fonts.length > 0) {\n // Convert font objects to Tailwind-compatible format\n cache.fonts.forEach(fontFace => {\n // Tailwind expects each @font-face as a separate rule\n addBase({\n '@font-face': fontFace\n });\n });\n }\n\n // 7. Add enter/exit animation utilities\n addUtilities({\n \"@keyframes enter\": theme(\"keyframes.enter\"),\n \"@keyframes exit\": theme(\"keyframes.exit\"),\n \".animate-in\": {\n animationName: \"enter\",\n animationDuration: theme(\"animationDuration.DEFAULT\"),\n \"--tw-enter-opacity\": \"initial\",\n \"--tw-enter-scale\": \"initial\",\n \"--tw-enter-rotate\": \"initial\",\n \"--tw-enter-translate-x\": \"initial\",\n \"--tw-enter-translate-y\": \"initial\",\n },\n \".animate-out\": {\n animationName: \"exit\",\n animationDuration: theme(\"animationDuration.DEFAULT\"),\n \"--tw-exit-opacity\": \"initial\",\n \"--tw-exit-scale\": \"initial\",\n \"--tw-exit-rotate\": \"initial\",\n \"--tw-exit-translate-x\": \"initial\",\n \"--tw-exit-translate-y\": \"initial\",\n },\n });\n\n // 10. Add animation match utilities\n matchUtilities(\n {\n \"fade-in\": (value) => ({ \"--tw-enter-opacity\": value }),\n \"fade-out\": (value) => ({ \"--tw-exit-opacity\": value }),\n },\n { values: theme(\"animationOpacity\") }\n );\n\n matchUtilities(\n {\n \"zoom-in\": (value) => ({ \"--tw-enter-scale\": value }),\n \"zoom-out\": (value) => ({ \"--tw-exit-scale\": value }),\n },\n { values: theme(\"animationScale\") }\n );\n\n matchUtilities(\n {\n \"spin-in\": (value) => ({ \"--tw-enter-rotate\": value }),\n \"spin-out\": (value) => ({ \"--tw-exit-rotate\": value }),\n },\n { values: theme(\"animationRotate\") }\n );\n\n matchUtilities(\n {\n \"slide-in-from-top\": (value) => ({\n \"--tw-enter-translate-y\": `-${value}`,\n }),\n \"slide-in-from-bottom\": (value) => ({\n \"--tw-enter-translate-y\": value,\n }),\n \"slide-in-from-left\": (value) => ({\n \"--tw-enter-translate-x\": `-${value}`,\n }),\n \"slide-in-from-right\": (value) => ({\n \"--tw-enter-translate-x\": value,\n }),\n \"slide-out-to-top\": (value) => ({\n \"--tw-exit-translate-y\": `-${value}`,\n }),\n \"slide-out-to-bottom\": (value) => ({\n \"--tw-exit-translate-y\": value,\n }),\n \"slide-out-to-left\": (value) => ({\n \"--tw-exit-translate-x\": `-${value}`,\n }),\n \"slide-out-to-right\": (value) => ({\n \"--tw-exit-translate-x\": value,\n }),\n },\n { values: theme(\"animationTranslate\") }\n );\n\n // 11. Add animation control utilities\n matchUtilities(\n { duration: (value) => ({ animationDuration: value }) },\n { values: filterDefault(theme(\"animationDuration\")) }\n );\n\n matchUtilities(\n { delay: (value) => ({ animationDelay: value }) },\n { values: theme(\"animationDelay\") }\n );\n\n matchUtilities(\n { ease: (value) => ({ animationTimingFunction: value }) },\n { values: filterDefault(theme(\"animationTimingFunction\")) }\n );\n\n addUtilities({\n \".running\": { animationPlayState: \"running\" },\n \".paused\": { animationPlayState: \"paused\" },\n });\n\n matchUtilities(\n { \"fill-mode\": (value) => ({ animationFillMode: value }) },\n { values: theme(\"animationFillMode\") }\n );\n\n matchUtilities(\n { direction: (value) => ({ animationDirection: value }) },\n { values: theme(\"animationDirection\") }\n );\n\n matchUtilities(\n { repeat: (value) => ({ animationIterationCount: value }) },\n { values: theme(\"animationRepeat\") }\n );\n\n // 12. Add custom CSS\n if (cache.custom && cache.custom.raw && typeof cache.custom.raw === 'string') {\n const rawCss = cache.custom.raw.trim();\n \n if (!rawCss) {\n if (options.verbose) {\n console.warn('[FrontFriend] Empty custom CSS');\n }\n return;\n }\n\n // Check if PostCSS is available\n if (!postcss) {\n console.warn('[FrontFriend] PostCSS not available - custom CSS will not be added');\n return;\n }\n\n try {\n // Parse the CSS using PostCSS to get an AST\n const root = postcss.parse(rawCss);\n \n // Split nodes into base and utilities layers\n const baseNodes = [];\n const utilityNodes = [];\n \n root.each((node) => {\n // @keyframes, @font-face, @media, etc. go to base\n if (node.type === 'atrule') {\n // Special handling for @keyframes and other at-rules\n baseNodes.push(node);\n return;\n }\n \n // Regular rules\n if (node.type === 'rule') {\n // Class selectors starting with . go to utilities\n const isClassSelector = \n typeof node.selector === 'string' && \n node.selector.trim().startsWith('.');\n \n if (isClassSelector) {\n utilityNodes.push(node);\n } else {\n // Element selectors, IDs, attribute selectors, etc. go to base\n baseNodes.push(node);\n }\n return;\n }\n \n // Comments and other nodes go to base\n if (node.type !== 'comment') {\n baseNodes.push(node);\n }\n });\n \n // Add nodes to their respective layers\n // Tailwind accepts PostCSS nodes directly\n if (baseNodes.length > 0) {\n addBase(baseNodes);\n }\n \n if (utilityNodes.length > 0) {\n addUtilities(utilityNodes);\n }\n \n if (options.verbose) {\n console.log(`[FrontFriend] Added custom CSS: ${baseNodes.length} base rules, ${utilityNodes.length} utility classes`);\n }\n } catch (error) {\n console.error('[FrontFriend] Failed to parse custom CSS:', error.message);\n // Don't throw - just log the error and continue\n }\n }\n\n // Log success\n if (options.verbose) {\n console.log('[FrontFriend] Plugin loaded successfully');\n console.log(`[FrontFriend] Colors: ${Object.keys(cache.variables || {}).length}`);\n console.log(`[FrontFriend] Semantic vars: ${Object.keys(cache.semanticVariables || {}).length}`);\n console.log(`[FrontFriend] Fonts: ${(cache.fonts || []).length}`);\n console.log(`[FrontFriend] Safelist classes: ${Array.isArray(cache.safelist) ? cache.safelist.length : 0}`);\n }\n };\n },\n function (options = {}) {\n // Return theme configuration\n let cache = null;\n if (CacheManager) {\n const cacheManager = new CacheManager(process.cwd());\n cache = cacheManager.exists() ? cacheManager.load() : null;\n }\n\n // Default content paths matching the current-plugin approach\n const defaultContent = [\n './pages/**/*.{js,ts,jsx,tsx}',\n './components/**/*.{js,ts,jsx,tsx}',\n './app/**/*.{js,ts,jsx,tsx}',\n './src/**/*.{js,ts,jsx,tsx}',\n './stories/**/*.{js,ts,jsx,tsx}'\n ];\n\n // Log cache loading\n if (options.verbose && cache) {\n console.log('[FrontFriend] Cache loaded successfully');\n if (cache.safelist && Array.isArray(cache.safelist)) {\n console.log(`[FrontFriend] Loading ${cache.safelist.length} classes for safelist`);\n }\n }\n\n return {\n theme: {\n extend: {\n // Extend colors if needed\n colors: options.extendColors || {},\n // Extend animations if needed\n animation: options.extendAnimations || {},\n // Add custom spacing values\n spacing: {\n '18': '4.5rem',\n '88': '22rem',\n '128': '32rem'\n },\n // Add custom box shadows\n boxShadow: {\n 'top-sm': '0 -1px 1px 0 rgba(0, 0, 0, 0.05)'\n },\n // Add border radius values\n borderRadius: {\n '2xl': '1rem'\n },\n // Animation extensions\n animationDelay: ({ theme }) => ({\n ...theme(\"transitionDelay\"),\n }),\n animationDuration: ({ theme }) => ({\n 0: \"0ms\",\n ...theme(\"transitionDuration\"),\n }),\n animationTimingFunction: ({ theme }) => ({\n ...theme(\"transitionTimingFunction\"),\n }),\n animationFillMode: {\n none: \"none\",\n forwards: \"forwards\",\n backwards: \"backwards\",\n both: \"both\",\n },\n animationDirection: {\n normal: \"normal\",\n reverse: \"reverse\",\n alternate: \"alternate\",\n \"alternate-reverse\": \"alternate-reverse\",\n },\n animationOpacity: ({ theme }) => ({\n DEFAULT: 0,\n ...theme(\"opacity\"),\n }),\n animationTranslate: ({ theme }) => ({\n DEFAULT: \"100%\",\n ...theme(\"translate\"),\n }),\n animationScale: ({ theme }) => ({\n DEFAULT: 0,\n ...theme(\"scale\"),\n }),\n animationRotate: ({ theme }) => ({\n DEFAULT: \"30deg\",\n ...theme(\"rotate\"),\n }),\n animationRepeat: {\n 0: \"0\",\n 1: \"1\",\n infinite: \"infinite\",\n },\n keyframes: {\n enter: {\n from: {\n opacity: \"var(--tw-enter-opacity, 1)\",\n transform:\n \"translate3d(var(--tw-enter-translate-x, 0), var(--tw-enter-translate-y, 0), 0) scale3d(var(--tw-enter-scale, 1), var(--tw-enter-scale, 1), var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))\",\n },\n },\n exit: {\n to: {\n opacity: \"var(--tw-exit-opacity, 1)\",\n transform:\n \"translate3d(var(--tw-exit-translate-x, 0), var(--tw-exit-translate-y, 0), 0) scale3d(var(--tw-exit-scale, 1), var(--tw-exit-scale, 1), var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))\",\n },\n },\n },\n }\n },\n // Include safelist from cache and additional classes\n safelist: [\n ...(cache?.safelist || []),\n {\n pattern: /(text|fill)-icon-(neutral|positive|negative|warning|info|highlight|interactive|brand|inverse|onpositive|onnegative|onwarning|oninfo|onhighlight|oninteractive|onbrand)-(mid|strong|subtle|low)(-(neutral|hover|active|selected|disabled))?$/,\n },\n {\n pattern: /^(layer-(below|surface|raised|popover|dialog|control)|overlay-(mid|strong|subtle|low))$/,\n },\n ],\n // Set content paths - merge options with defaults\n content: options.content || defaultContent\n };\n }\n);\n\n// Default export is the plugin\nmodule.exports = pluginExport;\n\n// Export components config and icons with getter functions\n// This allows dynamic resolution at runtime\n\n// Create getter for config\nObject.defineProperty(module.exports, 'config', {\n get: function () {\n // Check for webpack-injected global variable\n if (typeof __FF_CONFIG__ !== 'undefined') {\n return __FF_CONFIG__;\n }\n\n // Check if we're in a browser environment\n if (typeof window !== 'undefined' && window.__FF_CONFIG__) {\n return window.__FF_CONFIG__;\n }\n\n // Node.js: load from cache\n if (CacheManager) {\n try {\n const cacheManager = new CacheManager(process.cwd());\n if (cacheManager.exists()) {\n const cache = cacheManager.load();\n if (cache) {\n return cache.componentsConfig || null;\n }\n }\n } catch (error) {\n // Config not available\n }\n }\n\n return null;\n }\n});\n\n// Create getter for iconSet\nObject.defineProperty(module.exports, 'iconSet', {\n get: function () {\n // Check for webpack-injected global variable\n if (typeof __FF_ICONS__ !== 'undefined') {\n return __FF_ICONS__;\n }\n\n // Check if we're in a browser environment\n if (typeof window !== 'undefined' && window.__FF_ICONS__) {\n return window.__FF_ICONS__;\n }\n\n // Node.js: load from cache\n if (CacheManager) {\n try {\n const cacheManager = new CacheManager(process.cwd());\n if (cacheManager.exists()) {\n const cache = cacheManager.load();\n if (cache) {\n return cache.icons || null;\n }\n }\n } catch (error) {\n // Icons not available\n }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R,IAAIG,GAAA,YAAAA,EAAO,WAAY,CAAC,EACxB,CACE,QAAS,6OACX,EACA,CACE,QAAS,yFACX,CACF,EAEA,QAASN,EAAQ,SAAW6B,CAC9B,CACF,CACF,EAGA,OAAO,QAAU9B,GAMjB,OAAO,eAAe,OAAO,QAAS,SAAU,CAC9C,IAAK,UAAY,CAEf,GAAI,OAAO,cAAkB,IAC3B,OAAO,cAIT,GAAI,OAAO,OAAW,KAAe,OAAO,cAC1C,OAAO,OAAO,cAIhB,GAAIL,EACF,GAAI,CACF,IAAMW,EAAe,IAAIX,EAAa,QAAQ,IAAI,CAAC,EACnD,GAAIW,EAAa,OAAO,EAAG,CACzB,IAAMC,EAAQD,EAAa,KAAK,EAChC,GAAIC,EACF,OAAOA,EAAM,kBAAoB,IAErC,CACF,MAAgB,CAEhB,CAGF,OAAO,IACT,CACF,CAAC,EAGD,OAAO,eAAe,OAAO,QAAS,UAAW,CAC/C,IAAK,UAAY,CAEf,GAAI,OAAO,aAAiB,IAC1B,OAAO,aAIT,GAAI,OAAO,OAAW,KAAe,OAAO,aAC1C,OAAO,OAAO,aAIhB,GAAIZ,EACF,GAAI,CACF,IAAMW,EAAe,IAAIX,EAAa,QAAQ,IAAI,CAAC,EACnD,GAAIW,EAAa,OAAO,EAAG,CACzB,IAAMC,EAAQD,EAAa,KAAK,EAChC,GAAIC,EACF,OAAOA,EAAM,OAAS,IAE1B,CACF,MAAgB,CAEhB,CAGF,OAAO,IACT,CACF,CAAC,EAGD,OAAO,QAAQ,KAAO",
|
|
6
|
+
"names": ["require_file_utils", "__commonJSMin", "exports", "module", "fs", "readJsonFileSafe", "filepath", "content", "error", "readFileSafe", "writeJsonFile", "data", "indent", "writeModuleExportsFile", "fileExists", "ensureDirectoryExists", "dirpath", "removeDirectory", "require_package", "__commonJSMin", "exports", "module", "require_main", "__commonJSMin", "exports", "module", "fs", "path", "os", "crypto", "packageJson", "version", "LINE", "parse", "src", "obj", "lines", "match", "key", "value", "maybeQuote", "_parseVault", "options", "vaultPath", "_vaultPath", "result", "DotenvModule", "err", "keys", "_dotenvKey", "length", "decrypted", "i", "attrs", "_instructions", "error", "_warn", "message", "_debug", "_log", "dotenvKey", "uri", "environment", "environmentKey", "ciphertext", "possibleVaultPath", "filepath", "_resolveHome", "envPath", "_configVault", "debug", "quiet", "parsed", "processEnv", "configDotenv", "dotenvPath", "encoding", "optionPaths", "lastError", "parsedAll", "e", "keysCount", "shortPaths", "filePath", "relative", "config", "decrypt", "encrypted", "keyStr", "nonce", "authTag", "aesgcm", "isRange", "invalidKeyLength", "decryptionFailed", "populate", "override", "require_env_utils", "__commonJSMin", "exports", "module", "path", "fileExists", "loadEnvLocal", "cwd", "envLocalPath", "getEnvVar", "name", "defaultValue", "isEnvTrue", "require_ffdc", "__commonJSMin", "exports", "module", "config", "plugin", "postcss", "CacheManager", "loadEnvLocal", "filterDefault", "values", "key", "pluginExport", "options", "addBase", "addUtilities", "theme", "matchUtilities", "cacheManager", "cache", "rootVars", "value", "darkVars", "semanticUtilities", "cssVar", "match", "prefix", "name", "className", "bgUtilities", "textUtilities", "borderUtilities", "fillUtilities", "textIconUtilities", "fontUtilities", "fontFace", "rawCss", "root", "baseNodes", "utilityNodes", "node", "error", "defaultContent"]
|
|
7
7
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var
|
|
1
|
+
var u=typeof window<"u"&&typeof window.document<"u",F=typeof process<"u"&&process.versions&&process.versions.node,f=function(){return u&&console.warn("[FrontFriend] The Tailwind plugin cannot be used directly in browser environments"),{}};function c(){let t=new Map,e={get(s,i){return i===Symbol.toPrimitive||i==="valueOf"?()=>"":i==="toString"||i===Symbol.toStringTag?()=>"":i==="constructor"?Object:(t.has(i)||t.set(i,c()),t.get(i))},has(s,i){return!(typeof i=="symbol"&&i.toString().includes("nodejs.util.inspect"))},ownKeys(s){return[]},getOwnPropertyDescriptor(s,i){return{enumerable:!0,configurable:!0}}};return new Proxy({},e)}function a(t){return!t||typeof t!="object"?c():t}var r=null,n=null;function o(){if(typeof __FF_CONFIG__<"u")return __FF_CONFIG__;if(typeof process<"u"&&process.env){if(process.env.NEXT_PUBLIC_FF_CONFIG)try{return JSON.parse(process.env.NEXT_PUBLIC_FF_CONFIG)}catch{console.warn("[FrontFriend] Failed to parse NEXT_PUBLIC_FF_CONFIG from environment")}if(process.env.__FF_CONFIG__)try{return JSON.parse(process.env.__FF_CONFIG__)}catch{console.warn("[FrontFriend] Failed to parse __FF_CONFIG__ from environment")}}return u&&window.__FF_CONFIG__?window.__FF_CONFIG__:null}function _(){if(typeof __FF_ICONS__<"u")return __FF_ICONS__;if(typeof process<"u"&&process.env){if(process.env.NEXT_PUBLIC_FF_ICONS)try{return JSON.parse(process.env.NEXT_PUBLIC_FF_ICONS)}catch{console.warn("[FrontFriend] Failed to parse NEXT_PUBLIC_FF_ICONS from environment")}if(process.env.__FF_ICONS__)try{return JSON.parse(process.env.__FF_ICONS__)}catch{console.warn("[FrontFriend] Failed to parse __FF_ICONS__ from environment")}}return u&&window.__FF_ICONS__?window.__FF_ICONS__:null}var l=new Proxy({},{_proxyCache:new Map,get(t,e){return e===Symbol.toPrimitive||e==="valueOf"?()=>"":e==="toString"||e===Symbol.toStringTag?()=>"[object Object]":e==="constructor"?Object:(r||(r=o()),r&&e in r?r[e]:(this._proxyCache.has(e)||this._proxyCache.set(e,c()),this._proxyCache.get(e)))},has(t,e){return r||(r=o()),r?e in r:!0},ownKeys(t){return r||(r=o()),r?Object.keys(r):[]},getOwnPropertyDescriptor(t,e){return r||(r=o()),r&&e in r?Object.getOwnPropertyDescriptor(r,e):{enumerable:!0,configurable:!0}}}),d=new Proxy({},{get(t,e){return e===Symbol.toPrimitive||e==="valueOf"?()=>"":e==="toString"||e===Symbol.toStringTag?()=>"[object Object]":e==="constructor"?Object:(n||(n=_()),n&&e in n?n[e]:null)},has(t,e){return n||(n=_()),n?e in n:!1},ownKeys(t){return n||(n=_()),n?Object.keys(n):[]},getOwnPropertyDescriptor(t,e){if(n||(n=_()),n&&e in n)return Object.getOwnPropertyDescriptor(n,e)}}),O=f;export{l as config,O as default,a as ffdc,d as iconSet};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../index.mjs"],
|
|
4
|
-
"sourcesContent": ["// ES Module wrapper for frontfriend-tailwind\n// This file provides ES module exports for browser environments\n\n// Determine environment\nconst isBrowser = typeof window !== 'undefined' && typeof window.document !== 'undefined';\nconst isNode = typeof process !== 'undefined' && process.versions && process.versions.node;\n\n// Default plugin stub for browser\nconst plugin = function() {\n if (isBrowser) {\n console.warn('[FrontFriend] The Tailwind plugin cannot be used directly in browser environments');\n }\n return {};\n};\n\n// The ffdc function - with graceful fallback for SSR\nexport function ffdc(config) {\n // During SSR or initial load, config might not be available yet\n // Return a proxy that provides empty objects/strings for any property access\n if (!config || typeof config !== 'object') {\n return new Proxy({}, {\n get(target, prop) {\n // Return another proxy for nested property access\n return new Proxy({}, {\n get(target2, prop2) {\n // For deeply nested properties, return empty string or another proxy\n return new Proxy({}, {\n get() {\n return '';\n }\n });\n }\n });\n }\n });\n }\n \n return config;\n}\n\n// In browser environments, config and iconSet must be provided by the build system\n// (e.g., Vite plugin, webpack plugin, etc.) or loaded from a global variable\nlet _config = null;\nlet _iconSet = null;\n\n// Function to get config - tries multiple sources\nfunction getConfig() {\n // Try global variable first (webpack DefinePlugin)\n if (typeof __FF_CONFIG__ !== 'undefined') {\n return __FF_CONFIG__;\n }\n // Try Next.js environment variable (Turbopack compatibility)\n if (typeof process !== 'undefined' && process.env) {\n // Try NEXT_PUBLIC_ prefixed version first (Next.js requirement)\n if (process.env.NEXT_PUBLIC_FF_CONFIG) {\n try {\n return JSON.parse(process.env.NEXT_PUBLIC_FF_CONFIG);\n } catch (e) {\n console.warn('[FrontFriend] Failed to parse NEXT_PUBLIC_FF_CONFIG from environment');\n }\n }\n // Fallback to __ prefixed version for non-Next.js environments\n if (process.env.__FF_CONFIG__) {\n try {\n return JSON.parse(process.env.__FF_CONFIG__);\n } catch (e) {\n console.warn('[FrontFriend] Failed to parse __FF_CONFIG__ from environment');\n }\n }\n }\n // Try window global\n if (isBrowser && window.__FF_CONFIG__) {\n return window.__FF_CONFIG__;\n }\n return null;\n}\n\n// Function to get icons - tries multiple sources\nfunction getIcons() {\n // Try global variable first (webpack DefinePlugin)\n if (typeof __FF_ICONS__ !== 'undefined') {\n return __FF_ICONS__;\n }\n // Try Next.js environment variable (Turbopack compatibility)\n if (typeof process !== 'undefined' && process.env) {\n // Try NEXT_PUBLIC_ prefixed version first (Next.js requirement)\n if (process.env.NEXT_PUBLIC_FF_ICONS) {\n try {\n return JSON.parse(process.env.NEXT_PUBLIC_FF_ICONS);\n } catch (e) {\n console.warn('[FrontFriend] Failed to parse NEXT_PUBLIC_FF_ICONS from environment');\n }\n }\n // Fallback to __ prefixed version for non-Next.js environments\n if (process.env.__FF_ICONS__) {\n try {\n return JSON.parse(process.env.__FF_ICONS__);\n } catch (e) {\n console.warn('[FrontFriend] Failed to parse __FF_ICONS__ from environment');\n }\n }\n }\n // Try window global\n if (isBrowser && window.__FF_ICONS__) {\n return window.__FF_ICONS__;\n }\n return null;\n}\n\n// Export config - returns empty object if not loaded\nexport const config = new Proxy({}, {\n get(target, prop) {\n // Try to get config if not already loaded\n if (!_config) {\n _config = getConfig();\n }\n \n if (_config && prop in _config) {\n return _config[prop];\n }\n \n // Return a proxy that provides empty objects for any nested access\n // This prevents errors when accessing nested properties during SSR\n return new Proxy({}, {\n get(target2, prop2) {\n return new Proxy({}, {\n get() {\n return '';\n }\n });\n }\n });\n }\n});\n\n// Export iconSet - returns null if not loaded\nexport const iconSet = new Proxy({}, {\n get(target, prop) {\n // Try to get icons if not already loaded\n if (!_iconSet) {\n _iconSet = getIcons();\n }\n \n if (_iconSet && prop in _iconSet) {\n return _iconSet[prop];\n }\n return null;\n }\n});\n\n// Default export\nexport default plugin;"],
|
|
5
|
-
"mappings": "AAIA,IAAMA,EAAY,OAAO,OAAW,KAAe,OAAO,OAAO,SAAa,IACxEC,EAAS,OAAO,QAAY,KAAe,QAAQ,UAAY,QAAQ,SAAS,KAGhFC,EAAS,UAAW,CACxB,OAAIF,GACF,QAAQ,KAAK,mFAAmF,EAE3F,CAAC,CACV,
|
|
6
|
-
"names": ["isBrowser", "isNode", "plugin", "
|
|
4
|
+
"sourcesContent": ["// ES Module wrapper for frontfriend-tailwind\n// This file provides ES module exports for browser environments\n\n// Determine environment\nconst isBrowser = typeof window !== 'undefined' && typeof window.document !== 'undefined';\nconst isNode = typeof process !== 'undefined' && process.versions && process.versions.node;\n\n// Default plugin stub for browser\nconst plugin = function() {\n if (isBrowser) {\n console.warn('[FrontFriend] The Tailwind plugin cannot be used directly in browser environments');\n }\n return {};\n};\n\n/**\n * Creates a deep proxy that gracefully handles arbitrary nested property access\n * without throwing errors. This is essential for SSR and build-time scenarios\n * where configuration might not be loaded yet.\n *\n * Features:\n * - Infinite depth access: config.a.b.c.d.e never crashes\n * - Referential equality: config.a === config.a (memoized)\n * - Iteration support: Object.keys(), spread operator, for...in\n * - Type coercion: Works with toString, valueOf, Symbol.toPrimitive\n * - 'in' operator: 'property' in config returns true\n *\n * @returns {Proxy} A proxy object that handles any property access safely\n *\n * @example\n * const config = createDeepProxy();\n * const value = config.sidebar.root.wrapper.base; // Never crashes\n * config.a === config.a; // true (referential equality)\n * 'anything' in config; // true\n * Object.keys(config); // []\n */\nfunction createDeepProxy() {\n // Cache for memoization - ensures referential equality\n // This is critical for React dependency arrays and equality checks\n const cache = new Map();\n\n const handler = {\n /**\n * Handles property access with memoization\n * Ensures config.a === config.a for referential equality\n */\n get(target, prop) {\n // Handle special cases for type coercion and inspection\n if (prop === Symbol.toPrimitive || prop === 'valueOf') {\n return () => '';\n }\n if (prop === 'toString' || prop === Symbol.toStringTag) {\n return () => '';\n }\n if (prop === 'constructor') {\n return Object;\n }\n\n // Return cached proxy for same property to maintain referential equality\n // This prevents issues with React hooks and memoization\n if (!cache.has(prop)) {\n cache.set(prop, createDeepProxy());\n }\n return cache.get(prop);\n },\n\n /**\n * Handles 'in' operator\n * Makes 'property' in config return true for any property\n */\n has(target, prop) {\n // Return true for all properties except internal symbols\n if (typeof prop === 'symbol' && prop.toString().includes('nodejs.util.inspect')) {\n return false;\n }\n return true;\n },\n\n /**\n * Handles Object.keys(), Object.getOwnPropertyNames(), for...in\n * Returns empty array since proxy represents missing/unknown config\n */\n ownKeys(target) {\n return [];\n },\n\n /**\n * Handles Object.getOwnPropertyDescriptor()\n * Required for proper iteration support with ownKeys\n */\n getOwnPropertyDescriptor(target, prop) {\n return {\n enumerable: true,\n configurable: true,\n };\n },\n };\n\n return new Proxy({}, handler);\n}\n\n/**\n * FrontFriend Design Config (ffdc) - Safe config wrapper with SSR support\n *\n * Wraps configuration objects to prevent crashes during SSR or when config\n * is not yet loaded. Returns actual config if valid, or a deep proxy fallback.\n *\n * This is the recommended way to access config in components to ensure\n * they work during both build-time (SSR) and runtime.\n *\n * @param {Object|null|undefined} config - The configuration object to wrap\n * @returns {Object|Proxy} The config object or a safe deep proxy\n *\n * @example\n * import { config, ffdc } from '@frontfriend/tailwind';\n *\n * // Safe access during SSR - never crashes\n * const sidebarConfig = ffdc(config || {}).sidebar;\n * const className = sidebarConfig.root.wrapper.base; // Always safe\n *\n * @example\n * // In a React component\n * function Sidebar() {\n * const cfg = ffdc(config).sidebar;\n * return <div className={cfg.root.base}>...</div>;\n * }\n */\nexport function ffdc(config) {\n // During SSR or initial load, config might not be available yet\n // Return a deep proxy that handles any property access without crashing\n if (!config || typeof config !== 'object') {\n return createDeepProxy();\n }\n\n return config;\n}\n\n// In browser environments, config and iconSet must be provided by the build system\n// (e.g., Vite plugin, webpack plugin, etc.) or loaded from a global variable\nlet _config = null;\nlet _iconSet = null;\n\n// Function to get config - tries multiple sources\nfunction getConfig() {\n // Try global variable first (webpack DefinePlugin)\n if (typeof __FF_CONFIG__ !== 'undefined') {\n return __FF_CONFIG__;\n }\n // Try Next.js environment variable (Turbopack compatibility)\n if (typeof process !== 'undefined' && process.env) {\n // Try NEXT_PUBLIC_ prefixed version first (Next.js requirement)\n if (process.env.NEXT_PUBLIC_FF_CONFIG) {\n try {\n return JSON.parse(process.env.NEXT_PUBLIC_FF_CONFIG);\n } catch (e) {\n console.warn('[FrontFriend] Failed to parse NEXT_PUBLIC_FF_CONFIG from environment');\n }\n }\n // Fallback to __ prefixed version for non-Next.js environments\n if (process.env.__FF_CONFIG__) {\n try {\n return JSON.parse(process.env.__FF_CONFIG__);\n } catch (e) {\n console.warn('[FrontFriend] Failed to parse __FF_CONFIG__ from environment');\n }\n }\n }\n // Try window global\n if (isBrowser && window.__FF_CONFIG__) {\n return window.__FF_CONFIG__;\n }\n return null;\n}\n\n// Function to get icons - tries multiple sources\nfunction getIcons() {\n // Try global variable first (webpack DefinePlugin)\n if (typeof __FF_ICONS__ !== 'undefined') {\n return __FF_ICONS__;\n }\n // Try Next.js environment variable (Turbopack compatibility)\n if (typeof process !== 'undefined' && process.env) {\n // Try NEXT_PUBLIC_ prefixed version first (Next.js requirement)\n if (process.env.NEXT_PUBLIC_FF_ICONS) {\n try {\n return JSON.parse(process.env.NEXT_PUBLIC_FF_ICONS);\n } catch (e) {\n console.warn('[FrontFriend] Failed to parse NEXT_PUBLIC_FF_ICONS from environment');\n }\n }\n // Fallback to __ prefixed version for non-Next.js environments\n if (process.env.__FF_ICONS__) {\n try {\n return JSON.parse(process.env.__FF_ICONS__);\n } catch (e) {\n console.warn('[FrontFriend] Failed to parse __FF_ICONS__ from environment');\n }\n }\n }\n // Try window global\n if (isBrowser && window.__FF_ICONS__) {\n return window.__FF_ICONS__;\n }\n return null;\n}\n\n/**\n * Main config export with lazy loading and memoization\n *\n * This proxy:\n * - Lazily loads config from multiple sources (globals, env vars, window)\n * - Returns actual config values when available\n * - Falls back to deep proxy for missing properties\n * - Maintains referential equality for the same property access\n * - Supports 'in' operator and iteration\n *\n * @example\n * import { config } from '@frontfriend/tailwind';\n * const sidebarConfig = config.sidebar; // Loads config lazily\n * config.sidebar === config.sidebar; // true (memoized)\n */\nexport const config = new Proxy({}, {\n // Cache for memoized deep proxies\n _proxyCache: new Map(),\n\n get(target, prop) {\n // Handle special cases for console.log, JSON.stringify, etc.\n if (prop === Symbol.toPrimitive || prop === 'valueOf') {\n return () => '';\n }\n if (prop === 'toString' || prop === Symbol.toStringTag) {\n return () => '[object Object]';\n }\n if (prop === 'constructor') {\n return Object;\n }\n\n // Try to get config if not already loaded\n if (!_config) {\n _config = getConfig();\n }\n\n // Return actual config value if it exists\n if (_config && prop in _config) {\n return _config[prop];\n }\n\n // Return memoized deep proxy for missing properties\n // This ensures config.missing === config.missing (referential equality)\n if (!this._proxyCache.has(prop)) {\n this._proxyCache.set(prop, createDeepProxy());\n }\n return this._proxyCache.get(prop);\n },\n\n /**\n * Handles 'in' operator\n * Returns true if property exists in loaded config, or true for any property\n * to prevent crashes during property checks\n */\n has(target, prop) {\n // Try to load config first\n if (!_config) {\n _config = getConfig();\n }\n\n // If config is loaded, check if property exists\n if (_config) {\n return prop in _config;\n }\n\n // If config not loaded, return true to allow safe access\n return true;\n },\n\n /**\n * Handles Object.keys(), Object.getOwnPropertyNames()\n * Returns actual config keys if loaded, empty array otherwise\n */\n ownKeys(target) {\n if (!_config) {\n _config = getConfig();\n }\n\n return _config ? Object.keys(_config) : [];\n },\n\n /**\n * Handles Object.getOwnPropertyDescriptor()\n * Required for proper iteration support\n */\n getOwnPropertyDescriptor(target, prop) {\n if (!_config) {\n _config = getConfig();\n }\n\n if (_config && prop in _config) {\n return Object.getOwnPropertyDescriptor(_config, prop);\n }\n\n return {\n enumerable: true,\n configurable: true,\n };\n },\n});\n\n/**\n * Icon set export with lazy loading\n *\n * This proxy:\n * - Lazily loads icons from multiple sources (globals, env vars, window)\n * - Returns actual icon values when available\n * - Returns null for missing icons (allowing graceful fallbacks)\n * - Supports 'in' operator to check icon availability\n *\n * @example\n * import { iconSet } from '@frontfriend/tailwind';\n * const closeIcon = iconSet.sidebar?.close; // Safely access with optional chaining\n * if ('close' in iconSet.sidebar) { ... } // Check if icon exists\n */\nexport const iconSet = new Proxy({}, {\n get(target, prop) {\n // Handle special cases for type coercion\n if (prop === Symbol.toPrimitive || prop === 'valueOf') {\n return () => '';\n }\n if (prop === 'toString' || prop === Symbol.toStringTag) {\n return () => '[object Object]';\n }\n if (prop === 'constructor') {\n return Object;\n }\n\n // Try to get icons if not already loaded\n if (!_iconSet) {\n _iconSet = getIcons();\n }\n\n // Return actual icon value if it exists\n if (_iconSet && prop in _iconSet) {\n return _iconSet[prop];\n }\n\n // Return null for missing icons (allows graceful fallbacks)\n return null;\n },\n\n /**\n * Handles 'in' operator for icon existence checks\n */\n has(target, prop) {\n if (!_iconSet) {\n _iconSet = getIcons();\n }\n\n return _iconSet ? prop in _iconSet : false;\n },\n\n /**\n * Handles Object.keys() for iconSet\n */\n ownKeys(target) {\n if (!_iconSet) {\n _iconSet = getIcons();\n }\n\n return _iconSet ? Object.keys(_iconSet) : [];\n },\n\n /**\n * Handles Object.getOwnPropertyDescriptor() for iconSet\n */\n getOwnPropertyDescriptor(target, prop) {\n if (!_iconSet) {\n _iconSet = getIcons();\n }\n\n if (_iconSet && prop in _iconSet) {\n return Object.getOwnPropertyDescriptor(_iconSet, prop);\n }\n\n return undefined;\n },\n});\n\n// Default export\nexport default plugin;"],
|
|
5
|
+
"mappings": "AAIA,IAAMA,EAAY,OAAO,OAAW,KAAe,OAAO,OAAO,SAAa,IACxEC,EAAS,OAAO,QAAY,KAAe,QAAQ,UAAY,QAAQ,SAAS,KAGhFC,EAAS,UAAW,CACxB,OAAIF,GACF,QAAQ,KAAK,mFAAmF,EAE3F,CAAC,CACV,EAuBA,SAASG,GAAkB,CAGzB,IAAMC,EAAQ,IAAI,IAEZC,EAAU,CAKd,IAAIC,EAAQC,EAAM,CAEhB,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M,CAChB,OAAKI,IACHA,EAAWE,EAAS,GAGfF,EAAWJ,KAAQI,EAAW,EACvC,EAKA,QAAQL,EAAQ,CACd,OAAKK,IACHA,EAAWE,EAAS,GAGfF,EAAW,OAAO,KAAKA,CAAQ,EAAI,CAAC,CAC7C,EAKA,yBAAyBL,EAAQC,EAAM,CAKrC,GAJKI,IACHA,EAAWE,EAAS,GAGlBF,GAAYJ,KAAQI,EACtB,OAAO,OAAO,yBAAyBA,EAAUJ,CAAI,CAIzD,CACF,CAAC,EAGMQ,EAAQb",
|
|
6
|
+
"names": ["isBrowser", "isNode", "plugin", "createDeepProxy", "cache", "handler", "target", "prop", "ffdc", "config", "_config", "_iconSet", "getConfig", "getIcons", "iconSet", "frontfriend_tailwind_default"]
|
|
7
7
|
}
|
package/dist/runtime.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(function(){"use strict";let i=function(){return typeof window<"u"&&window.__FF_CONFIG__?window.__FF_CONFIG__:typeof global<"u"&&global.__FF_CONFIG__?global.__FF_CONFIG__:null},
|
|
1
|
+
(function(){"use strict";function c(){let r=new Map,t={get:function(g,i){return i===Symbol.toPrimitive||i==="valueOf"?function(){return""}:i==="toString"||i===Symbol.toStringTag?function(){return""}:i==="constructor"?Object:(r.has(i)||r.set(i,c()),r.get(i))},has:function(g,i){return!(typeof i=="symbol"&&i.toString().includes("nodejs.util.inspect"))},ownKeys:function(g){return[]},getOwnPropertyDescriptor:function(g,i){return{enumerable:!0,configurable:!0}}};return new Proxy({},t)}let n=null,e=null,u=function(){return typeof window<"u"&&window.__FF_CONFIG__?window.__FF_CONFIG__:typeof global<"u"&&global.__FF_CONFIG__?global.__FF_CONFIG__:null},o=function(){return typeof window<"u"&&window.__FF_ICONS__?window.__FF_ICONS__:typeof global<"u"&&global.__FF_ICONS__?global.__FF_ICONS__:null},f=new Map,_=new Proxy({},{get:function(r,t){return t===Symbol.toPrimitive||t==="valueOf"?function(){return""}:t==="toString"||t===Symbol.toStringTag?function(){return"[object Object]"}:t==="constructor"?Object:(n||(n=u()),n&&t in n?n[t]:(f.has(t)||f.set(t,c()),f.get(t)))},has:function(r,t){return n||(n=u()),n?t in n:!0},ownKeys:function(r){return n||(n=u()),n?Object.keys(n):[]},getOwnPropertyDescriptor:function(r,t){return n||(n=u()),n&&t in n?Object.getOwnPropertyDescriptor(n,t):{enumerable:!0,configurable:!0}}}),a=new Proxy({},{get:function(r,t){return t===Symbol.toPrimitive||t==="valueOf"?function(){return""}:t==="toString"||t===Symbol.toStringTag?function(){return"[object Object]"}:t==="constructor"?Object:(e||(e=o()),e&&t in e?e[t]:null)},has:function(r,t){return e||(e=o()),e?t in e:!1},ownKeys:function(r){return e||(e=o()),e?Object.keys(e):[]},getOwnPropertyDescriptor:function(r,t){if(e||(e=o()),e&&t in e)return Object.getOwnPropertyDescriptor(e,t)}});function s(r){return!r||typeof r!="object"?c():r}let l={config:_,iconSet:a,ffdc:s,getIcon:function(r){return a[r]},refresh:function(){n=null,e=null,f.clear()}};typeof define=="function"&&define.amd?define([],function(){return l}):typeof module<"u"&&typeof module.exports<"u"&&(module.exports=l),typeof window<"u"&&(window.FrontFriend=l)})();
|
|
2
2
|
//# sourceMappingURL=runtime.js.map
|
package/dist/runtime.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../runtime.js"],
|
|
4
|
-
"sourcesContent": ["(function() {\n 'use strict';\n\n //
|
|
5
|
-
"mappings": "CAAC,UAAW,CACV,
|
|
6
|
-
"names": ["getConfig", "getIcons", "
|
|
4
|
+
"sourcesContent": ["(function() {\n 'use strict';\n\n /**\n * Creates a deep proxy that handles arbitrary nested property access\n * without throwing errors. Essential for SSR and build-time scenarios.\n */\n function createDeepProxy() {\n const cache = new Map();\n\n const handler = {\n get: function(target, prop) {\n // Handle special cases for type coercion\n if (prop === Symbol.toPrimitive || prop === 'valueOf') {\n return function() { return ''; };\n }\n if (prop === 'toString' || prop === Symbol.toStringTag) {\n return function() { return ''; };\n }\n if (prop === 'constructor') {\n return Object;\n }\n\n // Return cached proxy for referential equality\n if (!cache.has(prop)) {\n cache.set(prop, createDeepProxy());\n }\n return cache.get(prop);\n },\n\n has: function(target, prop) {\n // Return true for all properties except internal symbols\n if (typeof prop === 'symbol' && prop.toString().includes('nodejs.util.inspect')) {\n return false;\n }\n return true;\n },\n\n ownKeys: function(target) {\n return [];\n },\n\n getOwnPropertyDescriptor: function(target, prop) {\n return {\n enumerable: true,\n configurable: true,\n };\n },\n };\n\n return new Proxy({}, handler);\n }\n\n // Configuration loader\n let _config = null;\n let _iconSet = null;\n\n const getConfig = function() {\n // Check if running in browser\n if (typeof window !== 'undefined' && window.__FF_CONFIG__) {\n return window.__FF_CONFIG__;\n }\n // Check if in Node.js environment (for SSR)\n if (typeof global !== 'undefined' && global.__FF_CONFIG__) {\n return global.__FF_CONFIG__;\n }\n return null;\n };\n\n const getIcons = function() {\n // Check if running in browser\n if (typeof window !== 'undefined' && window.__FF_ICONS__) {\n return window.__FF_ICONS__;\n }\n // Check if in Node.js environment (for SSR)\n if (typeof global !== 'undefined' && global.__FF_ICONS__) {\n return global.__FF_ICONS__;\n }\n return null;\n };\n\n // Config proxy with lazy loading and memoization\n const configProxyCache = new Map();\n const configProxy = new Proxy({}, {\n get: function(target, prop) {\n // Handle special cases\n if (prop === Symbol.toPrimitive || prop === 'valueOf') {\n return function() { return ''; };\n }\n if (prop === 'toString' || prop === Symbol.toStringTag) {\n return function() { return '[object Object]'; };\n }\n if (prop === 'constructor') {\n return Object;\n }\n\n // Lazy load config\n if (!_config) {\n _config = getConfig();\n }\n\n // Return actual value if exists\n if (_config && prop in _config) {\n return _config[prop];\n }\n\n // Return memoized deep proxy for missing properties\n if (!configProxyCache.has(prop)) {\n configProxyCache.set(prop, createDeepProxy());\n }\n return configProxyCache.get(prop);\n },\n\n has: function(target, prop) {\n if (!_config) {\n _config = getConfig();\n }\n return _config ? prop in _config : true;\n },\n\n ownKeys: function(target) {\n if (!_config) {\n _config = getConfig();\n }\n return _config ? Object.keys(_config) : [];\n },\n\n getOwnPropertyDescriptor: function(target, prop) {\n if (!_config) {\n _config = getConfig();\n }\n if (_config && prop in _config) {\n return Object.getOwnPropertyDescriptor(_config, prop);\n }\n return {\n enumerable: true,\n configurable: true,\n };\n },\n });\n\n // IconSet proxy with lazy loading\n const iconSetProxy = new Proxy({}, {\n get: function(target, prop) {\n // Handle special cases\n if (prop === Symbol.toPrimitive || prop === 'valueOf') {\n return function() { return ''; };\n }\n if (prop === 'toString' || prop === Symbol.toStringTag) {\n return function() { return '[object Object]'; };\n }\n if (prop === 'constructor') {\n return Object;\n }\n\n // Lazy load icons\n if (!_iconSet) {\n _iconSet = getIcons();\n }\n\n // Return actual icon if exists\n if (_iconSet && prop in _iconSet) {\n return _iconSet[prop];\n }\n\n return null;\n },\n\n has: function(target, prop) {\n if (!_iconSet) {\n _iconSet = getIcons();\n }\n return _iconSet ? prop in _iconSet : false;\n },\n\n ownKeys: function(target) {\n if (!_iconSet) {\n _iconSet = getIcons();\n }\n return _iconSet ? Object.keys(_iconSet) : [];\n },\n\n getOwnPropertyDescriptor: function(target, prop) {\n if (!_iconSet) {\n _iconSet = getIcons();\n }\n if (_iconSet && prop in _iconSet) {\n return Object.getOwnPropertyDescriptor(_iconSet, prop);\n }\n return undefined;\n },\n });\n\n /**\n * FrontFriend Design Config (ffdc) - Safe config wrapper\n * Returns actual config if valid, or a deep proxy fallback for SSR safety\n */\n function ffdc(config) {\n if (!config || typeof config !== 'object') {\n return createDeepProxy();\n }\n return config;\n }\n\n // Public API\n const FrontFriend = {\n config: configProxy,\n iconSet: iconSetProxy,\n ffdc: ffdc,\n\n // Helper method to get a specific icon\n getIcon: function(name) {\n return iconSetProxy[name];\n },\n\n // Helper method to refresh config (useful for dynamic updates)\n refresh: function() {\n _config = null;\n _iconSet = null;\n configProxyCache.clear();\n }\n };\n\n // Detect environment and export accordingly\n \n // AMD (RequireJS) - check first since it might also have module defined\n if (typeof define === 'function' && define.amd) {\n define([], function() {\n return FrontFriend;\n });\n }\n // CommonJS (Node.js)\n else if (typeof module !== 'undefined' && typeof module.exports !== 'undefined') {\n module.exports = FrontFriend;\n }\n \n // Always attach to window in browser environment (even with module loaders)\n if (typeof window !== 'undefined') {\n window.FrontFriend = FrontFriend;\n }\n\n})();"],
|
|
5
|
+
"mappings": "CAAC,UAAW,CACV,aAMA,SAASA,GAAkB,CACzB,IAAMC,EAAQ,IAAI,IAEZC,EAAU,CACd,IAAK,SAASC,EAAQC,EAAM,CAE1B,OAAIA,IAAS,OAAO,aAAeA,IAAS,UACnC,UAAW,CAAE,MAAO,EAAI,EAE7BA,IAAS,YAAcA,IAAS,OAAO,YAClC,UAAW,CAAE,MAAO,EAAI,EAE7BA,IAAS,cACJ,QAIJH,EAAM,IAAIG,CAAI,GACjBH,EAAM,IAAIG,EAAMJ,EAAgB,CAAC,EAE5BC,EAAM,IAAIG,CAAI,EACvB,EAEA,IAAK,SAASD,EAAQC,EAAM,CAE1B,MAAI,SAAOA,GAAS,UAAYA,EAAK,SAAS,EAAE,SAAS,qBAAqB,EAIhF,EAEA,QAAS,SAASD,EAAQ,CACxB,MAAO,CAAC,CACV,EAEA,yBAA0B,SAASA,EAAQC,EAAM,CAC/C,MAAO,CACL,WAAY,GACZ,aAAc,EAChB,CACF,CACF,EAEA,OAAO,IAAI,MAAM,CAAC,EAAGF,CAAO,CAC9B,CAGA,IAAIG,EAAU,KACVC,EAAW,KAETC,EAAY,UAAW,CAE3B,OAAI,OAAO,OAAW,KAAe,OAAO,cACnC,OAAO,cAGZ,OAAO,OAAW,KAAe,OAAO,cACnC,OAAO,cAET,IACT,EAEMC,EAAW,UAAW,CAE1B,OAAI,OAAO,OAAW,KAAe,OAAO,aACnC,OAAO,aAGZ,OAAO,OAAW,KAAe,OAAO,aACnC,OAAO,aAET,IACT,EAGMC,EAAmB,IAAI,IACvBC,EAAc,IAAI,MAAM,CAAC,EAAG,C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AAQ,EAAI,CAAC,CAC7C,EAEA,yBAA0B,SAASH,EAAQC,EAAM,CAI/C,GAHKE,IACHA,EAAWE,EAAS,GAElBF,GAAYF,KAAQE,EACtB,OAAO,OAAO,yBAAyBA,EAAUF,CAAI,CAGzD,CACF,CAAC,EAMD,SAASQ,EAAKC,EAAQ,CACpB,MAAI,CAACA,GAAU,OAAOA,GAAW,SACxBb,EAAgB,EAElBa,CACT,CAGA,IAAMC,EAAc,CAClB,OAAQJ,EACR,QAASC,EACT,KAAMC,EAGN,QAAS,SAASG,EAAM,CACtB,OAAOJ,EAAaI,CAAI,CAC1B,EAGA,QAAS,UAAW,CAClBV,EAAU,KACVC,EAAW,KACXG,EAAiB,MAAM,CACzB,CACF,EAKI,OAAO,QAAW,YAAc,OAAO,IACzC,OAAO,CAAC,EAAG,UAAW,CACpB,OAAOK,CACT,CAAC,EAGM,OAAO,OAAW,KAAe,OAAO,OAAO,QAAY,MAClE,OAAO,QAAUA,GAIf,OAAO,OAAW,MACpB,OAAO,YAAcA,EAGzB,GAAG",
|
|
6
|
+
"names": ["createDeepProxy", "cache", "handler", "target", "prop", "_config", "_iconSet", "getConfig", "getIcons", "configProxyCache", "configProxy", "iconSetProxy", "ffdc", "config", "FrontFriend", "name"]
|
|
7
7
|
}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -141,21 +141,63 @@ declare module '@frontfriend/tailwind/lib/react/utils.mjs' {
|
|
|
141
141
|
}
|
|
142
142
|
|
|
143
143
|
declare module '@frontfriend/tailwind/lib/vue/utils' {
|
|
144
|
+
import type { Ref, ComputedRef } from 'vue';
|
|
145
|
+
|
|
144
146
|
/**
|
|
145
147
|
* Combines class names with tailwind-merge
|
|
146
148
|
* @param inputs - Class names to combine
|
|
147
149
|
* @returns Merged class string
|
|
148
150
|
*/
|
|
149
151
|
export function cn(...inputs: any[]): string;
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Vue composable for media query matching
|
|
155
|
+
* @param query - Media query string
|
|
156
|
+
* @returns Ref with boolean value indicating if query matches
|
|
157
|
+
*/
|
|
158
|
+
export function useMediaQuery(query: string): Ref<boolean>;
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* Vue composable for responsive breakpoints
|
|
162
|
+
* @returns Object with breakpoint state refs and active breakpoint
|
|
163
|
+
*/
|
|
164
|
+
export function useBreakpoints(): {
|
|
165
|
+
isXs: Ref<boolean>;
|
|
166
|
+
isSm: Ref<boolean>;
|
|
167
|
+
isMd: Ref<boolean>;
|
|
168
|
+
isLg: Ref<boolean>;
|
|
169
|
+
active: ComputedRef<'xs' | 'sm' | 'md' | 'lg'>;
|
|
170
|
+
};
|
|
150
171
|
}
|
|
151
172
|
|
|
152
173
|
declare module '@frontfriend/tailwind/lib/vue/utils.mjs' {
|
|
174
|
+
import type { Ref, ComputedRef } from 'vue';
|
|
175
|
+
|
|
153
176
|
/**
|
|
154
177
|
* Combines class names with tailwind-merge
|
|
155
178
|
* @param inputs - Class names to combine
|
|
156
179
|
* @returns Merged class string
|
|
157
180
|
*/
|
|
158
181
|
export function cn(...inputs: any[]): string;
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* Vue composable for media query matching
|
|
185
|
+
* @param query - Media query string
|
|
186
|
+
* @returns Ref with boolean value indicating if query matches
|
|
187
|
+
*/
|
|
188
|
+
export function useMediaQuery(query: string): Ref<boolean>;
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* Vue composable for responsive breakpoints
|
|
192
|
+
* @returns Object with breakpoint state refs and active breakpoint
|
|
193
|
+
*/
|
|
194
|
+
export function useBreakpoints(): {
|
|
195
|
+
isXs: Ref<boolean>;
|
|
196
|
+
isSm: Ref<boolean>;
|
|
197
|
+
isMd: Ref<boolean>;
|
|
198
|
+
isLg: Ref<boolean>;
|
|
199
|
+
active: ComputedRef<'xs' | 'sm' | 'md' | 'lg'>;
|
|
200
|
+
};
|
|
159
201
|
}
|
|
160
202
|
|
|
161
203
|
// Internal modules (for advanced usage)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frontfriend/tailwind",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.6.0",
|
|
4
4
|
"description": "Design token management for Tailwind CSS",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/types/index.d.ts",
|
|
@@ -39,11 +39,6 @@
|
|
|
39
39
|
"default": "./dist/ffdc.js"
|
|
40
40
|
}
|
|
41
41
|
},
|
|
42
|
-
"scripts": {
|
|
43
|
-
"test": "jest",
|
|
44
|
-
"build": "node scripts/build.js",
|
|
45
|
-
"prepublishOnly": "npm run build"
|
|
46
|
-
},
|
|
47
42
|
"keywords": [
|
|
48
43
|
"tailwindcss",
|
|
49
44
|
"design-tokens",
|
|
@@ -73,5 +68,9 @@
|
|
|
73
68
|
"jest": "^29.0.0",
|
|
74
69
|
"esbuild": "^0.19.0",
|
|
75
70
|
"glob": "^10.0.0"
|
|
71
|
+
},
|
|
72
|
+
"scripts": {
|
|
73
|
+
"test": "jest",
|
|
74
|
+
"build": "node scripts/build.js"
|
|
76
75
|
}
|
|
77
|
-
}
|
|
76
|
+
}
|