@elmeragroup/internal 0.1.1-canary.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,53 @@
1
+ /// <reference lib="esnext.disposable" />
2
+ import { t as ExtractWarning } from "./index-C9vKRif1.mjs";
3
+ import { a as ComponentApiArtifact, i as ApiPropOrigin, n as ApiPart, o as RscStatus, r as ApiProp, t as ApiArtifactDiagnostic } from "./model-1dzGdHi8.mjs";
4
+ //#region ../api-artifacts/dist/generate.d.ts
5
+ type ApiArtifactComponent = {
6
+ readonly slug: string;
7
+ /** Absolute or relative to projectRoot. */
8
+ readonly entryFile: string;
9
+ readonly exportNames: readonly string[];
10
+ /** Absolute or relative to projectRoot. Must end in .json. */
11
+ readonly outputFile: string;
12
+ };
13
+ type GenerateApiArtifactsOptions = {
14
+ readonly projectRoot: string;
15
+ readonly tsconfigPath: string;
16
+ readonly components: readonly ApiArtifactComponent[];
17
+ readonly includeExternalTypes?: readonly string[];
18
+ /** Accepted warnings remain visible in the returned diagnostics. */
19
+ readonly allowedWarningCodes?: readonly ExtractWarning["code"][];
20
+ /**
21
+ * `check` validates the complete inventory and throws `ApiArtifactsDriftError` listing the
22
+ * missing or stale output files without writing anything; the generated texts are not returned
23
+ * on that path. `write` (the default) replaces changed files.
24
+ */
25
+ readonly mode?: "write" | "check";
26
+ /** Optional consumer-specific regeneration instructions. */
27
+ readonly generatedBy?: string;
28
+ };
29
+ type GeneratedApiComponent = ComponentApiArtifact & {
30
+ readonly outputFile: string;
31
+ readonly text: string;
32
+ readonly changed: boolean;
33
+ };
34
+ type GenerateApiArtifactsResult = {
35
+ readonly components: readonly GeneratedApiComponent[];
36
+ readonly diagnostics: readonly ApiArtifactDiagnostic[];
37
+ };
38
+ //#endregion
39
+ //#region ../api-artifacts/dist/errors.d.ts
40
+ export declare class ApiArtifactsError extends Error {
41
+ readonly problems: readonly string[];
42
+ constructor(problems: readonly string[]);
43
+ }
44
+ export declare class ApiArtifactsDriftError extends Error {
45
+ readonly files: readonly string[];
46
+ constructor(files: readonly string[]);
47
+ }
48
+ //#endregion
49
+ //#region src/index.d.ts
50
+ /** Generates API artifacts with the Elmera UI documentation defaults. */
51
+ export declare function generateApiArtifacts(options: GenerateApiArtifactsOptions): Promise<GenerateApiArtifactsResult>;
52
+ //#endregion
53
+ export type { ApiArtifactComponent, ApiArtifactDiagnostic, ApiPart, ApiProp, ApiPropOrigin, ComponentApiArtifact, GenerateApiArtifactsOptions, GenerateApiArtifactsResult, GeneratedApiComponent, RscStatus };
package/dist/index.mjs ADDED
@@ -0,0 +1,15 @@
1
+
2
+ import { n as ApiArtifactsError, t as ApiArtifactsDriftError } from "./errors-ByXSCE94.mjs";
3
+ //#region src/index.ts
4
+ /** Generates API artifacts with the Elmera UI documentation defaults. */
5
+ async function generateApiArtifacts(options) {
6
+ const { generateApiArtifacts: generate } = await import("./dist-CcEC-Qb_.mjs");
7
+ return generate({
8
+ ...options,
9
+ includeExternalTypes: options.includeExternalTypes ?? ["@base-ui/react"],
10
+ allowedWarningCodes: options.allowedWarningCodes ?? ["unsupported-type-fallback"],
11
+ generatedBy: options.generatedBy ?? "Generated from TypeScript types and JSDoc by @elmeragroup/internal. Do not edit."
12
+ });
13
+ }
14
+ //#endregion
15
+ export { ApiArtifactsDriftError, ApiArtifactsError, generateApiArtifacts };
@@ -0,0 +1,35 @@
1
+ /// <reference lib="esnext.disposable" />
2
+ import { t as ExtractWarning } from "./index-C9vKRif1.mjs";
3
+ //#region ../api-artifacts/dist/model.d.ts
4
+ type ApiArtifactDiagnostic = {
5
+ readonly component: string;
6
+ readonly warning: ExtractWarning;
7
+ };
8
+ type RscStatus = "client" | "server";
9
+ type ApiPropOrigin = "declared" | "recipe-axis" | {
10
+ readonly packageName: string;
11
+ };
12
+ type ApiProp = {
13
+ name: string;
14
+ origin: ApiPropOrigin;
15
+ type: string;
16
+ shortType: string | null;
17
+ defaultValue: string | null;
18
+ description: string;
19
+ required: boolean;
20
+ };
21
+ type ApiPart = {
22
+ name: string;
23
+ rsc: RscStatus;
24
+ sourcePath: string;
25
+ props: readonly ApiProp[];
26
+ forwardedFrom: readonly string[];
27
+ forwardedCount: number;
28
+ };
29
+ type ComponentApiArtifact = {
30
+ $generated: string;
31
+ slug: string;
32
+ parts: readonly ApiPart[];
33
+ };
34
+ //#endregion
35
+ export { ComponentApiArtifact as a, ApiPropOrigin as i, ApiPart as n, RscStatus as o, ApiProp as r, ApiArtifactDiagnostic as t };
@@ -0,0 +1,6 @@
1
+ /// <reference lib="esnext.disposable" />
2
+ import { Plugin } from "@oxlint/plugins";
3
+ //#region src/oxlint-anti-slop.d.ts
4
+ declare const plugin: Plugin;
5
+ //#endregion
6
+ export { plugin as default };