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

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.js CHANGED
@@ -877,6 +877,7 @@ var normalizeImportPath2 = (fromFile, targetFile) => {
877
877
  return;
878
878
  }
879
879
  const resolvedRegistryPath = resolve5(projectRoot, registryPath);
880
+ const sharedDtsTarget = resolve5(dirname3(resolvedRegistryPath), "absolute-islands.d.ts");
880
881
  const buildRegistryAugmentation = (registryImportPath, moduleBody) => `import type { islandRegistry } from ${JSON.stringify(registryImportPath)};
881
882
 
882
883
  ` + `declare global {
@@ -887,6 +888,30 @@ var normalizeImportPath2 = (fromFile, targetFile) => {
887
888
 
888
889
  ` : "") + `export {};
889
890
  `;
891
+ const sharedRegistryImport = normalizeImportPath2(sharedDtsTarget, resolvedRegistryPath);
892
+ const sharedModuleBodies = [
893
+ `declare module "@absolutejs/absolute/react" {
894
+ import type { JSX } from "react";
895
+ import type { ConfiguredTypedIslandRenderProps } from "@absolutejs/absolute";
896
+ export const Island: (props: ConfiguredTypedIslandRenderProps) => Promise<JSX.Element>;
897
+ }`,
898
+ `declare module "@absolutejs/absolute/vue" {
899
+ import type { ConfiguredTypedIslandRenderProps } from "@absolutejs/absolute";
900
+ export const Island: new () => { $props: ConfiguredTypedIslandRenderProps };
901
+ }`,
902
+ `declare module "@absolutejs/absolute/svelte" {
903
+ import type { Component } from "svelte";
904
+ import type { ConfiguredTypedIslandRenderProps } from "@absolutejs/absolute";
905
+ export const Island: Component<ConfiguredTypedIslandRenderProps>;
906
+ }`,
907
+ `declare module "@absolutejs/absolute/angular" {
908
+ import type { Type } from "@angular/core";
909
+ export const Island: Type<unknown>;
910
+ }`
911
+ ];
912
+ writeIfChanged(sharedDtsTarget, buildRegistryAugmentation(sharedRegistryImport, sharedModuleBodies.join(`
913
+
914
+ `)));
890
915
  if (config.reactDirectory) {
891
916
  const compatTarget = resolve5(config.reactDirectory, "generated", "absolute-react.ts");
892
917
  const dtsTarget = resolve5(config.reactDirectory, "generated", "absolute-react.d.ts");
@@ -215479,5 +215504,5 @@ export {
215479
215504
  ANGULAR_INIT_TIMEOUT_MS
215480
215505
  };
215481
215506
 
215482
- //# debugId=0892F6F816B8A8A764756E2164756E21
215507
+ //# debugId=72AE380913AF604464756E2164756E21
215483
215508
  //# sourceMappingURL=index.js.map