@nodaro/shared 3.55.0 → 3.57.0

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.
Files changed (183) hide show
  1. package/dist/{chunk-MCIBQ5BF.js → chunk-2LRBQOKA.js} +9 -9
  2. package/dist/{chunk-MCIBQ5BF.js.map → chunk-2LRBQOKA.js.map} +1 -1
  3. package/dist/{chunk-OVIIJVXH.cjs → chunk-2LWHRJPB.cjs} +21 -21
  4. package/dist/{chunk-OVIIJVXH.cjs.map → chunk-2LWHRJPB.cjs.map} +1 -1
  5. package/dist/{chunk-C5S75476.js → chunk-3SH5ZUNJ.js} +9 -4
  6. package/dist/{chunk-C5S75476.js.map → chunk-3SH5ZUNJ.js.map} +1 -1
  7. package/dist/{chunk-KM35K2M5.cjs → chunk-4KKFO6YR.cjs} +143 -32
  8. package/dist/chunk-4KKFO6YR.cjs.map +1 -0
  9. package/dist/{chunk-3633VD2M.cjs → chunk-5SXI7IYW.cjs} +8 -8
  10. package/dist/{chunk-3633VD2M.cjs.map → chunk-5SXI7IYW.cjs.map} +1 -1
  11. package/dist/{chunk-ZKHQSG76.js → chunk-6NZWWMVY.js} +5 -5
  12. package/dist/chunk-6NZWWMVY.js.map +1 -0
  13. package/dist/{chunk-2OYV6K7D.cjs → chunk-7JM5EZF3.cjs} +13 -13
  14. package/dist/{chunk-2OYV6K7D.cjs.map → chunk-7JM5EZF3.cjs.map} +1 -1
  15. package/dist/chunk-ALVO5Q36.cjs +48 -0
  16. package/dist/chunk-ALVO5Q36.cjs.map +1 -0
  17. package/dist/{chunk-SEEQ3H22.cjs → chunk-ASSJKIZO.cjs} +59 -6
  18. package/dist/chunk-ASSJKIZO.cjs.map +1 -0
  19. package/dist/{chunk-HZL7QMXK.js → chunk-AWS4BWEC.js} +7 -3
  20. package/dist/chunk-AWS4BWEC.js.map +1 -0
  21. package/dist/chunk-BBMK5XNO.js +42 -0
  22. package/dist/chunk-BBMK5XNO.js.map +1 -0
  23. package/dist/{chunk-IPCWYKX5.cjs → chunk-BH2IDJVO.cjs} +60 -46
  24. package/dist/chunk-BH2IDJVO.cjs.map +1 -0
  25. package/dist/{chunk-HG3KKCJJ.js → chunk-C3E6UZS4.js} +3 -3
  26. package/dist/{chunk-HG3KKCJJ.js.map → chunk-C3E6UZS4.js.map} +1 -1
  27. package/dist/{chunk-N3WL6IOJ.js → chunk-D56ALOLY.js} +55 -5
  28. package/dist/chunk-D56ALOLY.js.map +1 -0
  29. package/dist/{chunk-SZUDEFX2.cjs → chunk-D5J332XS.cjs} +44 -39
  30. package/dist/{chunk-SZUDEFX2.cjs.map → chunk-D5J332XS.cjs.map} +1 -1
  31. package/dist/{chunk-ZWB3NG4M.js → chunk-EXCZD5ZY.js} +3 -3
  32. package/dist/{chunk-ZWB3NG4M.js.map → chunk-EXCZD5ZY.js.map} +1 -1
  33. package/dist/{chunk-5R6LTKE5.cjs → chunk-FFW2HTR2.cjs} +5 -5
  34. package/dist/{chunk-5R6LTKE5.cjs.map → chunk-FFW2HTR2.cjs.map} +1 -1
  35. package/dist/{chunk-KMSEU6FK.js → chunk-INGQNLY4.js} +3 -3
  36. package/dist/{chunk-KMSEU6FK.js.map → chunk-INGQNLY4.js.map} +1 -1
  37. package/dist/chunk-IOET54EV.js +39 -0
  38. package/dist/chunk-IOET54EV.js.map +1 -0
  39. package/dist/{chunk-3CHOZ573.js → chunk-IQS3WQXQ.js} +309 -18
  40. package/dist/chunk-IQS3WQXQ.js.map +1 -0
  41. package/dist/{chunk-2R74OU76.cjs → chunk-JYNW4QK7.cjs} +309 -17
  42. package/dist/chunk-JYNW4QK7.cjs.map +1 -0
  43. package/dist/{chunk-UWMXMLMV.js → chunk-KZTXGMVH.js} +3 -3
  44. package/dist/{chunk-UWMXMLMV.js.map → chunk-KZTXGMVH.js.map} +1 -1
  45. package/dist/{chunk-5DVDHL7Y.js → chunk-MBKJ7IBS.js} +21 -7
  46. package/dist/chunk-MBKJ7IBS.js.map +1 -0
  47. package/dist/{chunk-G7IUQKRU.cjs → chunk-NJTLBZIP.cjs} +51 -51
  48. package/dist/{chunk-G7IUQKRU.cjs.map → chunk-NJTLBZIP.cjs.map} +1 -1
  49. package/dist/{chunk-J4CVGAAV.cjs → chunk-NZRG5CXQ.cjs} +7 -2
  50. package/dist/chunk-NZRG5CXQ.cjs.map +1 -0
  51. package/dist/{chunk-AGTCHDG5.cjs → chunk-O33WVAYQ.cjs} +6 -6
  52. package/dist/{chunk-AGTCHDG5.cjs.map → chunk-O33WVAYQ.cjs.map} +1 -1
  53. package/dist/{chunk-WVACGZYV.cjs → chunk-OHQBQOGH.cjs} +8 -8
  54. package/dist/{chunk-WVACGZYV.cjs.map → chunk-OHQBQOGH.cjs.map} +1 -1
  55. package/dist/chunk-OWNPYQSH.cjs +283 -0
  56. package/dist/chunk-OWNPYQSH.cjs.map +1 -0
  57. package/dist/{chunk-C6IQCKJT.cjs → chunk-P5KH7GAI.cjs} +4 -4
  58. package/dist/{chunk-C6IQCKJT.cjs.map → chunk-P5KH7GAI.cjs.map} +1 -1
  59. package/dist/{chunk-25KAGSPT.js → chunk-QMP3W5GA.js} +3 -3
  60. package/dist/{chunk-25KAGSPT.js.map → chunk-QMP3W5GA.js.map} +1 -1
  61. package/dist/chunk-QSWUSXRL.cjs +53 -0
  62. package/dist/chunk-QSWUSXRL.cjs.map +1 -0
  63. package/dist/{chunk-E4YES25K.js → chunk-QTTVIQJP.js} +4 -4
  64. package/dist/{chunk-E4YES25K.js.map → chunk-QTTVIQJP.js.map} +1 -1
  65. package/dist/{chunk-6HUWQLF2.cjs → chunk-R3OIZ2BM.cjs} +6 -6
  66. package/dist/{chunk-6HUWQLF2.cjs.map → chunk-R3OIZ2BM.cjs.map} +1 -1
  67. package/dist/{chunk-YBZQXZ6A.js → chunk-R5GOPHYB.js} +115 -15
  68. package/dist/chunk-R5GOPHYB.js.map +1 -0
  69. package/dist/chunk-RKTWLAJO.cjs +27 -0
  70. package/dist/chunk-RKTWLAJO.cjs.map +1 -0
  71. package/dist/chunk-S7FCFQ6X.js +255 -0
  72. package/dist/chunk-S7FCFQ6X.js.map +1 -0
  73. package/dist/{chunk-HEF4BIMA.js → chunk-SWPTF7QJ.js} +4 -4
  74. package/dist/{chunk-HEF4BIMA.js.map → chunk-SWPTF7QJ.js.map} +1 -1
  75. package/dist/{chunk-LKCPFD5X.js → chunk-SWVGHAYO.js} +5 -3
  76. package/dist/chunk-SWVGHAYO.js.map +1 -0
  77. package/dist/{chunk-ZAK276QF.js → chunk-UFB36LWU.js} +4 -4
  78. package/dist/{chunk-ZAK276QF.js.map → chunk-UFB36LWU.js.map} +1 -1
  79. package/dist/{chunk-LYWJAXPT.js → chunk-UMPZR56R.js} +3 -3
  80. package/dist/{chunk-LYWJAXPT.js.map → chunk-UMPZR56R.js.map} +1 -1
  81. package/dist/{chunk-G5NTNQ7W.cjs → chunk-XROE3CAS.cjs} +5 -3
  82. package/dist/chunk-XROE3CAS.cjs.map +1 -0
  83. package/dist/{chunk-MTUNORQB.cjs → chunk-ZLSPGMES.cjs} +11 -11
  84. package/dist/{chunk-MTUNORQB.cjs.map → chunk-ZLSPGMES.cjs.map} +1 -1
  85. package/dist/{chunk-MGJR5OXO.js → chunk-ZPPFPQPO.js} +5 -5
  86. package/dist/{chunk-MGJR5OXO.js.map → chunk-ZPPFPQPO.js.map} +1 -1
  87. package/dist/{chunk-FIYVKW7F.cjs → chunk-ZSTL4JEJ.cjs} +12 -12
  88. package/dist/{chunk-FIYVKW7F.cjs.map → chunk-ZSTL4JEJ.cjs.map} +1 -1
  89. package/dist/entries/apps.cjs +43 -42
  90. package/dist/entries/apps.js +8 -7
  91. package/dist/entries/credits.cjs +151 -150
  92. package/dist/entries/credits.d.cts +4 -1
  93. package/dist/entries/credits.d.ts +4 -1
  94. package/dist/entries/credits.js +8 -7
  95. package/dist/entries/entities.cjs +125 -125
  96. package/dist/entries/entities.d.cts +1 -1
  97. package/dist/entries/entities.d.ts +1 -1
  98. package/dist/entries/entities.js +1 -1
  99. package/dist/entries/llm-models.d.cts +1 -1
  100. package/dist/entries/llm-models.d.ts +1 -1
  101. package/dist/entries/model-catalog.cjs +127 -66
  102. package/dist/entries/model-catalog.d.cts +61 -9
  103. package/dist/entries/model-catalog.d.ts +61 -9
  104. package/dist/entries/model-catalog.js +5 -4
  105. package/dist/entries/models.cjs +320 -276
  106. package/dist/entries/models.d.cts +3 -3
  107. package/dist/entries/models.d.ts +3 -3
  108. package/dist/entries/models.js +4 -4
  109. package/dist/entries/nodes.cjs +208 -207
  110. package/dist/entries/nodes.d.cts +1 -1
  111. package/dist/entries/nodes.d.ts +1 -1
  112. package/dist/entries/nodes.js +10 -9
  113. package/dist/entries/pipeline.cjs +161 -149
  114. package/dist/entries/pipeline.d.cts +165 -26
  115. package/dist/entries/pipeline.d.ts +165 -26
  116. package/dist/entries/pipeline.js +3 -3
  117. package/dist/entries/runtime-config.cjs +116 -0
  118. package/dist/entries/runtime-config.cjs.map +1 -0
  119. package/dist/entries/runtime-config.d.cts +308 -0
  120. package/dist/entries/runtime-config.d.ts +308 -0
  121. package/dist/entries/runtime-config.js +3 -0
  122. package/dist/entries/runtime-config.js.map +1 -0
  123. package/dist/entries/ugc.cjs +71 -71
  124. package/dist/entries/ugc.js +4 -4
  125. package/dist/entries/video.cjs +117 -117
  126. package/dist/entries/video.js +4 -4
  127. package/dist/entries/workflow.cjs +150 -146
  128. package/dist/entries/workflow.d.cts +8 -1
  129. package/dist/entries/workflow.d.ts +8 -1
  130. package/dist/entries/workflow.js +2 -2
  131. package/dist/index.cjs +3172 -2942
  132. package/dist/index.d.cts +6 -5
  133. package/dist/index.d.ts +6 -5
  134. package/dist/index.js +23 -21
  135. package/dist/{model-catalog-Dm2UiwUe.d.cts → model-catalog-CwkG9xi-.d.cts} +40 -4
  136. package/dist/{model-catalog-Dm2UiwUe.d.ts → model-catalog-CwkG9xi-.d.ts} +40 -4
  137. package/dist/{model-constants-DZUGVDOw.d.cts → model-constants-BbsZSVTA.d.cts} +57 -13
  138. package/dist/{model-constants-DZUGVDOw.d.ts → model-constants-BbsZSVTA.d.ts} +57 -13
  139. package/package.json +6 -1
  140. package/src/__tests__/fixtures/root-exports.baseline.json +2 -0
  141. package/src/__tests__/gpt-image-2-6.test.ts +277 -0
  142. package/src/__tests__/gvp-supported-providers.test.ts +2 -0
  143. package/src/__tests__/image-model-roles.test.ts +28 -9
  144. package/src/__tests__/runtime-config.test.ts +398 -0
  145. package/src/__tests__/seedance-25-catalog-modes.test.ts +35 -0
  146. package/src/__tests__/voice-library-values.test.ts +24 -0
  147. package/src/credit-identifiers.ts +45 -1
  148. package/src/entries/model-catalog.ts +17 -0
  149. package/src/entries/models.ts +13 -0
  150. package/src/entries/runtime-config.ts +51 -0
  151. package/src/entries/workflow.ts +1 -1
  152. package/src/gpt-image-2-6.ts +104 -0
  153. package/src/image-model-roles.ts +31 -10
  154. package/src/index.ts +1 -0
  155. package/src/model-catalog.ts +341 -17
  156. package/src/model-constants.ts +149 -9
  157. package/src/node-default-mappings.ts +5 -0
  158. package/src/node-refs.ts +11 -0
  159. package/src/pipeline-types.ts +2 -0
  160. package/src/reference-board-templates.ts +2 -0
  161. package/src/runtime-config/contract.ts +492 -0
  162. package/src/runtime-config/worlds.ts +77 -0
  163. package/src/video-ui-defaults.ts +2 -1
  164. package/src/voices.ts +175 -2
  165. package/dist/chunk-2R74OU76.cjs.map +0 -1
  166. package/dist/chunk-3CHOZ573.js.map +0 -1
  167. package/dist/chunk-5DVDHL7Y.js.map +0 -1
  168. package/dist/chunk-ATWLKUAI.cjs +0 -34
  169. package/dist/chunk-ATWLKUAI.cjs.map +0 -1
  170. package/dist/chunk-DUL5ZLTJ.js +0 -29
  171. package/dist/chunk-DUL5ZLTJ.js.map +0 -1
  172. package/dist/chunk-G5NTNQ7W.cjs.map +0 -1
  173. package/dist/chunk-HD45Y7QU.cjs +0 -27
  174. package/dist/chunk-HD45Y7QU.cjs.map +0 -1
  175. package/dist/chunk-HZL7QMXK.js.map +0 -1
  176. package/dist/chunk-IPCWYKX5.cjs.map +0 -1
  177. package/dist/chunk-J4CVGAAV.cjs.map +0 -1
  178. package/dist/chunk-KM35K2M5.cjs.map +0 -1
  179. package/dist/chunk-LKCPFD5X.js.map +0 -1
  180. package/dist/chunk-N3WL6IOJ.js.map +0 -1
  181. package/dist/chunk-SEEQ3H22.cjs.map +0 -1
  182. package/dist/chunk-YBZQXZ6A.js.map +0 -1
  183. package/dist/chunk-ZKHQSG76.js.map +0 -1
@@ -0,0 +1,308 @@
1
+ /**
2
+ * The worlds a Nodaro deployment can offer — the tabs of the shared site
3
+ * header, in its canonical display order — and the node types each one runs.
4
+ *
5
+ * A world is offered to a viewer when the deployment's profile allows it
6
+ * (`surface.worlds.allow`, when set) AND every node type it runs is available
7
+ * to that viewer. The platform's `GET /v1/surface/availability` answers both
8
+ * per viewer; this table is the one copy that answer and every client read,
9
+ * so a world is never shown where its runs would be refused.
10
+ *
11
+ * Structural vocabulary only (ids and node-type names), no content.
12
+ */
13
+ declare const WORLD_IDS: readonly ["explore", "image", "video", "music", "trends", "motion", "voice", "app", "studio"];
14
+ type WorldId = (typeof WORLD_IDS)[number];
15
+ declare function isWorldId(value: unknown): value is WorldId;
16
+ /**
17
+ * The node types each world runs: a world is offered only while every one of
18
+ * them is available to the viewer. A world with none runs no node of its own
19
+ * and is gated by the allowlist alone: Explore is a showcase, App is the
20
+ * workflow editor (whose nodes are gated one by one inside it), Studio is its
21
+ * own product.
22
+ *
23
+ * - `image`: Generate Image (`POST /v1/generate-image`).
24
+ * - `video`: Generate Video and Text to Video — the world's two routes
25
+ * (`/v1/generate-video` from a start frame, `/v1/text-to-video` from a
26
+ * prompt). The canvas's Image to Video node is not one of them.
27
+ * - `music`: Suno Create Music (`/v1/suno/generate`).
28
+ * - `trends`, `motion`: Cast Swap (`/v1/cast-swap`), the run both worlds start.
29
+ * - `voice`: Voice Changer Pro (`/v1/voice-changer-pro`).
30
+ */
31
+ declare const WORLD_REQUIRED_NODE_TYPES: Readonly<Record<WorldId, readonly string[]>>;
32
+ /** The worlds part of a deployment's surface profile. */
33
+ interface SurfaceWorlds {
34
+ /**
35
+ * When PRESENT, exactly these worlds are offered (`[]` offers none). Absent:
36
+ * every world is, subject to its node types. Unlike the profile's other
37
+ * lists, presence is what narrows, so a list whose ids are all unknown
38
+ * offers nothing instead of everything.
39
+ */
40
+ readonly allow?: readonly string[];
41
+ /** The world a visit to the site's root lands on. Always one `allow` lets through. */
42
+ readonly home?: WorldId;
43
+ /** Display order; worlds it leaves out follow in canonical order. */
44
+ readonly order?: readonly WorldId[];
45
+ }
46
+ /** Does the profile's allowlist let this world through? (Node availability is checked separately.) */
47
+ declare function worldAllowed(worlds: SurfaceWorlds | undefined, id: string): boolean;
48
+ /** Every world, `order`'s known ids first (each once), then the rest in canonical order. */
49
+ declare function orderWorlds(order?: readonly string[]): WorldId[];
50
+
51
+ /**
52
+ * The deployment runtime config — the object a Nodaro platform container
53
+ * writes to `/config.js` at boot as `window.__NODARO_RUNTIME__`, and that every
54
+ * product served from the same site reads before its app starts. One published
55
+ * build then serves any deployment without a rebuild.
56
+ *
57
+ * This module is the contract between that writer and its readers: the key
58
+ * names, their shapes, and a lenient parser. Structural vocabulary only: no
59
+ * content, no prices, nothing about any one deployment. The platform's own
60
+ * schema stays the authority on what a deployment may set. What reaches the
61
+ * page has already been validated there and stripped of every server-only
62
+ * value; this parser only refuses to hand a reader a value of the wrong type.
63
+ */
64
+ /** The global `/config.js` assigns. */
65
+ declare const RUNTIME_CONFIG_GLOBAL = "__NODARO_RUNTIME__";
66
+ /** Every top-level key `/config.js` can carry. */
67
+ declare const RUNTIME_CONFIG_KEYS: readonly ["apiUrl", "supabaseUrl", "supabaseAnonKey", "freecutUrl", "audiomassUrl", "defaultLocale", "surface", "moderation", "previewStopRule", "mediaOrigin"];
68
+ type RuntimeConfigKey = (typeof RUNTIME_CONFIG_KEYS)[number];
69
+ declare const SURFACE_HEADER_MODES: readonly ["default", "white-label"];
70
+ /** `white-label`: the deployment's own header, with no platform links or art. */
71
+ type SurfaceHeaderMode = (typeof SURFACE_HEADER_MODES)[number];
72
+ declare const SURFACE_CATALOG_IMAGES: readonly ["default", "none", "own"];
73
+ /** Pictures on picker options: the platform's (`default`), none, or the deployment's own (`own`). */
74
+ type SurfaceCatalogImages = (typeof SURFACE_CATALOG_IMAGES)[number];
75
+ interface RuntimeSurfaceSibling {
76
+ readonly label: string;
77
+ readonly url: string;
78
+ readonly urlByHost?: Readonly<Record<string, string>>;
79
+ }
80
+ interface RuntimeSurfaceBrand {
81
+ readonly productName: string;
82
+ readonly description?: string;
83
+ readonly wordmark?: string;
84
+ readonly platformLinks?: boolean;
85
+ /** A same-site path (`/brand/logo.svg`) or an https URL. */
86
+ readonly logo?: string;
87
+ /** The page's icons, each a path on this site (`/brand/favicon.svg`): see `isSameSitePath`. */
88
+ readonly favicon?: readonly string[];
89
+ }
90
+ /**
91
+ * Overrides of a product's UI strings, `product → locale id → message key →
92
+ * text`. Each product reads only its own namespace (`UI_STRING_PRODUCTS`). The
93
+ * platform checks every entry against that product's dictionary before it
94
+ * reaches a page: the key exists, the locale is one the deployment offers, the
95
+ * text is plain and keeps the base string's `{placeholders}`.
96
+ */
97
+ type RuntimeSurfaceStrings = Readonly<Record<string, Readonly<Record<string, Readonly<Record<string, string>>>>>>;
98
+ /** The display side of billing. The server-only billing keys never reach a page. */
99
+ interface RuntimeSurfaceBilling {
100
+ readonly costTab: "inherit" | "hidden";
101
+ readonly sidebarCard: "inherit" | "hidden";
102
+ readonly selfServe: boolean;
103
+ readonly unitLabel?: string;
104
+ readonly unitRate?: number;
105
+ readonly unitDecimals?: number;
106
+ /**
107
+ * The unit's word per interface language, beside the single `unitLabel`: a
108
+ * language the deployment gives no word for uses `unitLabel`. Read with
109
+ * `surfaceUnitLabel`.
110
+ */
111
+ readonly unitLabels?: Readonly<Record<string, string>>;
112
+ }
113
+ /**
114
+ * The deployment's surface profile as a page receives it, with every default
115
+ * applied. Lists that are empty keep the product's own default, except
116
+ * `worlds.allow` (see `SurfaceWorlds`).
117
+ */
118
+ interface RuntimeSurface {
119
+ readonly nav: {
120
+ readonly hide: readonly string[];
121
+ };
122
+ readonly features: {
123
+ readonly hide: readonly string[];
124
+ };
125
+ readonly dashboard: {
126
+ readonly tabs: readonly string[];
127
+ };
128
+ readonly nodes: {
129
+ readonly deny: readonly string[];
130
+ readonly allow: readonly string[];
131
+ };
132
+ readonly models: {
133
+ readonly deny: readonly string[];
134
+ readonly allow: readonly string[];
135
+ };
136
+ /** `requireSignIn`: no guest visits. When the deployment does not say, true exactly when sign-in is SSO-only. */
137
+ readonly auth: {
138
+ readonly methods: readonly string[];
139
+ readonly ssoLabel?: string;
140
+ readonly requireSignIn: boolean;
141
+ };
142
+ readonly siblings: {
143
+ readonly apps: readonly RuntimeSurfaceSibling[];
144
+ };
145
+ readonly brand: RuntimeSurfaceBrand;
146
+ /** `offered`: the languages a visitor may pick from; absent = every language the product ships. */
147
+ readonly locale: {
148
+ readonly default?: string;
149
+ readonly picker: boolean;
150
+ readonly offered?: readonly string[];
151
+ };
152
+ readonly outputs: {
153
+ readonly allowPublic: boolean;
154
+ };
155
+ readonly voice: {
156
+ readonly allowedGenders: readonly string[];
157
+ };
158
+ readonly billing: RuntimeSurfaceBilling;
159
+ readonly catalogs: {
160
+ readonly required: boolean;
161
+ readonly factoryPresets: boolean;
162
+ readonly images: SurfaceCatalogImages;
163
+ };
164
+ /** `links`: whether media may be imported from a link to another site. */
165
+ readonly imports: {
166
+ readonly links: boolean;
167
+ };
168
+ readonly header: SurfaceHeaderMode;
169
+ readonly worlds: SurfaceWorlds;
170
+ /** The deployment's own wording for UI strings; `{}` = none. Read with `surfaceStringOverride`. */
171
+ readonly strings: RuntimeSurfaceStrings;
172
+ /** Carried as given; no reader acts on it. */
173
+ readonly catalogPolicy?: unknown;
174
+ }
175
+ interface NodaroRuntimeConfig {
176
+ /** The API base. `"/"` means this page's own origin: see `resolveRuntimeApiBase`. */
177
+ readonly apiUrl?: string;
178
+ /** The Supabase URL. `"/supabase"` means this page's own origin: see `resolveRuntimeSupabaseUrl`. */
179
+ readonly supabaseUrl?: string;
180
+ readonly supabaseAnonKey?: string;
181
+ /** The platform editor's embedded video editor. */
182
+ readonly freecutUrl?: string;
183
+ /** The platform editor's embedded audio editor. */
184
+ readonly audiomassUrl?: string;
185
+ /** The language a first-time visitor starts in. */
186
+ readonly defaultLocale?: string;
187
+ /** Present only when the deployment configured a surface profile. */
188
+ readonly surface?: RuntimeSurface;
189
+ /** The platform editor's upload-moderation capability. */
190
+ readonly moderation?: {
191
+ readonly uploadImage?: boolean;
192
+ };
193
+ /** A platform editor rollout flag. */
194
+ readonly previewStopRule?: boolean;
195
+ /**
196
+ * The https origin this deployment serves user media from
197
+ * (`https://media.example.com`). Present only on a white-label deployment
198
+ * whose public media URL is https; absent, a reader trusts no media host
199
+ * beyond its own site.
200
+ */
201
+ readonly mediaOrigin?: string;
202
+ }
203
+ /** Sign-in is SSO-only when SSO is the one method offered. */
204
+ declare function isSsoOnly(methods: readonly unknown[]): boolean;
205
+ /** An explicit `requireSignIn` wins; otherwise a deployment requires sign-in exactly when it is SSO-only. */
206
+ declare function surfaceRequiresSignIn(auth: {
207
+ readonly methods?: unknown;
208
+ readonly requireSignIn?: unknown;
209
+ } | undefined): boolean;
210
+ /**
211
+ * A brand logo reference a page may load: a path on the page's own site
212
+ * (`/brand/logo.svg`), or an https URL without credentials. A protocol-relative
213
+ * `//host/…`, any other scheme (`http:`, `data:`, `javascript:`) and anything
214
+ * with whitespace or a backslash is not one.
215
+ */
216
+ declare function isBrandLogoRef(value: unknown): value is string;
217
+ /**
218
+ * A path on the page's own site (`/brand/favicon.svg`, `/icon.png?v=2`): what
219
+ * `brand.favicon` holds, written into the page's `<head>` as a link. Stricter
220
+ * than `isBrandLogoRef`: no URL to another site at all, and no character that
221
+ * could end an HTML attribute.
222
+ */
223
+ declare function isSameSitePath(value: unknown): value is string;
224
+ /**
225
+ * The products whose UI strings a deployment may override, each keyed in
226
+ * `surface.strings` by its id and checked against that product's own
227
+ * dictionary. `flow`: the platform's workflow editor; `tools`: the tools app;
228
+ * `voice`: the voice app. One profile words them all. A product adopts the
229
+ * overrides by adding its id here and giving the platform its key manifest
230
+ * (`uiStringManifestFile`), which a deployment composing the app into one
231
+ * image copies next to Flow's own.
232
+ */
233
+ declare const UI_STRING_PRODUCTS: readonly ["flow", "tools", "voice"];
234
+ type UiStringProduct = (typeof UI_STRING_PRODUCTS)[number];
235
+ /**
236
+ * What a product's build emits beside its output so the platform can check a
237
+ * deployment's overrides at boot: every key of its base (English) dictionary
238
+ * with the placeholder names that key's text uses, and the locales the product
239
+ * offers. Keys and names only, never the text.
240
+ */
241
+ interface UiStringManifest {
242
+ /** The `surface.strings` namespace the dictionary answers to (`UI_STRING_PRODUCTS`). */
243
+ readonly product: string;
244
+ /** The locales overrides may target when the deployment sets no `locale.offered`. */
245
+ readonly locales: readonly string[];
246
+ /** Every key a deployment may override → the placeholder names its base text uses, sorted. */
247
+ readonly keys: Readonly<Record<string, readonly string[]>>;
248
+ }
249
+ /** The manifest's file name, at the root of the product's build output. */
250
+ declare function uiStringManifestFile(product: string): string;
251
+ /** The placeholder names `text` uses, each once, sorted. */
252
+ declare function uiStringPlaceholders(text: string): string[];
253
+ /**
254
+ * The manifest of a base dictionary. A key whose base text is blank is left
255
+ * out: it is grammar data (a word's grammatical gender, the gap between two
256
+ * joined fragments), not wording, and overriding it would only break the
257
+ * sentences built from it.
258
+ */
259
+ declare function buildUiStringManifest(product: string, dict: Readonly<Record<string, string>>, locales: readonly string[]): UiStringManifest;
260
+ /** The deployment's text for `key` in `locale` of `product`, or undefined. */
261
+ declare function surfaceStringOverride(strings: RuntimeSurfaceStrings | undefined, product: string, locale: string, key: string): string | undefined;
262
+ /**
263
+ * The deployment's word for its unit in `locale`: the `billing.unitLabels`
264
+ * entry for that language, else its single `unitLabel` (`single`). `labels` is
265
+ * the map as it arrives, on the surface or on a `display` object beside its
266
+ * `unit`.
267
+ */
268
+ declare function surfaceUnitLabel(labels: Readonly<Record<string, string>> | undefined, locale: string | undefined, single: string): string;
269
+ /**
270
+ * An https origin, spelled exactly as a browser spells one
271
+ * (`https://media.example.com`, a port only when it is not 443): what
272
+ * `new URL(src).origin` is compared with, so a path, a trailing slash,
273
+ * credentials, another letter case or any other scheme could never match, and
274
+ * is not one.
275
+ */
276
+ declare function isHttpsOrigin(value: unknown): value is string;
277
+ /**
278
+ * The base a client builds API URLs on. `"/"` is the same-origin sentinel (a
279
+ * site answering on more than one hostname cannot name one) and resolves to
280
+ * `""`: build every URL relative to the page. `undefined` when the config names
281
+ * none, so the app keeps its own build-time value. It never makes up a URL.
282
+ */
283
+ declare function resolveRuntimeApiBase(cfg: Pick<NodaroRuntimeConfig, "apiUrl"> | undefined): string | undefined;
284
+ /**
285
+ * The Supabase URL a browser client uses. supabase-js needs an absolute URL, so
286
+ * the same-origin sentinel `"/supabase"` resolves against `origin`, the page's
287
+ * own (`location.origin`). `undefined` when the config names none.
288
+ */
289
+ declare function resolveRuntimeSupabaseUrl(cfg: Pick<NodaroRuntimeConfig, "supabaseUrl"> | undefined, origin: string): string | undefined;
290
+ /**
291
+ * `surface.strings`, keeping only text: a product, locale or key whose value
292
+ * has the wrong type is left out, and an emptied level with it. Built from
293
+ * entries, so a `"__proto__"` key stays an ordinary key. Never throws.
294
+ */
295
+ declare function parseRuntimeStrings(raw: unknown): RuntimeSurfaceStrings;
296
+ /** The surface block of `/config.js`, every default applied. Never throws. */
297
+ declare function parseRuntimeSurface(raw: unknown): RuntimeSurface;
298
+ /** The surface a deployment that configured none renders. */
299
+ declare const RUNTIME_SURFACE_DEFAULT: RuntimeSurface;
300
+ /**
301
+ * `/config.js`'s object, typed. Keeps each key only when it has the expected
302
+ * type; a blank string is no value. Never throws.
303
+ */
304
+ declare function parseRuntimeConfig(raw: unknown): NodaroRuntimeConfig;
305
+ /** Read and parse the runtime config `/config.js` set on `scope` (default: the global object). */
306
+ declare function readRuntimeConfig(scope?: unknown): NodaroRuntimeConfig;
307
+
308
+ export { type NodaroRuntimeConfig, RUNTIME_CONFIG_GLOBAL, RUNTIME_CONFIG_KEYS, RUNTIME_SURFACE_DEFAULT, type RuntimeConfigKey, type RuntimeSurface, type RuntimeSurfaceBilling, type RuntimeSurfaceBrand, type RuntimeSurfaceSibling, type RuntimeSurfaceStrings, SURFACE_CATALOG_IMAGES, SURFACE_HEADER_MODES, type SurfaceCatalogImages, type SurfaceHeaderMode, type SurfaceWorlds, UI_STRING_PRODUCTS, type UiStringManifest, type UiStringProduct, WORLD_IDS, WORLD_REQUIRED_NODE_TYPES, type WorldId, buildUiStringManifest, isBrandLogoRef, isHttpsOrigin, isSameSitePath, isSsoOnly, isWorldId, orderWorlds, parseRuntimeConfig, parseRuntimeStrings, parseRuntimeSurface, readRuntimeConfig, resolveRuntimeApiBase, resolveRuntimeSupabaseUrl, surfaceRequiresSignIn, surfaceStringOverride, surfaceUnitLabel, uiStringManifestFile, uiStringPlaceholders, worldAllowed };
@@ -0,0 +1,308 @@
1
+ /**
2
+ * The worlds a Nodaro deployment can offer — the tabs of the shared site
3
+ * header, in its canonical display order — and the node types each one runs.
4
+ *
5
+ * A world is offered to a viewer when the deployment's profile allows it
6
+ * (`surface.worlds.allow`, when set) AND every node type it runs is available
7
+ * to that viewer. The platform's `GET /v1/surface/availability` answers both
8
+ * per viewer; this table is the one copy that answer and every client read,
9
+ * so a world is never shown where its runs would be refused.
10
+ *
11
+ * Structural vocabulary only (ids and node-type names), no content.
12
+ */
13
+ declare const WORLD_IDS: readonly ["explore", "image", "video", "music", "trends", "motion", "voice", "app", "studio"];
14
+ type WorldId = (typeof WORLD_IDS)[number];
15
+ declare function isWorldId(value: unknown): value is WorldId;
16
+ /**
17
+ * The node types each world runs: a world is offered only while every one of
18
+ * them is available to the viewer. A world with none runs no node of its own
19
+ * and is gated by the allowlist alone: Explore is a showcase, App is the
20
+ * workflow editor (whose nodes are gated one by one inside it), Studio is its
21
+ * own product.
22
+ *
23
+ * - `image`: Generate Image (`POST /v1/generate-image`).
24
+ * - `video`: Generate Video and Text to Video — the world's two routes
25
+ * (`/v1/generate-video` from a start frame, `/v1/text-to-video` from a
26
+ * prompt). The canvas's Image to Video node is not one of them.
27
+ * - `music`: Suno Create Music (`/v1/suno/generate`).
28
+ * - `trends`, `motion`: Cast Swap (`/v1/cast-swap`), the run both worlds start.
29
+ * - `voice`: Voice Changer Pro (`/v1/voice-changer-pro`).
30
+ */
31
+ declare const WORLD_REQUIRED_NODE_TYPES: Readonly<Record<WorldId, readonly string[]>>;
32
+ /** The worlds part of a deployment's surface profile. */
33
+ interface SurfaceWorlds {
34
+ /**
35
+ * When PRESENT, exactly these worlds are offered (`[]` offers none). Absent:
36
+ * every world is, subject to its node types. Unlike the profile's other
37
+ * lists, presence is what narrows, so a list whose ids are all unknown
38
+ * offers nothing instead of everything.
39
+ */
40
+ readonly allow?: readonly string[];
41
+ /** The world a visit to the site's root lands on. Always one `allow` lets through. */
42
+ readonly home?: WorldId;
43
+ /** Display order; worlds it leaves out follow in canonical order. */
44
+ readonly order?: readonly WorldId[];
45
+ }
46
+ /** Does the profile's allowlist let this world through? (Node availability is checked separately.) */
47
+ declare function worldAllowed(worlds: SurfaceWorlds | undefined, id: string): boolean;
48
+ /** Every world, `order`'s known ids first (each once), then the rest in canonical order. */
49
+ declare function orderWorlds(order?: readonly string[]): WorldId[];
50
+
51
+ /**
52
+ * The deployment runtime config — the object a Nodaro platform container
53
+ * writes to `/config.js` at boot as `window.__NODARO_RUNTIME__`, and that every
54
+ * product served from the same site reads before its app starts. One published
55
+ * build then serves any deployment without a rebuild.
56
+ *
57
+ * This module is the contract between that writer and its readers: the key
58
+ * names, their shapes, and a lenient parser. Structural vocabulary only: no
59
+ * content, no prices, nothing about any one deployment. The platform's own
60
+ * schema stays the authority on what a deployment may set. What reaches the
61
+ * page has already been validated there and stripped of every server-only
62
+ * value; this parser only refuses to hand a reader a value of the wrong type.
63
+ */
64
+ /** The global `/config.js` assigns. */
65
+ declare const RUNTIME_CONFIG_GLOBAL = "__NODARO_RUNTIME__";
66
+ /** Every top-level key `/config.js` can carry. */
67
+ declare const RUNTIME_CONFIG_KEYS: readonly ["apiUrl", "supabaseUrl", "supabaseAnonKey", "freecutUrl", "audiomassUrl", "defaultLocale", "surface", "moderation", "previewStopRule", "mediaOrigin"];
68
+ type RuntimeConfigKey = (typeof RUNTIME_CONFIG_KEYS)[number];
69
+ declare const SURFACE_HEADER_MODES: readonly ["default", "white-label"];
70
+ /** `white-label`: the deployment's own header, with no platform links or art. */
71
+ type SurfaceHeaderMode = (typeof SURFACE_HEADER_MODES)[number];
72
+ declare const SURFACE_CATALOG_IMAGES: readonly ["default", "none", "own"];
73
+ /** Pictures on picker options: the platform's (`default`), none, or the deployment's own (`own`). */
74
+ type SurfaceCatalogImages = (typeof SURFACE_CATALOG_IMAGES)[number];
75
+ interface RuntimeSurfaceSibling {
76
+ readonly label: string;
77
+ readonly url: string;
78
+ readonly urlByHost?: Readonly<Record<string, string>>;
79
+ }
80
+ interface RuntimeSurfaceBrand {
81
+ readonly productName: string;
82
+ readonly description?: string;
83
+ readonly wordmark?: string;
84
+ readonly platformLinks?: boolean;
85
+ /** A same-site path (`/brand/logo.svg`) or an https URL. */
86
+ readonly logo?: string;
87
+ /** The page's icons, each a path on this site (`/brand/favicon.svg`): see `isSameSitePath`. */
88
+ readonly favicon?: readonly string[];
89
+ }
90
+ /**
91
+ * Overrides of a product's UI strings, `product → locale id → message key →
92
+ * text`. Each product reads only its own namespace (`UI_STRING_PRODUCTS`). The
93
+ * platform checks every entry against that product's dictionary before it
94
+ * reaches a page: the key exists, the locale is one the deployment offers, the
95
+ * text is plain and keeps the base string's `{placeholders}`.
96
+ */
97
+ type RuntimeSurfaceStrings = Readonly<Record<string, Readonly<Record<string, Readonly<Record<string, string>>>>>>;
98
+ /** The display side of billing. The server-only billing keys never reach a page. */
99
+ interface RuntimeSurfaceBilling {
100
+ readonly costTab: "inherit" | "hidden";
101
+ readonly sidebarCard: "inherit" | "hidden";
102
+ readonly selfServe: boolean;
103
+ readonly unitLabel?: string;
104
+ readonly unitRate?: number;
105
+ readonly unitDecimals?: number;
106
+ /**
107
+ * The unit's word per interface language, beside the single `unitLabel`: a
108
+ * language the deployment gives no word for uses `unitLabel`. Read with
109
+ * `surfaceUnitLabel`.
110
+ */
111
+ readonly unitLabels?: Readonly<Record<string, string>>;
112
+ }
113
+ /**
114
+ * The deployment's surface profile as a page receives it, with every default
115
+ * applied. Lists that are empty keep the product's own default, except
116
+ * `worlds.allow` (see `SurfaceWorlds`).
117
+ */
118
+ interface RuntimeSurface {
119
+ readonly nav: {
120
+ readonly hide: readonly string[];
121
+ };
122
+ readonly features: {
123
+ readonly hide: readonly string[];
124
+ };
125
+ readonly dashboard: {
126
+ readonly tabs: readonly string[];
127
+ };
128
+ readonly nodes: {
129
+ readonly deny: readonly string[];
130
+ readonly allow: readonly string[];
131
+ };
132
+ readonly models: {
133
+ readonly deny: readonly string[];
134
+ readonly allow: readonly string[];
135
+ };
136
+ /** `requireSignIn`: no guest visits. When the deployment does not say, true exactly when sign-in is SSO-only. */
137
+ readonly auth: {
138
+ readonly methods: readonly string[];
139
+ readonly ssoLabel?: string;
140
+ readonly requireSignIn: boolean;
141
+ };
142
+ readonly siblings: {
143
+ readonly apps: readonly RuntimeSurfaceSibling[];
144
+ };
145
+ readonly brand: RuntimeSurfaceBrand;
146
+ /** `offered`: the languages a visitor may pick from; absent = every language the product ships. */
147
+ readonly locale: {
148
+ readonly default?: string;
149
+ readonly picker: boolean;
150
+ readonly offered?: readonly string[];
151
+ };
152
+ readonly outputs: {
153
+ readonly allowPublic: boolean;
154
+ };
155
+ readonly voice: {
156
+ readonly allowedGenders: readonly string[];
157
+ };
158
+ readonly billing: RuntimeSurfaceBilling;
159
+ readonly catalogs: {
160
+ readonly required: boolean;
161
+ readonly factoryPresets: boolean;
162
+ readonly images: SurfaceCatalogImages;
163
+ };
164
+ /** `links`: whether media may be imported from a link to another site. */
165
+ readonly imports: {
166
+ readonly links: boolean;
167
+ };
168
+ readonly header: SurfaceHeaderMode;
169
+ readonly worlds: SurfaceWorlds;
170
+ /** The deployment's own wording for UI strings; `{}` = none. Read with `surfaceStringOverride`. */
171
+ readonly strings: RuntimeSurfaceStrings;
172
+ /** Carried as given; no reader acts on it. */
173
+ readonly catalogPolicy?: unknown;
174
+ }
175
+ interface NodaroRuntimeConfig {
176
+ /** The API base. `"/"` means this page's own origin: see `resolveRuntimeApiBase`. */
177
+ readonly apiUrl?: string;
178
+ /** The Supabase URL. `"/supabase"` means this page's own origin: see `resolveRuntimeSupabaseUrl`. */
179
+ readonly supabaseUrl?: string;
180
+ readonly supabaseAnonKey?: string;
181
+ /** The platform editor's embedded video editor. */
182
+ readonly freecutUrl?: string;
183
+ /** The platform editor's embedded audio editor. */
184
+ readonly audiomassUrl?: string;
185
+ /** The language a first-time visitor starts in. */
186
+ readonly defaultLocale?: string;
187
+ /** Present only when the deployment configured a surface profile. */
188
+ readonly surface?: RuntimeSurface;
189
+ /** The platform editor's upload-moderation capability. */
190
+ readonly moderation?: {
191
+ readonly uploadImage?: boolean;
192
+ };
193
+ /** A platform editor rollout flag. */
194
+ readonly previewStopRule?: boolean;
195
+ /**
196
+ * The https origin this deployment serves user media from
197
+ * (`https://media.example.com`). Present only on a white-label deployment
198
+ * whose public media URL is https; absent, a reader trusts no media host
199
+ * beyond its own site.
200
+ */
201
+ readonly mediaOrigin?: string;
202
+ }
203
+ /** Sign-in is SSO-only when SSO is the one method offered. */
204
+ declare function isSsoOnly(methods: readonly unknown[]): boolean;
205
+ /** An explicit `requireSignIn` wins; otherwise a deployment requires sign-in exactly when it is SSO-only. */
206
+ declare function surfaceRequiresSignIn(auth: {
207
+ readonly methods?: unknown;
208
+ readonly requireSignIn?: unknown;
209
+ } | undefined): boolean;
210
+ /**
211
+ * A brand logo reference a page may load: a path on the page's own site
212
+ * (`/brand/logo.svg`), or an https URL without credentials. A protocol-relative
213
+ * `//host/…`, any other scheme (`http:`, `data:`, `javascript:`) and anything
214
+ * with whitespace or a backslash is not one.
215
+ */
216
+ declare function isBrandLogoRef(value: unknown): value is string;
217
+ /**
218
+ * A path on the page's own site (`/brand/favicon.svg`, `/icon.png?v=2`): what
219
+ * `brand.favicon` holds, written into the page's `<head>` as a link. Stricter
220
+ * than `isBrandLogoRef`: no URL to another site at all, and no character that
221
+ * could end an HTML attribute.
222
+ */
223
+ declare function isSameSitePath(value: unknown): value is string;
224
+ /**
225
+ * The products whose UI strings a deployment may override, each keyed in
226
+ * `surface.strings` by its id and checked against that product's own
227
+ * dictionary. `flow`: the platform's workflow editor; `tools`: the tools app;
228
+ * `voice`: the voice app. One profile words them all. A product adopts the
229
+ * overrides by adding its id here and giving the platform its key manifest
230
+ * (`uiStringManifestFile`), which a deployment composing the app into one
231
+ * image copies next to Flow's own.
232
+ */
233
+ declare const UI_STRING_PRODUCTS: readonly ["flow", "tools", "voice"];
234
+ type UiStringProduct = (typeof UI_STRING_PRODUCTS)[number];
235
+ /**
236
+ * What a product's build emits beside its output so the platform can check a
237
+ * deployment's overrides at boot: every key of its base (English) dictionary
238
+ * with the placeholder names that key's text uses, and the locales the product
239
+ * offers. Keys and names only, never the text.
240
+ */
241
+ interface UiStringManifest {
242
+ /** The `surface.strings` namespace the dictionary answers to (`UI_STRING_PRODUCTS`). */
243
+ readonly product: string;
244
+ /** The locales overrides may target when the deployment sets no `locale.offered`. */
245
+ readonly locales: readonly string[];
246
+ /** Every key a deployment may override → the placeholder names its base text uses, sorted. */
247
+ readonly keys: Readonly<Record<string, readonly string[]>>;
248
+ }
249
+ /** The manifest's file name, at the root of the product's build output. */
250
+ declare function uiStringManifestFile(product: string): string;
251
+ /** The placeholder names `text` uses, each once, sorted. */
252
+ declare function uiStringPlaceholders(text: string): string[];
253
+ /**
254
+ * The manifest of a base dictionary. A key whose base text is blank is left
255
+ * out: it is grammar data (a word's grammatical gender, the gap between two
256
+ * joined fragments), not wording, and overriding it would only break the
257
+ * sentences built from it.
258
+ */
259
+ declare function buildUiStringManifest(product: string, dict: Readonly<Record<string, string>>, locales: readonly string[]): UiStringManifest;
260
+ /** The deployment's text for `key` in `locale` of `product`, or undefined. */
261
+ declare function surfaceStringOverride(strings: RuntimeSurfaceStrings | undefined, product: string, locale: string, key: string): string | undefined;
262
+ /**
263
+ * The deployment's word for its unit in `locale`: the `billing.unitLabels`
264
+ * entry for that language, else its single `unitLabel` (`single`). `labels` is
265
+ * the map as it arrives, on the surface or on a `display` object beside its
266
+ * `unit`.
267
+ */
268
+ declare function surfaceUnitLabel(labels: Readonly<Record<string, string>> | undefined, locale: string | undefined, single: string): string;
269
+ /**
270
+ * An https origin, spelled exactly as a browser spells one
271
+ * (`https://media.example.com`, a port only when it is not 443): what
272
+ * `new URL(src).origin` is compared with, so a path, a trailing slash,
273
+ * credentials, another letter case or any other scheme could never match, and
274
+ * is not one.
275
+ */
276
+ declare function isHttpsOrigin(value: unknown): value is string;
277
+ /**
278
+ * The base a client builds API URLs on. `"/"` is the same-origin sentinel (a
279
+ * site answering on more than one hostname cannot name one) and resolves to
280
+ * `""`: build every URL relative to the page. `undefined` when the config names
281
+ * none, so the app keeps its own build-time value. It never makes up a URL.
282
+ */
283
+ declare function resolveRuntimeApiBase(cfg: Pick<NodaroRuntimeConfig, "apiUrl"> | undefined): string | undefined;
284
+ /**
285
+ * The Supabase URL a browser client uses. supabase-js needs an absolute URL, so
286
+ * the same-origin sentinel `"/supabase"` resolves against `origin`, the page's
287
+ * own (`location.origin`). `undefined` when the config names none.
288
+ */
289
+ declare function resolveRuntimeSupabaseUrl(cfg: Pick<NodaroRuntimeConfig, "supabaseUrl"> | undefined, origin: string): string | undefined;
290
+ /**
291
+ * `surface.strings`, keeping only text: a product, locale or key whose value
292
+ * has the wrong type is left out, and an emptied level with it. Built from
293
+ * entries, so a `"__proto__"` key stays an ordinary key. Never throws.
294
+ */
295
+ declare function parseRuntimeStrings(raw: unknown): RuntimeSurfaceStrings;
296
+ /** The surface block of `/config.js`, every default applied. Never throws. */
297
+ declare function parseRuntimeSurface(raw: unknown): RuntimeSurface;
298
+ /** The surface a deployment that configured none renders. */
299
+ declare const RUNTIME_SURFACE_DEFAULT: RuntimeSurface;
300
+ /**
301
+ * `/config.js`'s object, typed. Keeps each key only when it has the expected
302
+ * type; a blank string is no value. Never throws.
303
+ */
304
+ declare function parseRuntimeConfig(raw: unknown): NodaroRuntimeConfig;
305
+ /** Read and parse the runtime config `/config.js` set on `scope` (default: the global object). */
306
+ declare function readRuntimeConfig(scope?: unknown): NodaroRuntimeConfig;
307
+
308
+ export { type NodaroRuntimeConfig, RUNTIME_CONFIG_GLOBAL, RUNTIME_CONFIG_KEYS, RUNTIME_SURFACE_DEFAULT, type RuntimeConfigKey, type RuntimeSurface, type RuntimeSurfaceBilling, type RuntimeSurfaceBrand, type RuntimeSurfaceSibling, type RuntimeSurfaceStrings, SURFACE_CATALOG_IMAGES, SURFACE_HEADER_MODES, type SurfaceCatalogImages, type SurfaceHeaderMode, type SurfaceWorlds, UI_STRING_PRODUCTS, type UiStringManifest, type UiStringProduct, WORLD_IDS, WORLD_REQUIRED_NODE_TYPES, type WorldId, buildUiStringManifest, isBrandLogoRef, isHttpsOrigin, isSameSitePath, isSsoOnly, isWorldId, orderWorlds, parseRuntimeConfig, parseRuntimeStrings, parseRuntimeSurface, readRuntimeConfig, resolveRuntimeApiBase, resolveRuntimeSupabaseUrl, surfaceRequiresSignIn, surfaceStringOverride, surfaceUnitLabel, uiStringManifestFile, uiStringPlaceholders, worldAllowed };
@@ -0,0 +1,3 @@
1
+ export { RUNTIME_CONFIG_GLOBAL, RUNTIME_CONFIG_KEYS, RUNTIME_SURFACE_DEFAULT, SURFACE_CATALOG_IMAGES, SURFACE_HEADER_MODES, UI_STRING_PRODUCTS, WORLD_IDS, WORLD_REQUIRED_NODE_TYPES, buildUiStringManifest, isBrandLogoRef, isHttpsOrigin, isSameSitePath, isSsoOnly, isWorldId, orderWorlds, parseRuntimeConfig, parseRuntimeStrings, parseRuntimeSurface, readRuntimeConfig, resolveRuntimeApiBase, resolveRuntimeSupabaseUrl, surfaceRequiresSignIn, surfaceStringOverride, surfaceUnitLabel, uiStringManifestFile, uiStringPlaceholders, worldAllowed } from '../chunk-S7FCFQ6X.js';
2
+ //# sourceMappingURL=runtime-config.js.map
3
+ //# sourceMappingURL=runtime-config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"runtime-config.js"}