@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/index.js CHANGED
@@ -877,16 +877,43 @@ 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
 
883
+ ` + `type GeneratedAbsoluteIslandRegistry = typeof islandRegistry;
884
+
882
885
  ` + `declare global {
883
- interface AbsoluteIslandRegistry extends typeof islandRegistry {}
886
+ interface AbsoluteIslandRegistry extends GeneratedAbsoluteIslandRegistry {}
884
887
  }
885
888
 
886
889
  ` + (moduleBody ? `${moduleBody}
887
890
 
888
891
  ` : "") + `export {};
889
892
  `;
893
+ const sharedRegistryImport = normalizeImportPath2(sharedDtsTarget, resolvedRegistryPath);
894
+ const sharedModuleBodies = [
895
+ `declare module "@absolutejs/absolute/react" {
896
+ import type { JSX } from "react";
897
+ import type { ConfiguredTypedIslandRenderProps } from "@absolutejs/absolute";
898
+ export const Island: (props: ConfiguredTypedIslandRenderProps) => Promise<JSX.Element>;
899
+ }`,
900
+ `declare module "@absolutejs/absolute/vue" {
901
+ import type { ConfiguredTypedIslandRenderProps } from "@absolutejs/absolute";
902
+ export const Island: new () => { $props: ConfiguredTypedIslandRenderProps };
903
+ }`,
904
+ `declare module "@absolutejs/absolute/svelte" {
905
+ import type { Component } from "svelte";
906
+ import type { ConfiguredTypedIslandRenderProps } from "@absolutejs/absolute";
907
+ export const Island: Component<ConfiguredTypedIslandRenderProps>;
908
+ }`,
909
+ `declare module "@absolutejs/absolute/angular" {
910
+ import type { Type } from "@angular/core";
911
+ export const Island: Type<unknown>;
912
+ }`
913
+ ];
914
+ writeIfChanged(sharedDtsTarget, buildRegistryAugmentation(sharedRegistryImport, sharedModuleBodies.join(`
915
+
916
+ `)));
890
917
  if (config.reactDirectory) {
891
918
  const compatTarget = resolve5(config.reactDirectory, "generated", "absolute-react.ts");
892
919
  const dtsTarget = resolve5(config.reactDirectory, "generated", "absolute-react.d.ts");
@@ -215479,5 +215506,5 @@ export {
215479
215506
  ANGULAR_INIT_TIMEOUT_MS
215480
215507
  };
215481
215508
 
215482
- //# debugId=0892F6F816B8A8A764756E2164756E21
215509
+ //# debugId=5E40B456CFBAF1D064756E2164756E21
215483
215510
  //# sourceMappingURL=index.js.map