@absolutejs/absolute 0.19.0-beta.311 → 0.19.0-beta.313

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/build.js CHANGED
@@ -525,16 +525,43 @@ var normalizeImportPath2 = (fromFile, targetFile) => {
525
525
  return;
526
526
  }
527
527
  const resolvedRegistryPath = resolve2(projectRoot, registryPath);
528
+ const sharedDtsTarget = resolve2(dirname2(resolvedRegistryPath), "absolute-islands.d.ts");
528
529
  const buildRegistryAugmentation = (registryImportPath, moduleBody) => `import type { islandRegistry } from ${JSON.stringify(registryImportPath)};
529
530
 
531
+ ` + `type GeneratedAbsoluteIslandRegistry = typeof islandRegistry;
532
+
530
533
  ` + `declare global {
531
- interface AbsoluteIslandRegistry extends typeof islandRegistry {}
534
+ interface AbsoluteIslandRegistry extends GeneratedAbsoluteIslandRegistry {}
532
535
  }
533
536
 
534
537
  ` + (moduleBody ? `${moduleBody}
535
538
 
536
539
  ` : "") + `export {};
537
540
  `;
541
+ const sharedRegistryImport = normalizeImportPath2(sharedDtsTarget, resolvedRegistryPath);
542
+ const sharedModuleBodies = [
543
+ `declare module "@absolutejs/absolute/react" {
544
+ import type { JSX } from "react";
545
+ import type { ConfiguredTypedIslandRenderProps } from "@absolutejs/absolute";
546
+ export const Island: (props: ConfiguredTypedIslandRenderProps) => Promise<JSX.Element>;
547
+ }`,
548
+ `declare module "@absolutejs/absolute/vue" {
549
+ import type { ConfiguredTypedIslandRenderProps } from "@absolutejs/absolute";
550
+ export const Island: new () => { $props: ConfiguredTypedIslandRenderProps };
551
+ }`,
552
+ `declare module "@absolutejs/absolute/svelte" {
553
+ import type { Component } from "svelte";
554
+ import type { ConfiguredTypedIslandRenderProps } from "@absolutejs/absolute";
555
+ export const Island: Component<ConfiguredTypedIslandRenderProps>;
556
+ }`,
557
+ `declare module "@absolutejs/absolute/angular" {
558
+ import type { Type } from "@angular/core";
559
+ export const Island: Type<unknown>;
560
+ }`
561
+ ];
562
+ writeIfChanged(sharedDtsTarget, buildRegistryAugmentation(sharedRegistryImport, sharedModuleBodies.join(`
563
+
564
+ `)));
538
565
  if (config.reactDirectory) {
539
566
  const compatTarget = resolve2(config.reactDirectory, "generated", "absolute-react.ts");
540
567
  const dtsTarget = resolve2(config.reactDirectory, "generated", "absolute-react.d.ts");
@@ -208034,5 +208061,5 @@ export {
208034
208061
  build
208035
208062
  };
208036
208063
 
208037
- //# debugId=63D351FEF559F19364756E2164756E21
208064
+ //# debugId=7270DE63D0B7E96864756E2164756E21
208038
208065
  //# sourceMappingURL=build.js.map