@pikacss/integration 0.0.33 → 0.0.35

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/index.d.cts CHANGED
@@ -25,20 +25,31 @@ interface FnUtils {
25
25
  isPreview: (fnName: string) => boolean;
26
26
  RE: RegExp;
27
27
  }
28
+ interface IntegrationContextOptions {
29
+ cwd: string;
30
+ currentPackageName: string;
31
+ scan: {
32
+ include: string[];
33
+ exclude: string[];
34
+ };
35
+ configOrPath: EngineConfig | string | Nullish;
36
+ fnName: string;
37
+ transformedFormat: 'string' | 'array' | 'inline';
38
+ tsCodegen: false | string;
39
+ cssCodegen: string;
40
+ autoCreateConfig: boolean;
41
+ }
28
42
  interface IntegrationContext {
29
43
  cwd: string;
30
44
  currentPackageName: string;
31
45
  fnName: string;
32
- fnUtils: FnUtils;
33
46
  transformedFormat: 'string' | 'array' | 'inline';
34
- devCssFilepath: string;
47
+ cssCodegenFilepath: string;
35
48
  tsCodegenFilepath: string | Nullish;
36
49
  hasVue: boolean;
37
- usages: Map<string, UsageRecord[]>;
38
- hooks: {
39
- styleUpdated: ReturnType<typeof createEventHook<void>>;
40
- tsCodegenUpdated: ReturnType<typeof createEventHook<void>>;
41
- };
50
+ resolvedConfig: EngineConfig | Nullish;
51
+ resolvedConfigPath: string | Nullish;
52
+ resolvedConfigContent: string | Nullish;
42
53
  loadConfig: () => Promise<{
43
54
  config: EngineConfig;
44
55
  file: null;
@@ -49,33 +60,30 @@ interface IntegrationContext {
49
60
  config: EngineConfig;
50
61
  file: string;
51
62
  }>;
52
- init: () => Promise<any>;
53
- isReady: boolean;
54
- configSources: string[];
55
- resolvedConfigPath: string | Nullish;
63
+ usages: Map<string, UsageRecord[]>;
64
+ hooks: {
65
+ styleUpdated: ReturnType<typeof createEventHook<void>>;
66
+ tsCodegenUpdated: ReturnType<typeof createEventHook<void>>;
67
+ };
56
68
  engine: Engine;
69
+ transformFilter: {
70
+ include: string[];
71
+ exclude: string[];
72
+ };
57
73
  transform: (code: string, id: string) => Promise<{
58
74
  code: string;
59
75
  map: SourceMap;
60
76
  } | Nullish>;
61
- getCssContent: (isDev: boolean) => Promise<string | Nullish>;
77
+ getCssCodegenContent: () => Promise<string | Nullish>;
62
78
  getTsCodegenContent: () => Promise<string | Nullish>;
63
- writeDevCssFile: () => Promise<void>;
79
+ writeCssCodegenFile: () => Promise<void>;
64
80
  writeTsCodegenFile: () => Promise<void>;
65
- }
66
- interface IntegrationContextOptions {
67
- cwd: string;
68
- currentPackageName: string;
69
- target: string[];
70
- configOrPath: EngineConfig | string | Nullish;
71
- fnName: string;
72
- transformedFormat: 'string' | 'array' | 'inline';
73
- tsCodegen: false | string;
74
- devCss: string;
75
- autoCreateConfig: boolean;
81
+ fullyCssCodegen: () => Promise<void>;
82
+ setupPromise: Promise<void> | null;
83
+ setup: () => Promise<void>;
76
84
  }
77
85
  //#endregion
78
86
  //#region src/ctx.d.ts
79
- declare function createCtx(options: IntegrationContextOptions): Promise<IntegrationContext>;
87
+ declare function createCtx(options: IntegrationContextOptions): IntegrationContext;
80
88
  //#endregion
81
89
  export { FnUtils, IntegrationContext, IntegrationContextOptions, UsageRecord, createCtx };
package/dist/index.d.mts CHANGED
@@ -25,20 +25,31 @@ interface FnUtils {
25
25
  isPreview: (fnName: string) => boolean;
26
26
  RE: RegExp;
27
27
  }
28
+ interface IntegrationContextOptions {
29
+ cwd: string;
30
+ currentPackageName: string;
31
+ scan: {
32
+ include: string[];
33
+ exclude: string[];
34
+ };
35
+ configOrPath: EngineConfig | string | Nullish;
36
+ fnName: string;
37
+ transformedFormat: 'string' | 'array' | 'inline';
38
+ tsCodegen: false | string;
39
+ cssCodegen: string;
40
+ autoCreateConfig: boolean;
41
+ }
28
42
  interface IntegrationContext {
29
43
  cwd: string;
30
44
  currentPackageName: string;
31
45
  fnName: string;
32
- fnUtils: FnUtils;
33
46
  transformedFormat: 'string' | 'array' | 'inline';
34
- devCssFilepath: string;
47
+ cssCodegenFilepath: string;
35
48
  tsCodegenFilepath: string | Nullish;
36
49
  hasVue: boolean;
37
- usages: Map<string, UsageRecord[]>;
38
- hooks: {
39
- styleUpdated: ReturnType<typeof createEventHook<void>>;
40
- tsCodegenUpdated: ReturnType<typeof createEventHook<void>>;
41
- };
50
+ resolvedConfig: EngineConfig | Nullish;
51
+ resolvedConfigPath: string | Nullish;
52
+ resolvedConfigContent: string | Nullish;
42
53
  loadConfig: () => Promise<{
43
54
  config: EngineConfig;
44
55
  file: null;
@@ -49,33 +60,30 @@ interface IntegrationContext {
49
60
  config: EngineConfig;
50
61
  file: string;
51
62
  }>;
52
- init: () => Promise<any>;
53
- isReady: boolean;
54
- configSources: string[];
55
- resolvedConfigPath: string | Nullish;
63
+ usages: Map<string, UsageRecord[]>;
64
+ hooks: {
65
+ styleUpdated: ReturnType<typeof createEventHook<void>>;
66
+ tsCodegenUpdated: ReturnType<typeof createEventHook<void>>;
67
+ };
56
68
  engine: Engine;
69
+ transformFilter: {
70
+ include: string[];
71
+ exclude: string[];
72
+ };
57
73
  transform: (code: string, id: string) => Promise<{
58
74
  code: string;
59
75
  map: SourceMap;
60
76
  } | Nullish>;
61
- getCssContent: (isDev: boolean) => Promise<string | Nullish>;
77
+ getCssCodegenContent: () => Promise<string | Nullish>;
62
78
  getTsCodegenContent: () => Promise<string | Nullish>;
63
- writeDevCssFile: () => Promise<void>;
79
+ writeCssCodegenFile: () => Promise<void>;
64
80
  writeTsCodegenFile: () => Promise<void>;
65
- }
66
- interface IntegrationContextOptions {
67
- cwd: string;
68
- currentPackageName: string;
69
- target: string[];
70
- configOrPath: EngineConfig | string | Nullish;
71
- fnName: string;
72
- transformedFormat: 'string' | 'array' | 'inline';
73
- tsCodegen: false | string;
74
- devCss: string;
75
- autoCreateConfig: boolean;
81
+ fullyCssCodegen: () => Promise<void>;
82
+ setupPromise: Promise<void> | null;
83
+ setup: () => Promise<void>;
76
84
  }
77
85
  //#endregion
78
86
  //#region src/ctx.d.ts
79
- declare function createCtx(options: IntegrationContextOptions): Promise<IntegrationContext>;
87
+ declare function createCtx(options: IntegrationContextOptions): IntegrationContext;
80
88
  //#endregion
81
89
  export { FnUtils, IntegrationContext, IntegrationContextOptions, UsageRecord, createCtx };