@absolutejs/absolute 0.20.0-beta.5 → 0.20.0-beta.50
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/README.md +205 -0
- package/dist/angular/browser.js +392 -361
- package/dist/angular/browser.js.map +3 -3
- package/dist/angular/components/core/streamingSlotRegistrar.js +7 -7
- package/dist/angular/components/core/streamingSlotRegistry.js +4 -4
- package/dist/angular/index.js +355 -302
- package/dist/angular/index.js.map +5 -5
- package/dist/angular/server.js +109 -58
- package/dist/angular/server.js.map +5 -5
- package/dist/build.js +2261 -1335
- package/dist/build.js.map +16 -12
- package/dist/cli/config/client.js +12 -12
- package/dist/cli/config/server.js +1136 -1090
- package/dist/cli/index.js +8247 -1898
- package/dist/client/index.js +29 -25
- package/dist/client/index.js.map +2 -2
- package/dist/core/streamingSlotRegistrar.js +15 -13
- package/dist/core/streamingSlotRegistrar.js.map +2 -2
- package/dist/core/streamingSlotRegistry.js +11 -9
- package/dist/core/streamingSlotRegistry.js.map +2 -2
- package/dist/dev/client/hmrClient.ts +35 -3
- package/dist/dev/client/hmrTiming.ts +6 -0
- package/dist/dev/client/syncDevtools.ts +237 -0
- package/dist/dev/serverBootstrap.js +28 -0
- package/dist/image-client/imageClient.js +7 -7
- package/dist/index.js +3400 -2126
- package/dist/index.js.map +30 -23
- package/dist/islands/browser.js +11 -9
- package/dist/islands/browser.js.map +2 -2
- package/dist/islands/index.js +39 -35
- package/dist/islands/index.js.map +2 -2
- package/dist/mobile/browser.js +167 -20
- package/dist/mobile/browser.js.map +7 -5
- package/dist/mobile/index.js +7840 -2983
- package/dist/mobile/index.js.map +37 -18
- package/dist/mobile/remoteMacAgentEntry.js +1184 -14
- package/dist/mobile/shellAuth.js +36 -0
- package/dist/mobile/shellBootstrap.js +836 -0
- package/dist/mobile/shellExpoAuth.js +163 -0
- package/dist/mobile/shellExpoDevices.js +77 -0
- package/dist/mobile/shellExpoSync.js +104 -0
- package/dist/mobile/shellSync.js +173 -0
- package/dist/react/browser.js +17 -15
- package/dist/react/browser.js.map +2 -2
- package/dist/react/components/browser/index.js +107 -107
- package/dist/react/components/index.js +118 -116
- package/dist/react/components/index.js.map +2 -2
- package/dist/react/hooks/index.js +11 -9
- package/dist/react/hooks/index.js.map +2 -2
- package/dist/react/index.js +92 -49
- package/dist/react/index.js.map +4 -4
- package/dist/react/jsxDevRuntimeCompat.js +11 -9
- package/dist/react/jsxDevRuntimeCompat.js.map +2 -2
- package/dist/react/jsxRuntimeCompat.js +11 -9
- package/dist/react/jsxRuntimeCompat.js.map +2 -2
- package/dist/react/router/browser.js +9 -7
- package/dist/react/router/browser.js.map +2 -2
- package/dist/react/router/index.js +9 -7
- package/dist/react/router/index.js.map +2 -2
- package/dist/react/server.js +51 -10
- package/dist/react/server.js.map +4 -4
- package/dist/src/build/pwa.d.ts +16 -0
- package/dist/src/cli/config/server.d.ts +1 -1
- package/dist/src/cli/instanceStatus.d.ts +1 -0
- package/dist/src/cli/scripts/dev.d.ts +2 -0
- package/dist/src/core/devBuild.d.ts +1 -0
- package/dist/src/core/prepare.d.ts +376 -0
- package/dist/src/dev/clientManager.d.ts +1 -0
- package/dist/src/dev/devCert.d.ts +6 -4
- package/dist/src/dev/serverEntryCopies.d.ts +3 -0
- package/dist/src/mobile/androidEmulatorController.d.ts +8 -1
- package/dist/src/mobile/androidRelease.d.ts +9 -2
- package/dist/src/mobile/androidTestReport.d.ts +14 -0
- package/dist/src/mobile/androidUpgradeConformance.d.ts +47 -0
- package/dist/src/mobile/androidWebView.d.ts +1 -0
- package/dist/src/mobile/browser.d.ts +1 -0
- package/dist/src/mobile/capacitorBundle.d.ts +11 -0
- package/dist/src/mobile/ciWorkflow.d.ts +26 -0
- package/dist/src/mobile/config.d.ts +4 -1
- package/dist/src/mobile/devDeviceAdapter.d.ts +3 -0
- package/dist/src/mobile/deviceCapabilities.d.ts +48 -0
- package/dist/src/mobile/expoBridge.d.ts +91 -0
- package/dist/src/mobile/expoDevController.d.ts +56 -0
- package/dist/src/mobile/expoProject.d.ts +16 -0
- package/dist/src/mobile/index.d.ts +14 -0
- package/dist/src/mobile/iosDeviceAcceptance.d.ts +32 -0
- package/dist/src/mobile/iosPhysicalDeviceTransport.d.ts +16 -0
- package/dist/src/mobile/iosRelease.d.ts +16 -3
- package/dist/src/mobile/iosSimulatorController.d.ts +20 -2
- package/dist/src/mobile/iosTestReport.d.ts +24 -0
- package/dist/src/mobile/mobileBundleInspection.d.ts +55 -0
- package/dist/src/mobile/mobileInspect.d.ts +136 -0
- package/dist/src/mobile/mobilePreview.d.ts +174 -0
- package/dist/src/mobile/mobilePreviewClient.d.ts +1 -0
- package/dist/src/mobile/nativeAuth.d.ts +6 -0
- package/dist/src/mobile/nativeBackgroundSync.d.ts +4 -0
- package/dist/src/mobile/nativeDeviceCapabilities.d.ts +6 -0
- package/dist/src/mobile/nativeRoute.d.ts +13 -0
- package/dist/src/mobile/nativeTestReport.d.ts +91 -0
- package/dist/src/mobile/pageProtocol.d.ts +2 -0
- package/dist/src/mobile/releaseDoctor.d.ts +23 -1
- package/dist/src/mobile/remoteMacProtocol.d.ts +38 -0
- package/dist/src/mobile/remoteMacWire.d.ts +1 -1
- package/dist/src/mobile/shellAuth.d.ts +8 -1
- package/dist/src/mobile/shellBootstrap.d.ts +14 -2
- package/dist/src/mobile/shellExpoAuth.d.ts +12 -0
- package/dist/src/mobile/shellExpoDevices.d.ts +3 -0
- package/dist/src/mobile/shellExpoSync.d.ts +18 -0
- package/dist/src/mobile/shellHttp.d.ts +2 -0
- package/dist/src/mobile/shellPush.d.ts +11 -0
- package/dist/src/mobile/shellSync.d.ts +46 -1
- package/dist/src/mobile/syncRemediation.d.ts +10 -0
- package/dist/src/mobile/syncSchema.d.ts +9 -0
- package/dist/src/mobile/transport.d.ts +7 -0
- package/dist/src/plugins/hmr.d.ts +3 -0
- package/dist/src/plugins/imageOptimizer.d.ts +1 -1
- package/dist/src/react/hooks/useMediaQuery.d.ts +1 -1
- package/dist/src/utils/imageProcessing.d.ts +3 -0
- package/dist/src/utils/loadConfig.d.ts +1 -0
- package/dist/src/utils/logger.d.ts +1 -0
- package/dist/src/utils/startupBanner.d.ts +1 -0
- package/dist/src/utils/userAgentFunctions.d.ts +1 -1
- package/dist/svelte/browser.js +12 -10
- package/dist/svelte/browser.js.map +2 -2
- package/dist/svelte/index.js +86 -43
- package/dist/svelte/index.js.map +4 -4
- package/dist/svelte/server.js +68 -27
- package/dist/svelte/server.js.map +4 -4
- package/dist/types/build.d.ts +53 -3
- package/dist/types/cli.d.ts +1 -0
- package/dist/types/messages.d.ts +1 -1
- package/dist/vue/browser.js +14 -12
- package/dist/vue/browser.js.map +2 -2
- package/dist/vue/components/Image.js +9 -7
- package/dist/vue/components/Image.js.map +2 -2
- package/dist/vue/components/index.js +11 -9
- package/dist/vue/components/index.js.map +2 -2
- package/dist/vue/index.js +91 -48
- package/dist/vue/index.js.map +4 -4
- package/dist/vue/server.js +53 -12
- package/dist/vue/server.js.map +4 -4
- package/package.json +35 -15
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"const reduxImpl = (reducer, initial) => (set, _get, api) => {\n api.dispatch = (action) => {\n set((state) => reducer(state, action), false, action);\n return action;\n };\n api.dispatchFromDevtools = true;\n return { dispatch: (...args) => api.dispatch(...args), ...initial };\n};\nconst redux = reduxImpl;\n\nconst shouldDispatchFromDevtools = (api) => !!api.dispatchFromDevtools && typeof api.dispatch === \"function\";\nconst trackedConnections = /* @__PURE__ */ new Map();\nconst getTrackedConnectionState = (name) => {\n const api = trackedConnections.get(name);\n if (!api) return {};\n return Object.fromEntries(\n Object.entries(api.stores).map(([key, api2]) => [key, api2.getState()])\n );\n};\nconst extractConnectionInformation = (store, extensionConnector, options) => {\n if (store === void 0) {\n return {\n type: \"untracked\",\n connection: extensionConnector.connect(options)\n };\n }\n const existingConnection = trackedConnections.get(options.name);\n if (existingConnection) {\n return { type: \"tracked\", store, ...existingConnection };\n }\n const newConnection = {\n connection: extensionConnector.connect(options),\n stores: {}\n };\n trackedConnections.set(options.name, newConnection);\n return { type: \"tracked\", store, ...newConnection };\n};\nconst removeStoreFromTrackedConnections = (name, store) => {\n if (store === void 0) return;\n const connectionInfo = trackedConnections.get(name);\n if (!connectionInfo) return;\n delete connectionInfo.stores[store];\n if (Object.keys(connectionInfo.stores).length === 0) {\n trackedConnections.delete(name);\n }\n};\nconst findCallerName = (stack) => {\n var _a, _b;\n if (!stack) return void 0;\n const traceLines = stack.split(\"\\n\");\n const apiSetStateLineIndex = traceLines.findIndex(\n (traceLine) => traceLine.includes(\"api.setState\")\n );\n if (apiSetStateLineIndex < 0) return void 0;\n const callerLine = ((_a = traceLines[apiSetStateLineIndex + 1]) == null ? void 0 : _a.trim()) || \"\";\n return (_b = /.+ (.+) .+/.exec(callerLine)) == null ? void 0 : _b[1];\n};\nconst devtoolsImpl = (fn, devtoolsOptions = {}) => (set, get, api) => {\n const { enabled, anonymousActionType, store, ...options } = devtoolsOptions;\n let extensionConnector;\n try {\n extensionConnector = (enabled != null ? enabled : (import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") && window.__REDUX_DEVTOOLS_EXTENSION__;\n } catch (e) {\n }\n if (!extensionConnector) {\n return fn(set, get, api);\n }\n const { connection, ...connectionInformation } = extractConnectionInformation(store, extensionConnector, options);\n let isRecording = true;\n api.setState = ((state, replace, nameOrAction) => {\n const r = set(state, replace);\n if (!isRecording) return r;\n const action = nameOrAction === void 0 ? {\n type: anonymousActionType || findCallerName(new Error().stack) || \"anonymous\"\n } : typeof nameOrAction === \"string\" ? { type: nameOrAction } : nameOrAction;\n if (store === void 0) {\n connection == null ? void 0 : connection.send(action, get());\n return r;\n }\n connection == null ? void 0 : connection.send(\n {\n ...action,\n type: `${store}/${action.type}`\n },\n {\n ...getTrackedConnectionState(options.name),\n [store]: api.getState()\n }\n );\n return r;\n });\n api.devtools = {\n cleanup: () => {\n if (connection && typeof connection.unsubscribe === \"function\") {\n connection.unsubscribe();\n }\n removeStoreFromTrackedConnections(options.name, store);\n }\n };\n const setStateFromDevtools = (...a) => {\n const originalIsRecording = isRecording;\n isRecording = false;\n set(...a);\n isRecording = originalIsRecording;\n };\n const initialState = fn(api.setState, get, api);\n if (connectionInformation.type === \"untracked\") {\n connection == null ? void 0 : connection.init(initialState);\n } else {\n connectionInformation.stores[connectionInformation.store] = api;\n connection == null ? void 0 : connection.init(\n Object.fromEntries(\n Object.entries(connectionInformation.stores).map(([key, store2]) => [\n key,\n key === connectionInformation.store ? initialState : store2.getState()\n ])\n )\n );\n }\n if (shouldDispatchFromDevtools(api)) {\n let didWarnAboutReservedActionType = false;\n const originalDispatch = api.dispatch;\n api.dispatch = (...args) => {\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && args[0].type === \"__setState\" && !didWarnAboutReservedActionType) {\n console.warn(\n '[zustand devtools middleware] \"__setState\" action type is reserved to set state from the devtools. Avoid using it.'\n );\n didWarnAboutReservedActionType = true;\n }\n originalDispatch(...args);\n };\n }\n connection.subscribe((message) => {\n var _a;\n switch (message.type) {\n case \"ACTION\":\n if (typeof message.payload !== \"string\") {\n console.error(\n \"[zustand devtools middleware] Unsupported action format\"\n );\n return;\n }\n return parseJsonThen(\n message.payload,\n (action) => {\n if (action.type === \"__setState\") {\n if (store === void 0) {\n setStateFromDevtools(action.state);\n return;\n }\n if (Object.keys(action.state).length !== 1) {\n console.error(\n `\n [zustand devtools middleware] Unsupported __setState action format.\n When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(),\n and value of this only key should be a state object. Example: { \"type\": \"__setState\", \"state\": { \"abc123Store\": { \"foo\": \"bar\" } } }\n `\n );\n }\n const stateFromDevtools = action.state[store];\n if (stateFromDevtools === void 0 || stateFromDevtools === null) {\n return;\n }\n if (JSON.stringify(api.getState()) !== JSON.stringify(stateFromDevtools)) {\n setStateFromDevtools(stateFromDevtools);\n }\n return;\n }\n if (shouldDispatchFromDevtools(api)) {\n api.dispatch(action);\n }\n }\n );\n case \"DISPATCH\":\n switch (message.payload.type) {\n case \"RESET\":\n setStateFromDevtools(initialState);\n if (store === void 0) {\n return connection == null ? void 0 : connection.init(api.getState());\n }\n return connection == null ? void 0 : connection.init(getTrackedConnectionState(options.name));\n case \"COMMIT\":\n if (store === void 0) {\n connection == null ? void 0 : connection.init(api.getState());\n return;\n }\n return connection == null ? void 0 : connection.init(getTrackedConnectionState(options.name));\n case \"ROLLBACK\":\n return parseJsonThen(message.state, (state) => {\n if (store === void 0) {\n setStateFromDevtools(state);\n connection == null ? void 0 : connection.init(api.getState());\n return;\n }\n setStateFromDevtools(state[store]);\n connection == null ? void 0 : connection.init(getTrackedConnectionState(options.name));\n });\n case \"JUMP_TO_STATE\":\n case \"JUMP_TO_ACTION\":\n return parseJsonThen(message.state, (state) => {\n if (store === void 0) {\n setStateFromDevtools(state);\n return;\n }\n if (JSON.stringify(api.getState()) !== JSON.stringify(state[store])) {\n setStateFromDevtools(state[store]);\n }\n });\n case \"IMPORT_STATE\": {\n const { nextLiftedState } = message.payload;\n const lastComputedState = (_a = nextLiftedState.computedStates.slice(-1)[0]) == null ? void 0 : _a.state;\n if (!lastComputedState) return;\n if (store === void 0) {\n setStateFromDevtools(lastComputedState);\n } else {\n setStateFromDevtools(lastComputedState[store]);\n }\n connection == null ? void 0 : connection.send(\n null,\n // FIXME no-any\n nextLiftedState\n );\n return;\n }\n case \"PAUSE_RECORDING\":\n return isRecording = !isRecording;\n }\n return;\n }\n });\n return initialState;\n};\nconst devtools = devtoolsImpl;\nconst parseJsonThen = (stringified, fn) => {\n let parsed;\n try {\n parsed = JSON.parse(stringified);\n } catch (e) {\n console.error(\n \"[zustand devtools middleware] Could not parse the received json\",\n e\n );\n }\n if (parsed !== void 0) fn(parsed);\n};\n\nconst subscribeWithSelectorImpl = (fn) => (set, get, api) => {\n const origSubscribe = api.subscribe;\n api.subscribe = ((selector, optListener, options) => {\n let listener = selector;\n if (optListener) {\n const equalityFn = (options == null ? void 0 : options.equalityFn) || Object.is;\n let currentSlice = selector(api.getState());\n listener = (state) => {\n const nextSlice = selector(state);\n if (!equalityFn(currentSlice, nextSlice)) {\n const previousSlice = currentSlice;\n optListener(currentSlice = nextSlice, previousSlice);\n }\n };\n if (options == null ? void 0 : options.fireImmediately) {\n optListener(currentSlice, currentSlice);\n }\n }\n return origSubscribe(listener);\n });\n const initialState = fn(set, get, api);\n return initialState;\n};\nconst subscribeWithSelector = subscribeWithSelectorImpl;\n\nfunction combine(initialState, create) {\n return (...args) => Object.assign({}, initialState, create(...args));\n}\n\nfunction createJSONStorage(getStorage, options) {\n let storage;\n try {\n storage = getStorage();\n } catch (e) {\n return;\n }\n const persistStorage = {\n getItem: (name) => {\n var _a;\n const parse = (str2) => {\n if (str2 === null) {\n return null;\n }\n return JSON.parse(str2, options == null ? void 0 : options.reviver);\n };\n const str = (_a = storage.getItem(name)) != null ? _a : null;\n if (str instanceof Promise) {\n return str.then(parse);\n }\n return parse(str);\n },\n setItem: (name, newValue) => storage.setItem(name, JSON.stringify(newValue, options == null ? void 0 : options.replacer)),\n removeItem: (name) => storage.removeItem(name)\n };\n return persistStorage;\n}\nconst toThenable = (fn) => (input) => {\n try {\n const result = fn(input);\n if (result instanceof Promise) {\n return result;\n }\n return {\n then(onFulfilled) {\n return toThenable(onFulfilled)(result);\n },\n catch(_onRejected) {\n return this;\n }\n };\n } catch (e) {\n return {\n then(_onFulfilled) {\n return this;\n },\n catch(onRejected) {\n return toThenable(onRejected)(e);\n }\n };\n }\n};\nconst persistImpl = (config, baseOptions) => (set, get, api) => {\n let options = {\n storage: createJSONStorage(() => window.localStorage),\n partialize: (state) => state,\n version: 0,\n merge: (persistedState, currentState) => ({\n ...currentState,\n ...persistedState\n }),\n ...baseOptions\n };\n let hasHydrated = false;\n let hydrationVersion = 0;\n const hydrationListeners = /* @__PURE__ */ new Set();\n const finishHydrationListeners = /* @__PURE__ */ new Set();\n let storage = options.storage;\n if (!storage) {\n return config(\n (...args) => {\n console.warn(\n `[zustand persist middleware] Unable to update item '${options.name}', the given storage is currently unavailable.`\n );\n set(...args);\n },\n get,\n api\n );\n }\n const setItem = () => {\n const state = options.partialize({ ...get() });\n return storage.setItem(options.name, {\n state,\n version: options.version\n });\n };\n const savedSetState = api.setState;\n api.setState = (state, replace) => {\n savedSetState(state, replace);\n return setItem();\n };\n const configResult = config(\n (...args) => {\n set(...args);\n return setItem();\n },\n get,\n api\n );\n api.getInitialState = () => configResult;\n let stateFromStorage;\n const hydrate = () => {\n var _a, _b;\n if (!storage) return;\n const currentVersion = ++hydrationVersion;\n hasHydrated = false;\n hydrationListeners.forEach((cb) => {\n var _a2;\n return cb((_a2 = get()) != null ? _a2 : configResult);\n });\n const postRehydrationCallback = ((_b = options.onRehydrateStorage) == null ? void 0 : _b.call(options, (_a = get()) != null ? _a : configResult)) || void 0;\n return toThenable(storage.getItem.bind(storage))(options.name).then((deserializedStorageValue) => {\n if (deserializedStorageValue) {\n if (typeof deserializedStorageValue.version === \"number\" && deserializedStorageValue.version !== options.version) {\n if (options.migrate) {\n const migration = options.migrate(\n deserializedStorageValue.state,\n deserializedStorageValue.version\n );\n if (migration instanceof Promise) {\n return migration.then((result) => [true, result]);\n }\n return [true, migration];\n }\n console.error(\n `State loaded from storage couldn't be migrated since no migrate function was provided`\n );\n } else {\n return [false, deserializedStorageValue.state];\n }\n }\n return [false, void 0];\n }).then((migrationResult) => {\n var _a2;\n if (currentVersion !== hydrationVersion) {\n return;\n }\n const [migrated, migratedState] = migrationResult;\n stateFromStorage = options.merge(\n migratedState,\n (_a2 = get()) != null ? _a2 : configResult\n );\n set(stateFromStorage, true);\n if (migrated) {\n return setItem();\n }\n }).then(() => {\n if (currentVersion !== hydrationVersion) {\n return;\n }\n postRehydrationCallback == null ? void 0 : postRehydrationCallback(get(), void 0);\n stateFromStorage = get();\n hasHydrated = true;\n finishHydrationListeners.forEach((cb) => cb(stateFromStorage));\n }).catch((e) => {\n if (currentVersion !== hydrationVersion) {\n return;\n }\n postRehydrationCallback == null ? void 0 : postRehydrationCallback(void 0, e);\n });\n };\n api.persist = {\n setOptions: (newOptions) => {\n options = {\n ...options,\n ...newOptions\n };\n if (newOptions.storage) {\n storage = newOptions.storage;\n }\n },\n clearStorage: () => {\n storage == null ? void 0 : storage.removeItem(options.name);\n },\n getOptions: () => options,\n rehydrate: () => hydrate(),\n hasHydrated: () => hasHydrated,\n onHydrate: (cb) => {\n hydrationListeners.add(cb);\n return () => {\n hydrationListeners.delete(cb);\n };\n },\n onFinishHydration: (cb) => {\n finishHydrationListeners.add(cb);\n return () => {\n finishHydrationListeners.delete(cb);\n };\n }\n };\n if (!options.skipHydration) {\n hydrate();\n }\n return stateFromStorage || configResult;\n};\nconst persist = persistImpl;\n\nfunction ssrSafe(config, isSSR = typeof window === \"undefined\") {\n return (set, get, api) => {\n if (!isSSR) {\n return config(set, get, api);\n }\n const ssrSet = () => {\n throw new Error(\"Cannot set state of Zustand store in SSR\");\n };\n api.setState = ssrSet;\n return config(ssrSet, get, api);\n };\n}\n\nexport { combine, createJSONStorage, devtools, persist, redux, subscribeWithSelector, ssrSafe as unstable_ssrSafe };\n",
|
|
14
14
|
"import { createStore, type StateCreator, type StoreApi } from 'zustand/vanilla';\nimport { combine } from 'zustand/middleware';\n\nexport type IslandStoreState = object;\ntype IslandStoreSnapshot = Record<string, unknown>;\ntype IslandStoreShape<\n\tTState extends IslandStoreState,\n\tTActions extends object\n> = Omit<TState, keyof TActions> & TActions;\nexport type IslandStateSnapshot = Record<string, IslandStoreSnapshot>;\ntype AnyIslandStore = StoreApi<object>;\ntype IslandStoreInstance = {\n\tapplyExternalSnapshot: (snapshot: IslandStoreSnapshot) => void;\n\tstore: AnyIslandStore;\n};\n\nexport const ABSOLUTE_ISLAND_STATE = '__ABS_ISLAND_STATE__';\nexport const ABSOLUTE_ISLAND_STORES = '__ABS_ISLAND_STORES__';\n\ndeclare global {\n\tvar __ABS_ISLAND_STATE__: IslandStateSnapshot | undefined;\n\tvar __ABS_ISLAND_STORES__:\n\t\t| Map<string, Set<IslandStoreInstance>>\n\t\t| undefined;\n}\n\nconst getIslandStoreSnapshot = () => {\n\tglobalThis.__ABS_ISLAND_STATE__ ??= {};\n\n\treturn globalThis.__ABS_ISLAND_STATE__;\n};\n\nconst getIslandStores = () => {\n\tglobalThis.__ABS_ISLAND_STORES__ ??= new Map();\n\n\treturn globalThis.__ABS_ISLAND_STORES__;\n};\n\nconst isSerializableValue = (value: unknown) =>\n\ttypeof value !== 'function' && value !== undefined;\n\nconst toSerializableState = <T extends object>(state: T) =>\n\tObject.fromEntries(\n\t\tObject.entries(state).filter(([, value]) => isSerializableValue(value))\n\t);\n\nconst applySnapshot = <T extends object>(\n\tstore: StoreApi<T>,\n\tsnapshot: IslandStoreSnapshot | undefined\n) => {\n\tif (!snapshot) {\n\t\treturn;\n\t}\n\n\tstore.setState({\n\t\t...store.getState(),\n\t\t...snapshot\n\t});\n};\n\nconst getPeerStores = (\n\tstoreInstances: Set<IslandStoreInstance>,\n\townerStore: AnyIslandStore\n) => [...storeInstances].filter((peer) => peer.store !== ownerStore);\n\nconst syncIslandSnapshot = <\n\tTState extends IslandStoreState,\n\tTActions extends object\n>(\n\tstoreId: string,\n\tstate: IslandStoreShape<TState, TActions>,\n\tstoreInstances: Set<IslandStoreInstance>,\n\townerStore: AnyIslandStore\n) => {\n\tconst nextSnapshot = toSerializableState(state);\n\tgetIslandStoreSnapshot()[storeId] = nextSnapshot;\n\n\tfor (const peerStore of getPeerStores(storeInstances, ownerStore)) {\n\t\tpeerStore.applyExternalSnapshot(nextSnapshot);\n\t}\n};\n\nexport const createIslandStore = <\n\tTState extends IslandStoreState,\n\tTActions extends object\n>(\n\tstoreId: string,\n\tinitialState: TState,\n\tcreateState: StateCreator<TState, [], [], TActions>\n) => {\n\tconst store = createStore(combine(initialState, createState));\n\tconst stores = getIslandStores();\n\tconst storeInstances =\n\t\tstores.get(storeId) ?? new Set<IslandStoreInstance>();\n\tconst initialSnapshot = getIslandStoreSnapshot()[storeId];\n\tapplySnapshot(store, initialSnapshot);\n\tlet isApplyingExternalSnapshot = false;\n\n\tconst applyExternalSnapshot = (snapshot: IslandStoreSnapshot) => {\n\t\tisApplyingExternalSnapshot = true;\n\t\tapplySnapshot(store, snapshot);\n\t};\n\n\tstoreInstances.add({\n\t\tapplyExternalSnapshot,\n\t\tstore\n\t});\n\tstores.set(storeId, storeInstances);\n\n\tsyncIslandSnapshot(storeId, store.getState(), storeInstances, store);\n\tstore.subscribe((state) => {\n\t\tif (isApplyingExternalSnapshot) {\n\t\t\tisApplyingExternalSnapshot = false;\n\n\t\t\treturn;\n\t\t}\n\n\t\tsyncIslandSnapshot(storeId, state, storeInstances, store);\n\t});\n\n\treturn store;\n};\nexport const getIslandStoreServerSnapshot = <\n\tTState extends IslandStoreState,\n\tTSelected\n>(\n\tstore: StoreApi<TState>,\n\tselector: (state: TState) => TSelected\n) => selector(store.getInitialState());\nconst applySnapshotToStoreInstances = (\n\tstoreId: string,\n\tinstances: Set<IslandStoreInstance>,\n\tsnapshot: IslandStateSnapshot\n) => {\n\tfor (const instance of instances) {\n\t\tinstance.applyExternalSnapshot(snapshot[storeId] ?? {});\n\t}\n};\n\nexport const initializeIslandStores = (state: IslandStateSnapshot) => {\n\tconst currentSnapshot = getIslandStoreSnapshot();\n\tconst nextSnapshot: IslandStateSnapshot = {\n\t\t...state,\n\t\t...currentSnapshot\n\t};\n\n\tglobalThis.__ABS_ISLAND_STATE__ = nextSnapshot;\n\n\tfor (const [storeId, store] of getIslandStores()) {\n\t\tapplySnapshotToStoreInstances(storeId, store, nextSnapshot);\n\t}\n};\nexport const readIslandStore = <TState extends IslandStoreState, TSelected>(\n\tstore: StoreApi<TState>,\n\tselector: (state: TState) => TSelected\n) => selector(store.getState());\nexport const resetIslandStoreForTesting = () => {\n\tdelete globalThis.__ABS_ISLAND_STATE__;\n\tdelete globalThis.__ABS_ISLAND_STORES__;\n};\nexport const subscribeIslandStore = <\n\tTState extends IslandStoreState,\n\tTSelected\n>(\n\tstore: StoreApi<TState>,\n\tselector: (state: TState) => TSelected,\n\tlistener: (value: TSelected) => void\n) => {\n\tlet currentSelection = selector(store.getState());\n\n\treturn store.subscribe((state) => {\n\t\tconst nextSelection = selector(state);\n\t\tif (Object.is(nextSelection, currentSelection)) {\n\t\t\treturn;\n\t\t}\n\n\t\tcurrentSelection = nextSelection;\n\t\tlistener(nextSelection);\n\t});\n};\n"
|
|
15
15
|
],
|
|
16
|
-
"mappings": "
|
|
17
|
-
"debugId": "
|
|
16
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAEM,2BAA2B,CAAC,cACjC,UAAU,IAAI,YAAY,IAAI,UAAU,MAAM,CAAC,GAE1C,0BAA0B,CAC/B,UACA,WACI;AAAA,EACJ,MAAM,UAAkC,CAAC;AAAA,EACzC,IAAI,QAAQ;AAAA,EAEZ,YAAY,KAAK,UAAU,OAAO,QAAQ,QAAQ,GAAG;AAAA,IACpD,IAAI,CAAC,IAAI,WAAW,MAAM;AAAA,MAAG;AAAA,IAE7B,MAAM,YAAY,IAAI,MAAM,OAAO,MAAM;AAAA,IACzC,IAAI,CAAC;AAAA,MAAW;AAAA,IAEhB,QAAQ,aAAa;AAAA,IACrB,QAAQ;AAAA,EACT;AAAA,EAEA,OAAO,QAAQ,UAAU;AAAA,GAGb,2BAA2B,CAAC,aAAqC;AAAA,EAC7E,MAAM,UACL,CAAC;AAAA,EACF,MAAM,aAAgC,CAAC,SAAS,UAAU,OAAO,SAAS;AAAA,EAE1E,WAAW,aAAa,YAAY;AAAA,IACnC,MAAM,SAAS,SAAS,yBAAyB,SAAS;AAAA,IAC1D,MAAM,UAAU,wBAAwB,UAAU,MAAM;AAAA,IACxD,IAAI;AAAA,MAAS,QAAQ,aAAa;AAAA,EACnC;AAAA,EAEA,OAAO;AAAA,GAEK,uBAAuB,CACnC,WACA,cACI,SAAS,yBAAyB,SAAS,IAAI;;;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EA,mBAAmB;AAAA,IACnB,SAAS,aAAa;AAAA,GACtB;AAAA;;;AHzKK,IAAM,iBAAiB,CAC7B,OACA,aAEA,qBACC,CAAC,aACA,qBAAqB,OAAO,UAAU,MAAM;AAAA,EAC3C,SAAS;AAAA,CACT,GACF,MAAM,gBAAgB,OAAO,QAAQ,GACrC,MAAM,6BAA6B,OAAO,QAAQ,CACnD;",
|
|
17
|
+
"debugId": "6574EA60E3A5A24C64756E2164756E21",
|
|
18
18
|
"names": []
|
|
19
19
|
}
|
|
@@ -17,7 +17,7 @@ var serializeJsonLd = (schema) => {
|
|
|
17
17
|
};
|
|
18
18
|
|
|
19
19
|
// src/react/components/Head.tsx
|
|
20
|
-
import {
|
|
20
|
+
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
21
21
|
var RobotsContent = ({ robots }) => {
|
|
22
22
|
const directives = [];
|
|
23
23
|
if (robots.index === false)
|
|
@@ -41,110 +41,110 @@ var RobotsContent = ({ robots }) => {
|
|
|
41
41
|
if (robots.maxVideoPreview !== undefined)
|
|
42
42
|
directives.push(`max-video-preview:${robots.maxVideoPreview}`);
|
|
43
43
|
const content = directives.join(", ");
|
|
44
|
-
return content ? /* @__PURE__ */
|
|
44
|
+
return content ? /* @__PURE__ */ jsx("meta", {
|
|
45
45
|
content,
|
|
46
46
|
name: "robots"
|
|
47
|
-
}
|
|
47
|
+
}) : null;
|
|
48
48
|
};
|
|
49
49
|
var OpenGraphTags = ({
|
|
50
50
|
openGraph,
|
|
51
51
|
title,
|
|
52
52
|
description
|
|
53
|
-
}) => /* @__PURE__ */
|
|
53
|
+
}) => /* @__PURE__ */ jsxs(Fragment, {
|
|
54
54
|
children: [
|
|
55
|
-
/* @__PURE__ */
|
|
55
|
+
/* @__PURE__ */ jsx("meta", {
|
|
56
56
|
content: openGraph.title ?? title,
|
|
57
57
|
property: "og:title"
|
|
58
|
-
}
|
|
59
|
-
/* @__PURE__ */
|
|
58
|
+
}),
|
|
59
|
+
/* @__PURE__ */ jsx("meta", {
|
|
60
60
|
content: openGraph.description ?? description,
|
|
61
61
|
property: "og:description"
|
|
62
|
-
}
|
|
63
|
-
openGraph.url && /* @__PURE__ */
|
|
62
|
+
}),
|
|
63
|
+
openGraph.url && /* @__PURE__ */ jsx("meta", {
|
|
64
64
|
content: openGraph.url,
|
|
65
65
|
property: "og:url"
|
|
66
|
-
}
|
|
67
|
-
openGraph.image && /* @__PURE__ */
|
|
66
|
+
}),
|
|
67
|
+
openGraph.image && /* @__PURE__ */ jsx("meta", {
|
|
68
68
|
content: openGraph.image,
|
|
69
69
|
property: "og:image"
|
|
70
|
-
}
|
|
71
|
-
openGraph.imageAlt && /* @__PURE__ */
|
|
70
|
+
}),
|
|
71
|
+
openGraph.imageAlt && /* @__PURE__ */ jsx("meta", {
|
|
72
72
|
content: openGraph.imageAlt,
|
|
73
73
|
property: "og:image:alt"
|
|
74
|
-
}
|
|
75
|
-
openGraph.imageWidth && /* @__PURE__ */
|
|
74
|
+
}),
|
|
75
|
+
openGraph.imageWidth && /* @__PURE__ */ jsx("meta", {
|
|
76
76
|
content: String(openGraph.imageWidth),
|
|
77
77
|
property: "og:image:width"
|
|
78
|
-
}
|
|
79
|
-
openGraph.imageHeight && /* @__PURE__ */
|
|
78
|
+
}),
|
|
79
|
+
openGraph.imageHeight && /* @__PURE__ */ jsx("meta", {
|
|
80
80
|
content: String(openGraph.imageHeight),
|
|
81
81
|
property: "og:image:height"
|
|
82
|
-
}
|
|
83
|
-
openGraph.type && /* @__PURE__ */
|
|
82
|
+
}),
|
|
83
|
+
openGraph.type && /* @__PURE__ */ jsx("meta", {
|
|
84
84
|
content: openGraph.type,
|
|
85
85
|
property: "og:type"
|
|
86
|
-
}
|
|
87
|
-
openGraph.siteName && /* @__PURE__ */
|
|
86
|
+
}),
|
|
87
|
+
openGraph.siteName && /* @__PURE__ */ jsx("meta", {
|
|
88
88
|
content: openGraph.siteName,
|
|
89
89
|
property: "og:site_name"
|
|
90
|
-
}
|
|
91
|
-
openGraph.locale && /* @__PURE__ */
|
|
90
|
+
}),
|
|
91
|
+
openGraph.locale && /* @__PURE__ */ jsx("meta", {
|
|
92
92
|
content: openGraph.locale,
|
|
93
93
|
property: "og:locale"
|
|
94
|
-
}
|
|
94
|
+
})
|
|
95
95
|
]
|
|
96
|
-
}
|
|
96
|
+
});
|
|
97
97
|
var TwitterTags = ({
|
|
98
98
|
twitter,
|
|
99
99
|
title,
|
|
100
100
|
description
|
|
101
|
-
}) => /* @__PURE__ */
|
|
101
|
+
}) => /* @__PURE__ */ jsxs(Fragment, {
|
|
102
102
|
children: [
|
|
103
|
-
twitter.card && /* @__PURE__ */
|
|
103
|
+
twitter.card && /* @__PURE__ */ jsx("meta", {
|
|
104
104
|
content: twitter.card,
|
|
105
105
|
name: "twitter:card"
|
|
106
|
-
}
|
|
107
|
-
/* @__PURE__ */
|
|
106
|
+
}),
|
|
107
|
+
/* @__PURE__ */ jsx("meta", {
|
|
108
108
|
content: twitter.title ?? title,
|
|
109
109
|
name: "twitter:title"
|
|
110
|
-
}
|
|
111
|
-
/* @__PURE__ */
|
|
110
|
+
}),
|
|
111
|
+
/* @__PURE__ */ jsx("meta", {
|
|
112
112
|
content: twitter.description ?? description,
|
|
113
113
|
name: "twitter:description"
|
|
114
|
-
}
|
|
115
|
-
twitter.image && /* @__PURE__ */
|
|
114
|
+
}),
|
|
115
|
+
twitter.image && /* @__PURE__ */ jsx("meta", {
|
|
116
116
|
content: twitter.image,
|
|
117
117
|
name: "twitter:image"
|
|
118
|
-
}
|
|
119
|
-
twitter.imageAlt && /* @__PURE__ */
|
|
118
|
+
}),
|
|
119
|
+
twitter.imageAlt && /* @__PURE__ */ jsx("meta", {
|
|
120
120
|
content: twitter.imageAlt,
|
|
121
121
|
name: "twitter:image:alt"
|
|
122
|
-
}
|
|
123
|
-
twitter.site && /* @__PURE__ */
|
|
122
|
+
}),
|
|
123
|
+
twitter.site && /* @__PURE__ */ jsx("meta", {
|
|
124
124
|
content: twitter.site,
|
|
125
125
|
name: "twitter:site"
|
|
126
|
-
}
|
|
127
|
-
twitter.creator && /* @__PURE__ */
|
|
126
|
+
}),
|
|
127
|
+
twitter.creator && /* @__PURE__ */ jsx("meta", {
|
|
128
128
|
content: twitter.creator,
|
|
129
129
|
name: "twitter:creator"
|
|
130
|
-
}
|
|
130
|
+
})
|
|
131
131
|
]
|
|
132
|
-
}
|
|
132
|
+
});
|
|
133
133
|
var CustomMetaTag = ({ tag }) => {
|
|
134
134
|
if (tag.property)
|
|
135
|
-
return /* @__PURE__ */
|
|
135
|
+
return /* @__PURE__ */ jsx("meta", {
|
|
136
136
|
content: tag.content,
|
|
137
137
|
property: tag.property
|
|
138
|
-
}
|
|
138
|
+
});
|
|
139
139
|
if (tag.httpEquiv)
|
|
140
|
-
return /* @__PURE__ */
|
|
140
|
+
return /* @__PURE__ */ jsx("meta", {
|
|
141
141
|
content: tag.content,
|
|
142
142
|
httpEquiv: tag.httpEquiv
|
|
143
|
-
}
|
|
144
|
-
return /* @__PURE__ */
|
|
143
|
+
});
|
|
144
|
+
return /* @__PURE__ */ jsx("meta", {
|
|
145
145
|
content: tag.content,
|
|
146
146
|
name: tag.name
|
|
147
|
-
}
|
|
147
|
+
});
|
|
148
148
|
};
|
|
149
149
|
var Head = ({
|
|
150
150
|
title = "AbsoluteJS",
|
|
@@ -158,79 +158,79 @@ var Head = ({
|
|
|
158
158
|
robots,
|
|
159
159
|
meta,
|
|
160
160
|
jsonLd
|
|
161
|
-
} = {}) => /* @__PURE__ */
|
|
161
|
+
} = {}) => /* @__PURE__ */ jsxs("head", {
|
|
162
162
|
suppressHydrationWarning: true,
|
|
163
163
|
children: [
|
|
164
|
-
/* @__PURE__ */
|
|
164
|
+
/* @__PURE__ */ jsx("meta", {
|
|
165
165
|
charSet: "utf-8"
|
|
166
|
-
}
|
|
167
|
-
/* @__PURE__ */
|
|
166
|
+
}),
|
|
167
|
+
/* @__PURE__ */ jsx("title", {
|
|
168
168
|
children: title
|
|
169
|
-
}
|
|
170
|
-
/* @__PURE__ */
|
|
169
|
+
}),
|
|
170
|
+
/* @__PURE__ */ jsx("meta", {
|
|
171
171
|
content: description,
|
|
172
172
|
name: "description"
|
|
173
|
-
}
|
|
174
|
-
/* @__PURE__ */
|
|
173
|
+
}),
|
|
174
|
+
/* @__PURE__ */ jsx("meta", {
|
|
175
175
|
content: "width=device-width, initial-scale=1",
|
|
176
176
|
name: "viewport"
|
|
177
|
-
}
|
|
178
|
-
/* @__PURE__ */
|
|
177
|
+
}),
|
|
178
|
+
/* @__PURE__ */ jsx("link", {
|
|
179
179
|
href: applyIconVersion(icon),
|
|
180
180
|
rel: "icon",
|
|
181
181
|
type: iconMimeType(icon)
|
|
182
|
-
}
|
|
183
|
-
canonical && /* @__PURE__ */
|
|
182
|
+
}),
|
|
183
|
+
canonical && /* @__PURE__ */ jsx("link", {
|
|
184
184
|
href: canonical,
|
|
185
185
|
rel: "canonical"
|
|
186
|
-
}
|
|
187
|
-
openGraph && /* @__PURE__ */
|
|
186
|
+
}),
|
|
187
|
+
openGraph && /* @__PURE__ */ jsx(OpenGraphTags, {
|
|
188
188
|
description,
|
|
189
189
|
openGraph,
|
|
190
190
|
title
|
|
191
|
-
}
|
|
192
|
-
twitter && /* @__PURE__ */
|
|
191
|
+
}),
|
|
192
|
+
twitter && /* @__PURE__ */ jsx(TwitterTags, {
|
|
193
193
|
description,
|
|
194
194
|
title,
|
|
195
195
|
twitter
|
|
196
|
-
}
|
|
197
|
-
robots && /* @__PURE__ */
|
|
196
|
+
}),
|
|
197
|
+
robots && /* @__PURE__ */ jsx(RobotsContent, {
|
|
198
198
|
robots
|
|
199
|
-
}
|
|
200
|
-
meta?.map((tag, i) => /* @__PURE__ */
|
|
199
|
+
}),
|
|
200
|
+
meta?.map((tag, i) => /* @__PURE__ */ jsx(CustomMetaTag, {
|
|
201
201
|
tag
|
|
202
|
-
}, i
|
|
203
|
-
font && /* @__PURE__ */
|
|
202
|
+
}, i)),
|
|
203
|
+
font && /* @__PURE__ */ jsxs(Fragment, {
|
|
204
204
|
children: [
|
|
205
|
-
/* @__PURE__ */
|
|
205
|
+
/* @__PURE__ */ jsx("link", {
|
|
206
206
|
href: "https://fonts.googleapis.com",
|
|
207
207
|
rel: "preconnect"
|
|
208
|
-
}
|
|
209
|
-
/* @__PURE__ */
|
|
208
|
+
}),
|
|
209
|
+
/* @__PURE__ */ jsx("link", {
|
|
210
210
|
crossOrigin: "anonymous",
|
|
211
211
|
href: "https://fonts.gstatic.com",
|
|
212
212
|
rel: "preconnect",
|
|
213
213
|
suppressHydrationWarning: true
|
|
214
|
-
}
|
|
215
|
-
/* @__PURE__ */
|
|
214
|
+
}),
|
|
215
|
+
/* @__PURE__ */ jsx("link", {
|
|
216
216
|
href: `https://fonts.googleapis.com/css2?family=${font}:wght@100..900&display=swap`,
|
|
217
217
|
rel: "stylesheet",
|
|
218
218
|
suppressHydrationWarning: true
|
|
219
|
-
}
|
|
219
|
+
})
|
|
220
220
|
]
|
|
221
|
-
}
|
|
222
|
-
cssPath && [cssPath].flat().map((path) => /* @__PURE__ */
|
|
221
|
+
}),
|
|
222
|
+
cssPath && [cssPath].flat().map((path) => /* @__PURE__ */ jsx("link", {
|
|
223
223
|
href: path,
|
|
224
224
|
rel: "stylesheet",
|
|
225
225
|
suppressHydrationWarning: true,
|
|
226
226
|
type: "text/css"
|
|
227
|
-
}, path
|
|
228
|
-
jsonLd && /* @__PURE__ */
|
|
227
|
+
}, path)),
|
|
228
|
+
jsonLd && /* @__PURE__ */ jsx("script", {
|
|
229
229
|
dangerouslySetInnerHTML: { __html: serializeJsonLd(jsonLd) },
|
|
230
230
|
type: "application/ld+json"
|
|
231
|
-
}
|
|
231
|
+
})
|
|
232
232
|
]
|
|
233
|
-
}
|
|
233
|
+
});
|
|
234
234
|
// src/constants.ts
|
|
235
235
|
var HOURS_IN_DAY = 24;
|
|
236
236
|
var IMAGE_DEFAULT_DEVICE_SIZES = [
|
|
@@ -292,7 +292,7 @@ var generateSrcSet = (src, width, sizes, deviceSizes, imageSizes) => {
|
|
|
292
292
|
};
|
|
293
293
|
|
|
294
294
|
// src/react/components/Image.tsx
|
|
295
|
-
import {
|
|
295
|
+
import { jsx as jsx2, jsxs as jsxs2, Fragment as Fragment2 } from "react/jsx-runtime";
|
|
296
296
|
var resolveSource = (src, overrideSrc, unoptimized, loader, width, quality) => {
|
|
297
297
|
if (overrideSrc)
|
|
298
298
|
return overrideSrc;
|
|
@@ -368,15 +368,15 @@ var Image = ({
|
|
|
368
368
|
position: "relative",
|
|
369
369
|
width: "100%"
|
|
370
370
|
};
|
|
371
|
-
const preloadLink = priority ? /* @__PURE__ */
|
|
371
|
+
const preloadLink = priority ? /* @__PURE__ */ jsx2("link", {
|
|
372
372
|
as: "image",
|
|
373
373
|
crossOrigin,
|
|
374
374
|
href: resolvedSrc,
|
|
375
375
|
imageSizes: resolvedSizes,
|
|
376
376
|
imageSrcSet: srcSet,
|
|
377
377
|
rel: "preload"
|
|
378
|
-
}
|
|
379
|
-
const imgElement = /* @__PURE__ */
|
|
378
|
+
}) : null;
|
|
379
|
+
const imgElement = /* @__PURE__ */ jsx2("img", {
|
|
380
380
|
alt,
|
|
381
381
|
className,
|
|
382
382
|
crossOrigin,
|
|
@@ -399,27 +399,27 @@ var Image = ({
|
|
|
399
399
|
srcSet,
|
|
400
400
|
style: imgStyle,
|
|
401
401
|
width: fill ? undefined : width
|
|
402
|
-
}
|
|
402
|
+
});
|
|
403
403
|
if (fill) {
|
|
404
|
-
return /* @__PURE__ */
|
|
404
|
+
return /* @__PURE__ */ jsxs2(Fragment2, {
|
|
405
405
|
children: [
|
|
406
406
|
preloadLink,
|
|
407
|
-
/* @__PURE__ */
|
|
407
|
+
/* @__PURE__ */ jsx2("span", {
|
|
408
408
|
style: fillWrapperStyle,
|
|
409
409
|
children: imgElement
|
|
410
|
-
}
|
|
410
|
+
})
|
|
411
411
|
]
|
|
412
|
-
}
|
|
412
|
+
});
|
|
413
413
|
}
|
|
414
|
-
return /* @__PURE__ */
|
|
414
|
+
return /* @__PURE__ */ jsxs2(Fragment2, {
|
|
415
415
|
children: [
|
|
416
416
|
preloadLink,
|
|
417
417
|
imgElement
|
|
418
418
|
]
|
|
419
|
-
}
|
|
419
|
+
});
|
|
420
420
|
};
|
|
421
421
|
// src/react/components/JsonLd.tsx
|
|
422
|
-
import {
|
|
422
|
+
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
423
423
|
var JsonLd = ({
|
|
424
424
|
schema
|
|
425
425
|
}) => {
|
|
@@ -428,49 +428,49 @@ var JsonLd = ({
|
|
|
428
428
|
"@context": schemaOrgContext,
|
|
429
429
|
...s
|
|
430
430
|
})) : { "@context": schemaOrgContext, ...schema };
|
|
431
|
-
return /* @__PURE__ */
|
|
431
|
+
return /* @__PURE__ */ jsx3("script", {
|
|
432
432
|
dangerouslySetInnerHTML: { __html: JSON.stringify(data) },
|
|
433
433
|
type: "application/ld+json"
|
|
434
|
-
}
|
|
434
|
+
});
|
|
435
435
|
};
|
|
436
436
|
// src/react/components/SuspenseSlot.browser.tsx
|
|
437
|
-
import {
|
|
437
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
438
438
|
var isLegacyProps = (props) => ("fallbackHtml" in props) || ("errorHtml" in props);
|
|
439
439
|
var SuspenseSlot = (props) => {
|
|
440
440
|
if (isLegacyProps(props)) {
|
|
441
|
-
return /* @__PURE__ */
|
|
441
|
+
return /* @__PURE__ */ jsx4("div", {
|
|
442
442
|
className: props.className,
|
|
443
443
|
dangerouslySetInnerHTML: { __html: props.fallbackHtml ?? "" },
|
|
444
444
|
"data-absolute-slot": "true",
|
|
445
445
|
id: props.id,
|
|
446
446
|
suppressHydrationWarning: true
|
|
447
|
-
}
|
|
447
|
+
});
|
|
448
448
|
}
|
|
449
|
-
return /* @__PURE__ */
|
|
449
|
+
return /* @__PURE__ */ jsx4("div", {
|
|
450
450
|
className: props.className,
|
|
451
451
|
"data-absolute-slot": "true",
|
|
452
452
|
id: props.id,
|
|
453
453
|
suppressHydrationWarning: true,
|
|
454
454
|
children: props.fallback ?? null
|
|
455
|
-
}
|
|
455
|
+
});
|
|
456
456
|
};
|
|
457
457
|
// src/react/components/StreamSlot.browser.tsx
|
|
458
|
-
import {
|
|
458
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
459
459
|
var StreamSlot = ({
|
|
460
460
|
className,
|
|
461
461
|
fallbackHtml = "",
|
|
462
462
|
id
|
|
463
|
-
}) => /* @__PURE__ */
|
|
463
|
+
}) => /* @__PURE__ */ jsx5("div", {
|
|
464
464
|
className,
|
|
465
465
|
dangerouslySetInnerHTML: { __html: fallbackHtml },
|
|
466
466
|
"data-absolute-slot": "true",
|
|
467
467
|
id,
|
|
468
468
|
suppressHydrationWarning: true
|
|
469
|
-
}
|
|
469
|
+
});
|
|
470
470
|
export {
|
|
471
|
-
|
|
472
|
-
StreamSlot,
|
|
473
|
-
JsonLd,
|
|
471
|
+
Head,
|
|
474
472
|
Image,
|
|
475
|
-
|
|
473
|
+
JsonLd,
|
|
474
|
+
StreamSlot,
|
|
475
|
+
SuspenseSlot
|
|
476
476
|
};
|