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

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.
@@ -135,9 +135,8 @@ var renderIslandMarkup = async () => {
135
135
  };
136
136
  export {
137
137
  renderIslandMarkup,
138
- defineIslandRegistry,
139
- defineIslandComponent
138
+ defineIslandRegistry
140
139
  };
141
140
 
142
- //# debugId=78E804F61F901C0F64756E2164756E21
141
+ //# debugId=9FA3F1A76B9E5E0A64756E2164756E21
143
142
  //# sourceMappingURL=browser.js.map
@@ -4,9 +4,9 @@
4
4
  "sourcesContent": [
5
5
  "import type { IslandFramework } from '../../types/island';\n\nconst toIslandFrameworkSegment = (framework: IslandFramework) =>\n\tframework[0]?.toUpperCase() + framework.slice(1);\n\nexport const getIslandManifestKey = (\n\tframework: IslandFramework,\n\tcomponent: string\n) => `Island${toIslandFrameworkSegment(framework)}${component}`;\n\nexport const getIslandManifestEntries = (\n\tmanifest: Record<string, string>\n) => {\n\tconst islands: Partial<Record<IslandFramework, Record<string, string>>> = {};\n\tconst frameworks: IslandFramework[] = [\n\t\t'react',\n\t\t'svelte',\n\t\t'vue',\n\t\t'angular'\n\t];\n\n\tfor (const framework of frameworks) {\n\t\tconst prefix = `Island${toIslandFrameworkSegment(framework)}`;\n\t\tfor (const [key, value] of Object.entries(manifest)) {\n\t\t\tif (!key.startsWith(prefix)) continue;\n\n\t\t\tconst component = key.slice(prefix.length);\n\t\t\tif (!component) continue;\n\n\t\t\tconst frameworkEntries = islands[framework] ?? {};\n\t\t\tframeworkEntries[component] = value;\n\t\t\tislands[framework] = frameworkEntries;\n\t\t}\n\t}\n\n\treturn islands;\n};\n",
6
6
  "import type {\n\tIslandComponentDefinition,\n\tIslandRegistry,\n\tIslandRegistryInput\n} from '../../types/island';\n\nexport const defineIslandRegistry = <T extends IslandRegistryInput>(\n\tregistry: IslandRegistry<T>\n) => registry;\n\nexport const defineIslandComponent = <Component>(\n\tcomponent: Component,\n\toptions: {\n\t\texport?: string;\n\t\tsource: string;\n\t}\n): IslandComponentDefinition<Component> => ({\n\tcomponent,\n\texport: options.export,\n\tsource: options.source\n});\n\nconst isRecord = (value: unknown): value is Record<string, unknown> =>\n\ttypeof value === 'object' && value !== null;\n\nexport const isIslandComponentDefinition = <Component>(\n\tvalue: Component | IslandComponentDefinition<Component>\n): value is IslandComponentDefinition<Component> =>\n\tisRecord(value) &&\n\t'component' in value &&\n\t'source' in value &&\n\ttypeof value.source === 'string';\n\nexport function getIslandComponent<Component>(component: Component): Component;\nexport function getIslandComponent<Component>(\n\tcomponent: IslandComponentDefinition<Component>\n): Component;\nexport function getIslandComponent<Component>(\n\tcomponent: Component | IslandComponentDefinition<Component>\n) {\n\tif (isIslandComponentDefinition(component)) {\n\t\treturn component.component;\n\t}\n\n\treturn component;\n}\n\nexport const getIslandBuildReference = <Component>(\n\tcomponent: Component | IslandComponentDefinition<Component>\n) => {\n\tif (!isIslandComponentDefinition(component)) return null;\n\n\treturn {\n\t\texport: component.export,\n\t\tsource: component.source\n\t};\n};\n\nexport const serializeIslandProps = (props: unknown) =>\n\tJSON.stringify(props ?? {});\n\nexport const parseIslandProps = (rawProps: string | null) => {\n\tif (!rawProps) return {};\n\n\treturn JSON.parse(rawProps);\n};\n\nexport { getIslandManifestEntries, getIslandManifestKey } from './islandManifest';\n",
7
- "export {\n\tdefineIslandComponent,\n\tdefineIslandRegistry\n} from '../core/islands';\n\nexport const renderIslandMarkup = async () => {\n\tthrow new Error(\n\t\t'renderIslandMarkup is server-only. Import from \"@absolutejs/absolute/islands/server\" on the server.'\n\t);\n};\n\n"
7
+ "export { defineIslandRegistry } from '../core/islands';\n\nexport const renderIslandMarkup = async () => {\n\tthrow new Error(\n\t\t'renderIslandMarkup is server-only. Import from \"@absolutejs/absolute/islands/server\" on the server.'\n\t);\n};\n"
8
8
  ],
9
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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S,GAAG;AAAA,IAC3C,OAAO,UAAU;AAAA,EAClB;AAAA,EAEA,OAAO;AAAA;AAAA,IAtCK,uBAAuB,CACnC,aACI,UAEQ,wBAAwB,CACpC,WACA,aAI2C;AAAA,EAC3C;AAAA,EACA,QAAQ,QAAQ;AAAA,EAChB,QAAQ,QAAQ;AACjB,IAEM,WAAW,CAAC,UACjB,OAAO,UAAU,YAAY,UAAU,MAE3B,8BAA8B,CAC1C,UAEA,SAAS,KAAK,MACd,eAAe,WACf,YAAY,UACZ,OAAO,MAAM,WAAW,UAgBZ,0BAA0B,CACtC,cACI;AAAA,EACJ,IAAI,CAAC,4BAA4B,SAAS;AAAA,IAAG,OAAO;AAAA,EAEpD,OAAO;AAAA,IACN,QAAQ,UAAU;AAAA,IAClB,QAAQ,UAAU;AAAA,EACnB;AAAA,GAGY,uBAAuB,CAAC,UACpC,KAAK,UAAU,SAAS,CAAC,CAAC,GAEd,mBAAmB,CAAC,aAA4B;AAAA,EAC5D,IAAI,CAAC;AAAA,IAAU,OAAO,CAAC;AAAA,EAEvB,OAAO,KAAK,MAAM,QAAQ;AAAA;AAAA;;;AChE3B;AAEO,IAAM,qBAAqB,YAAY;AAAA,EAC7C,MAAM,IAAI,MACT,qGACD;AAAA;",
10
+ "debugId": "9FA3F1A76B9E5E0A64756E2164756E21",
11
11
  "names": []
12
12
  }
@@ -30224,9 +30224,8 @@ init_islands();
30224
30224
  init_renderIslandMarkup();
30225
30225
  export {
30226
30226
  renderIslandMarkup,
30227
- defineIslandRegistry,
30228
- defineIslandComponent
30227
+ defineIslandRegistry
30229
30228
  };
30230
30229
 
30231
- //# debugId=C5EC13B138F27AC064756E2164756E21
30230
+ //# debugId=B8BEB970B9E8C87264756E2164756E21
30232
30231
  //# sourceMappingURL=index.js.map