one 2.10.0 → 2.11.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.
- package/One.podspec +14 -0
- package/android/src/main/java/com/margelo/nitro/one/OneUpdatesLauncher.kt +28 -0
- package/android/src/main/java/dev/onejs/one/OnePackage.kt +2 -0
- package/android/src/main/java/dev/onejs/onenative/OneDOMHostManager.kt +85 -0
- package/android/src/main/java/dev/onejs/onenative/OneDOMHostView.kt +399 -0
- package/android/src/main/java/dev/onejs/onenative/OneDOMResources.kt +126 -0
- package/dist/cjs/cli/iosLinkSet.cjs +111 -0
- package/dist/cjs/cli/iosLinkSet.native.cjs +120 -0
- package/dist/cjs/cli/iosLinkSet.native.js +122 -0
- package/dist/cjs/cli/iosLinkSet.native.js.map +1 -0
- package/dist/cjs/cli/iosLinkSetAnalysis.cjs +329 -0
- package/dist/cjs/cli/iosLinkSetAnalysis.native.cjs +714 -0
- package/dist/cjs/cli/iosLinkSetAnalysis.native.js +716 -0
- package/dist/cjs/cli/iosLinkSetAnalysis.native.js.map +1 -0
- package/dist/cjs/cli/prebuild.cjs +5 -1
- package/dist/cjs/cli/prebuild.native.cjs +4 -2
- package/dist/cjs/cli/prebuild.native.js +4 -2
- package/dist/cjs/cli/prebuild.native.js.map +1 -1
- package/dist/cjs/cli/updatesPublish.cjs +16 -12
- package/dist/cjs/cli/updatesPublish.native.cjs +45 -22
- package/dist/cjs/cli/updatesPublish.native.js +45 -22
- package/dist/cjs/cli/updatesPublish.native.js.map +1 -1
- package/dist/cjs/cli.cjs +4 -2
- package/dist/cjs/cli.native.cjs +4 -2
- package/dist/cjs/cli.native.js +4 -2
- package/dist/cjs/cli.native.js.map +1 -1
- package/dist/cjs/createApp.cjs +8 -0
- package/dist/cjs/createHandleRequest.cjs +4 -17
- package/dist/cjs/createHandleRequest.native.cjs +6 -19
- package/dist/cjs/createHandleRequest.native.js +6 -19
- package/dist/cjs/createHandleRequest.native.js.map +1 -1
- package/dist/cjs/dom/browserBridge.cjs +177 -0
- package/dist/cjs/dom/browserBridge.native.cjs +290 -0
- package/dist/cjs/dom/browserBridge.native.js +292 -0
- package/dist/cjs/dom/browserBridge.native.js.map +1 -0
- package/dist/cjs/dom/client.cjs +69 -0
- package/dist/cjs/dom/client.native.cjs +81 -0
- package/dist/cjs/dom/client.native.js +83 -0
- package/dist/cjs/dom/client.native.js.map +1 -0
- package/dist/cjs/dom/context.cjs +25 -0
- package/dist/cjs/dom/context.native.cjs +27 -0
- package/dist/cjs/dom/context.native.js +29 -0
- package/dist/cjs/dom/context.native.js.map +1 -0
- package/dist/cjs/dom/host.native.cjs +152 -0
- package/dist/cjs/dom/host.native.js +154 -0
- package/dist/cjs/dom/host.native.js.map +1 -0
- package/dist/cjs/dom/index.cjs +88 -0
- package/dist/cjs/dom/index.native.cjs +136 -0
- package/dist/cjs/dom/index.native.js +138 -0
- package/dist/cjs/dom/index.native.js.map +1 -0
- package/dist/cjs/dom/measure.cjs +51 -0
- package/dist/cjs/dom/measure.native.cjs +55 -0
- package/dist/cjs/dom/measure.native.js +57 -0
- package/dist/cjs/dom/measure.native.js.map +1 -0
- package/dist/cjs/dom/nativeBridge.cjs +135 -0
- package/dist/cjs/dom/nativeBridge.native.cjs +223 -0
- package/dist/cjs/dom/nativeBridge.native.js +225 -0
- package/dist/cjs/dom/nativeBridge.native.js.map +1 -0
- package/dist/cjs/dom/peer.cjs +148 -0
- package/dist/cjs/dom/peer.native.cjs +227 -0
- package/dist/cjs/dom/peer.native.js +229 -0
- package/dist/cjs/dom/peer.native.js.map +1 -0
- package/dist/cjs/dom/protocol.cjs +185 -0
- package/dist/cjs/dom/protocol.native.cjs +209 -0
- package/dist/cjs/dom/protocol.native.js +211 -0
- package/dist/cjs/dom/protocol.native.js.map +1 -0
- package/dist/cjs/dom/serialize.cjs +140 -0
- package/dist/cjs/dom/serialize.native.cjs +284 -0
- package/dist/cjs/dom/serialize.native.js +286 -0
- package/dist/cjs/dom/serialize.native.js.map +1 -0
- package/dist/cjs/dom/types.cjs +16 -0
- package/dist/cjs/dom/types.native.cjs +18 -0
- package/dist/cjs/dom/types.native.js +20 -0
- package/dist/cjs/dom/types.native.js.map +1 -0
- package/dist/cjs/fork/getPathFromState.cjs +9 -1
- package/dist/cjs/fork/getPathFromState.native.cjs +48 -4
- package/dist/cjs/fork/getPathFromState.native.js +48 -4
- package/dist/cjs/fork/getPathFromState.native.js.map +1 -1
- package/dist/cjs/hooks.cjs +50 -1
- package/dist/cjs/hooks.native.cjs +55 -2
- package/dist/cjs/hooks.native.js +55 -2
- package/dist/cjs/hooks.native.js.map +1 -1
- package/dist/cjs/index.cjs +2 -0
- package/dist/cjs/index.native.cjs +2 -0
- package/dist/cjs/index.native.js +2 -0
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/layouts/Tabs.linux.cjs +48 -0
- package/dist/cjs/layouts/Tabs.linux.native.cjs +50 -0
- package/dist/cjs/layouts/Tabs.linux.native.js +52 -0
- package/dist/cjs/layouts/Tabs.linux.native.js.map +1 -0
- package/dist/cjs/layouts/stack-navigator-desktop.cjs +26 -0
- package/dist/cjs/layouts/stack-navigator-desktop.native.cjs +28 -0
- package/dist/cjs/layouts/stack-navigator-desktop.native.js +30 -0
- package/dist/cjs/layouts/stack-navigator-desktop.native.js.map +1 -0
- package/dist/cjs/layouts/stack-navigator.linux.cjs +39 -0
- package/dist/cjs/layouts/stack-navigator.linux.native.cjs +41 -0
- package/dist/cjs/layouts/stack-navigator.linux.native.js +43 -0
- package/dist/cjs/layouts/stack-navigator.linux.native.js.map +1 -0
- package/dist/cjs/layouts/stack-navigator.macos.cjs +29 -0
- package/dist/cjs/layouts/stack-navigator.macos.native.cjs +31 -0
- package/dist/cjs/layouts/stack-navigator.macos.native.js +33 -0
- package/dist/cjs/layouts/stack-navigator.macos.native.js.map +1 -0
- package/dist/cjs/layouts/stack-utils/StackToolbarBottomHost.linux.cjs +18 -0
- package/dist/cjs/layouts/stack-utils/StackToolbarBottomHost.linux.native.cjs +20 -0
- package/dist/cjs/layouts/stack-utils/StackToolbarBottomHost.linux.native.js +22 -0
- package/dist/cjs/layouts/stack-utils/StackToolbarBottomHost.linux.native.js.map +1 -0
- package/dist/cjs/layouts/stack-utils/StackToolbarBottomHost.macos.cjs +30 -0
- package/dist/cjs/layouts/stack-utils/StackToolbarBottomHost.macos.native.cjs +33 -0
- package/dist/cjs/layouts/stack-utils/StackToolbarBottomHost.macos.native.js +35 -0
- package/dist/cjs/layouts/stack-utils/StackToolbarBottomHost.macos.native.js.map +1 -0
- package/dist/cjs/link/Link.cjs +4 -3
- package/dist/cjs/link/Link.native.cjs +4 -3
- package/dist/cjs/link/Link.native.js +4 -3
- package/dist/cjs/link/Link.native.js.map +1 -1
- package/dist/cjs/loaderResponseToModule.cjs +41 -0
- package/dist/cjs/loaderResponseToModule.native.cjs +44 -0
- package/dist/cjs/loaderResponseToModule.native.js +46 -0
- package/dist/cjs/loaderResponseToModule.native.js.map +1 -0
- package/dist/cjs/loaderSearchParams.cjs +99 -0
- package/dist/cjs/loaderSearchParams.native.cjs +139 -0
- package/dist/cjs/loaderSearchParams.native.js +141 -0
- package/dist/cjs/loaderSearchParams.native.js.map +1 -0
- package/dist/cjs/one-shared.cjs +129 -0
- package/dist/cjs/one-shared.native.cjs +132 -0
- package/dist/cjs/one-shared.native.js +134 -0
- package/dist/cjs/one-shared.native.js.map +1 -0
- package/dist/cjs/one.cjs +2 -113
- package/dist/cjs/one.linux.cjs +57 -0
- package/dist/cjs/one.linux.native.cjs +59 -0
- package/dist/cjs/one.linux.native.js +61 -0
- package/dist/cjs/one.linux.native.js.map +1 -0
- package/dist/cjs/one.macos.cjs +45 -0
- package/dist/cjs/one.macos.native.cjs +47 -0
- package/dist/cjs/one.macos.native.js +49 -0
- package/dist/cjs/one.macos.native.js.map +1 -0
- package/dist/cjs/one.native.cjs +2 -114
- package/dist/cjs/one.native.js +2 -114
- package/dist/cjs/one.native.js.map +1 -1
- package/dist/cjs/platform/adaptive/fixed.cjs +48 -0
- package/dist/cjs/platform/adaptive/fixed.native.cjs +50 -0
- package/dist/cjs/platform/adaptive/fixed.native.js +52 -0
- package/dist/cjs/platform/adaptive/fixed.native.js.map +1 -0
- package/dist/cjs/platform/adaptive/index.cjs +2 -24
- package/dist/cjs/platform/adaptive/index.linux.cjs +18 -0
- package/dist/cjs/platform/adaptive/index.linux.native.cjs +20 -0
- package/dist/cjs/platform/adaptive/index.linux.native.js +22 -0
- package/dist/cjs/platform/adaptive/index.linux.native.js.map +1 -0
- package/dist/cjs/platform/adaptive/index.macos.cjs +39 -0
- package/dist/cjs/platform/adaptive/index.macos.native.cjs +41 -0
- package/dist/cjs/platform/adaptive/index.macos.native.js +43 -0
- package/dist/cjs/platform/adaptive/index.macos.native.js.map +1 -0
- package/dist/cjs/platform/controlTypes.cjs +16 -0
- package/dist/cjs/platform/controlTypes.native.cjs +18 -0
- package/dist/cjs/platform/controlTypes.native.js +20 -0
- package/dist/cjs/platform/controlTypes.native.js.map +1 -0
- package/dist/cjs/platform/desktop/appCommandTypes.cjs +16 -0
- package/dist/cjs/platform/desktop/appCommandTypes.native.cjs +18 -0
- package/dist/cjs/platform/desktop/appCommandTypes.native.js +20 -0
- package/dist/cjs/platform/desktop/appCommandTypes.native.js.map +1 -0
- package/dist/cjs/platform/desktop/createAppCommands.cjs +55 -0
- package/dist/cjs/platform/desktop/createAppCommands.native.cjs +60 -0
- package/dist/cjs/platform/desktop/createAppCommands.native.js +62 -0
- package/dist/cjs/platform/desktop/createAppCommands.native.js.map +1 -0
- package/dist/cjs/platform/desktop/createControls.cjs +65 -0
- package/dist/cjs/platform/desktop/createControls.native.cjs +69 -0
- package/dist/cjs/platform/desktop/createControls.native.js +71 -0
- package/dist/cjs/platform/desktop/createControls.native.js.map +1 -0
- package/dist/cjs/platform/linux/AppCommands.linux.cjs +25 -0
- package/dist/cjs/platform/linux/AppCommands.linux.native.cjs +27 -0
- package/dist/cjs/platform/linux/AppCommands.linux.native.js +29 -0
- package/dist/cjs/platform/linux/AppCommands.linux.native.js.map +1 -0
- package/dist/cjs/platform/linux/Button.linux.cjs +41 -0
- package/dist/cjs/platform/linux/Button.linux.native.cjs +49 -0
- package/dist/cjs/platform/linux/Button.linux.native.js +51 -0
- package/dist/cjs/platform/linux/Button.linux.native.js.map +1 -0
- package/dist/cjs/platform/linux/DropDown.linux.cjs +74 -0
- package/dist/cjs/platform/linux/DropDown.linux.native.cjs +91 -0
- package/dist/cjs/platform/linux/DropDown.linux.native.js +93 -0
- package/dist/cjs/platform/linux/DropDown.linux.native.js.map +1 -0
- package/dist/cjs/platform/linux/NavigationView.linux.cjs +114 -0
- package/dist/cjs/platform/linux/NavigationView.linux.native.cjs +130 -0
- package/dist/cjs/platform/linux/NavigationView.linux.native.js +132 -0
- package/dist/cjs/platform/linux/NavigationView.linux.native.js.map +1 -0
- package/dist/cjs/platform/linux/OneLinuxButtonNativeComponent.cjs +46 -0
- package/dist/cjs/platform/linux/OneLinuxButtonNativeComponent.native.cjs +46 -0
- package/dist/cjs/platform/linux/OneLinuxButtonNativeComponent.native.js +47 -0
- package/dist/cjs/platform/linux/OneLinuxButtonNativeComponent.native.js.map +7 -0
- package/dist/cjs/platform/linux/OneLinuxDropDownNativeComponent.cjs +55 -0
- package/dist/cjs/platform/linux/OneLinuxDropDownNativeComponent.native.cjs +55 -0
- package/dist/cjs/platform/linux/OneLinuxDropDownNativeComponent.native.js +56 -0
- package/dist/cjs/platform/linux/OneLinuxDropDownNativeComponent.native.js.map +7 -0
- package/dist/cjs/platform/linux/OneLinuxNavigationNativeComponent.cjs +55 -0
- package/dist/cjs/platform/linux/OneLinuxNavigationNativeComponent.native.cjs +55 -0
- package/dist/cjs/platform/linux/OneLinuxNavigationNativeComponent.native.js +56 -0
- package/dist/cjs/platform/linux/OneLinuxNavigationNativeComponent.native.js.map +7 -0
- package/dist/cjs/platform/linux/OneLinuxProgressBarNativeComponent.cjs +33 -0
- package/dist/cjs/platform/linux/OneLinuxProgressBarNativeComponent.native.cjs +33 -0
- package/dist/cjs/platform/linux/OneLinuxProgressBarNativeComponent.native.js +34 -0
- package/dist/cjs/platform/linux/OneLinuxProgressBarNativeComponent.native.js.map +7 -0
- package/dist/cjs/platform/linux/OneLinuxSecureFieldNativeComponent.cjs +52 -0
- package/dist/cjs/platform/linux/OneLinuxSecureFieldNativeComponent.native.cjs +52 -0
- package/dist/cjs/platform/linux/OneLinuxSecureFieldNativeComponent.native.js +53 -0
- package/dist/cjs/platform/linux/OneLinuxSecureFieldNativeComponent.native.js.map +7 -0
- package/dist/cjs/platform/linux/OneLinuxSegmentedControlNativeComponent.cjs +47 -0
- package/dist/cjs/platform/linux/OneLinuxSegmentedControlNativeComponent.native.cjs +47 -0
- package/dist/cjs/platform/linux/OneLinuxSegmentedControlNativeComponent.native.js +48 -0
- package/dist/cjs/platform/linux/OneLinuxSegmentedControlNativeComponent.native.js.map +7 -0
- package/dist/cjs/platform/linux/OneLinuxSliderNativeComponent.cjs +57 -0
- package/dist/cjs/platform/linux/OneLinuxSliderNativeComponent.native.cjs +57 -0
- package/dist/cjs/platform/linux/OneLinuxSliderNativeComponent.native.js +58 -0
- package/dist/cjs/platform/linux/OneLinuxSliderNativeComponent.native.js.map +7 -0
- package/dist/cjs/platform/linux/OneLinuxStepperNativeComponent.cjs +50 -0
- package/dist/cjs/platform/linux/OneLinuxStepperNativeComponent.native.cjs +50 -0
- package/dist/cjs/platform/linux/OneLinuxStepperNativeComponent.native.js +51 -0
- package/dist/cjs/platform/linux/OneLinuxStepperNativeComponent.native.js.map +7 -0
- package/dist/cjs/platform/linux/OneLinuxSwitchNativeComponent.cjs +45 -0
- package/dist/cjs/platform/linux/OneLinuxSwitchNativeComponent.native.cjs +45 -0
- package/dist/cjs/platform/linux/OneLinuxSwitchNativeComponent.native.js +46 -0
- package/dist/cjs/platform/linux/OneLinuxSwitchNativeComponent.native.js.map +7 -0
- package/dist/cjs/platform/linux/OneLinuxTextFieldNativeComponent.cjs +52 -0
- package/dist/cjs/platform/linux/OneLinuxTextFieldNativeComponent.native.cjs +52 -0
- package/dist/cjs/platform/linux/OneLinuxTextFieldNativeComponent.native.js +53 -0
- package/dist/cjs/platform/linux/OneLinuxTextFieldNativeComponent.native.js.map +7 -0
- package/dist/cjs/platform/linux/OneLinuxToggleNativeComponent.cjs +47 -0
- package/dist/cjs/platform/linux/OneLinuxToggleNativeComponent.native.cjs +47 -0
- package/dist/cjs/platform/linux/OneLinuxToggleNativeComponent.native.js +48 -0
- package/dist/cjs/platform/linux/OneLinuxToggleNativeComponent.native.js.map +7 -0
- package/dist/cjs/platform/linux/ProgressBar.linux.cjs +42 -0
- package/dist/cjs/platform/linux/ProgressBar.linux.native.cjs +45 -0
- package/dist/cjs/platform/linux/ProgressBar.linux.native.js +47 -0
- package/dist/cjs/platform/linux/ProgressBar.linux.native.js.map +1 -0
- package/dist/cjs/platform/linux/SecureField.linux.cjs +31 -0
- package/dist/cjs/platform/linux/SecureField.linux.native.cjs +33 -0
- package/dist/cjs/platform/linux/SecureField.linux.native.js +35 -0
- package/dist/cjs/platform/linux/SecureField.linux.native.js.map +1 -0
- package/dist/cjs/platform/linux/SegmentedControl.linux.cjs +39 -0
- package/dist/cjs/platform/linux/SegmentedControl.linux.native.cjs +49 -0
- package/dist/cjs/platform/linux/SegmentedControl.linux.native.js +51 -0
- package/dist/cjs/platform/linux/SegmentedControl.linux.native.js.map +1 -0
- package/dist/cjs/platform/linux/Slider.linux.cjs +71 -0
- package/dist/cjs/platform/linux/Slider.linux.native.cjs +78 -0
- package/dist/cjs/platform/linux/Slider.linux.native.js +80 -0
- package/dist/cjs/platform/linux/Slider.linux.native.js.map +1 -0
- package/dist/cjs/platform/linux/Stepper.linux.cjs +57 -0
- package/dist/cjs/platform/linux/Stepper.linux.native.cjs +62 -0
- package/dist/cjs/platform/linux/Stepper.linux.native.js +64 -0
- package/dist/cjs/platform/linux/Stepper.linux.native.js.map +1 -0
- package/dist/cjs/platform/linux/Switch.linux.cjs +47 -0
- package/dist/cjs/platform/linux/Switch.linux.native.cjs +52 -0
- package/dist/cjs/platform/linux/Switch.linux.native.js +54 -0
- package/dist/cjs/platform/linux/Switch.linux.native.js.map +1 -0
- package/dist/cjs/platform/linux/TextField.linux.cjs +59 -0
- package/dist/cjs/platform/linux/TextField.linux.native.cjs +68 -0
- package/dist/cjs/platform/linux/TextField.linux.native.js +70 -0
- package/dist/cjs/platform/linux/TextField.linux.native.js.map +1 -0
- package/dist/cjs/platform/linux/Toggle.linux.cjs +40 -0
- package/dist/cjs/platform/linux/Toggle.linux.native.cjs +50 -0
- package/dist/cjs/platform/linux/Toggle.linux.native.js +52 -0
- package/dist/cjs/platform/linux/Toggle.linux.native.js.map +1 -0
- package/dist/cjs/platform/linux/Window.linux.cjs +27 -0
- package/dist/cjs/platform/linux/Window.linux.native.cjs +29 -0
- package/dist/cjs/platform/linux/Window.linux.native.js +31 -0
- package/dist/cjs/platform/linux/Window.linux.native.js.map +1 -0
- package/dist/cjs/platform/mac/AppCommands.macos.cjs +25 -0
- package/dist/cjs/platform/mac/AppCommands.macos.native.cjs +27 -0
- package/dist/cjs/platform/mac/AppCommands.macos.native.js +29 -0
- package/dist/cjs/platform/mac/AppCommands.macos.native.js.map +1 -0
- package/dist/cjs/platform/mac/Button.macos.cjs +35 -0
- package/dist/cjs/platform/mac/Button.macos.native.cjs +40 -0
- package/dist/cjs/platform/mac/Button.macos.native.js +42 -0
- package/dist/cjs/platform/mac/Button.macos.native.js.map +1 -0
- package/dist/cjs/platform/mac/Image.macos.cjs +48 -0
- package/dist/cjs/platform/mac/Image.macos.native.cjs +51 -0
- package/dist/cjs/platform/mac/Image.macos.native.js +53 -0
- package/dist/cjs/platform/mac/Image.macos.native.js.map +1 -0
- package/dist/cjs/platform/mac/OneMacButtonNativeComponent.cjs +47 -0
- package/dist/cjs/platform/mac/OneMacButtonNativeComponent.native.cjs +47 -0
- package/dist/cjs/platform/mac/OneMacButtonNativeComponent.native.js +48 -0
- package/dist/cjs/platform/mac/OneMacButtonNativeComponent.native.js.map +7 -0
- package/dist/cjs/platform/mac/OneMacImageNativeComponent.cjs +35 -0
- package/dist/cjs/platform/mac/OneMacImageNativeComponent.native.cjs +35 -0
- package/dist/cjs/platform/mac/OneMacImageNativeComponent.native.js +36 -0
- package/dist/cjs/platform/mac/OneMacImageNativeComponent.native.js.map +7 -0
- package/dist/cjs/platform/mac/OneMacPopUpButtonNativeComponent.cjs +47 -0
- package/dist/cjs/platform/mac/OneMacPopUpButtonNativeComponent.native.cjs +47 -0
- package/dist/cjs/platform/mac/OneMacPopUpButtonNativeComponent.native.js +48 -0
- package/dist/cjs/platform/mac/OneMacPopUpButtonNativeComponent.native.js.map +7 -0
- package/dist/cjs/platform/mac/OneMacSegmentedControlNativeComponent.cjs +48 -0
- package/dist/cjs/platform/mac/OneMacSegmentedControlNativeComponent.native.cjs +48 -0
- package/dist/cjs/platform/mac/OneMacSegmentedControlNativeComponent.native.js +49 -0
- package/dist/cjs/platform/mac/OneMacSegmentedControlNativeComponent.native.js.map +7 -0
- package/dist/cjs/platform/mac/OneMacToggleNativeComponent.cjs +46 -0
- package/dist/cjs/platform/mac/OneMacToggleNativeComponent.native.cjs +46 -0
- package/dist/cjs/platform/mac/OneMacToggleNativeComponent.native.js +47 -0
- package/dist/cjs/platform/mac/OneMacToggleNativeComponent.native.js.map +7 -0
- package/dist/cjs/platform/mac/PopUpButton.macos.cjs +51 -0
- package/dist/cjs/platform/mac/PopUpButton.macos.native.cjs +56 -0
- package/dist/cjs/platform/mac/PopUpButton.macos.native.js +58 -0
- package/dist/cjs/platform/mac/PopUpButton.macos.native.js.map +1 -0
- package/dist/cjs/platform/mac/SegmentedControl.macos.cjs +38 -0
- package/dist/cjs/platform/mac/SegmentedControl.macos.native.cjs +47 -0
- package/dist/cjs/platform/mac/SegmentedControl.macos.native.js +49 -0
- package/dist/cjs/platform/mac/SegmentedControl.macos.native.js.map +1 -0
- package/dist/cjs/platform/mac/Toggle.macos.cjs +38 -0
- package/dist/cjs/platform/mac/Toggle.macos.native.cjs +47 -0
- package/dist/cjs/platform/mac/Toggle.macos.native.js +49 -0
- package/dist/cjs/platform/mac/Toggle.macos.native.js.map +1 -0
- package/dist/cjs/platform/specs/OneDOMHostNativeComponent.cjs +71 -0
- package/dist/cjs/platform/specs/OneDOMHostNativeComponent.native.cjs +71 -0
- package/dist/cjs/platform/specs/OneDOMHostNativeComponent.native.js +72 -0
- package/dist/cjs/platform/specs/OneDOMHostNativeComponent.native.js.map +7 -0
- package/dist/cjs/platform/split-view/split-view.linux.cjs +18 -0
- package/dist/cjs/platform/split-view/split-view.linux.native.cjs +20 -0
- package/dist/cjs/platform/split-view/split-view.linux.native.js +22 -0
- package/dist/cjs/platform/split-view/split-view.linux.native.js.map +1 -0
- package/dist/cjs/platform/split-view/split-view.macos.cjs +34 -0
- package/dist/cjs/platform/split-view/split-view.macos.native.cjs +37 -0
- package/dist/cjs/platform/split-view/split-view.macos.native.js +39 -0
- package/dist/cjs/platform/split-view/split-view.macos.native.js.map +1 -0
- package/dist/cjs/platform/store-review/index.native.cjs +1 -1
- package/dist/cjs/platform/store-review/index.native.js +1 -1
- package/dist/cjs/platform/store-review/index.native.js.map +1 -1
- package/dist/cjs/platform/ui/Image.linux.cjs +18 -0
- package/dist/cjs/platform/ui/Image.linux.native.cjs +20 -0
- package/dist/cjs/platform/ui/Image.linux.native.js +22 -0
- package/dist/cjs/platform/ui/Image.linux.native.js.map +1 -0
- package/dist/cjs/platform/ui/Image.macos.cjs +33 -0
- package/dist/cjs/platform/ui/Image.macos.native.cjs +36 -0
- package/dist/cjs/platform/ui/Image.macos.native.js +38 -0
- package/dist/cjs/platform/ui/Image.macos.native.js.map +1 -0
- package/dist/cjs/router/getRoutes.cjs +2 -0
- package/dist/cjs/router/getRoutes.native.cjs +2 -0
- package/dist/cjs/router/getRoutes.native.js +2 -0
- package/dist/cjs/router/getRoutes.native.js.map +1 -1
- package/dist/cjs/router/router.cjs +57 -31
- package/dist/cjs/router/router.native.cjs +20 -4
- package/dist/cjs/router/router.native.js +20 -4
- package/dist/cjs/router/router.native.js.map +1 -1
- package/dist/cjs/searchParams.cjs +102 -0
- package/dist/cjs/searchParams.native.cjs +194 -0
- package/dist/cjs/searchParams.native.js +196 -0
- package/dist/cjs/searchParams.native.js.map +1 -0
- package/dist/cjs/server/oneServe.cjs +15 -3
- package/dist/cjs/server/oneServe.native.cjs +16 -3
- package/dist/cjs/server/oneServe.native.js +16 -3
- package/dist/cjs/server/oneServe.native.js.map +1 -1
- package/dist/cjs/server/workerHandler.cjs +16 -3
- package/dist/cjs/server/workerHandler.native.cjs +17 -3
- package/dist/cjs/server/workerHandler.native.js +17 -3
- package/dist/cjs/server/workerHandler.native.js.map +1 -1
- package/dist/cjs/standardSchema.cjs +36 -0
- package/dist/cjs/standardSchema.native.cjs +39 -0
- package/dist/cjs/standardSchema.native.js +41 -0
- package/dist/cjs/standardSchema.native.js.map +1 -0
- package/dist/cjs/typed-routes/generateRouteTypes.cjs +26 -1
- package/dist/cjs/typed-routes/generateRouteTypes.native.cjs +68 -1
- package/dist/cjs/typed-routes/generateRouteTypes.native.js +68 -1
- package/dist/cjs/typed-routes/generateRouteTypes.native.js.map +1 -1
- package/dist/cjs/typed-routes/getTypedRoutesDeclarationFile.cjs +27 -10
- package/dist/cjs/typed-routes/getTypedRoutesDeclarationFile.native.cjs +35 -9
- package/dist/cjs/typed-routes/getTypedRoutesDeclarationFile.native.js +35 -9
- package/dist/cjs/typed-routes/getTypedRoutesDeclarationFile.native.js.map +1 -1
- package/dist/cjs/typed-routes/searchParamSchemas.cjs +316 -0
- package/dist/cjs/typed-routes/searchParamSchemas.native.cjs +527 -0
- package/dist/cjs/typed-routes/searchParamSchemas.native.js +529 -0
- package/dist/cjs/typed-routes/searchParamSchemas.native.js.map +1 -0
- package/dist/cjs/typed-routes/searchSchemaEntries.cjs +34 -0
- package/dist/cjs/typed-routes/searchSchemaEntries.native.cjs +38 -0
- package/dist/cjs/typed-routes/searchSchemaEntries.native.js +40 -0
- package/dist/cjs/typed-routes/searchSchemaEntries.native.js.map +1 -0
- package/dist/cjs/useLoader.cjs +40 -30
- package/dist/cjs/useLoader.native.cjs +51 -37
- package/dist/cjs/useLoader.native.js +51 -37
- package/dist/cjs/useLoader.native.js.map +1 -1
- package/dist/cjs/utils/cleanUrl.cjs +31 -3
- package/dist/cjs/utils/cleanUrl.native.cjs +31 -3
- package/dist/cjs/utils/cleanUrl.native.js +31 -3
- package/dist/cjs/utils/cleanUrl.native.js.map +1 -1
- package/dist/cjs/validateParams.cjs +3 -5
- package/dist/cjs/validateParams.native.cjs +3 -6
- package/dist/cjs/validateParams.native.js +3 -6
- package/dist/cjs/validateParams.native.js.map +1 -1
- package/dist/cjs/{validateSearch.cjs → validateSearchParams.cjs} +21 -14
- package/dist/cjs/{validateSearch.native.cjs → validateSearchParams.native.cjs} +21 -15
- package/dist/cjs/{validateSearch.native.js → validateSearchParams.native.js} +22 -16
- package/dist/cjs/validateSearchParams.native.js.map +1 -0
- package/dist/cjs/vercel/build/generate/createSsrServerlessFunction.cjs +36 -2
- package/dist/cjs/vercel/build/generate/createSsrServerlessFunction.native.cjs +36 -2
- package/dist/cjs/vercel/build/generate/createSsrServerlessFunction.native.js +36 -2
- package/dist/cjs/vercel/build/generate/createSsrServerlessFunction.native.js.map +1 -1
- package/dist/cjs/vite/dom/browser.cjs +172 -0
- package/dist/cjs/vite/dom/browser.native.cjs +220 -0
- package/dist/cjs/vite/dom/browser.native.js +222 -0
- package/dist/cjs/vite/dom/browser.native.js.map +1 -0
- package/dist/cjs/vite/dom/directive.cjs +76 -0
- package/dist/cjs/vite/dom/directive.native.cjs +135 -0
- package/dist/cjs/vite/dom/directive.native.js +137 -0
- package/dist/cjs/vite/dom/directive.native.js.map +1 -0
- package/dist/cjs/vite/dom/registry.cjs +71 -0
- package/dist/cjs/vite/dom/registry.native.cjs +184 -0
- package/dist/cjs/vite/dom/registry.native.js +186 -0
- package/dist/cjs/vite/dom/registry.native.js.map +1 -0
- package/dist/cjs/vite/one.cjs +28 -3
- package/dist/cjs/vite/one.native.cjs +35 -10
- package/dist/cjs/vite/one.native.js +35 -10
- package/dist/cjs/vite/one.native.js.map +1 -1
- package/dist/cjs/vite/plugins/clientTreeShakePlugin.cjs +1 -1
- package/dist/cjs/vite/plugins/clientTreeShakePlugin.native.cjs +1 -1
- package/dist/cjs/vite/plugins/clientTreeShakePlugin.native.js +1 -1
- package/dist/cjs/vite/plugins/clientTreeShakePlugin.native.js.map +1 -1
- package/dist/cjs/vite/plugins/environmentGuardPlugin.cjs +6 -1
- package/dist/cjs/vite/plugins/environmentGuardPlugin.native.cjs +6 -1
- package/dist/cjs/vite/plugins/environmentGuardPlugin.native.js +6 -1
- package/dist/cjs/vite/plugins/environmentGuardPlugin.native.js.map +1 -1
- package/dist/cjs/vite/plugins/fileSystemRouterPlugin.cjs +11 -7
- package/dist/cjs/vite/plugins/fileSystemRouterPlugin.native.cjs +13 -7
- package/dist/cjs/vite/plugins/fileSystemRouterPlugin.native.js +13 -7
- package/dist/cjs/vite/plugins/fileSystemRouterPlugin.native.js.map +1 -1
- package/dist/cjs/vite/plugins/generateFileSystemRouteTypesPlugin.cjs +8 -2
- package/dist/cjs/vite/plugins/generateFileSystemRouteTypesPlugin.native.cjs +8 -2
- package/dist/cjs/vite/plugins/generateFileSystemRouteTypesPlugin.native.js +8 -2
- package/dist/cjs/vite/plugins/generateFileSystemRouteTypesPlugin.native.js.map +1 -1
- package/dist/cjs/vite/plugins/iosLinkSetPlugin.cjs +63 -0
- package/dist/cjs/vite/plugins/iosLinkSetPlugin.native.cjs +69 -0
- package/dist/cjs/vite/plugins/iosLinkSetPlugin.native.js +71 -0
- package/dist/cjs/vite/plugins/iosLinkSetPlugin.native.js.map +1 -0
- package/dist/cjs/vite/plugins/loaderSearchSchemasPlugin.cjs +67 -0
- package/dist/cjs/vite/plugins/loaderSearchSchemasPlugin.native.cjs +107 -0
- package/dist/cjs/vite/plugins/loaderSearchSchemasPlugin.native.js +109 -0
- package/dist/cjs/vite/plugins/loaderSearchSchemasPlugin.native.js.map +1 -0
- package/dist/cjs/vite/plugins/useDomPlugin.cjs +128 -22
- package/dist/cjs/vite/plugins/useDomPlugin.native.cjs +160 -22
- package/dist/cjs/vite/plugins/useDomPlugin.native.js +160 -22
- package/dist/cjs/vite/plugins/useDomPlugin.native.js.map +1 -1
- package/dist/esm/cli/iosLinkSet.mjs +83 -0
- package/dist/esm/cli/iosLinkSet.mjs.map +1 -0
- package/dist/esm/cli/iosLinkSet.native.js +90 -0
- package/dist/esm/cli/iosLinkSet.native.js.map +1 -0
- package/dist/esm/cli/iosLinkSetAnalysis.mjs +303 -0
- package/dist/esm/cli/iosLinkSetAnalysis.mjs.map +1 -0
- package/dist/esm/cli/iosLinkSetAnalysis.native.js +686 -0
- package/dist/esm/cli/iosLinkSetAnalysis.native.js.map +1 -0
- package/dist/esm/cli/prebuild.mjs +5 -1
- package/dist/esm/cli/prebuild.mjs.map +1 -1
- package/dist/esm/cli/prebuild.native.js +4 -2
- package/dist/esm/cli/prebuild.native.js.map +1 -1
- package/dist/esm/cli/updatesPublish.mjs +15 -11
- package/dist/esm/cli/updatesPublish.mjs.map +1 -1
- package/dist/esm/cli/updatesPublish.native.js +44 -21
- package/dist/esm/cli/updatesPublish.native.js.map +1 -1
- package/dist/esm/cli.mjs +4 -2
- package/dist/esm/cli.mjs.map +1 -1
- package/dist/esm/cli.native.js +4 -2
- package/dist/esm/cli.native.js.map +1 -1
- package/dist/esm/createApp.mjs +8 -0
- package/dist/esm/createApp.mjs.map +1 -1
- package/dist/esm/createHandleRequest.mjs +4 -17
- package/dist/esm/createHandleRequest.mjs.map +1 -1
- package/dist/esm/createHandleRequest.native.js +6 -19
- package/dist/esm/createHandleRequest.native.js.map +1 -1
- package/dist/esm/dom/browserBridge.mjs +158 -0
- package/dist/esm/dom/browserBridge.mjs.map +1 -0
- package/dist/esm/dom/browserBridge.native.js +269 -0
- package/dist/esm/dom/browserBridge.native.js.map +1 -0
- package/dist/esm/dom/client.mjs +49 -0
- package/dist/esm/dom/client.mjs.map +1 -0
- package/dist/esm/dom/client.native.js +59 -0
- package/dist/esm/dom/client.native.js.map +1 -0
- package/dist/esm/dom/context.mjs +6 -0
- package/dist/esm/dom/context.mjs.map +1 -0
- package/dist/esm/dom/context.native.js +6 -0
- package/dist/esm/dom/context.native.js.map +1 -0
- package/dist/esm/dom/host.native.js +125 -0
- package/dist/esm/dom/host.native.js.map +1 -0
- package/dist/esm/dom/index.mjs +69 -0
- package/dist/esm/dom/index.mjs.map +1 -0
- package/dist/esm/dom/index.native.js +115 -0
- package/dist/esm/dom/index.native.js.map +1 -0
- package/dist/esm/dom/measure.mjs +31 -0
- package/dist/esm/dom/measure.mjs.map +1 -0
- package/dist/esm/dom/measure.native.js +33 -0
- package/dist/esm/dom/measure.native.js.map +1 -0
- package/dist/esm/dom/nativeBridge.mjs +116 -0
- package/dist/esm/dom/nativeBridge.mjs.map +1 -0
- package/dist/esm/dom/nativeBridge.native.js +202 -0
- package/dist/esm/dom/nativeBridge.native.js.map +1 -0
- package/dist/esm/dom/peer.mjs +129 -0
- package/dist/esm/dom/peer.mjs.map +1 -0
- package/dist/esm/dom/peer.native.js +206 -0
- package/dist/esm/dom/peer.native.js.map +1 -0
- package/dist/esm/dom/protocol.mjs +162 -0
- package/dist/esm/dom/protocol.mjs.map +1 -0
- package/dist/esm/dom/protocol.native.js +184 -0
- package/dist/esm/dom/protocol.native.js.map +1 -0
- package/dist/esm/dom/serialize.mjs +114 -0
- package/dist/esm/dom/serialize.mjs.map +1 -0
- package/dist/esm/dom/serialize.native.js +256 -0
- package/dist/esm/dom/serialize.native.js.map +1 -0
- package/dist/esm/dom/types.mjs +0 -0
- package/dist/esm/dom/types.native.js +0 -0
- package/dist/esm/fork/getPathFromState.mjs +9 -1
- package/dist/esm/fork/getPathFromState.mjs.map +1 -1
- package/dist/esm/fork/getPathFromState.native.js +48 -4
- package/dist/esm/fork/getPathFromState.native.js.map +1 -1
- package/dist/esm/hooks.mjs +51 -2
- package/dist/esm/hooks.mjs.map +1 -1
- package/dist/esm/hooks.native.js +56 -3
- package/dist/esm/hooks.native.js.map +1 -1
- package/dist/esm/index.js +2 -1
- package/dist/esm/index.mjs +2 -1
- package/dist/esm/index.native.js +2 -1
- package/dist/esm/layouts/Tabs.linux.mjs +26 -0
- package/dist/esm/layouts/Tabs.linux.mjs.map +1 -0
- package/dist/esm/layouts/Tabs.linux.native.js +26 -0
- package/dist/esm/layouts/Tabs.linux.native.js.map +1 -0
- package/dist/esm/layouts/stack-navigator-desktop.mjs +6 -0
- package/dist/esm/layouts/stack-navigator-desktop.mjs.map +1 -0
- package/dist/esm/layouts/stack-navigator-desktop.native.js +6 -0
- package/dist/esm/layouts/stack-navigator-desktop.native.js.map +1 -0
- package/dist/esm/layouts/stack-navigator.linux.mjs +17 -0
- package/dist/esm/layouts/stack-navigator.linux.mjs.map +1 -0
- package/dist/esm/layouts/stack-navigator.linux.native.js +17 -0
- package/dist/esm/layouts/stack-navigator.linux.native.js.map +1 -0
- package/dist/esm/layouts/stack-navigator.macos.mjs +7 -0
- package/dist/esm/layouts/stack-navigator.macos.mjs.map +1 -0
- package/dist/esm/layouts/stack-navigator.macos.native.js +7 -0
- package/dist/esm/layouts/stack-navigator.macos.native.js.map +1 -0
- package/dist/esm/layouts/stack-utils/StackToolbarBottomHost.linux.mjs +1 -0
- package/dist/esm/layouts/stack-utils/StackToolbarBottomHost.linux.native.js +1 -0
- package/dist/esm/layouts/stack-utils/StackToolbarBottomHost.macos.mjs +11 -0
- package/dist/esm/layouts/stack-utils/StackToolbarBottomHost.macos.mjs.map +1 -0
- package/dist/esm/layouts/stack-utils/StackToolbarBottomHost.macos.native.js +12 -0
- package/dist/esm/layouts/stack-utils/StackToolbarBottomHost.macos.native.js.map +1 -0
- package/dist/esm/link/Link.mjs +4 -3
- package/dist/esm/link/Link.mjs.map +1 -1
- package/dist/esm/link/Link.native.js +4 -3
- package/dist/esm/link/Link.native.js.map +1 -1
- package/dist/esm/loaderResponseToModule.mjs +21 -0
- package/dist/esm/loaderResponseToModule.mjs.map +1 -0
- package/dist/esm/loaderResponseToModule.native.js +22 -0
- package/dist/esm/loaderResponseToModule.native.js.map +1 -0
- package/dist/esm/loaderSearchParams.mjs +76 -0
- package/dist/esm/loaderSearchParams.mjs.map +1 -0
- package/dist/esm/loaderSearchParams.native.js +114 -0
- package/dist/esm/loaderSearchParams.native.js.map +1 -0
- package/dist/esm/one-shared.mjs +110 -0
- package/dist/esm/one-shared.mjs.map +1 -0
- package/dist/esm/one-shared.native.js +111 -0
- package/dist/esm/one-shared.native.js.map +1 -0
- package/dist/esm/one.linux.mjs +38 -0
- package/dist/esm/one.linux.mjs.map +1 -0
- package/dist/esm/one.linux.native.js +38 -0
- package/dist/esm/one.linux.native.js.map +1 -0
- package/dist/esm/one.macos.mjs +26 -0
- package/dist/esm/one.macos.mjs.map +1 -0
- package/dist/esm/one.macos.native.js +26 -0
- package/dist/esm/one.macos.native.js.map +1 -0
- package/dist/esm/one.mjs +1 -110
- package/dist/esm/one.native.js +1 -111
- package/dist/esm/platform/adaptive/fixed.mjs +22 -0
- package/dist/esm/platform/adaptive/fixed.mjs.map +1 -0
- package/dist/esm/platform/adaptive/fixed.native.js +22 -0
- package/dist/esm/platform/adaptive/fixed.native.js.map +1 -0
- package/dist/esm/platform/adaptive/index.linux.mjs +1 -0
- package/dist/esm/platform/adaptive/index.linux.native.js +1 -0
- package/dist/esm/platform/adaptive/index.macos.mjs +6 -0
- package/dist/esm/platform/adaptive/index.macos.native.js +6 -0
- package/dist/esm/platform/adaptive/index.mjs +2 -21
- package/dist/esm/platform/controlTypes.mjs +0 -0
- package/dist/esm/platform/controlTypes.native.js +0 -0
- package/dist/esm/platform/desktop/appCommandTypes.mjs +0 -0
- package/dist/esm/platform/desktop/appCommandTypes.native.js +0 -0
- package/dist/esm/platform/desktop/createAppCommands.mjs +36 -0
- package/dist/esm/platform/desktop/createAppCommands.mjs.map +1 -0
- package/dist/esm/platform/desktop/createAppCommands.native.js +39 -0
- package/dist/esm/platform/desktop/createAppCommands.native.js.map +1 -0
- package/dist/esm/platform/desktop/createControls.mjs +42 -0
- package/dist/esm/platform/desktop/createControls.mjs.map +1 -0
- package/dist/esm/platform/desktop/createControls.native.js +44 -0
- package/dist/esm/platform/desktop/createControls.native.js.map +1 -0
- package/dist/esm/platform/linux/AppCommands.linux.mjs +6 -0
- package/dist/esm/platform/linux/AppCommands.linux.mjs.map +1 -0
- package/dist/esm/platform/linux/AppCommands.linux.native.js +6 -0
- package/dist/esm/platform/linux/AppCommands.linux.native.js.map +1 -0
- package/dist/esm/platform/linux/Button.linux.mjs +16 -0
- package/dist/esm/platform/linux/Button.linux.mjs.map +1 -0
- package/dist/esm/platform/linux/Button.linux.native.js +22 -0
- package/dist/esm/platform/linux/Button.linux.native.js.map +1 -0
- package/dist/esm/platform/linux/DropDown.linux.mjs +49 -0
- package/dist/esm/platform/linux/DropDown.linux.mjs.map +1 -0
- package/dist/esm/platform/linux/DropDown.linux.native.js +64 -0
- package/dist/esm/platform/linux/DropDown.linux.native.js.map +1 -0
- package/dist/esm/platform/linux/NavigationView.linux.mjs +89 -0
- package/dist/esm/platform/linux/NavigationView.linux.mjs.map +1 -0
- package/dist/esm/platform/linux/NavigationView.linux.native.js +103 -0
- package/dist/esm/platform/linux/NavigationView.linux.native.js.map +1 -0
- package/dist/esm/platform/linux/OneLinuxButtonNativeComponent.mjs +28 -0
- package/dist/esm/platform/linux/OneLinuxButtonNativeComponent.mjs.map +7 -0
- package/dist/esm/platform/linux/OneLinuxButtonNativeComponent.native.js +28 -0
- package/dist/esm/platform/linux/OneLinuxButtonNativeComponent.native.js.map +7 -0
- package/dist/esm/platform/linux/OneLinuxDropDownNativeComponent.mjs +37 -0
- package/dist/esm/platform/linux/OneLinuxDropDownNativeComponent.mjs.map +7 -0
- package/dist/esm/platform/linux/OneLinuxDropDownNativeComponent.native.js +37 -0
- package/dist/esm/platform/linux/OneLinuxDropDownNativeComponent.native.js.map +7 -0
- package/dist/esm/platform/linux/OneLinuxNavigationNativeComponent.mjs +37 -0
- package/dist/esm/platform/linux/OneLinuxNavigationNativeComponent.mjs.map +7 -0
- package/dist/esm/platform/linux/OneLinuxNavigationNativeComponent.native.js +37 -0
- package/dist/esm/platform/linux/OneLinuxNavigationNativeComponent.native.js.map +7 -0
- package/dist/esm/platform/linux/OneLinuxProgressBarNativeComponent.mjs +15 -0
- package/dist/esm/platform/linux/OneLinuxProgressBarNativeComponent.mjs.map +7 -0
- package/dist/esm/platform/linux/OneLinuxProgressBarNativeComponent.native.js +15 -0
- package/dist/esm/platform/linux/OneLinuxProgressBarNativeComponent.native.js.map +7 -0
- package/dist/esm/platform/linux/OneLinuxSecureFieldNativeComponent.mjs +34 -0
- package/dist/esm/platform/linux/OneLinuxSecureFieldNativeComponent.mjs.map +7 -0
- package/dist/esm/platform/linux/OneLinuxSecureFieldNativeComponent.native.js +34 -0
- package/dist/esm/platform/linux/OneLinuxSecureFieldNativeComponent.native.js.map +7 -0
- package/dist/esm/platform/linux/OneLinuxSegmentedControlNativeComponent.mjs +29 -0
- package/dist/esm/platform/linux/OneLinuxSegmentedControlNativeComponent.mjs.map +7 -0
- package/dist/esm/platform/linux/OneLinuxSegmentedControlNativeComponent.native.js +29 -0
- package/dist/esm/platform/linux/OneLinuxSegmentedControlNativeComponent.native.js.map +7 -0
- package/dist/esm/platform/linux/OneLinuxSliderNativeComponent.mjs +39 -0
- package/dist/esm/platform/linux/OneLinuxSliderNativeComponent.mjs.map +7 -0
- package/dist/esm/platform/linux/OneLinuxSliderNativeComponent.native.js +39 -0
- package/dist/esm/platform/linux/OneLinuxSliderNativeComponent.native.js.map +7 -0
- package/dist/esm/platform/linux/OneLinuxStepperNativeComponent.mjs +32 -0
- package/dist/esm/platform/linux/OneLinuxStepperNativeComponent.mjs.map +7 -0
- package/dist/esm/platform/linux/OneLinuxStepperNativeComponent.native.js +32 -0
- package/dist/esm/platform/linux/OneLinuxStepperNativeComponent.native.js.map +7 -0
- package/dist/esm/platform/linux/OneLinuxSwitchNativeComponent.mjs +27 -0
- package/dist/esm/platform/linux/OneLinuxSwitchNativeComponent.mjs.map +7 -0
- package/dist/esm/platform/linux/OneLinuxSwitchNativeComponent.native.js +27 -0
- package/dist/esm/platform/linux/OneLinuxSwitchNativeComponent.native.js.map +7 -0
- package/dist/esm/platform/linux/OneLinuxTextFieldNativeComponent.mjs +34 -0
- package/dist/esm/platform/linux/OneLinuxTextFieldNativeComponent.mjs.map +7 -0
- package/dist/esm/platform/linux/OneLinuxTextFieldNativeComponent.native.js +34 -0
- package/dist/esm/platform/linux/OneLinuxTextFieldNativeComponent.native.js.map +7 -0
- package/dist/esm/platform/linux/OneLinuxToggleNativeComponent.mjs +29 -0
- package/dist/esm/platform/linux/OneLinuxToggleNativeComponent.mjs.map +7 -0
- package/dist/esm/platform/linux/OneLinuxToggleNativeComponent.native.js +29 -0
- package/dist/esm/platform/linux/OneLinuxToggleNativeComponent.native.js.map +7 -0
- package/dist/esm/platform/linux/ProgressBar.linux.mjs +17 -0
- package/dist/esm/platform/linux/ProgressBar.linux.mjs.map +1 -0
- package/dist/esm/platform/linux/ProgressBar.linux.native.js +18 -0
- package/dist/esm/platform/linux/ProgressBar.linux.native.js.map +1 -0
- package/dist/esm/platform/linux/SecureField.linux.mjs +12 -0
- package/dist/esm/platform/linux/SecureField.linux.mjs.map +1 -0
- package/dist/esm/platform/linux/SecureField.linux.native.js +12 -0
- package/dist/esm/platform/linux/SecureField.linux.native.js.map +1 -0
- package/dist/esm/platform/linux/SegmentedControl.linux.mjs +14 -0
- package/dist/esm/platform/linux/SegmentedControl.linux.mjs.map +1 -0
- package/dist/esm/platform/linux/SegmentedControl.linux.native.js +22 -0
- package/dist/esm/platform/linux/SegmentedControl.linux.native.js.map +1 -0
- package/dist/esm/platform/linux/Slider.linux.mjs +46 -0
- package/dist/esm/platform/linux/Slider.linux.mjs.map +1 -0
- package/dist/esm/platform/linux/Slider.linux.native.js +51 -0
- package/dist/esm/platform/linux/Slider.linux.native.js.map +1 -0
- package/dist/esm/platform/linux/Stepper.linux.mjs +32 -0
- package/dist/esm/platform/linux/Stepper.linux.mjs.map +1 -0
- package/dist/esm/platform/linux/Stepper.linux.native.js +35 -0
- package/dist/esm/platform/linux/Stepper.linux.native.js.map +1 -0
- package/dist/esm/platform/linux/Switch.linux.mjs +22 -0
- package/dist/esm/platform/linux/Switch.linux.mjs.map +1 -0
- package/dist/esm/platform/linux/Switch.linux.native.js +25 -0
- package/dist/esm/platform/linux/Switch.linux.native.js.map +1 -0
- package/dist/esm/platform/linux/TextField.linux.mjs +31 -0
- package/dist/esm/platform/linux/TextField.linux.mjs.map +1 -0
- package/dist/esm/platform/linux/TextField.linux.native.js +38 -0
- package/dist/esm/platform/linux/TextField.linux.native.js.map +1 -0
- package/dist/esm/platform/linux/Toggle.linux.mjs +15 -0
- package/dist/esm/platform/linux/Toggle.linux.mjs.map +1 -0
- package/dist/esm/platform/linux/Toggle.linux.native.js +23 -0
- package/dist/esm/platform/linux/Toggle.linux.native.js.map +1 -0
- package/dist/esm/platform/linux/Window.linux.mjs +8 -0
- package/dist/esm/platform/linux/Window.linux.mjs.map +1 -0
- package/dist/esm/platform/linux/Window.linux.native.js +8 -0
- package/dist/esm/platform/linux/Window.linux.native.js.map +1 -0
- package/dist/esm/platform/mac/AppCommands.macos.mjs +6 -0
- package/dist/esm/platform/mac/AppCommands.macos.mjs.map +1 -0
- package/dist/esm/platform/mac/AppCommands.macos.native.js +6 -0
- package/dist/esm/platform/mac/AppCommands.macos.native.js.map +1 -0
- package/dist/esm/platform/mac/Button.macos.mjs +10 -0
- package/dist/esm/platform/mac/Button.macos.mjs.map +1 -0
- package/dist/esm/platform/mac/Button.macos.native.js +13 -0
- package/dist/esm/platform/mac/Button.macos.native.js.map +1 -0
- package/dist/esm/platform/mac/Image.macos.mjs +23 -0
- package/dist/esm/platform/mac/Image.macos.mjs.map +1 -0
- package/dist/esm/platform/mac/Image.macos.native.js +24 -0
- package/dist/esm/platform/mac/Image.macos.native.js.map +1 -0
- package/dist/esm/platform/mac/OneMacButtonNativeComponent.mjs +29 -0
- package/dist/esm/platform/mac/OneMacButtonNativeComponent.mjs.map +7 -0
- package/dist/esm/platform/mac/OneMacButtonNativeComponent.native.js +29 -0
- package/dist/esm/platform/mac/OneMacButtonNativeComponent.native.js.map +7 -0
- package/dist/esm/platform/mac/OneMacImageNativeComponent.mjs +17 -0
- package/dist/esm/platform/mac/OneMacImageNativeComponent.mjs.map +7 -0
- package/dist/esm/platform/mac/OneMacImageNativeComponent.native.js +17 -0
- package/dist/esm/platform/mac/OneMacImageNativeComponent.native.js.map +7 -0
- package/dist/esm/platform/mac/OneMacPopUpButtonNativeComponent.mjs +29 -0
- package/dist/esm/platform/mac/OneMacPopUpButtonNativeComponent.mjs.map +7 -0
- package/dist/esm/platform/mac/OneMacPopUpButtonNativeComponent.native.js +29 -0
- package/dist/esm/platform/mac/OneMacPopUpButtonNativeComponent.native.js.map +7 -0
- package/dist/esm/platform/mac/OneMacSegmentedControlNativeComponent.mjs +30 -0
- package/dist/esm/platform/mac/OneMacSegmentedControlNativeComponent.mjs.map +7 -0
- package/dist/esm/platform/mac/OneMacSegmentedControlNativeComponent.native.js +30 -0
- package/dist/esm/platform/mac/OneMacSegmentedControlNativeComponent.native.js.map +7 -0
- package/dist/esm/platform/mac/OneMacToggleNativeComponent.mjs +28 -0
- package/dist/esm/platform/mac/OneMacToggleNativeComponent.mjs.map +7 -0
- package/dist/esm/platform/mac/OneMacToggleNativeComponent.native.js +28 -0
- package/dist/esm/platform/mac/OneMacToggleNativeComponent.native.js.map +7 -0
- package/dist/esm/platform/mac/PopUpButton.macos.mjs +26 -0
- package/dist/esm/platform/mac/PopUpButton.macos.mjs.map +1 -0
- package/dist/esm/platform/mac/PopUpButton.macos.native.js +29 -0
- package/dist/esm/platform/mac/PopUpButton.macos.native.js.map +1 -0
- package/dist/esm/platform/mac/SegmentedControl.macos.mjs +13 -0
- package/dist/esm/platform/mac/SegmentedControl.macos.mjs.map +1 -0
- package/dist/esm/platform/mac/SegmentedControl.macos.native.js +20 -0
- package/dist/esm/platform/mac/SegmentedControl.macos.native.js.map +1 -0
- package/dist/esm/platform/mac/Toggle.macos.mjs +13 -0
- package/dist/esm/platform/mac/Toggle.macos.mjs.map +1 -0
- package/dist/esm/platform/mac/Toggle.macos.native.js +20 -0
- package/dist/esm/platform/mac/Toggle.macos.native.js.map +1 -0
- package/dist/esm/platform/specs/OneDOMHostNativeComponent.mjs +53 -0
- package/dist/esm/platform/specs/OneDOMHostNativeComponent.mjs.map +7 -0
- package/dist/esm/platform/specs/OneDOMHostNativeComponent.native.js +53 -0
- package/dist/esm/platform/specs/OneDOMHostNativeComponent.native.js.map +7 -0
- package/dist/esm/platform/split-view/split-view.linux.mjs +1 -0
- package/dist/esm/platform/split-view/split-view.linux.native.js +1 -0
- package/dist/esm/platform/split-view/split-view.macos.mjs +15 -0
- package/dist/esm/platform/split-view/split-view.macos.mjs.map +1 -0
- package/dist/esm/platform/split-view/split-view.macos.native.js +16 -0
- package/dist/esm/platform/split-view/split-view.macos.native.js.map +1 -0
- package/dist/esm/platform/store-review/index.native.js +1 -1
- package/dist/esm/platform/ui/Image.linux.mjs +1 -0
- package/dist/esm/platform/ui/Image.linux.native.js +1 -0
- package/dist/esm/platform/ui/Image.macos.mjs +14 -0
- package/dist/esm/platform/ui/Image.macos.mjs.map +1 -0
- package/dist/esm/platform/ui/Image.macos.native.js +15 -0
- package/dist/esm/platform/ui/Image.macos.native.js.map +1 -0
- package/dist/esm/router/getRoutes.mjs +2 -0
- package/dist/esm/router/getRoutes.mjs.map +1 -1
- package/dist/esm/router/getRoutes.native.js +2 -0
- package/dist/esm/router/getRoutes.native.js.map +1 -1
- package/dist/esm/router/router.mjs +56 -33
- package/dist/esm/router/router.mjs.map +1 -1
- package/dist/esm/router/router.native.js +18 -4
- package/dist/esm/router/router.native.js.map +1 -1
- package/dist/esm/searchParams.mjs +75 -0
- package/dist/esm/searchParams.mjs.map +1 -0
- package/dist/esm/searchParams.native.js +165 -0
- package/dist/esm/searchParams.native.js.map +1 -0
- package/dist/esm/server/oneServe.mjs +15 -3
- package/dist/esm/server/oneServe.mjs.map +1 -1
- package/dist/esm/server/oneServe.native.js +16 -3
- package/dist/esm/server/oneServe.native.js.map +1 -1
- package/dist/esm/server/workerHandler.mjs +16 -3
- package/dist/esm/server/workerHandler.mjs.map +1 -1
- package/dist/esm/server/workerHandler.native.js +17 -3
- package/dist/esm/server/workerHandler.native.js.map +1 -1
- package/dist/esm/standardSchema.mjs +13 -0
- package/dist/esm/standardSchema.mjs.map +1 -0
- package/dist/esm/standardSchema.native.js +14 -0
- package/dist/esm/standardSchema.native.js.map +1 -0
- package/dist/esm/typed-routes/generateRouteTypes.mjs +27 -2
- package/dist/esm/typed-routes/generateRouteTypes.mjs.map +1 -1
- package/dist/esm/typed-routes/generateRouteTypes.native.js +69 -2
- package/dist/esm/typed-routes/generateRouteTypes.native.js.map +1 -1
- package/dist/esm/typed-routes/getTypedRoutesDeclarationFile.mjs +27 -10
- package/dist/esm/typed-routes/getTypedRoutesDeclarationFile.mjs.map +1 -1
- package/dist/esm/typed-routes/getTypedRoutesDeclarationFile.native.js +35 -9
- package/dist/esm/typed-routes/getTypedRoutesDeclarationFile.native.js.map +1 -1
- package/dist/esm/typed-routes/searchParamSchemas.mjs +297 -0
- package/dist/esm/typed-routes/searchParamSchemas.mjs.map +1 -0
- package/dist/esm/typed-routes/searchParamSchemas.native.js +506 -0
- package/dist/esm/typed-routes/searchParamSchemas.native.js.map +1 -0
- package/dist/esm/typed-routes/searchSchemaEntries.mjs +15 -0
- package/dist/esm/typed-routes/searchSchemaEntries.mjs.map +1 -0
- package/dist/esm/typed-routes/searchSchemaEntries.native.js +17 -0
- package/dist/esm/typed-routes/searchSchemaEntries.native.js.map +1 -0
- package/dist/esm/useLoader.mjs +44 -34
- package/dist/esm/useLoader.mjs.map +1 -1
- package/dist/esm/useLoader.native.js +49 -37
- package/dist/esm/useLoader.native.js.map +1 -1
- package/dist/esm/utils/cleanUrl.mjs +25 -3
- package/dist/esm/utils/cleanUrl.mjs.map +1 -1
- package/dist/esm/utils/cleanUrl.native.js +25 -3
- package/dist/esm/utils/cleanUrl.native.js.map +1 -1
- package/dist/esm/validateParams.mjs +3 -4
- package/dist/esm/validateParams.mjs.map +1 -1
- package/dist/esm/validateParams.native.js +3 -5
- package/dist/esm/validateParams.native.js.map +1 -1
- package/dist/esm/{validateSearch.mjs → validateSearchParams.mjs} +18 -11
- package/dist/esm/validateSearchParams.mjs.map +1 -0
- package/dist/esm/{validateSearch.native.js → validateSearchParams.native.js} +18 -12
- package/dist/esm/validateSearchParams.native.js.map +1 -0
- package/dist/esm/vercel/build/generate/createSsrServerlessFunction.mjs +36 -2
- package/dist/esm/vercel/build/generate/createSsrServerlessFunction.mjs.map +1 -1
- package/dist/esm/vercel/build/generate/createSsrServerlessFunction.native.js +36 -2
- package/dist/esm/vercel/build/generate/createSsrServerlessFunction.native.js.map +1 -1
- package/dist/esm/vite/dom/browser.mjs +147 -0
- package/dist/esm/vite/dom/browser.mjs.map +1 -0
- package/dist/esm/vite/dom/browser.native.js +193 -0
- package/dist/esm/vite/dom/browser.native.js.map +1 -0
- package/dist/esm/vite/dom/directive.mjs +51 -0
- package/dist/esm/vite/dom/directive.mjs.map +1 -0
- package/dist/esm/vite/dom/directive.native.js +108 -0
- package/dist/esm/vite/dom/directive.native.js.map +1 -0
- package/dist/esm/vite/dom/registry.mjs +52 -0
- package/dist/esm/vite/dom/registry.mjs.map +1 -0
- package/dist/esm/vite/dom/registry.native.js +163 -0
- package/dist/esm/vite/dom/registry.native.js.map +1 -0
- package/dist/esm/vite/one.mjs +28 -3
- package/dist/esm/vite/one.mjs.map +1 -1
- package/dist/esm/vite/one.native.js +35 -10
- package/dist/esm/vite/one.native.js.map +1 -1
- package/dist/esm/vite/plugins/clientTreeShakePlugin.mjs +1 -1
- package/dist/esm/vite/plugins/clientTreeShakePlugin.mjs.map +1 -1
- package/dist/esm/vite/plugins/clientTreeShakePlugin.native.js +1 -1
- package/dist/esm/vite/plugins/clientTreeShakePlugin.native.js.map +1 -1
- package/dist/esm/vite/plugins/environmentGuardPlugin.mjs +6 -1
- package/dist/esm/vite/plugins/environmentGuardPlugin.mjs.map +1 -1
- package/dist/esm/vite/plugins/environmentGuardPlugin.native.js +6 -1
- package/dist/esm/vite/plugins/environmentGuardPlugin.native.js.map +1 -1
- package/dist/esm/vite/plugins/fileSystemRouterPlugin.mjs +11 -7
- package/dist/esm/vite/plugins/fileSystemRouterPlugin.mjs.map +1 -1
- package/dist/esm/vite/plugins/fileSystemRouterPlugin.native.js +13 -7
- package/dist/esm/vite/plugins/fileSystemRouterPlugin.native.js.map +1 -1
- package/dist/esm/vite/plugins/generateFileSystemRouteTypesPlugin.mjs +8 -2
- package/dist/esm/vite/plugins/generateFileSystemRouteTypesPlugin.mjs.map +1 -1
- package/dist/esm/vite/plugins/generateFileSystemRouteTypesPlugin.native.js +8 -2
- package/dist/esm/vite/plugins/generateFileSystemRouteTypesPlugin.native.js.map +1 -1
- package/dist/esm/vite/plugins/iosLinkSetPlugin.mjs +44 -0
- package/dist/esm/vite/plugins/iosLinkSetPlugin.mjs.map +1 -0
- package/dist/esm/vite/plugins/iosLinkSetPlugin.native.js +48 -0
- package/dist/esm/vite/plugins/iosLinkSetPlugin.native.js.map +1 -0
- package/dist/esm/vite/plugins/loaderSearchSchemasPlugin.mjs +48 -0
- package/dist/esm/vite/plugins/loaderSearchSchemasPlugin.mjs.map +1 -0
- package/dist/esm/vite/plugins/loaderSearchSchemasPlugin.native.js +86 -0
- package/dist/esm/vite/plugins/loaderSearchSchemasPlugin.native.js.map +1 -0
- package/dist/esm/vite/plugins/useDomPlugin.mjs +128 -22
- package/dist/esm/vite/plugins/useDomPlugin.mjs.map +1 -1
- package/dist/esm/vite/plugins/useDomPlugin.native.js +160 -22
- package/dist/esm/vite/plugins/useDomPlugin.native.js.map +1 -1
- package/env.d.ts +6 -6
- package/ios/DOM/OneDOMHostView.swift +389 -0
- package/ios/DOM/OneDOMResourceHandler.swift +147 -0
- package/ios/DOM/README.md +5 -0
- package/ios/Generated/OneNativeAddPassToWalletButtonComponentView.mm +11 -0
- package/ios/Generated/OneNativeAddPassToWalletButtonView.swift +4 -0
- package/ios/Generated/OneNativeChartComponentView.mm +10 -0
- package/ios/Generated/OneNativeChartView.swift +3 -0
- package/ios/Generated/OneNativeLivePhotoViewComponentView.mm +10 -0
- package/ios/Generated/OneNativeLivePhotoViewView.swift +4 -0
- package/ios/Generated/OneNativePayWithApplePayButtonComponentView.mm +11 -0
- package/ios/Generated/OneNativePayWithApplePayButtonView.swift +4 -0
- package/ios/Generated/OneNativePhotosPickerComponentView.mm +11 -0
- package/ios/Generated/OneNativePhotosPickerView.swift +4 -0
- package/ios/Generated/OneNativeProductViewComponentView.mm +11 -0
- package/ios/Generated/OneNativeProductViewView.swift +4 -0
- package/ios/Generated/OneNativeQuickLookComponentView.mm +10 -0
- package/ios/Generated/OneNativeQuickLookView.swift +4 -0
- package/ios/Generated/OneNativeSignInWithAppleButtonComponentView.mm +11 -0
- package/ios/Generated/OneNativeSignInWithAppleButtonView.swift +4 -0
- package/ios/Generated/OneNativeStoreViewComponentView.mm +11 -0
- package/ios/Generated/OneNativeStoreViewView.swift +4 -0
- package/ios/Generated/OneNativeSubscriptionStoreViewComponentView.mm +11 -0
- package/ios/Generated/OneNativeSubscriptionStoreViewView.swift +3 -0
- package/ios/Generated/OneNativeSwiftUI.swift +10 -0
- package/ios/Generated/OneNativeViewSlots.swift +16 -0
- package/ios/Nitro/HybridOneAppleAuth.swift +2 -0
- package/ios/Nitro/HybridOneBrowser.swift +2 -0
- package/ios/Nitro/HybridOneImagePicker.swift +2 -0
- package/ios/Nitro/HybridOneMailCompose.swift +2 -0
- package/ios/Nitro/HybridOneMessageCompose.swift +2 -0
- package/ios/Nitro/HybridOnePhotoLibrary.swift +10 -0
- package/ios/Nitro/HybridOnePurchases.swift +2 -0
- package/ios/Nitro/HybridOneStoreReview.swift +37 -0
- package/ios/Nitro/OneUpdatesLauncher.swift +24 -0
- package/ios/OneDOMHostComponentView.h +5 -0
- package/ios/OneDOMHostComponentView.mm +85 -0
- package/ios/OneNativeStyle.swift +426 -1
- package/ios-link-set.json +196 -0
- package/linux/cpp/CMakeLists.txt +160 -0
- package/linux/cpp/OneLinuxControlState.h +42 -0
- package/linux/cpp/OneLinuxControls.cpp +53 -0
- package/linux/cpp/OneLinuxControls.h +70 -0
- package/linux/cpp/OneLinuxNavigationComponent.h +86 -0
- package/linux/cpp/compat/OneLinuxStdCompat.h +6 -0
- package/linux/cpp/compat/OneLinuxThreadName.h +7 -0
- package/linux/cpp/deps/CMakeLists.txt +29 -0
- package/linux/cpp/deps/cmake-utils/react-native-flags.cmake +15 -0
- package/linux/cpp/imagemanager/OneLinuxImageManager.cpp +213 -0
- package/linux/cpp/nitro/NitroLinuxPlatform.cpp +67 -0
- package/linux/cpp/textlayoutmanager/OneLinuxText.cpp +258 -0
- package/linux/cpp/textlayoutmanager/OneLinuxText.h +34 -0
- package/linux/cpp/textlayoutmanager/react/renderer/textlayoutmanager/TextLayoutManager.cpp +101 -0
- package/linux/cpp/textlayoutmanager/react/renderer/textlayoutmanager/TextLayoutManager.h +35 -0
- package/linux/host/OneLinuxAppShell.cpp +267 -0
- package/linux/host/OneLinuxAppShell.h +46 -0
- package/linux/host/OneLinuxControl.cpp +515 -0
- package/linux/host/OneLinuxControl.h +23 -0
- package/linux/host/OneLinuxControlledValue.h +51 -0
- package/linux/host/OneLinuxHost.cpp +381 -0
- package/linux/host/OneLinuxHost.h +64 -0
- package/linux/host/OneLinuxModules.cpp +63 -0
- package/linux/host/OneLinuxModules.h +20 -0
- package/linux/host/OneLinuxMountingManager.cpp +747 -0
- package/linux/host/OneLinuxMountingManager.h +86 -0
- package/linux/host/OneLinuxNavigation.cpp +202 -0
- package/linux/host/OneLinuxNavigation.h +45 -0
- package/linux/host/OneLinuxNetwork.cpp +513 -0
- package/linux/host/OneLinuxNetwork.h +31 -0
- package/linux/host/OneLinuxNitro.cpp +24 -0
- package/linux/host/OneLinuxNitro.h +15 -0
- package/linux/host/OneLinuxOpSqlite.cpp +79 -0
- package/linux/host/OneLinuxOpSqlite.h +15 -0
- package/linux/host/OneLinuxPointer.cpp +373 -0
- package/linux/host/OneLinuxPointer.h +57 -0
- package/linux/host/OneLinuxRuntime.cpp +204 -0
- package/linux/host/OneLinuxRuntime.h +80 -0
- package/linux/host/OneLinuxStartup.cpp +58 -0
- package/linux/host/OneLinuxStartup.h +9 -0
- package/linux/host/OneLinuxTextInput.cpp +585 -0
- package/linux/host/OneLinuxTextInput.h +99 -0
- package/linux/host/OneLinuxView.cpp +540 -0
- package/linux/host/OneLinuxView.h +75 -0
- package/linux/host/OneLinuxWorklets.cpp +210 -0
- package/linux/host/OneLinuxWorklets.h +20 -0
- package/linux/host/main.cpp +89 -0
- package/linux/react-native/Libraries/Utilities/Platform.js +22 -0
- package/linux/scripts/build-core.sh +48 -0
- package/linux/scripts/bundle-js.sh +27 -0
- package/linux/scripts/cache.sh +22 -0
- package/linux/scripts/lima-vm.sh +26 -0
- package/linux/scripts/package-app.sh +118 -0
- package/linux/scripts/package-core.sh +20 -0
- package/linux/scripts/prepare-core.sh +54 -0
- package/linux/scripts/prepare-deps.sh +102 -0
- package/linux/scripts/prepare-hermes.sh +64 -0
- package/linux/scripts/prepare-icu.sh +40 -0
- package/linux/scripts/screenshot.sh +67 -0
- package/linux/smoke/main.cpp +228 -0
- package/linux/smoke/smoke.js +1 -0
- package/macos/README.md +170 -0
- package/macos/cpp/.gitkeep +0 -0
- package/macos/cpp/CMakeLists.txt +157 -0
- package/macos/cpp/OneMacButton/OneMacButtonComponentDescriptor.h +11 -0
- package/macos/cpp/OneMacButton/OneMacButtonEventEmitter.cpp +7 -0
- package/macos/cpp/OneMacButton/OneMacButtonEventEmitter.h +11 -0
- package/macos/cpp/OneMacButton/OneMacButtonProps.cpp +11 -0
- package/macos/cpp/OneMacButton/OneMacButtonProps.h +17 -0
- package/macos/cpp/OneMacButton/OneMacButtonShadowNode.h +28 -0
- package/macos/cpp/OneMacButton/OneMacButtonShadowNode.mm +15 -0
- package/macos/cpp/OneMacImage/OneMacImageComponentDescriptor.h +6 -0
- package/macos/cpp/OneMacImage/OneMacImageProps.cpp +11 -0
- package/macos/cpp/OneMacImage/OneMacImageProps.h +14 -0
- package/macos/cpp/OneMacImage/OneMacImageShadowNode.cpp +9 -0
- package/macos/cpp/OneMacImage/OneMacImageShadowNode.h +18 -0
- package/macos/cpp/OneMacPopUpButton/OneMacPopUpButtonComponentDescriptor.h +11 -0
- package/macos/cpp/OneMacPopUpButton/OneMacPopUpButtonEventEmitter.cpp +7 -0
- package/macos/cpp/OneMacPopUpButton/OneMacPopUpButtonEventEmitter.h +14 -0
- package/macos/cpp/OneMacPopUpButton/OneMacPopUpButtonProps.cpp +11 -0
- package/macos/cpp/OneMacPopUpButton/OneMacPopUpButtonProps.h +17 -0
- package/macos/cpp/OneMacPopUpButton/OneMacPopUpButtonShadowNode.h +28 -0
- package/macos/cpp/OneMacPopUpButton/OneMacPopUpButtonShadowNode.mm +16 -0
- package/macos/cpp/OneMacSegmentedControl/OneMacSegmentedControlComponentDescriptor.h +11 -0
- package/macos/cpp/OneMacSegmentedControl/OneMacSegmentedControlEventEmitter.cpp +7 -0
- package/macos/cpp/OneMacSegmentedControl/OneMacSegmentedControlEventEmitter.h +14 -0
- package/macos/cpp/OneMacSegmentedControl/OneMacSegmentedControlProps.cpp +12 -0
- package/macos/cpp/OneMacSegmentedControl/OneMacSegmentedControlProps.h +18 -0
- package/macos/cpp/OneMacSegmentedControl/OneMacSegmentedControlShadowNode.h +28 -0
- package/macos/cpp/OneMacSegmentedControl/OneMacSegmentedControlShadowNode.mm +15 -0
- package/macos/cpp/OneMacToggle/OneMacToggleComponentDescriptor.h +11 -0
- package/macos/cpp/OneMacToggle/OneMacToggleEventEmitter.cpp +13 -0
- package/macos/cpp/OneMacToggle/OneMacToggleEventEmitter.h +20 -0
- package/macos/cpp/OneMacToggle/OneMacToggleProps.cpp +17 -0
- package/macos/cpp/OneMacToggle/OneMacToggleProps.h +23 -0
- package/macos/cpp/OneMacToggle/OneMacToggleShadowNode.h +29 -0
- package/macos/cpp/OneMacToggle/OneMacToggleShadowNode.mm +27 -0
- package/macos/cpp/graphics/react/renderer/graphics/HostPlatformColor.h +129 -0
- package/macos/cpp/graphics/react/renderer/graphics/HostPlatformColor.mm +83 -0
- package/macos/cpp/graphics/react/renderer/graphics/PlatformColorParser.h +20 -0
- package/macos/cpp/graphics/react/renderer/graphics/PlatformColorParser.mm +38 -0
- package/macos/cpp/textlayoutmanager/OneMacosText.h +22 -0
- package/macos/cpp/textlayoutmanager/OneMacosText.mm +207 -0
- package/macos/cpp/textlayoutmanager/react/renderer/textlayoutmanager/TextLayoutManager.h +35 -0
- package/macos/cpp/textlayoutmanager/react/renderer/textlayoutmanager/TextLayoutManager.mm +74 -0
- package/macos/host/.gitkeep +0 -0
- package/macos/host/OneMacosAnimated.mm +91 -0
- package/macos/host/OneMacosAppCommands.h +36 -0
- package/macos/host/OneMacosAppCommands.mm +731 -0
- package/macos/host/OneMacosBlobStore.h +9 -0
- package/macos/host/OneMacosBlobStore.mm +50 -0
- package/macos/host/OneMacosButtonComponentView.h +3 -0
- package/macos/host/OneMacosButtonComponentView.mm +55 -0
- package/macos/host/OneMacosComponentView.h +67 -0
- package/macos/host/OneMacosComponentView.mm +533 -0
- package/macos/host/OneMacosControlsHosting.h +26 -0
- package/macos/host/OneMacosDebug.h +6 -0
- package/macos/host/OneMacosDebug.mm +337 -0
- package/macos/host/OneMacosImageComponentView.h +6 -0
- package/macos/host/OneMacosImageComponentView.mm +245 -0
- package/macos/host/OneMacosImageManager.mm +91 -0
- package/macos/host/OneMacosModules.h +35 -0
- package/macos/host/OneMacosModules.mm +287 -0
- package/macos/host/OneMacosMountingManager.h +36 -0
- package/macos/host/OneMacosMountingManager.mm +285 -0
- package/macos/host/OneMacosNetworking.h +13 -0
- package/macos/host/OneMacosNetworking.mm +263 -0
- package/macos/host/OneMacosOpSqlite.h +15 -0
- package/macos/host/OneMacosOpSqlite.mm +74 -0
- package/macos/host/OneMacosParagraphComponentView.h +4 -0
- package/macos/host/OneMacosParagraphComponentView.mm +35 -0
- package/macos/host/OneMacosPointerHandler.h +27 -0
- package/macos/host/OneMacosPointerHandler.mm +405 -0
- package/macos/host/OneMacosPopUpButtonComponentView.h +3 -0
- package/macos/host/OneMacosPopUpButtonComponentView.mm +50 -0
- package/macos/host/OneMacosRootView.h +21 -0
- package/macos/host/OneMacosRootView.mm +520 -0
- package/macos/host/OneMacosRuntime.h +46 -0
- package/macos/host/OneMacosRuntime.mm +133 -0
- package/macos/host/OneMacosScrollViewComponentView.h +6 -0
- package/macos/host/OneMacosScrollViewComponentView.mm +240 -0
- package/macos/host/OneMacosSegmentedControlComponentView.h +3 -0
- package/macos/host/OneMacosSegmentedControlComponentView.mm +51 -0
- package/macos/host/OneMacosSymbolImageComponentView.h +3 -0
- package/macos/host/OneMacosSymbolImageComponentView.mm +67 -0
- package/macos/host/OneMacosTextInputComponentView.h +7 -0
- package/macos/host/OneMacosTextInputComponentView.mm +729 -0
- package/macos/host/OneMacosToggleComponentView.h +4 -0
- package/macos/host/OneMacosToggleComponentView.mm +57 -0
- package/macos/host/OneMacosToggleHosting.h +15 -0
- package/macos/host/OneMacosWebSocket.h +22 -0
- package/macos/host/OneMacosWebSocket.mm +161 -0
- package/macos/host/OneMacosWorklets.cpp +139 -0
- package/macos/host/OneMacosWorklets.h +29 -0
- package/macos/host/OneMacosWorkletsPlatform.mm +88 -0
- package/macos/host/swift/OneMacControls.swift +155 -0
- package/macos/host/swift/OneMacToggle.swift +71 -0
- package/macos/react-native/Libraries/Utilities/Platform.js +22 -0
- package/macos/template/macos/OneApp/Info.plist +31 -0
- package/macos/template/macos/OneApp/OneApp-Bridging-Header.h +3 -0
- package/macos/template/macos/OneApp/OneApp.swift +20 -0
- package/macos/template/macos/scripts/build-core.sh +29 -0
- package/macos/template/macos/scripts/bundle-js.sh +29 -0
- package/macos/template/macos/scripts/embed-deps.sh +20 -0
- package/macos/template/macos/scripts/embed-hermes.sh +10 -0
- package/macos/template/macos/scripts/prepare-deps.sh +29 -0
- package/macos/template/macos/scripts/prepare-hermes.sh +29 -0
- package/native-core/host/OneHostCommandPredicate.h +118 -0
- package/native-core/host/OneHostModule.h +125 -0
- package/native-core/host/OneHostModules.cpp +355 -0
- package/native-core/host/OneHostModules.h +20 -0
- package/native-core/host/OneHostRuntime.cpp +314 -0
- package/native-core/host/OneHostRuntime.h +153 -0
- package/native-core/rn-core.cmake +101 -0
- package/nitrogen/generated/ios/One-Swift-Cxx-Bridge.cpp +17 -0
- package/nitrogen/generated/ios/One-Swift-Cxx-Bridge.hpp +19 -2
- package/nitrogen/generated/ios/One-Swift-Cxx-Umbrella.hpp +5 -0
- package/nitrogen/generated/ios/OneAutolinking.mm +22 -0
- package/nitrogen/generated/ios/OneAutolinking.swift +42 -16
- package/nitrogen/generated/ios/c++/HybridOneStoreReviewSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridOneStoreReviewSpecSwift.hpp +82 -0
- package/nitrogen/generated/ios/swift/HybridOneStoreReviewSpec.swift +55 -0
- package/nitrogen/generated/ios/swift/HybridOneStoreReviewSpec_cxx.swift +145 -0
- package/package.json +47 -18
- package/react-native.config.cjs +1 -0
- package/src/cli/build.ts +1 -1
- package/src/cli/iosLinkSet.ts +86 -0
- package/src/cli/iosLinkSetAnalysis.ts +411 -0
- package/src/cli/prebuild.ts +8 -1
- package/src/cli/updatesPublish.ts +25 -24
- package/src/cli.ts +3 -1
- package/src/createApp.tsx +5 -0
- package/src/createHandleRequest.ts +6 -32
- package/src/dom/README.md +27 -0
- package/src/dom/browserBridge.ts +185 -0
- package/src/dom/client.tsx +75 -0
- package/src/dom/context.ts +4 -0
- package/src/dom/host.native.tsx +137 -0
- package/src/dom/index.ts +109 -0
- package/src/dom/measure.ts +32 -0
- package/src/dom/nativeBridge.ts +143 -0
- package/src/dom/peer.ts +150 -0
- package/src/dom/protocol.ts +171 -0
- package/src/dom/serialize.ts +126 -0
- package/src/dom/types.ts +38 -0
- package/src/fork/getPathFromState.test.ts +14 -0
- package/src/fork/getPathFromState.ts +10 -1
- package/src/hooks.tsx +129 -2
- package/src/index.ts +10 -0
- package/src/interfaces/router.ts +63 -1
- package/src/layouts/Tabs.linux.tsx +15 -0
- package/src/layouts/stack-navigator-desktop.tsx +8 -0
- package/src/layouts/stack-navigator.linux.tsx +12 -0
- package/src/layouts/stack-navigator.macos.tsx +9 -0
- package/src/layouts/stack-utils/StackToolbarBottomHost.linux.tsx +1 -0
- package/src/layouts/stack-utils/StackToolbarBottomHost.macos.tsx +17 -0
- package/src/link/Link.tsx +5 -3
- package/src/link/Link.web.tsx +8 -3
- package/src/loaderResponseToModule.ts +42 -0
- package/src/loaderSearchParams.ts +115 -0
- package/src/one-shared.ts +361 -0
- package/src/one.linux.ts +42 -0
- package/src/one.macos.ts +29 -0
- package/src/one.ts +2 -303
- package/src/platform/adaptive/fixed.ts +27 -0
- package/src/platform/adaptive/index.linux.ts +1 -0
- package/src/platform/adaptive/index.macos.ts +11 -0
- package/src/platform/adaptive/index.ts +1 -26
- package/src/platform/controlTypes.ts +12 -0
- package/src/platform/desktop/appCommandTypes.ts +33 -0
- package/src/platform/desktop/createAppCommands.ts +40 -0
- package/src/platform/desktop/createControls.tsx +64 -0
- package/src/platform/linux/AppCommands.linux.ts +6 -0
- package/src/platform/linux/Button.linux.tsx +15 -0
- package/src/platform/linux/DropDown.linux.tsx +50 -0
- package/src/platform/linux/NavigationView.linux.tsx +80 -0
- package/src/platform/linux/OneLinuxButtonNativeComponent.ts +23 -0
- package/src/platform/linux/OneLinuxDropDownNativeComponent.ts +35 -0
- package/src/platform/linux/OneLinuxNavigationNativeComponent.ts +21 -0
- package/src/platform/linux/OneLinuxProgressBarNativeComponent.ts +10 -0
- package/src/platform/linux/OneLinuxSecureFieldNativeComponent.ts +16 -0
- package/src/platform/linux/OneLinuxSegmentedControlNativeComponent.ts +24 -0
- package/src/platform/linux/OneLinuxSliderNativeComponent.ts +29 -0
- package/src/platform/linux/OneLinuxStepperNativeComponent.ts +27 -0
- package/src/platform/linux/OneLinuxSwitchNativeComponent.ts +20 -0
- package/src/platform/linux/OneLinuxTextFieldNativeComponent.ts +16 -0
- package/src/platform/linux/OneLinuxToggleNativeComponent.ts +14 -0
- package/src/platform/linux/ProgressBar.linux.tsx +21 -0
- package/src/platform/linux/SecureField.linux.tsx +7 -0
- package/src/platform/linux/SegmentedControl.linux.tsx +13 -0
- package/src/platform/linux/Slider.linux.tsx +67 -0
- package/src/platform/linux/Stepper.linux.tsx +52 -0
- package/src/platform/linux/Switch.linux.tsx +23 -0
- package/src/platform/linux/TextField.linux.tsx +27 -0
- package/src/platform/linux/Toggle.linux.tsx +12 -0
- package/src/platform/linux/Window.linux.ts +12 -0
- package/src/platform/mac/AppCommands.macos.ts +8 -0
- package/src/platform/mac/Button.macos.tsx +12 -0
- package/src/platform/mac/Image.macos.tsx +41 -0
- package/src/platform/mac/OneMacButtonNativeComponent.ts +14 -0
- package/src/platform/mac/OneMacImageNativeComponent.ts +12 -0
- package/src/platform/mac/OneMacPopUpButtonNativeComponent.ts +20 -0
- package/src/platform/mac/OneMacSegmentedControlNativeComponent.ts +21 -0
- package/src/platform/mac/OneMacToggleNativeComponent.ts +21 -0
- package/src/platform/mac/PopUpButton.macos.tsx +31 -0
- package/src/platform/mac/SegmentedControl.macos.tsx +11 -0
- package/src/platform/mac/Toggle.macos.tsx +12 -0
- package/src/platform/specs/OneDOMHostNativeComponent.ts +30 -0
- package/src/platform/specs/OneStoreReview.nitro.ts +1 -1
- package/src/platform/split-view/split-view.linux.tsx +1 -0
- package/src/platform/split-view/split-view.macos.tsx +26 -0
- package/src/platform/ui/Image.linux.tsx +1 -0
- package/src/platform/ui/Image.macos.tsx +9 -0
- package/src/router/getRoutes.ts +1 -1
- package/src/router/router.ts +61 -13
- package/src/searchParams.ts +163 -0
- package/src/server/oneServe.ts +33 -3
- package/src/server/workerHandler.ts +27 -3
- package/src/standardSchema.ts +82 -0
- package/src/typed-routes/generateRouteTypes.ts +49 -3
- package/src/typed-routes/getTypedRoutesDeclarationFile.ts +62 -10
- package/src/typed-routes/searchParamSchemas.ts +377 -0
- package/src/typed-routes/searchSchemaEntries.ts +22 -0
- package/src/types.ts +15 -2
- package/src/useLoader.ts +91 -43
- package/src/utils/cleanUrl.ts +43 -2
- package/src/validateParams.ts +3 -14
- package/src/{validateSearch.ts → validateSearchParams.ts} +33 -33
- package/src/vercel/build/generate/createSsrServerlessFunction.ts +36 -2
- package/src/vite/dom/README.md +91 -0
- package/src/vite/dom/browser.ts +152 -0
- package/src/vite/dom/build.test.ts +204 -0
- package/src/vite/dom/directive.ts +76 -0
- package/src/vite/dom/registry.ts +67 -0
- package/src/vite/one-defines.test.ts +59 -1
- package/src/vite/one.ts +59 -3
- package/src/vite/plugins/clientTreeShakePlugin.ts +7 -1
- package/src/vite/plugins/environmentGuardPlugin.ts +4 -4
- package/src/vite/plugins/fileSystemRouterPlugin.tsx +33 -7
- package/src/vite/plugins/generateFileSystemRouteTypesPlugin.tsx +10 -2
- package/src/vite/plugins/iosLinkSetPlugin.ts +64 -0
- package/src/vite/plugins/iosSdkPlugin.ts +4 -1
- package/src/vite/plugins/kotlinSourcePlugin.ts +4 -1
- package/src/vite/plugins/loaderSearchSchemasPlugin.ts +69 -0
- package/src/vite/plugins/swiftPackagePlugin.ts +4 -1
- package/src/vite/plugins/useDomPlugin.ts +182 -35
- package/src/vite/types.ts +5 -1
- package/types/cli/build.d.ts +1 -1
- package/types/cli/build.d.ts.map +1 -1
- package/types/cli/iosLinkSet.d.ts +9 -0
- package/types/cli/iosLinkSet.d.ts.map +1 -0
- package/types/cli/iosLinkSetAnalysis.d.ts +25 -0
- package/types/cli/iosLinkSetAnalysis.d.ts.map +1 -0
- package/types/cli/prebuild.d.ts.map +1 -1
- package/types/cli/updatesPublish.d.ts.map +1 -1
- package/types/createApp.d.ts +8 -0
- package/types/createApp.d.ts.map +1 -1
- package/types/createHandleRequest.d.ts.map +1 -1
- package/types/dom/browserBridge.d.ts +34 -0
- package/types/dom/browserBridge.d.ts.map +1 -0
- package/types/dom/client.d.ts +8 -0
- package/types/dom/client.d.ts.map +1 -0
- package/types/dom/context.d.ts +3 -0
- package/types/dom/context.d.ts.map +1 -0
- package/types/dom/host.native.d.ts +6 -0
- package/types/dom/host.native.d.ts.map +1 -0
- package/types/dom/index.d.ts +8 -0
- package/types/dom/index.d.ts.map +1 -0
- package/types/dom/measure.d.ts +3 -0
- package/types/dom/measure.d.ts.map +1 -0
- package/types/dom/nativeBridge.d.ts +32 -0
- package/types/dom/nativeBridge.d.ts.map +1 -0
- package/types/dom/peer.d.ts +26 -0
- package/types/dom/peer.d.ts.map +1 -0
- package/types/dom/protocol.d.ts +54 -0
- package/types/dom/protocol.d.ts.map +1 -0
- package/types/dom/serialize.d.ts +21 -0
- package/types/dom/serialize.d.ts.map +1 -0
- package/types/dom/types.d.ts +32 -0
- package/types/dom/types.d.ts.map +1 -0
- package/types/fork/getPathFromState.d.ts.map +1 -1
- package/types/hooks.d.ts +30 -3
- package/types/hooks.d.ts.map +1 -1
- package/types/index.d.ts +3 -0
- package/types/index.d.ts.map +1 -1
- package/types/interfaces/router.d.ts +41 -1
- package/types/interfaces/router.d.ts.map +1 -1
- package/types/layouts/Tabs.linux.d.ts +212 -0
- package/types/layouts/Tabs.linux.d.ts.map +1 -0
- package/types/layouts/stack-navigator-desktop.d.ts +9 -0
- package/types/layouts/stack-navigator-desktop.d.ts.map +1 -0
- package/types/layouts/stack-navigator.linux.d.ts +3 -0
- package/types/layouts/stack-navigator.linux.d.ts.map +1 -0
- package/types/layouts/stack-navigator.macos.d.ts +7 -0
- package/types/layouts/stack-navigator.macos.d.ts.map +1 -0
- package/types/layouts/stack-utils/StackToolbarBottomHost.linux.d.ts +2 -0
- package/types/layouts/stack-utils/StackToolbarBottomHost.linux.d.ts.map +1 -0
- package/types/layouts/stack-utils/StackToolbarBottomHost.macos.d.ts +8 -0
- package/types/layouts/stack-utils/StackToolbarBottomHost.macos.d.ts.map +1 -0
- package/types/link/Link.d.ts.map +1 -1
- package/types/link/Link.web.d.ts.map +1 -1
- package/types/loaderResponseToModule.d.ts +7 -0
- package/types/loaderResponseToModule.d.ts.map +1 -0
- package/types/loaderSearchParams.d.ts +30 -0
- package/types/loaderSearchParams.d.ts.map +1 -0
- package/types/one-shared.d.ts +151 -0
- package/types/one-shared.d.ts.map +1 -0
- package/types/one.d.ts +1 -100
- package/types/one.d.ts.map +1 -1
- package/types/one.linux.d.ts +3 -0
- package/types/one.linux.d.ts.map +1 -0
- package/types/one.macos.d.ts +3 -0
- package/types/one.macos.d.ts.map +1 -0
- package/types/platform/adaptive/fixed.d.ts +7 -0
- package/types/platform/adaptive/fixed.d.ts.map +1 -0
- package/types/platform/adaptive/index.d.ts +1 -6
- package/types/platform/adaptive/index.d.ts.map +1 -1
- package/types/platform/adaptive/index.linux.d.ts +2 -0
- package/types/platform/adaptive/index.linux.d.ts.map +1 -0
- package/types/platform/adaptive/index.macos.d.ts +6 -0
- package/types/platform/adaptive/index.macos.d.ts.map +1 -0
- package/types/platform/controlTypes.d.ts +18 -0
- package/types/platform/controlTypes.d.ts.map +1 -0
- package/types/platform/desktop/appCommandTypes.d.ts +41 -0
- package/types/platform/desktop/appCommandTypes.d.ts.map +1 -0
- package/types/platform/desktop/createAppCommands.d.ts +6 -0
- package/types/platform/desktop/createAppCommands.d.ts.map +1 -0
- package/types/platform/desktop/createControls.d.ts +31 -0
- package/types/platform/desktop/createControls.d.ts.map +1 -0
- package/types/platform/linux/AppCommands.linux.d.ts +8 -0
- package/types/platform/linux/AppCommands.linux.d.ts.map +1 -0
- package/types/platform/linux/Button.linux.d.ts +4 -0
- package/types/platform/linux/Button.linux.d.ts.map +1 -0
- package/types/platform/linux/DropDown.linux.d.ts +26 -0
- package/types/platform/linux/DropDown.linux.d.ts.map +1 -0
- package/types/platform/linux/NavigationView.linux.d.ts +7 -0
- package/types/platform/linux/NavigationView.linux.d.ts.map +1 -0
- package/types/platform/linux/OneLinuxButtonNativeComponent.d.ts +17 -0
- package/types/platform/linux/OneLinuxButtonNativeComponent.d.ts.map +1 -0
- package/types/platform/linux/OneLinuxDropDownNativeComponent.d.ts +29 -0
- package/types/platform/linux/OneLinuxDropDownNativeComponent.d.ts.map +1 -0
- package/types/platform/linux/OneLinuxNavigationNativeComponent.d.ts +23 -0
- package/types/platform/linux/OneLinuxNavigationNativeComponent.d.ts.map +1 -0
- package/types/platform/linux/OneLinuxProgressBarNativeComponent.d.ts +9 -0
- package/types/platform/linux/OneLinuxProgressBarNativeComponent.d.ts.map +1 -0
- package/types/platform/linux/OneLinuxSecureFieldNativeComponent.d.ts +22 -0
- package/types/platform/linux/OneLinuxSecureFieldNativeComponent.d.ts.map +1 -0
- package/types/platform/linux/OneLinuxSegmentedControlNativeComponent.d.ts +18 -0
- package/types/platform/linux/OneLinuxSegmentedControlNativeComponent.d.ts.map +1 -0
- package/types/platform/linux/OneLinuxSliderNativeComponent.d.ts +26 -0
- package/types/platform/linux/OneLinuxSliderNativeComponent.d.ts.map +1 -0
- package/types/platform/linux/OneLinuxStepperNativeComponent.d.ts +21 -0
- package/types/platform/linux/OneLinuxStepperNativeComponent.d.ts.map +1 -0
- package/types/platform/linux/OneLinuxSwitchNativeComponent.d.ts +16 -0
- package/types/platform/linux/OneLinuxSwitchNativeComponent.d.ts.map +1 -0
- package/types/platform/linux/OneLinuxTextFieldNativeComponent.d.ts +22 -0
- package/types/platform/linux/OneLinuxTextFieldNativeComponent.d.ts.map +1 -0
- package/types/platform/linux/OneLinuxToggleNativeComponent.d.ts +18 -0
- package/types/platform/linux/OneLinuxToggleNativeComponent.d.ts.map +1 -0
- package/types/platform/linux/ProgressBar.linux.d.ts +7 -0
- package/types/platform/linux/ProgressBar.linux.d.ts.map +1 -0
- package/types/platform/linux/SecureField.linux.d.ts +4 -0
- package/types/platform/linux/SecureField.linux.d.ts.map +1 -0
- package/types/platform/linux/SegmentedControl.linux.d.ts +5 -0
- package/types/platform/linux/SegmentedControl.linux.d.ts.map +1 -0
- package/types/platform/linux/Slider.linux.d.ts +19 -0
- package/types/platform/linux/Slider.linux.d.ts.map +1 -0
- package/types/platform/linux/Stepper.linux.d.ts +11 -0
- package/types/platform/linux/Stepper.linux.d.ts.map +1 -0
- package/types/platform/linux/Switch.linux.d.ts +9 -0
- package/types/platform/linux/Switch.linux.d.ts.map +1 -0
- package/types/platform/linux/TextField.linux.d.ts +13 -0
- package/types/platform/linux/TextField.linux.d.ts.map +1 -0
- package/types/platform/linux/Toggle.linux.d.ts +4 -0
- package/types/platform/linux/Toggle.linux.d.ts.map +1 -0
- package/types/platform/linux/Window.linux.d.ts +4 -0
- package/types/platform/linux/Window.linux.d.ts.map +1 -0
- package/types/platform/mac/AppCommands.macos.d.ts +7 -0
- package/types/platform/mac/AppCommands.macos.d.ts.map +1 -0
- package/types/platform/mac/Button.macos.d.ts +7 -0
- package/types/platform/mac/Button.macos.d.ts.map +1 -0
- package/types/platform/mac/Image.macos.d.ts +11 -0
- package/types/platform/mac/Image.macos.d.ts.map +1 -0
- package/types/platform/mac/OneMacButtonNativeComponent.d.ts +13 -0
- package/types/platform/mac/OneMacButtonNativeComponent.d.ts.map +1 -0
- package/types/platform/mac/OneMacImageNativeComponent.d.ts +11 -0
- package/types/platform/mac/OneMacImageNativeComponent.d.ts.map +1 -0
- package/types/platform/mac/OneMacPopUpButtonNativeComponent.d.ts +18 -0
- package/types/platform/mac/OneMacPopUpButtonNativeComponent.d.ts.map +1 -0
- package/types/platform/mac/OneMacSegmentedControlNativeComponent.d.ts +19 -0
- package/types/platform/mac/OneMacSegmentedControlNativeComponent.d.ts.map +1 -0
- package/types/platform/mac/OneMacToggleNativeComponent.d.ts +17 -0
- package/types/platform/mac/OneMacToggleNativeComponent.d.ts.map +1 -0
- package/types/platform/mac/PopUpButton.macos.d.ts +14 -0
- package/types/platform/mac/PopUpButton.macos.d.ts.map +1 -0
- package/types/platform/mac/SegmentedControl.macos.d.ts +4 -0
- package/types/platform/mac/SegmentedControl.macos.d.ts.map +1 -0
- package/types/platform/mac/Toggle.macos.d.ts +5 -0
- package/types/platform/mac/Toggle.macos.d.ts.map +1 -0
- package/types/platform/specs/OneDOMHostNativeComponent.d.ts +34 -0
- package/types/platform/specs/OneDOMHostNativeComponent.d.ts.map +1 -0
- package/types/platform/specs/OneStoreReview.nitro.d.ts +1 -0
- package/types/platform/specs/OneStoreReview.nitro.d.ts.map +1 -1
- package/types/platform/split-view/split-view.linux.d.ts +2 -0
- package/types/platform/split-view/split-view.linux.d.ts.map +1 -0
- package/types/platform/split-view/split-view.macos.d.ts +16 -0
- package/types/platform/split-view/split-view.macos.d.ts.map +1 -0
- package/types/platform/ui/Image.linux.d.ts +2 -0
- package/types/platform/ui/Image.linux.d.ts.map +1 -0
- package/types/platform/ui/Image.macos.d.ts +3 -0
- package/types/platform/ui/Image.macos.d.ts.map +1 -0
- package/types/router/createRoute.d.ts +26 -3
- package/types/router/createRoute.d.ts.map +1 -1
- package/types/router/router.d.ts +6 -0
- package/types/router/router.d.ts.map +1 -1
- package/types/searchParams.d.ts +58 -0
- package/types/searchParams.d.ts.map +1 -0
- package/types/server/oneServe.d.ts.map +1 -1
- package/types/server/workerHandler.d.ts.map +1 -1
- package/types/standardSchema.d.ts +47 -0
- package/types/standardSchema.d.ts.map +1 -0
- package/types/typed-routes/generateRouteTypes.d.ts +5 -1
- package/types/typed-routes/generateRouteTypes.d.ts.map +1 -1
- package/types/typed-routes/getTypedRoutesDeclarationFile.d.ts +8 -1
- package/types/typed-routes/getTypedRoutesDeclarationFile.d.ts.map +1 -1
- package/types/typed-routes/searchParamSchemas.d.ts +34 -0
- package/types/typed-routes/searchParamSchemas.d.ts.map +1 -0
- package/types/typed-routes/searchSchemaEntries.d.ts +9 -0
- package/types/typed-routes/searchSchemaEntries.d.ts.map +1 -0
- package/types/types.d.ts +10 -2
- package/types/types.d.ts.map +1 -1
- package/types/useLoader.d.ts +2 -2
- package/types/useLoader.d.ts.map +1 -1
- package/types/utils/cleanUrl.d.ts +11 -1
- package/types/utils/cleanUrl.d.ts.map +1 -1
- package/types/validateParams.d.ts +1 -1
- package/types/validateParams.d.ts.map +1 -1
- package/types/{validateSearch.d.ts → validateSearchParams.d.ts} +13 -19
- package/types/validateSearchParams.d.ts.map +1 -0
- package/types/vercel/build/generate/createSsrServerlessFunction.d.ts.map +1 -1
- package/types/vite/dom/browser.d.ts +8 -0
- package/types/vite/dom/browser.d.ts.map +1 -0
- package/types/vite/dom/directive.d.ts +6 -0
- package/types/vite/dom/directive.d.ts.map +1 -0
- package/types/vite/dom/registry.d.ts +23 -0
- package/types/vite/dom/registry.d.ts.map +1 -0
- package/types/vite/one.d.ts.map +1 -1
- package/types/vite/plugins/clientTreeShakePlugin.d.ts.map +1 -1
- package/types/vite/plugins/environmentGuardPlugin.d.ts +2 -2
- package/types/vite/plugins/fileSystemRouterPlugin.d.ts.map +1 -1
- package/types/vite/plugins/generateFileSystemRouteTypesPlugin.d.ts.map +1 -1
- package/types/vite/plugins/iosLinkSetPlugin.d.ts +3 -0
- package/types/vite/plugins/iosLinkSetPlugin.d.ts.map +1 -0
- package/types/vite/plugins/iosSdkPlugin.d.ts +1 -1
- package/types/vite/plugins/iosSdkPlugin.d.ts.map +1 -1
- package/types/vite/plugins/kotlinSourcePlugin.d.ts +1 -1
- package/types/vite/plugins/kotlinSourcePlugin.d.ts.map +1 -1
- package/types/vite/plugins/loaderSearchSchemasPlugin.d.ts +14 -0
- package/types/vite/plugins/loaderSearchSchemasPlugin.d.ts.map +1 -0
- package/types/vite/plugins/swiftPackagePlugin.d.ts +1 -1
- package/types/vite/plugins/swiftPackagePlugin.d.ts.map +1 -1
- package/types/vite/plugins/useDomPlugin.d.ts +8 -1
- package/types/vite/plugins/useDomPlugin.d.ts.map +1 -1
- package/types/vite/types.d.ts +5 -1
- package/types/vite/types.d.ts.map +1 -1
- package/dist/cjs/platform/store-review/backend.ios.cjs +0 -47
- package/dist/cjs/platform/store-review/backend.ios.js +0 -49
- package/dist/cjs/platform/store-review/backend.ios.js.map +0 -1
- package/dist/cjs/validateSearch.native.js.map +0 -1
- package/dist/esm/one.mjs.map +0 -1
- package/dist/esm/one.native.js.map +0 -1
- package/dist/esm/platform/adaptive/index.mjs.map +0 -1
- package/dist/esm/platform/store-review/backend.ios.js +0 -26
- package/dist/esm/platform/store-review/backend.ios.js.map +0 -1
- package/dist/esm/validateSearch.mjs.map +0 -1
- package/dist/esm/validateSearch.native.js.map +0 -1
- package/src/platform/store-review/backend.ios.ts +0 -28
- package/types/platform/store-review/backend.ios.d.ts +0 -6
- package/types/platform/store-review/backend.ios.d.ts.map +0 -1
- package/types/validateSearch.d.ts.map +0 -1
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { validateStandardSchemaSync } from "./standardSchema.mjs";
|
|
2
|
+
import { SearchValidationError, parseSearchString, setOwn } from "./validateSearchParams.mjs";
|
|
3
|
+
|
|
4
|
+
function toSearchRecord(params, href) {
|
|
5
|
+
const search = href.split("#")[0].split("?")[1] ?? "";
|
|
6
|
+
const queryKeys = new Set(new URLSearchParams(search).keys());
|
|
7
|
+
const record = {};
|
|
8
|
+
for (const [key, value] of Object.entries(params)) {
|
|
9
|
+
if (value == null || !queryKeys.has(key)) continue;
|
|
10
|
+
setOwn(record, key, Array.isArray(value) ? value.map(String) : String(value));
|
|
11
|
+
}
|
|
12
|
+
return record;
|
|
13
|
+
}
|
|
14
|
+
function searchRecordKey(record) {
|
|
15
|
+
return JSON.stringify(record);
|
|
16
|
+
}
|
|
17
|
+
function parseSearchRecord(schema, record) {
|
|
18
|
+
const result = validateStandardSchemaSync(schema, record);
|
|
19
|
+
if (result.issues) {
|
|
20
|
+
throw new SearchValidationError(`Invalid search params (${describeIssues(result.issues)})`, result.issues);
|
|
21
|
+
}
|
|
22
|
+
return result.value;
|
|
23
|
+
}
|
|
24
|
+
function describeIssues(issues) {
|
|
25
|
+
return issues.map((issue) => {
|
|
26
|
+
const path = issue.path?.map((segment) => String(typeof segment === "object" ? segment.key : segment)).join(".");
|
|
27
|
+
return path ? `${path}: ${issue.message}` : issue.message;
|
|
28
|
+
}).join("; ");
|
|
29
|
+
}
|
|
30
|
+
function toStrings(key, value) {
|
|
31
|
+
if (value == null) return void 0;
|
|
32
|
+
const values = Array.isArray(value) ? value : [value];
|
|
33
|
+
for (const item of values) {
|
|
34
|
+
const type = typeof item;
|
|
35
|
+
if (type !== "string" && type !== "number" && type !== "boolean") {
|
|
36
|
+
throw new TypeError(`Search param "${key}" cannot be written to the URL: expected a string, number, boolean or an array of those, got ${type === "object" ? item === null ? "null" : item.constructor?.name : type}. Pass the text the schema reads instead.`);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
return values.length ? values.map(String) : void 0;
|
|
40
|
+
}
|
|
41
|
+
function mergeSearchRecord(current, update) {
|
|
42
|
+
const next = { ...current };
|
|
43
|
+
for (const [key, value] of Object.entries(update)) {
|
|
44
|
+
const strings = toStrings(key, value);
|
|
45
|
+
if (!strings) {
|
|
46
|
+
delete next[key];
|
|
47
|
+
} else {
|
|
48
|
+
setOwn(next, key, strings.length === 1 && !Array.isArray(value) ? strings[0] : strings);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
return next;
|
|
52
|
+
}
|
|
53
|
+
function stringifySearchRecord(record) {
|
|
54
|
+
const parts = [];
|
|
55
|
+
for (const [key, value] of Object.entries(record)) {
|
|
56
|
+
for (const item of Array.isArray(value) ? value : [value]) {
|
|
57
|
+
parts.push(`${encodeURIComponent(key)}=${encodeURIComponent(item)}`);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
return parts.join("&");
|
|
61
|
+
}
|
|
62
|
+
function applySearchParams(href, update) {
|
|
63
|
+
if (!update) return href;
|
|
64
|
+
const hashIndex = href.indexOf("#");
|
|
65
|
+
const hash = hashIndex === -1 ? "" : href.slice(hashIndex);
|
|
66
|
+
const withoutHash = hashIndex === -1 ? href : href.slice(0, hashIndex);
|
|
67
|
+
const queryIndex = withoutHash.indexOf("?");
|
|
68
|
+
const path = queryIndex === -1 ? withoutHash : withoutHash.slice(0, queryIndex);
|
|
69
|
+
const current = queryIndex === -1 ? {} : parseSearchString(withoutHash.slice(queryIndex + 1));
|
|
70
|
+
const query = stringifySearchRecord(mergeSearchRecord(current, update));
|
|
71
|
+
return `${path}${query ? `?${query}` : ""}${hash}`;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export { applySearchParams, describeIssues, mergeSearchRecord, parseSearchRecord, searchRecordKey, stringifySearchRecord, toSearchRecord };
|
|
75
|
+
//# sourceMappingURL=searchParams.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"searchParams.js","names":[],"sources":["esm/searchParams.js"],"sourcesContent":["import { validateStandardSchemaSync } from \"./standardSchema\";\nimport { parseSearchString, SearchValidationError, setOwn } from \"./validateSearchParams\";\nfunction toSearchRecord(params, href) {\n const search = href.split(\"#\")[0].split(\"?\")[1] ?? \"\";\n const queryKeys = new Set(new URLSearchParams(search).keys());\n const record = {};\n for (const [key, value] of Object.entries(params)) {\n if (value == null || !queryKeys.has(key)) continue;\n setOwn(record, key, Array.isArray(value) ? value.map(String) : String(value));\n }\n return record;\n}\nfunction searchRecordKey(record) {\n return JSON.stringify(record);\n}\nfunction parseSearchRecord(schema, record) {\n const result = validateStandardSchemaSync(schema, record);\n if (result.issues) {\n throw new SearchValidationError(\n `Invalid search params (${describeIssues(result.issues)})`,\n result.issues\n );\n }\n return result.value;\n}\nfunction describeIssues(issues) {\n return issues.map((issue) => {\n const path = issue.path?.map((segment) => String(typeof segment === \"object\" ? segment.key : segment)).join(\".\");\n return path ? `${path}: ${issue.message}` : issue.message;\n }).join(\"; \");\n}\nfunction toStrings(key, value) {\n if (value == null) return void 0;\n const values = Array.isArray(value) ? value : [value];\n for (const item of values) {\n const type = typeof item;\n if (type !== \"string\" && type !== \"number\" && type !== \"boolean\") {\n throw new TypeError(\n `Search param \"${key}\" cannot be written to the URL: expected a string, number, boolean or an array of those, got ${type === \"object\" ? item === null ? \"null\" : item.constructor?.name : type}. Pass the text the schema reads instead.`\n );\n }\n }\n return values.length ? values.map(String) : void 0;\n}\nfunction mergeSearchRecord(current, update) {\n const next = { ...current };\n for (const [key, value] of Object.entries(update)) {\n const strings = toStrings(key, value);\n if (!strings) {\n delete next[key];\n } else {\n setOwn(next, key, strings.length === 1 && !Array.isArray(value) ? strings[0] : strings);\n }\n }\n return next;\n}\nfunction stringifySearchRecord(record) {\n const parts = [];\n for (const [key, value] of Object.entries(record)) {\n for (const item of Array.isArray(value) ? value : [value]) {\n parts.push(`${encodeURIComponent(key)}=${encodeURIComponent(item)}`);\n }\n }\n return parts.join(\"&\");\n}\nfunction applySearchParams(href, update) {\n if (!update) return href;\n const hashIndex = href.indexOf(\"#\");\n const hash = hashIndex === -1 ? \"\" : href.slice(hashIndex);\n const withoutHash = hashIndex === -1 ? href : href.slice(0, hashIndex);\n const queryIndex = withoutHash.indexOf(\"?\");\n const path = queryIndex === -1 ? withoutHash : withoutHash.slice(0, queryIndex);\n const current = queryIndex === -1 ? {} : parseSearchString(withoutHash.slice(queryIndex + 1));\n const query = stringifySearchRecord(mergeSearchRecord(current, update));\n return `${path}${query ? `?${query}` : \"\"}${hash}`;\n}\nexport {\n applySearchParams,\n describeIssues,\n mergeSearchRecord,\n parseSearchRecord,\n searchRecordKey,\n stringifySearchRecord,\n toSearchRecord\n};\n//# sourceMappingURL=searchParams.js.map\n"],"mappings":";;;;AAEA,SAAS,eAAe,QAAQ,MAAM;CACpC,MAAM,SAAS,KAAK,MAAM,GAAG,CAAC,CAAC,EAAE,CAAC,MAAM,GAAG,CAAC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9C"}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import { validateStandardSchemaSync } from "./standardSchema.native.js";
|
|
2
|
+
import { SearchValidationError, parseSearchString, setOwn } from "./validateSearchParams.native.js";
|
|
3
|
+
|
|
4
|
+
function toSearchRecord(params, href) {
|
|
5
|
+
var _href_split__split_;
|
|
6
|
+
var search = (_href_split__split_ = href.split("#")[0].split("?")[1]) !== null && _href_split__split_ !== void 0 ? _href_split__split_ : "";
|
|
7
|
+
var queryKeys = new Set(new URLSearchParams(search).keys());
|
|
8
|
+
var record = {};
|
|
9
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
|
10
|
+
try {
|
|
11
|
+
for (var _iterator = Object.entries(params)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
12
|
+
var [key, value] = _step.value;
|
|
13
|
+
if (value == null || !queryKeys.has(key)) continue;
|
|
14
|
+
setOwn(record, key, Array.isArray(value) ? value.map(String) : String(value));
|
|
15
|
+
}
|
|
16
|
+
} catch (err) {
|
|
17
|
+
_didIteratorError = true;
|
|
18
|
+
_iteratorError = err;
|
|
19
|
+
} finally {
|
|
20
|
+
try {
|
|
21
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
22
|
+
_iterator.return();
|
|
23
|
+
}
|
|
24
|
+
} finally {
|
|
25
|
+
if (_didIteratorError) {
|
|
26
|
+
throw _iteratorError;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return record;
|
|
31
|
+
}
|
|
32
|
+
function searchRecordKey(record) {
|
|
33
|
+
return JSON.stringify(record);
|
|
34
|
+
}
|
|
35
|
+
function parseSearchRecord(schema, record) {
|
|
36
|
+
var result = validateStandardSchemaSync(schema, record);
|
|
37
|
+
if (result.issues) {
|
|
38
|
+
throw new SearchValidationError(`Invalid search params (${describeIssues(result.issues)})`, result.issues);
|
|
39
|
+
}
|
|
40
|
+
return result.value;
|
|
41
|
+
}
|
|
42
|
+
function describeIssues(issues) {
|
|
43
|
+
return issues.map(function(issue) {
|
|
44
|
+
var _issue_path;
|
|
45
|
+
var path = (_issue_path = issue.path) === null || _issue_path === void 0 ? void 0 : _issue_path.map(function(segment) {
|
|
46
|
+
return String(typeof segment === "object" ? segment.key : segment);
|
|
47
|
+
}).join(".");
|
|
48
|
+
return path ? `${path}: ${issue.message}` : issue.message;
|
|
49
|
+
}).join("; ");
|
|
50
|
+
}
|
|
51
|
+
function toStrings(key, value) {
|
|
52
|
+
if (value == null) return void 0;
|
|
53
|
+
var values = Array.isArray(value) ? value : [value];
|
|
54
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
|
55
|
+
try {
|
|
56
|
+
for (var _iterator = values[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
57
|
+
var item = _step.value;
|
|
58
|
+
var type = typeof item;
|
|
59
|
+
if (type !== "string" && type !== "number" && type !== "boolean") {
|
|
60
|
+
var _item_constructor;
|
|
61
|
+
throw new TypeError(`Search param "${key}" cannot be written to the URL: expected a string, number, boolean or an array of those, got ${type === "object" ? item === null ? "null" : (_item_constructor = item.constructor) === null || _item_constructor === void 0 ? void 0 : _item_constructor.name : type}. Pass the text the schema reads instead.`);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
} catch (err) {
|
|
65
|
+
_didIteratorError = true;
|
|
66
|
+
_iteratorError = err;
|
|
67
|
+
} finally {
|
|
68
|
+
try {
|
|
69
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
70
|
+
_iterator.return();
|
|
71
|
+
}
|
|
72
|
+
} finally {
|
|
73
|
+
if (_didIteratorError) {
|
|
74
|
+
throw _iteratorError;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
return values.length ? values.map(String) : void 0;
|
|
79
|
+
}
|
|
80
|
+
function mergeSearchRecord(current, update) {
|
|
81
|
+
var next = { ...current };
|
|
82
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
|
83
|
+
try {
|
|
84
|
+
for (var _iterator = Object.entries(update)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
85
|
+
var [key, value] = _step.value;
|
|
86
|
+
var strings = toStrings(key, value);
|
|
87
|
+
if (!strings) {
|
|
88
|
+
delete next[key];
|
|
89
|
+
} else {
|
|
90
|
+
setOwn(next, key, strings.length === 1 && !Array.isArray(value) ? strings[0] : strings);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
} catch (err) {
|
|
94
|
+
_didIteratorError = true;
|
|
95
|
+
_iteratorError = err;
|
|
96
|
+
} finally {
|
|
97
|
+
try {
|
|
98
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
99
|
+
_iterator.return();
|
|
100
|
+
}
|
|
101
|
+
} finally {
|
|
102
|
+
if (_didIteratorError) {
|
|
103
|
+
throw _iteratorError;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
return next;
|
|
108
|
+
}
|
|
109
|
+
function stringifySearchRecord(record) {
|
|
110
|
+
var parts = [];
|
|
111
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
|
112
|
+
try {
|
|
113
|
+
for (var _iterator = Object.entries(record)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
114
|
+
var [key, value] = _step.value;
|
|
115
|
+
var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = void 0;
|
|
116
|
+
try {
|
|
117
|
+
for (var _iterator1 = (Array.isArray(value) ? value : [value])[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) {
|
|
118
|
+
var item = _step1.value;
|
|
119
|
+
parts.push(`${encodeURIComponent(key)}=${encodeURIComponent(item)}`);
|
|
120
|
+
}
|
|
121
|
+
} catch (err) {
|
|
122
|
+
_didIteratorError1 = true;
|
|
123
|
+
_iteratorError1 = err;
|
|
124
|
+
} finally {
|
|
125
|
+
try {
|
|
126
|
+
if (!_iteratorNormalCompletion1 && _iterator1.return != null) {
|
|
127
|
+
_iterator1.return();
|
|
128
|
+
}
|
|
129
|
+
} finally {
|
|
130
|
+
if (_didIteratorError1) {
|
|
131
|
+
throw _iteratorError1;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
} catch (err) {
|
|
137
|
+
_didIteratorError = true;
|
|
138
|
+
_iteratorError = err;
|
|
139
|
+
} finally {
|
|
140
|
+
try {
|
|
141
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
142
|
+
_iterator.return();
|
|
143
|
+
}
|
|
144
|
+
} finally {
|
|
145
|
+
if (_didIteratorError) {
|
|
146
|
+
throw _iteratorError;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
return parts.join("&");
|
|
151
|
+
}
|
|
152
|
+
function applySearchParams(href, update) {
|
|
153
|
+
if (!update) return href;
|
|
154
|
+
var hashIndex = href.indexOf("#");
|
|
155
|
+
var hash = hashIndex === -1 ? "" : href.slice(hashIndex);
|
|
156
|
+
var withoutHash = hashIndex === -1 ? href : href.slice(0, hashIndex);
|
|
157
|
+
var queryIndex = withoutHash.indexOf("?");
|
|
158
|
+
var path = queryIndex === -1 ? withoutHash : withoutHash.slice(0, queryIndex);
|
|
159
|
+
var current = queryIndex === -1 ? {} : parseSearchString(withoutHash.slice(queryIndex + 1));
|
|
160
|
+
var query = stringifySearchRecord(mergeSearchRecord(current, update));
|
|
161
|
+
return `${path}${query ? `?${query}` : ""}${hash}`;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
export { applySearchParams, describeIssues, mergeSearchRecord, parseSearchRecord, searchRecordKey, stringifySearchRecord, toSearchRecord };
|
|
165
|
+
//# sourceMappingURL=searchParams.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"searchParams.native.js","names":[],"sources":["esm/searchParams.native.js"],"sourcesContent":["import { validateStandardSchemaSync } from \"./standardSchema\";\nimport { parseSearchString, SearchValidationError, setOwn } from \"./validateSearchParams\";\nfunction toSearchRecord(params, href) {\n var _href_split__split_;\n var search = (_href_split__split_ = href.split(\"#\")[0].split(\"?\")[1]) !== null && _href_split__split_ !== void 0 ? _href_split__split_ : \"\";\n var queryKeys = new Set(new URLSearchParams(search).keys());\n var record = {};\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = Object.entries(params)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var [key, value] = _step.value;\n if (value == null || !queryKeys.has(key)) continue;\n setOwn(record, key, Array.isArray(value) ? value.map(String) : String(value));\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n return record;\n}\nfunction searchRecordKey(record) {\n return JSON.stringify(record);\n}\nfunction parseSearchRecord(schema, record) {\n var result = validateStandardSchemaSync(schema, record);\n if (result.issues) {\n throw new SearchValidationError(`Invalid search params (${describeIssues(result.issues)})`, result.issues);\n }\n return result.value;\n}\nfunction describeIssues(issues) {\n return issues.map(function(issue) {\n var _issue_path;\n var path = (_issue_path = issue.path) === null || _issue_path === void 0 ? void 0 : _issue_path.map(function(segment) {\n return String(typeof segment === \"object\" ? segment.key : segment);\n }).join(\".\");\n return path ? `${path}: ${issue.message}` : issue.message;\n }).join(\"; \");\n}\nfunction toStrings(key, value) {\n if (value == null) return void 0;\n var values = Array.isArray(value) ? value : [\n value\n ];\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = values[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var item = _step.value;\n var type = typeof item;\n if (type !== \"string\" && type !== \"number\" && type !== \"boolean\") {\n var _item_constructor;\n throw new TypeError(`Search param \"${key}\" cannot be written to the URL: expected a string, number, boolean or an array of those, got ${type === \"object\" ? item === null ? \"null\" : (_item_constructor = item.constructor) === null || _item_constructor === void 0 ? void 0 : _item_constructor.name : type}. Pass the text the schema reads instead.`);\n }\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n return values.length ? values.map(String) : void 0;\n}\nfunction mergeSearchRecord(current, update) {\n var next = {\n ...current\n };\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = Object.entries(update)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var [key, value] = _step.value;\n var strings = toStrings(key, value);\n if (!strings) {\n delete next[key];\n } else {\n setOwn(next, key, strings.length === 1 && !Array.isArray(value) ? strings[0] : strings);\n }\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n return next;\n}\nfunction stringifySearchRecord(record) {\n var parts = [];\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = Object.entries(record)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var [key, value] = _step.value;\n var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = void 0;\n try {\n for (var _iterator1 = (Array.isArray(value) ? value : [\n value\n ])[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) {\n var item = _step1.value;\n parts.push(`${encodeURIComponent(key)}=${encodeURIComponent(item)}`);\n }\n } catch (err) {\n _didIteratorError1 = true;\n _iteratorError1 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion1 && _iterator1.return != null) {\n _iterator1.return();\n }\n } finally {\n if (_didIteratorError1) {\n throw _iteratorError1;\n }\n }\n }\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n return parts.join(\"&\");\n}\nfunction applySearchParams(href, update) {\n if (!update) return href;\n var hashIndex = href.indexOf(\"#\");\n var hash = hashIndex === -1 ? \"\" : href.slice(hashIndex);\n var withoutHash = hashIndex === -1 ? href : href.slice(0, hashIndex);\n var queryIndex = withoutHash.indexOf(\"?\");\n var path = queryIndex === -1 ? withoutHash : withoutHash.slice(0, queryIndex);\n var current = queryIndex === -1 ? {} : parseSearchString(withoutHash.slice(queryIndex + 1));\n var query = stringifySearchRecord(mergeSearchRecord(current, update));\n return `${path}${query ? `?${query}` : \"\"}${hash}`;\n}\nexport {\n applySearchParams,\n describeIssues,\n mergeSearchRecord,\n parseSearchRecord,\n searchRecordKey,\n stringifySearchRecord,\n toSearchRecord\n};\n//# sourceMappingURL=searchParams.js.map\n"],"mappings":";;;;AAEA,SAAS,eAAe,QAAQ,MAAM;CACpC,IAAI;CACJ,IAAI,UAAU,sBAAsB,KAAK,MAAM,GAAG,CAAC,CAAC,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC,QAAQ,QAAQ,wBAAwB,KAAK,IAAI,sBAAsB;CACzI,IAAI,YAAY,IAAI,IAAI,IAAI,g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R,IAAI,oBAAoB;MACtB,MAAM;KACR;IACF;GACF;EACF;CACF,SAAS,KAAK;EACZ,oBAAoB;EACpB,iBAAiB;CACnB,UAAU;EACR,IAAI;GACF,IAAI,CAAC,6BAA6B,UAAU,UAAU,MAAM;IAC1D,UAAU,OAAO;GACnB;EACF,UAAU;GACR,IAAI,mBAAmB;IACrB,MAAM;GACR;EACF;CACF;CACA,OAAO,MAAM,KAAK,GAAG;AACvB;AACA,SAAS,kBAAkB,MAAM,QAAQ;CACvC,IAAI,CAAC,QAAQ,OAAO;CACpB,IAAI,YAAY,KAAK,QAAQ,GAAG;CAChC,IAAI,OAAO,cAAc,CAAC,IAAI,KAAK,KAAK,MAAM,SAAS;CACvD,IAAI,cAAc,cAAc,CAAC,IAAI,OAAO,KAAK,MAAM,GAAG,SAAS;CACnE,IAAI,aAAa,YAAY,QAAQ,GAAG;CACxC,IAAI,OAAO,eAAe,CAAC,IAAI,cAAc,YAAY,MAAM,GAAG,UAAU;CAC5E,IAAI,UAAU,eAAe,CAAC,IAAI,CAAC,IAAI,kBAAkB,YAAY,MAAM,aAAa,CAAC,CAAC;CAC1F,IAAI,QAAQ,sBAAsB,kBAAkB,SAAS,MAAM,CAAC;CACpE,OAAO,GAAG,OAAO,QAAQ,IAAI,UAAU,KAAK;AAC9C"}
|
|
@@ -6,6 +6,7 @@ import { getPathFromLoaderPath } from "../utils/cleanUrl.mjs";
|
|
|
6
6
|
import { getRouterRootFromOneOptions } from "../utils/getRouterRootFromOneOptions.mjs";
|
|
7
7
|
import { toAbsoluteUrl } from "../utils/toAbsolute.mjs";
|
|
8
8
|
import { toServerOutputPath } from "../utils/toServerOutputPath.mjs";
|
|
9
|
+
import { getLoaderSearchSchemas, withLoaderSearchParams } from "../loaderSearchParams.mjs";
|
|
9
10
|
import { getRouteExportsFromEntry } from "./routeExportsFromEntry.mjs";
|
|
10
11
|
import { setSSRLoaderData } from "./ssrLoaderData.mjs";
|
|
11
12
|
import { getFetchStaticHtml } from "./staticHtmlFetcher.mjs";
|
|
@@ -107,6 +108,7 @@ async function oneServe(oneOptions, buildInfo, app, options) {
|
|
|
107
108
|
const loaderCache = /* @__PURE__ */ new Map();
|
|
108
109
|
const moduleImportCache = /* @__PURE__ */ new Map();
|
|
109
110
|
const loaderCacheFnMap = /* @__PURE__ */ new Map();
|
|
111
|
+
const loaderSearchSchemaMap = /* @__PURE__ */ new Map();
|
|
110
112
|
const pendingLoaderResults = /* @__PURE__ */ new Map();
|
|
111
113
|
async function importRouteModule(lazyKey, serverPath) {
|
|
112
114
|
if (lazyKey && options?.lazyRoutes?.pages?.[lazyKey]) {
|
|
@@ -135,10 +137,11 @@ async function oneServe(oneOptions, buildInfo, app, options) {
|
|
|
135
137
|
setBounded(loaderCache, cacheKey, loader, MODULE_CACHE_MAX);
|
|
136
138
|
const loaderCacheFn = routeExported?.loaderCache ?? null;
|
|
137
139
|
setBounded(loaderCacheFnMap, cacheKey, loaderCacheFn, MODULE_CACHE_MAX);
|
|
140
|
+
setBounded(loaderSearchSchemaMap, cacheKey, getLoaderSearchSchemas(routeExported), MODULE_CACHE_MAX);
|
|
138
141
|
return loader;
|
|
139
142
|
})();
|
|
140
143
|
}
|
|
141
|
-
async function importAndRunLoader(routeId, serverPath, lazyKey,
|
|
144
|
+
async function importAndRunLoader(routeId, serverPath, lazyKey, requestLoaderProps, withSearchParams = false) {
|
|
142
145
|
if (!serverPath && !lazyKey) {
|
|
143
146
|
return {
|
|
144
147
|
loaderData: void 0,
|
|
@@ -146,6 +149,12 @@ async function oneServe(oneOptions, buildInfo, app, options) {
|
|
|
146
149
|
};
|
|
147
150
|
}
|
|
148
151
|
const cacheMapKey = lazyKey || serverPath || "";
|
|
152
|
+
let loaderProps = requestLoaderProps;
|
|
153
|
+
const validateSearch = () => {
|
|
154
|
+
const schemas = withSearchParams && loaderSearchSchemaMap.get(cacheMapKey);
|
|
155
|
+
if (schemas) loaderProps = withLoaderSearchParams(schemas, requestLoaderProps);
|
|
156
|
+
};
|
|
157
|
+
validateSearch();
|
|
149
158
|
const loaderCacheFn = loaderCacheFnMap.get(cacheMapKey);
|
|
150
159
|
let coalFullKey;
|
|
151
160
|
let coalTtl = 0;
|
|
@@ -174,6 +183,7 @@ async function oneServe(oneOptions, buildInfo, app, options) {
|
|
|
174
183
|
routeId
|
|
175
184
|
};
|
|
176
185
|
}
|
|
186
|
+
if (loaderProps === requestLoaderProps) validateSearch();
|
|
177
187
|
if (coalFullKey) {
|
|
178
188
|
const promise = loader(loaderProps);
|
|
179
189
|
const entry = {
|
|
@@ -279,6 +289,8 @@ async function oneServe(oneOptions, buildInfo, app, options) {
|
|
|
279
289
|
if (!loader) {
|
|
280
290
|
return null;
|
|
281
291
|
}
|
|
292
|
+
const searchSchemas = route.type === "ssr" && loaderSearchSchemaMap.get(routeFile || serverPath);
|
|
293
|
+
if (searchSchemas) loaderProps = withLoaderSearchParams(searchSchemas, loaderProps);
|
|
282
294
|
let json;
|
|
283
295
|
try {
|
|
284
296
|
json = await loader(loaderProps);
|
|
@@ -315,10 +327,10 @@ async function oneServe(oneOptions, buildInfo, app, options) {
|
|
|
315
327
|
routeId: layout.contextKey
|
|
316
328
|
});
|
|
317
329
|
} else {
|
|
318
|
-
layoutLoaderPromises.push(importAndRunLoader(layout.contextKey, serverPath, layout.contextKey, loaderProps));
|
|
330
|
+
layoutLoaderPromises.push(importAndRunLoader(layout.contextKey, serverPath, layout.contextKey, loaderProps, true));
|
|
319
331
|
}
|
|
320
332
|
}
|
|
321
|
-
const pageLoaderPromise = importAndRunLoader(route.file, buildInfo2.serverJsPath, route.file, loaderProps);
|
|
333
|
+
const pageLoaderPromise = importAndRunLoader(route.file, buildInfo2.serverJsPath, route.file, loaderProps, true);
|
|
322
334
|
let layoutResults;
|
|
323
335
|
let pageResult;
|
|
324
336
|
try {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oneServe.js","names":[],"sources":["esm/server/oneServe.js"],"sourcesContent":["import { readFile } from \"node:fs/promises\";\nimport { join, posix } from \"node:path\";\nimport {\n CSS_PRELOAD_JS_POSTFIX_REGEX,\n LOADER_JS_POSTFIX_UNCACHED,\n PRELOAD_JS_POSTFIX_REGEX\n} from \"../constants\";\nimport {\n compileManifest,\n getSubdomain,\n getURLfromRequestURL,\n runMiddlewares\n} from \"../createHandleRequest\";\nimport { getPathFromLoaderPath } from \"../utils/cleanUrl\";\nimport { getRouterRootFromOneOptions } from \"../utils/getRouterRootFromOneOptions\";\nimport { toAbsoluteUrl } from \"../utils/toAbsolute\";\nimport { toServerOutputPath } from \"../utils/toServerOutputPath\";\nimport { getRouteExportsFromEntry } from \"./routeExportsFromEntry\";\nimport { setSSRLoaderData } from \"./ssrLoaderData\";\nimport { getFetchStaticHtml } from \"./staticHtmlFetcher\";\nconst debugRouter = process.env.ONE_DEBUG_ROUTER;\nconst MODULE_CACHE_MAX = 500;\nfunction setBounded(map, key, value, max) {\n if (map.has(key)) {\n map.set(key, value);\n return;\n }\n if (map.size >= max) {\n const firstKey = map.keys().next().value;\n if (firstKey !== void 0) map.delete(firstKey);\n }\n map.set(key, value);\n}\nfunction forwardHeaders(response, context) {\n const setCookies = response.headers.getSetCookie?.();\n if (setCookies?.length) {\n for (const cookie of setCookies) {\n context.header(\"set-cookie\", cookie, { append: true });\n }\n }\n response.headers.forEach((value, key) => {\n if (key === \"set-cookie\") return;\n context.header(key, value);\n });\n}\nasync function readStaticHtml(htmlPath, outDir = \"dist\") {\n const fetchStaticHtml = getFetchStaticHtml();\n if (fetchStaticHtml) {\n const html = await fetchStaticHtml(htmlPath);\n if (html) return html;\n }\n try {\n return await readFile(join(`${outDir}/client`, htmlPath), \"utf-8\");\n } catch {\n return null;\n }\n}\nasync function oneServe(oneOptions, buildInfo, app, options) {\n const outDir = buildInfo.outDir || \"dist\";\n const { resolveAPIRoute, resolveLoaderRoute, resolvePageRoute } = await import(\"../createHandleRequest\");\n const { isResponse } = await import(\"../utils/isResponse\");\n const { isStatusRedirect } = await import(\"../utils/isStatus\");\n const { resolveResponse } = await import(\"../vite/resolveResponse\");\n const isAPIRequest = /* @__PURE__ */ new WeakMap();\n const redirects = oneOptions.web?.redirects;\n if (redirects) {\n for (const redirect of redirects) {\n app.get(redirect.source, (context) => {\n const destinationUrl = redirect.destination.replace(/:\\w+/g, (param) => {\n const paramName = param.substring(1);\n return context.req.param(paramName) || \"\";\n });\n if (debugRouter) {\n console.info(`[one] \\u21AA redirect ${context.req.path} \\u2192 ${destinationUrl}`);\n }\n return context.redirect(destinationUrl, redirect.permanent ? 301 : 302);\n });\n }\n }\n if (!buildInfo) {\n throw new Error(`No build info found, have you run build?`);\n }\n const { routeToBuildInfo, routeMap } = buildInfo;\n function findNearestNotFoundPath(urlPath) {\n let cur = urlPath;\n while (cur) {\n const parent = cur.lastIndexOf(\"/\") > 0 ? cur.slice(0, cur.lastIndexOf(\"/\")) : \"\";\n if (routeMap[`${parent}/+not-found`]) {\n return `${parent}/+not-found`;\n }\n if (!parent) break;\n cur = parent;\n }\n return \"/+not-found\";\n }\n function make404LoaderJs(path, logReason) {\n const nfPath = findNearestNotFoundPath(path);\n if (logReason) {\n console.error(`[one] 404 loader for ${path}: ${logReason}`);\n }\n return `export function loader(){return{__oneError:404,__oneErrorMessage:'Not Found',__oneNotFoundPath:${JSON.stringify(nfPath)}}}`;\n }\n const serverOptions = {\n ...oneOptions,\n root: \".\"\n };\n const apiCJS = oneOptions.build?.api?.outputFormat === \"cjs\";\n const routerRoot = getRouterRootFromOneOptions(oneOptions);\n const useStreaming = !process.env.ONE_BUFFERED_SSR;\n const htmlHeaders = { \"content-type\": \"text/html\" };\n const ssrHtmlHeaders = { \"content-type\": \"text/html\", \"cache-control\": \"no-cache\" };\n const loaderCache = /* @__PURE__ */ new Map();\n const moduleImportCache = /* @__PURE__ */ new Map();\n const loaderCacheFnMap = /* @__PURE__ */ new Map();\n const pendingLoaderResults = /* @__PURE__ */ new Map();\n async function importRouteModule(lazyKey, serverPath) {\n if (lazyKey && options?.lazyRoutes?.pages?.[lazyKey]) {\n return await options.lazyRoutes.pages[lazyKey]();\n }\n if (lazyKey) {\n const entry = await loadServerEntry();\n const exported = await getRouteExportsFromEntry(entry, routerRoot, lazyKey);\n if (exported) return exported;\n }\n return await import(toAbsoluteUrl(toServerOutputPath(serverPath || lazyKey || \"\", outDir)));\n }\n function resolveLoaderSync(serverPath, lazyKey) {\n const cacheKey = lazyKey || serverPath || \"\";\n const cached = loaderCache.get(cacheKey);\n if (cached !== void 0) return cached;\n return (async () => {\n let routeExported;\n if (moduleImportCache.has(cacheKey)) {\n routeExported = moduleImportCache.get(cacheKey);\n } else {\n routeExported = await importRouteModule(lazyKey, serverPath);\n setBounded(moduleImportCache, cacheKey, routeExported, MODULE_CACHE_MAX);\n }\n const loader = routeExported?.loader || null;\n setBounded(loaderCache, cacheKey, loader, MODULE_CACHE_MAX);\n const loaderCacheFn = routeExported?.loaderCache ?? null;\n setBounded(loaderCacheFnMap, cacheKey, loaderCacheFn, MODULE_CACHE_MAX);\n return loader;\n })();\n }\n async function importAndRunLoader(routeId, serverPath, lazyKey, loaderProps) {\n if (!serverPath && !lazyKey) {\n return { loaderData: void 0, routeId };\n }\n const cacheMapKey = lazyKey || serverPath || \"\";\n const loaderCacheFn = loaderCacheFnMap.get(cacheMapKey);\n let coalFullKey;\n let coalTtl = 0;\n if (loaderCacheFn) {\n const cacheResult = loaderCacheFn(loaderProps?.params, loaderProps?.request);\n const cacheKey = typeof cacheResult === \"string\" ? cacheResult : cacheResult?.key;\n coalTtl = typeof cacheResult === \"string\" ? 0 : cacheResult?.ttl ?? 0;\n if (cacheKey != null) {\n coalFullKey = routeId + \"\\0\" + cacheKey;\n const existing = pendingLoaderResults.get(coalFullKey);\n if (existing && (!existing.expires || Date.now() < existing.expires)) {\n const loaderData = await existing.promise;\n return { loaderData, routeId };\n }\n }\n }\n try {\n const loaderOrPromise = resolveLoaderSync(serverPath, lazyKey);\n const loader = loaderOrPromise instanceof Promise ? await loaderOrPromise : loaderOrPromise;\n if (!loader) {\n return { loaderData: void 0, routeId };\n }\n if (coalFullKey) {\n const promise = loader(loaderProps);\n const entry = { promise, expires: 0 };\n pendingLoaderResults.set(coalFullKey, entry);\n promise.then(\n () => {\n entry.expires = coalTtl > 0 ? Date.now() + coalTtl : 0;\n if (coalTtl <= 0) {\n Promise.resolve().then(() => pendingLoaderResults.delete(coalFullKey));\n }\n },\n () => {\n pendingLoaderResults.delete(coalFullKey);\n }\n );\n const loaderData2 = await promise;\n return { loaderData: loaderData2, routeId };\n }\n const loaderData = await loader(loaderProps);\n return { loaderData, routeId };\n } catch (err) {\n if (isResponse(err)) {\n throw err;\n }\n if (err?.code === \"ENOENT\") {\n return { loaderData: void 0, routeId, isEnoent: true };\n }\n console.error(`[one] Error running loader for ${routeId}:`, err);\n return { loaderData: void 0, routeId };\n }\n }\n let render = null;\n let renderStream = null;\n let renderLoading = null;\n let entryLoading = null;\n function loadServerEntry() {\n if (!entryLoading) {\n entryLoading = options?.lazyRoutes?.serverEntry ? options.lazyRoutes.serverEntry() : import(toAbsoluteUrl(\n `${serverOptions.root}/${outDir}/server/_virtual_one-entry.${typeof oneOptions.build?.server === \"object\" && oneOptions.build.server.outputFormat === \"cjs\" ? \"c\" : \"\"}js`\n ));\n }\n return entryLoading;\n }\n function ensureRenderLoaded() {\n if (render) return;\n if (renderLoading) return renderLoading;\n renderLoading = (async () => {\n const entry = await loadServerEntry();\n render = entry.default.render;\n renderStream = entry.default.renderStream;\n })();\n return renderLoading;\n }\n const clientDir = join(process.cwd(), outDir, \"client\");\n const requestHandlers = {\n async handleStaticFile(filePath) {\n try {\n const fullPath = join(clientDir, filePath);\n const content = await readFile(fullPath, \"utf-8\");\n return new Response(content, {\n headers: { \"Content-Type\": \"text/javascript\" }\n });\n } catch {\n return null;\n }\n },\n async handleAPI({ route }) {\n if (options?.lazyRoutes?.api?.[route.page]) {\n return await options.lazyRoutes.api[route.page]();\n }\n const fileName = route.page.slice(1).replace(/\\[/g, \"_\").replace(/\\]/g, \"_\");\n const apiFile = posix.join(outDir, \"api\", fileName + (apiCJS ? \".cjs\" : \".js\"));\n return await import(toAbsoluteUrl(apiFile));\n },\n async loadMiddleware(route) {\n if (options?.lazyRoutes?.middlewares?.[route.contextKey]) {\n return await options.lazyRoutes.middlewares[route.contextKey]();\n }\n return await import(toAbsoluteUrl(route.contextKey));\n },\n async handleLoader({ route, loaderProps }) {\n const routeFile = route.routeFile || route.file;\n const serverPath = toServerOutputPath(route.file, outDir);\n let loader;\n try {\n const loaderResult = resolveLoaderSync(serverPath, routeFile);\n loader = loaderResult instanceof Promise ? await loaderResult : loaderResult;\n } catch (err) {\n if (err?.code === \"ERR_MODULE_NOT_FOUND\") {\n return null;\n }\n throw err;\n }\n if (!loader) {\n return null;\n }\n let json;\n try {\n json = await loader(loaderProps);\n } catch (err) {\n if (err?.code === \"ENOENT\") {\n return make404LoaderJs(\n loaderProps?.path || \"/\",\n `ENOENT ${err?.path || err}`\n );\n }\n throw err;\n }\n if (isResponse(json)) {\n throw json;\n }\n return `export function loader() { return ${JSON.stringify(json)} }`;\n },\n async handlePage({ route, url, loaderProps }) {\n const buildInfo2 = routeToBuildInfo[route.file];\n if (route.type === \"ssr\") {\n if (!buildInfo2) {\n console.error(`Error in route`, route);\n throw new Error(\n `No buildinfo found for ${url}, route: ${route.file}, in keys:\n ${Object.keys(routeToBuildInfo).join(\"\\n \")}`\n );\n }\n try {\n const layoutRoutes = route.layouts || [];\n const layoutLoaderPromises = [];\n const noLoaderResults = [];\n for (const layout of layoutRoutes) {\n const serverPath = layout.loaderServerPath || layout.contextKey;\n const cacheKey = layout.contextKey || serverPath || \"\";\n const cachedLoader = loaderCache.get(cacheKey);\n if (cachedLoader === null) {\n noLoaderResults.push({ loaderData: void 0, routeId: layout.contextKey });\n } else {\n layoutLoaderPromises.push(\n importAndRunLoader(\n layout.contextKey,\n serverPath,\n layout.contextKey,\n loaderProps\n )\n );\n }\n }\n const pageLoaderPromise = importAndRunLoader(\n route.file,\n buildInfo2.serverJsPath,\n route.file,\n loaderProps\n );\n let layoutResults;\n let pageResult;\n try {\n if (layoutLoaderPromises.length === 0) {\n layoutResults = noLoaderResults;\n pageResult = await pageLoaderPromise;\n } else {\n const [asyncLayoutResults, pr] = await Promise.all([\n Promise.all(layoutLoaderPromises),\n pageLoaderPromise\n ]);\n layoutResults = [...noLoaderResults, ...asyncLayoutResults];\n pageResult = pr;\n }\n } catch (err) {\n if (isResponse(err)) {\n return err;\n }\n throw err;\n }\n if (pageResult.isEnoent) {\n const nfPath = findNearestNotFoundPath(loaderProps?.path || \"/\");\n const nfHtml = routeMap[nfPath];\n if (nfHtml) {\n try {\n const html = await readFile(\n join(process.cwd(), `${outDir}/client`, nfHtml),\n \"utf-8\"\n );\n return new Response(html, {\n headers: { \"content-type\": \"text/html\" },\n status: 404\n });\n } catch {\n }\n }\n return new Response(\"404 Not Found\", { status: 404 });\n }\n const matchPathname = loaderProps?.path || \"/\";\n const matchParams = loaderProps?.params || {};\n const matches = new Array(layoutResults.length + 1);\n for (let i = 0; i < layoutResults.length; i++) {\n const result = layoutResults[i];\n matches[i] = {\n routeId: result.routeId,\n pathname: matchPathname,\n params: matchParams,\n loaderData: result.loaderData\n };\n }\n matches[layoutResults.length] = {\n routeId: pageResult.routeId,\n pathname: matchPathname,\n params: matchParams,\n loaderData: pageResult.loaderData\n };\n const loaderData = pageResult.loaderData;\n for (const layout of layoutRoutes) {\n const key = layout.contextKey;\n const loaderFn = loaderCache.get(key);\n if (loaderFn) {\n const result = layoutResults.find((r) => r.routeId === key);\n if (result) {\n setSSRLoaderData(loaderFn, result.loaderData);\n }\n }\n }\n const pageLoaderFn = loaderCache.get(route.file);\n if (pageLoaderFn) {\n setSSRLoaderData(pageLoaderFn, pageResult.loaderData);\n }\n globalThis[\"__vxrnresetState\"]?.();\n const renderProps = {\n mode: route.type,\n loaderData,\n loaderProps,\n path: loaderProps?.path || \"/\",\n preloads: buildInfo2.criticalPreloads || buildInfo2.preloads,\n deferredPreloads: buildInfo2.deferredPreloads,\n css: buildInfo2.css,\n cssContents: buildInfo2.cssContents,\n matches\n };\n const _rl = ensureRenderLoaded();\n if (_rl) await _rl;\n const status = route.isNotFound ? 404 : 200;\n const responseHeaders = route.isNotFound ? htmlHeaders : ssrHtmlHeaders;\n if (useStreaming) {\n const stream = await renderStream(renderProps);\n return new Response(stream, {\n headers: responseHeaders,\n status\n });\n }\n const rendered = await render(renderProps);\n return new Response(rendered, {\n headers: responseHeaders,\n status\n });\n } catch (err) {\n if (isResponse(err)) {\n return err;\n }\n console.error(`[one] Error rendering SSR route ${route.file}\n\n${err?.[\"stack\"] ?? err}\n\nurl: ${url}`);\n }\n } else {\n const layoutRoutes = route.layouts || [];\n const needsSpaShell = route.type === \"spa\" && layoutRoutes.some(\n (layout) => layout.layoutRenderMode === \"ssg\" || layout.layoutRenderMode === \"ssr\"\n );\n if (needsSpaShell) {\n try {\n const layoutResults = await Promise.all(\n layoutRoutes.map((layout) => {\n const serverPath = layout.loaderServerPath || layout.contextKey;\n return importAndRunLoader(\n layout.contextKey,\n serverPath,\n layout.contextKey,\n loaderProps\n );\n })\n );\n const matches = layoutResults.map((result) => ({\n routeId: result.routeId,\n pathname: loaderProps?.path || \"/\",\n params: loaderProps?.params || {},\n loaderData: result.loaderData\n }));\n globalThis[\"__vxrnresetState\"]?.();\n const _rl3 = ensureRenderLoaded();\n if (_rl3) await _rl3;\n const rendered = await render({\n mode: \"spa-shell\",\n // don't pass loaderData for spa-shell - the page loader runs on client\n // passing {} here would make useLoaderState think data is preloaded\n loaderData: void 0,\n loaderProps,\n path: loaderProps?.path || \"/\",\n preloads: buildInfo2?.criticalPreloads || buildInfo2?.preloads,\n deferredPreloads: buildInfo2?.deferredPreloads,\n css: buildInfo2?.css,\n cssContents: buildInfo2?.cssContents,\n matches\n });\n return new Response(rendered, {\n headers: htmlHeaders,\n status: route.isNotFound ? 404 : 200\n });\n } catch (err) {\n if (isResponse(err)) {\n return err;\n }\n console.error(\n `[one] Error rendering spa-shell for ${route.file}\n${err?.[\"stack\"] ?? err}\nurl: ${url}`\n );\n }\n }\n const isDynamicRoute = Object.keys(route.routeKeys).length > 0;\n const routeCleanPath = route.urlCleanPath.replace(/\\?/g, \"\");\n const notFoundKey = route.isNotFound ? route.page.replace(/\\[([^\\]]+)\\]/g, \":$1\") : null;\n const htmlPath = notFoundKey ? routeMap[notFoundKey] : isDynamicRoute ? routeMap[routeCleanPath] || routeMap[url.pathname] : routeMap[url.pathname] || routeMap[buildInfo2?.cleanPath];\n if (htmlPath) {\n const html = await readStaticHtml(htmlPath, outDir);\n if (html) {\n const headers = new Headers();\n headers.set(\"content-type\", \"text/html\");\n return new Response(html, {\n headers,\n status: route.isNotFound ? 404 : 200\n });\n }\n }\n if (isDynamicRoute) {\n const notFoundRoute = findNearestNotFoundPath(url.pathname);\n const notFoundHtmlPath = routeMap[notFoundRoute];\n if (notFoundHtmlPath) {\n const notFoundHtml = await readStaticHtml(notFoundHtmlPath, outDir);\n if (notFoundHtml) {\n const notFoundMarker = `<script>window.__one404=${JSON.stringify({ originalPath: url.pathname, notFoundPath: notFoundRoute })}</script>`;\n const injectedHtml = notFoundHtml.includes(\"</head>\") ? notFoundHtml.replace(\"</head>\", `${notFoundMarker}</head>`) : notFoundHtml.replace(\"<body\", `${notFoundMarker}<body`);\n const headers = new Headers();\n headers.set(\"content-type\", \"text/html\");\n return new Response(injectedHtml, {\n headers,\n status: 404\n });\n }\n }\n return new Response(\"404 Not Found\", { status: 404 });\n }\n }\n }\n };\n function createHonoHandler(route) {\n const isDynamicOrNotFound = route.page.endsWith(\"/+not-found\") || Object.keys(route.routeKeys).length > 0;\n return async (context, next) => {\n try {\n const request = context.req.raw;\n if (isDynamicOrNotFound) {\n if (options?.serveStaticAssets) {\n const staticAssetResponse = await options.serveStaticAssets({\n context\n });\n if (staticAssetResponse) {\n return await runMiddlewares(\n requestHandlers,\n request,\n route,\n async () => staticAssetResponse\n );\n }\n }\n }\n const reqPath = context.req.path;\n if (reqPath.endsWith(\".js\") || reqPath.endsWith(\".css\")) {\n return next();\n }\n if (route.type === \"ssr\" && !route.middlewares?.length && !reqPath.endsWith(LOADER_JS_POSTFIX_UNCACHED)) {\n if (debugRouter) {\n console.info(`[one] \\u26A1 ${reqPath} \\u2192 matched page route: ${route.page} (ssr)`);\n }\n const pathname = reqPath;\n const rawUrl = request.url;\n const qIdx = rawUrl.indexOf(\"?\");\n const search = qIdx >= 0 ? rawUrl.slice(qIdx) : \"\";\n const params = {};\n const match = route.compiledRegex.exec(pathname);\n if (match?.groups) {\n for (const [key, value] of Object.entries(match.groups)) {\n const namedKey = route.routeKeys[key];\n params[namedKey] = value;\n }\n }\n const loaderProps = {\n path: pathname,\n search,\n subdomain: getSubdomain(getURLfromRequestURL(request)),\n request,\n params\n };\n const url2 = getURLfromRequestURL(request);\n const response2 = await resolveResponse(async () => {\n try {\n return await requestHandlers.handlePage({\n request,\n route,\n url: url2,\n loaderProps\n });\n } catch (err) {\n if (isResponse(err)) {\n return err;\n }\n throw err;\n }\n });\n if (response2) {\n if (isResponse(response2)) {\n if (isStatusRedirect(response2.status)) {\n const location = `${response2.headers.get(\"location\") || \"\"}`;\n forwardHeaders(response2, context);\n return context.redirect(location, response2.status);\n }\n return response2;\n }\n return next();\n }\n return next();\n }\n const url = getURLfromRequestURL(request);\n const response = await (() => {\n if (url.pathname.endsWith(LOADER_JS_POSTFIX_UNCACHED)) {\n const originalUrl = getPathFromLoaderPath(url.pathname);\n if (route.type === \"ssg\" && Object.keys(route.routeKeys).length > 0) {\n if (!routeMap[originalUrl]) {\n return new Response(\n make404LoaderJs(originalUrl, \"ssg route not in routeMap\"),\n {\n headers: { \"Content-Type\": \"text/javascript\" }\n }\n );\n }\n }\n const finalUrl = new URL(originalUrl, url.origin);\n finalUrl.search = url.search;\n const cleanedRequest = new Request(finalUrl, request);\n return resolveLoaderRoute(requestHandlers, cleanedRequest, finalUrl, route);\n }\n switch (route.type) {\n case \"api\": {\n if (debugRouter) {\n console.info(\n `[one] \\u26A1 ${url.pathname} \\u2192 matched API route: ${route.page}`\n );\n }\n return resolveAPIRoute(requestHandlers, request, url, route);\n }\n case \"ssg\":\n case \"spa\":\n case \"ssr\": {\n if (debugRouter) {\n console.info(\n `[one] \\u26A1 ${url.pathname} \\u2192 matched page route: ${route.page} (${route.type})`\n );\n }\n return resolvePageRoute(requestHandlers, request, url, route);\n }\n }\n })();\n if (response) {\n if (isResponse(response)) {\n if (isStatusRedirect(response.status)) {\n const location = `${response.headers.get(\"location\") || \"\"}`;\n forwardHeaders(response, context);\n return context.redirect(location, response.status);\n }\n if (isAPIRequest.get(request)) {\n try {\n if (!response.headers.has(\"cache-control\") && !response.headers.has(\"Cache-Control\")) {\n response.headers.set(\"cache-control\", \"no-store\");\n }\n return response;\n } catch (err) {\n console.info(\n `Error updating cache header on api route \"${context.req.path}\" to no-store, it is ${response.headers.get(\"cache-control\")}, continue`,\n err\n );\n }\n }\n if (!response.headers.has(\"cache-control\") && !response.headers.has(\"Cache-Control\")) {\n if (route.type === \"ssg\" || route.type === \"spa\") {\n response.headers.set(\n \"cache-control\",\n \"public, s-maxage=60, stale-while-revalidate=120\"\n );\n } else {\n response.headers.set(\"cache-control\", \"no-cache\");\n }\n }\n return response;\n }\n return next();\n }\n } catch (err) {\n console.error(` [one] Error handling request: ${err[\"stack\"]}`);\n }\n return next();\n };\n }\n const compiledManifest = compileManifest(buildInfo.manifest);\n for (const route of compiledManifest.apiRoutes) {\n app.get(route.urlPath, createHonoHandler(route));\n app.put(route.urlPath, createHonoHandler(route));\n app.post(route.urlPath, createHonoHandler(route));\n app.delete(route.urlPath, createHonoHandler(route));\n app.patch(route.urlPath, createHonoHandler(route));\n app.options(route.urlPath, createHonoHandler(route));\n if (route.urlPath !== route.urlCleanPath) {\n app.get(route.urlCleanPath, createHonoHandler(route));\n app.put(route.urlCleanPath, createHonoHandler(route));\n app.post(route.urlCleanPath, createHonoHandler(route));\n app.delete(route.urlCleanPath, createHonoHandler(route));\n app.patch(route.urlCleanPath, createHonoHandler(route));\n app.options(route.urlCleanPath, createHonoHandler(route));\n }\n }\n for (const route of compiledManifest.pageRoutes) {\n app.get(route.urlPath, createHonoHandler(route));\n if (route.urlPath !== route.urlCleanPath) {\n app.get(route.urlCleanPath, createHonoHandler(route));\n }\n }\n const { preloads, cssPreloads } = buildInfo;\n app.get(\"*\", async (c, next) => {\n if (PRELOAD_JS_POSTFIX_REGEX.test(c.req.path)) {\n if (!preloads[c.req.path]) {\n c.header(\"Content-Type\", \"text/javascript\");\n c.status(200);\n return c.body(``);\n }\n }\n if (CSS_PRELOAD_JS_POSTFIX_REGEX.test(c.req.path)) {\n if (!cssPreloads?.[c.req.path]) {\n c.header(\"Content-Type\", \"text/javascript\");\n c.status(200);\n return c.body(`export default Promise.resolve()`);\n }\n }\n if (c.req.path.endsWith(LOADER_JS_POSTFIX_UNCACHED)) {\n const request = c.req.raw;\n const url = getURLfromRequestURL(request);\n const originalUrl = getPathFromLoaderPath(c.req.path);\n for (const route of compiledManifest.pageRoutes) {\n if (route.file === \"\") {\n continue;\n }\n if (!route.compiledRegex.test(originalUrl)) {\n continue;\n }\n if (route.type === \"ssg\" && Object.keys(route.routeKeys).length > 0 && !routeMap[originalUrl]) {\n c.header(\"Content-Type\", \"text/javascript\");\n c.status(200);\n return c.body(make404LoaderJs(originalUrl, \"ssg route not in routeMap\"));\n }\n const loaderRoute = {\n ...route,\n routeFile: route.file,\n // preserve original for lazy route lookup\n file: route.loaderServerPath || c.req.path\n };\n const finalUrl = new URL(originalUrl, url.origin);\n finalUrl.search = url.search;\n const cleanedRequest = new Request(finalUrl, request);\n try {\n const resolved = await resolveLoaderRoute(\n requestHandlers,\n cleanedRequest,\n finalUrl,\n loaderRoute\n );\n return resolved;\n } catch (err) {\n if (err?.code === \"ERR_MODULE_NOT_FOUND\") {\n c.header(\"Content-Type\", \"text/javascript\");\n c.status(200);\n return c.body(`export function loader() { return undefined }`);\n }\n console.error(`Error running loader: ${err}`);\n return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CAAC,SAAS,KAAK,CAAC,SAAS,cAAc;KAC7F,EAAE,OAAO,gBAAgB,iBAAiB;KAC1C,EAAE,OAAO,GAAG;KACZ,OAAO,EAAE,KAAK,gBAAgB,aAAa,2BAA2B,CAAC;IACzE;IACA,MAAM,cAAc;KAClB,GAAG;KACH,WAAW,MAAM;KAEjB,MAAM,MAAM,oBAAoB,EAAE,IAAI;IACxC;IACA,MAAM,WAAW,IAAI,IAAI,aAAa,IAAI,MAAM;IAChD,SAAS,SAAS,IAAI;IACtB,MAAM,iBAAiB,IAAI,QAAQ,UAAU,OAAO;IACpD,IAAI;KACF,MAAM,WAAW,MAAM,mBACrB,iBACA,gBACA,UACA,WACF;KACA,OAAO;IACT,SAAS,KAAK;KACZ,IAAI,KAAK,SAAS,wBAAwB;MACxC,EAAE,OAAO,gBAAgB,iBAAiB;MAC1C,EAAE,OAAO,GAAG;MACZ,OAAO,EAAE,KAAK,+CAA+C;KAC/D;KACA,QAAQ,MAAM,yBAAyB,KAAK;KAC5C,OAAO,KAAK;IACd;GACF;EACF;EACA,OAAO,KAAK;CACd,CAAC;AACH"}
|
|
1
|
+
{"version":3,"file":"oneServe.js","names":[],"sources":["esm/server/oneServe.js"],"sourcesContent":["import { readFile } from \"node:fs/promises\";\nimport { join, posix } from \"node:path\";\nimport {\n CSS_PRELOAD_JS_POSTFIX_REGEX,\n LOADER_JS_POSTFIX_UNCACHED,\n PRELOAD_JS_POSTFIX_REGEX\n} from \"../constants\";\nimport {\n compileManifest,\n getSubdomain,\n getURLfromRequestURL,\n runMiddlewares\n} from \"../createHandleRequest\";\nimport { getPathFromLoaderPath } from \"../utils/cleanUrl\";\nimport { getRouterRootFromOneOptions } from \"../utils/getRouterRootFromOneOptions\";\nimport { toAbsoluteUrl } from \"../utils/toAbsolute\";\nimport { toServerOutputPath } from \"../utils/toServerOutputPath\";\nimport {\n getLoaderSearchSchemas,\n withLoaderSearchParams\n} from \"../loaderSearchParams\";\nimport { getRouteExportsFromEntry } from \"./routeExportsFromEntry\";\nimport { setSSRLoaderData } from \"./ssrLoaderData\";\nimport { getFetchStaticHtml } from \"./staticHtmlFetcher\";\nconst debugRouter = process.env.ONE_DEBUG_ROUTER;\nconst MODULE_CACHE_MAX = 500;\nfunction setBounded(map, key, value, max) {\n if (map.has(key)) {\n map.set(key, value);\n return;\n }\n if (map.size >= max) {\n const firstKey = map.keys().next().value;\n if (firstKey !== void 0) map.delete(firstKey);\n }\n map.set(key, value);\n}\nfunction forwardHeaders(response, context) {\n const setCookies = response.headers.getSetCookie?.();\n if (setCookies?.length) {\n for (const cookie of setCookies) {\n context.header(\"set-cookie\", cookie, { append: true });\n }\n }\n response.headers.forEach((value, key) => {\n if (key === \"set-cookie\") return;\n context.header(key, value);\n });\n}\nasync function readStaticHtml(htmlPath, outDir = \"dist\") {\n const fetchStaticHtml = getFetchStaticHtml();\n if (fetchStaticHtml) {\n const html = await fetchStaticHtml(htmlPath);\n if (html) return html;\n }\n try {\n return await readFile(join(`${outDir}/client`, htmlPath), \"utf-8\");\n } catch {\n return null;\n }\n}\nasync function oneServe(oneOptions, buildInfo, app, options) {\n const outDir = buildInfo.outDir || \"dist\";\n const { resolveAPIRoute, resolveLoaderRoute, resolvePageRoute } = await import(\"../createHandleRequest\");\n const { isResponse } = await import(\"../utils/isResponse\");\n const { isStatusRedirect } = await import(\"../utils/isStatus\");\n const { resolveResponse } = await import(\"../vite/resolveResponse\");\n const isAPIRequest = /* @__PURE__ */ new WeakMap();\n const redirects = oneOptions.web?.redirects;\n if (redirects) {\n for (const redirect of redirects) {\n app.get(redirect.source, (context) => {\n const destinationUrl = redirect.destination.replace(/:\\w+/g, (param) => {\n const paramName = param.substring(1);\n return context.req.param(paramName) || \"\";\n });\n if (debugRouter) {\n console.info(`[one] \\u21AA redirect ${context.req.path} \\u2192 ${destinationUrl}`);\n }\n return context.redirect(destinationUrl, redirect.permanent ? 301 : 302);\n });\n }\n }\n if (!buildInfo) {\n throw new Error(`No build info found, have you run build?`);\n }\n const { routeToBuildInfo, routeMap } = buildInfo;\n function findNearestNotFoundPath(urlPath) {\n let cur = urlPath;\n while (cur) {\n const parent = cur.lastIndexOf(\"/\") > 0 ? cur.slice(0, cur.lastIndexOf(\"/\")) : \"\";\n if (routeMap[`${parent}/+not-found`]) {\n return `${parent}/+not-found`;\n }\n if (!parent) break;\n cur = parent;\n }\n return \"/+not-found\";\n }\n function make404LoaderJs(path, logReason) {\n const nfPath = findNearestNotFoundPath(path);\n if (logReason) {\n console.error(`[one] 404 loader for ${path}: ${logReason}`);\n }\n return `export function loader(){return{__oneError:404,__oneErrorMessage:'Not Found',__oneNotFoundPath:${JSON.stringify(nfPath)}}}`;\n }\n const serverOptions = {\n ...oneOptions,\n root: \".\"\n };\n const apiCJS = oneOptions.build?.api?.outputFormat === \"cjs\";\n const routerRoot = getRouterRootFromOneOptions(oneOptions);\n const useStreaming = !process.env.ONE_BUFFERED_SSR;\n const htmlHeaders = { \"content-type\": \"text/html\" };\n const ssrHtmlHeaders = { \"content-type\": \"text/html\", \"cache-control\": \"no-cache\" };\n const loaderCache = /* @__PURE__ */ new Map();\n const moduleImportCache = /* @__PURE__ */ new Map();\n const loaderCacheFnMap = /* @__PURE__ */ new Map();\n const loaderSearchSchemaMap = /* @__PURE__ */ new Map();\n const pendingLoaderResults = /* @__PURE__ */ new Map();\n async function importRouteModule(lazyKey, serverPath) {\n if (lazyKey && options?.lazyRoutes?.pages?.[lazyKey]) {\n return await options.lazyRoutes.pages[lazyKey]();\n }\n if (lazyKey) {\n const entry = await loadServerEntry();\n const exported = await getRouteExportsFromEntry(entry, routerRoot, lazyKey);\n if (exported) return exported;\n }\n return await import(toAbsoluteUrl(toServerOutputPath(serverPath || lazyKey || \"\", outDir)));\n }\n function resolveLoaderSync(serverPath, lazyKey) {\n const cacheKey = lazyKey || serverPath || \"\";\n const cached = loaderCache.get(cacheKey);\n if (cached !== void 0) return cached;\n return (async () => {\n let routeExported;\n if (moduleImportCache.has(cacheKey)) {\n routeExported = moduleImportCache.get(cacheKey);\n } else {\n routeExported = await importRouteModule(lazyKey, serverPath);\n setBounded(moduleImportCache, cacheKey, routeExported, MODULE_CACHE_MAX);\n }\n const loader = routeExported?.loader || null;\n setBounded(loaderCache, cacheKey, loader, MODULE_CACHE_MAX);\n const loaderCacheFn = routeExported?.loaderCache ?? null;\n setBounded(loaderCacheFnMap, cacheKey, loaderCacheFn, MODULE_CACHE_MAX);\n setBounded(\n loaderSearchSchemaMap,\n cacheKey,\n getLoaderSearchSchemas(routeExported),\n MODULE_CACHE_MAX\n );\n return loader;\n })();\n }\n async function importAndRunLoader(routeId, serverPath, lazyKey, requestLoaderProps, withSearchParams = false) {\n if (!serverPath && !lazyKey) {\n return { loaderData: void 0, routeId };\n }\n const cacheMapKey = lazyKey || serverPath || \"\";\n let loaderProps = requestLoaderProps;\n const validateSearch = () => {\n const schemas = withSearchParams && loaderSearchSchemaMap.get(cacheMapKey);\n if (schemas) loaderProps = withLoaderSearchParams(schemas, requestLoaderProps);\n };\n validateSearch();\n const loaderCacheFn = loaderCacheFnMap.get(cacheMapKey);\n let coalFullKey;\n let coalTtl = 0;\n if (loaderCacheFn) {\n const cacheResult = loaderCacheFn(loaderProps?.params, loaderProps?.request);\n const cacheKey = typeof cacheResult === \"string\" ? cacheResult : cacheResult?.key;\n coalTtl = typeof cacheResult === \"string\" ? 0 : cacheResult?.ttl ?? 0;\n if (cacheKey != null) {\n coalFullKey = routeId + \"\\0\" + cacheKey;\n const existing = pendingLoaderResults.get(coalFullKey);\n if (existing && (!existing.expires || Date.now() < existing.expires)) {\n const loaderData = await existing.promise;\n return { loaderData, routeId };\n }\n }\n }\n try {\n const loaderOrPromise = resolveLoaderSync(serverPath, lazyKey);\n const loader = loaderOrPromise instanceof Promise ? await loaderOrPromise : loaderOrPromise;\n if (!loader) {\n return { loaderData: void 0, routeId };\n }\n if (loaderProps === requestLoaderProps) validateSearch();\n if (coalFullKey) {\n const promise = loader(loaderProps);\n const entry = { promise, expires: 0 };\n pendingLoaderResults.set(coalFullKey, entry);\n promise.then(\n () => {\n entry.expires = coalTtl > 0 ? Date.now() + coalTtl : 0;\n if (coalTtl <= 0) {\n Promise.resolve().then(() => pendingLoaderResults.delete(coalFullKey));\n }\n },\n () => {\n pendingLoaderResults.delete(coalFullKey);\n }\n );\n const loaderData2 = await promise;\n return { loaderData: loaderData2, routeId };\n }\n const loaderData = await loader(loaderProps);\n return { loaderData, routeId };\n } catch (err) {\n if (isResponse(err)) {\n throw err;\n }\n if (err?.code === \"ENOENT\") {\n return { loaderData: void 0, routeId, isEnoent: true };\n }\n console.error(`[one] Error running loader for ${routeId}:`, err);\n return { loaderData: void 0, routeId };\n }\n }\n let render = null;\n let renderStream = null;\n let renderLoading = null;\n let entryLoading = null;\n function loadServerEntry() {\n if (!entryLoading) {\n entryLoading = options?.lazyRoutes?.serverEntry ? options.lazyRoutes.serverEntry() : import(toAbsoluteUrl(\n `${serverOptions.root}/${outDir}/server/_virtual_one-entry.${typeof oneOptions.build?.server === \"object\" && oneOptions.build.server.outputFormat === \"cjs\" ? \"c\" : \"\"}js`\n ));\n }\n return entryLoading;\n }\n function ensureRenderLoaded() {\n if (render) return;\n if (renderLoading) return renderLoading;\n renderLoading = (async () => {\n const entry = await loadServerEntry();\n render = entry.default.render;\n renderStream = entry.default.renderStream;\n })();\n return renderLoading;\n }\n const clientDir = join(process.cwd(), outDir, \"client\");\n const requestHandlers = {\n async handleStaticFile(filePath) {\n try {\n const fullPath = join(clientDir, filePath);\n const content = await readFile(fullPath, \"utf-8\");\n return new Response(content, {\n headers: { \"Content-Type\": \"text/javascript\" }\n });\n } catch {\n return null;\n }\n },\n async handleAPI({ route }) {\n if (options?.lazyRoutes?.api?.[route.page]) {\n return await options.lazyRoutes.api[route.page]();\n }\n const fileName = route.page.slice(1).replace(/\\[/g, \"_\").replace(/\\]/g, \"_\");\n const apiFile = posix.join(outDir, \"api\", fileName + (apiCJS ? \".cjs\" : \".js\"));\n return await import(toAbsoluteUrl(apiFile));\n },\n async loadMiddleware(route) {\n if (options?.lazyRoutes?.middlewares?.[route.contextKey]) {\n return await options.lazyRoutes.middlewares[route.contextKey]();\n }\n return await import(toAbsoluteUrl(route.contextKey));\n },\n async handleLoader({ route, loaderProps }) {\n const routeFile = route.routeFile || route.file;\n const serverPath = toServerOutputPath(route.file, outDir);\n let loader;\n try {\n const loaderResult = resolveLoaderSync(serverPath, routeFile);\n loader = loaderResult instanceof Promise ? await loaderResult : loaderResult;\n } catch (err) {\n if (err?.code === \"ERR_MODULE_NOT_FOUND\") {\n return null;\n }\n throw err;\n }\n if (!loader) {\n return null;\n }\n const searchSchemas = route.type === \"ssr\" && loaderSearchSchemaMap.get(routeFile || serverPath);\n if (searchSchemas) loaderProps = withLoaderSearchParams(searchSchemas, loaderProps);\n let json;\n try {\n json = await loader(loaderProps);\n } catch (err) {\n if (err?.code === \"ENOENT\") {\n return make404LoaderJs(\n loaderProps?.path || \"/\",\n `ENOENT ${err?.path || err}`\n );\n }\n throw err;\n }\n if (isResponse(json)) {\n throw json;\n }\n return `export function loader() { return ${JSON.stringify(json)} }`;\n },\n async handlePage({ route, url, loaderProps }) {\n const buildInfo2 = routeToBuildInfo[route.file];\n if (route.type === \"ssr\") {\n if (!buildInfo2) {\n console.error(`Error in route`, route);\n throw new Error(\n `No buildinfo found for ${url}, route: ${route.file}, in keys:\n ${Object.keys(routeToBuildInfo).join(\"\\n \")}`\n );\n }\n try {\n const layoutRoutes = route.layouts || [];\n const layoutLoaderPromises = [];\n const noLoaderResults = [];\n for (const layout of layoutRoutes) {\n const serverPath = layout.loaderServerPath || layout.contextKey;\n const cacheKey = layout.contextKey || serverPath || \"\";\n const cachedLoader = loaderCache.get(cacheKey);\n if (cachedLoader === null) {\n noLoaderResults.push({ loaderData: void 0, routeId: layout.contextKey });\n } else {\n layoutLoaderPromises.push(\n importAndRunLoader(\n layout.contextKey,\n serverPath,\n layout.contextKey,\n loaderProps,\n true\n )\n );\n }\n }\n const pageLoaderPromise = importAndRunLoader(\n route.file,\n buildInfo2.serverJsPath,\n route.file,\n loaderProps,\n true\n );\n let layoutResults;\n let pageResult;\n try {\n if (layoutLoaderPromises.length === 0) {\n layoutResults = noLoaderResults;\n pageResult = await pageLoaderPromise;\n } else {\n const [asyncLayoutResults, pr] = await Promise.all([\n Promise.all(layoutLoaderPromises),\n pageLoaderPromise\n ]);\n layoutResults = [...noLoaderResults, ...asyncLayoutResults];\n pageResult = pr;\n }\n } catch (err) {\n if (isResponse(err)) {\n return err;\n }\n throw err;\n }\n if (pageResult.isEnoent) {\n const nfPath = findNearestNotFoundPath(loaderProps?.path || \"/\");\n const nfHtml = routeMap[nfPath];\n if (nfHtml) {\n try {\n const html = await readFile(\n join(process.cwd(), `${outDir}/client`, nfHtml),\n \"utf-8\"\n );\n return new Response(html, {\n headers: { \"content-type\": \"text/html\" },\n status: 404\n });\n } catch {\n }\n }\n return new Response(\"404 Not Found\", { status: 404 });\n }\n const matchPathname = loaderProps?.path || \"/\";\n const matchParams = loaderProps?.params || {};\n const matches = new Array(layoutResults.length + 1);\n for (let i = 0; i < layoutResults.length; i++) {\n const result = layoutResults[i];\n matches[i] = {\n routeId: result.routeId,\n pathname: matchPathname,\n params: matchParams,\n loaderData: result.loaderData\n };\n }\n matches[layoutResults.length] = {\n routeId: pageResult.routeId,\n pathname: matchPathname,\n params: matchParams,\n loaderData: pageResult.loaderData\n };\n const loaderData = pageResult.loaderData;\n for (const layout of layoutRoutes) {\n const key = layout.contextKey;\n const loaderFn = loaderCache.get(key);\n if (loaderFn) {\n const result = layoutResults.find((r) => r.routeId === key);\n if (result) {\n setSSRLoaderData(loaderFn, result.loaderData);\n }\n }\n }\n const pageLoaderFn = loaderCache.get(route.file);\n if (pageLoaderFn) {\n setSSRLoaderData(pageLoaderFn, pageResult.loaderData);\n }\n globalThis[\"__vxrnresetState\"]?.();\n const renderProps = {\n mode: route.type,\n loaderData,\n loaderProps,\n path: loaderProps?.path || \"/\",\n preloads: buildInfo2.criticalPreloads || buildInfo2.preloads,\n deferredPreloads: buildInfo2.deferredPreloads,\n css: buildInfo2.css,\n cssContents: buildInfo2.cssContents,\n matches\n };\n const _rl = ensureRenderLoaded();\n if (_rl) await _rl;\n const status = route.isNotFound ? 404 : 200;\n const responseHeaders = route.isNotFound ? htmlHeaders : ssrHtmlHeaders;\n if (useStreaming) {\n const stream = await renderStream(renderProps);\n return new Response(stream, {\n headers: responseHeaders,\n status\n });\n }\n const rendered = await render(renderProps);\n return new Response(rendered, {\n headers: responseHeaders,\n status\n });\n } catch (err) {\n if (isResponse(err)) {\n return err;\n }\n console.error(`[one] Error rendering SSR route ${route.file}\n\n${err?.[\"stack\"] ?? err}\n\nurl: ${url}`);\n }\n } else {\n const layoutRoutes = route.layouts || [];\n const needsSpaShell = route.type === \"spa\" && layoutRoutes.some(\n (layout) => layout.layoutRenderMode === \"ssg\" || layout.layoutRenderMode === \"ssr\"\n );\n if (needsSpaShell) {\n try {\n const layoutResults = await Promise.all(\n layoutRoutes.map((layout) => {\n const serverPath = layout.loaderServerPath || layout.contextKey;\n return importAndRunLoader(\n layout.contextKey,\n serverPath,\n layout.contextKey,\n loaderProps\n );\n })\n );\n const matches = layoutResults.map((result) => ({\n routeId: result.routeId,\n pathname: loaderProps?.path || \"/\",\n params: loaderProps?.params || {},\n loaderData: result.loaderData\n }));\n globalThis[\"__vxrnresetState\"]?.();\n const _rl3 = ensureRenderLoaded();\n if (_rl3) await _rl3;\n const rendered = await render({\n mode: \"spa-shell\",\n // don't pass loaderData for spa-shell - the page loader runs on client\n // passing {} here would make useLoaderState think data is preloaded\n loaderData: void 0,\n loaderProps,\n path: loaderProps?.path || \"/\",\n preloads: buildInfo2?.criticalPreloads || buildInfo2?.preloads,\n deferredPreloads: buildInfo2?.deferredPreloads,\n css: buildInfo2?.css,\n cssContents: buildInfo2?.cssContents,\n matches\n });\n return new Response(rendered, {\n headers: htmlHeaders,\n status: route.isNotFound ? 404 : 200\n });\n } catch (err) {\n if (isResponse(err)) {\n return err;\n }\n console.error(\n `[one] Error rendering spa-shell for ${route.file}\n${err?.[\"stack\"] ?? err}\nurl: ${url}`\n );\n }\n }\n const isDynamicRoute = Object.keys(route.routeKeys).length > 0;\n const routeCleanPath = route.urlCleanPath.replace(/\\?/g, \"\");\n const notFoundKey = route.isNotFound ? route.page.replace(/\\[([^\\]]+)\\]/g, \":$1\") : null;\n const htmlPath = notFoundKey ? routeMap[notFoundKey] : isDynamicRoute ? routeMap[routeCleanPath] || routeMap[url.pathname] : routeMap[url.pathname] || routeMap[buildInfo2?.cleanPath];\n if (htmlPath) {\n const html = await readStaticHtml(htmlPath, outDir);\n if (html) {\n const headers = new Headers();\n headers.set(\"content-type\", \"text/html\");\n return new Response(html, {\n headers,\n status: route.isNotFound ? 404 : 200\n });\n }\n }\n if (isDynamicRoute) {\n const notFoundRoute = findNearestNotFoundPath(url.pathname);\n const notFoundHtmlPath = routeMap[notFoundRoute];\n if (notFoundHtmlPath) {\n const notFoundHtml = await readStaticHtml(notFoundHtmlPath, outDir);\n if (notFoundHtml) {\n const notFoundMarker = `<script>window.__one404=${JSON.stringify({ originalPath: url.pathname, notFoundPath: notFoundRoute })}</script>`;\n const injectedHtml = notFoundHtml.includes(\"</head>\") ? notFoundHtml.replace(\"</head>\", `${notFoundMarker}</head>`) : notFoundHtml.replace(\"<body\", `${notFoundMarker}<body`);\n const headers = new Headers();\n headers.set(\"content-type\", \"text/html\");\n return new Response(injectedHtml, {\n headers,\n status: 404\n });\n }\n }\n return new Response(\"404 Not Found\", { status: 404 });\n }\n }\n }\n };\n function createHonoHandler(route) {\n const isDynamicOrNotFound = route.page.endsWith(\"/+not-found\") || Object.keys(route.routeKeys).length > 0;\n return async (context, next) => {\n try {\n const request = context.req.raw;\n if (isDynamicOrNotFound) {\n if (options?.serveStaticAssets) {\n const staticAssetResponse = await options.serveStaticAssets({\n context\n });\n if (staticAssetResponse) {\n return await runMiddlewares(\n requestHandlers,\n request,\n route,\n async () => staticAssetResponse\n );\n }\n }\n }\n const reqPath = context.req.path;\n if (reqPath.endsWith(\".js\") || reqPath.endsWith(\".css\")) {\n return next();\n }\n if (route.type === \"ssr\" && !route.middlewares?.length && !reqPath.endsWith(LOADER_JS_POSTFIX_UNCACHED)) {\n if (debugRouter) {\n console.info(`[one] \\u26A1 ${reqPath} \\u2192 matched page route: ${route.page} (ssr)`);\n }\n const pathname = reqPath;\n const rawUrl = request.url;\n const qIdx = rawUrl.indexOf(\"?\");\n const search = qIdx >= 0 ? rawUrl.slice(qIdx) : \"\";\n const params = {};\n const match = route.compiledRegex.exec(pathname);\n if (match?.groups) {\n for (const [key, value] of Object.entries(match.groups)) {\n const namedKey = route.routeKeys[key];\n params[namedKey] = value;\n }\n }\n const loaderProps = {\n path: pathname,\n search,\n subdomain: getSubdomain(getURLfromRequestURL(request)),\n request,\n params\n };\n const url2 = getURLfromRequestURL(request);\n const response2 = await resolveResponse(async () => {\n try {\n return await requestHandlers.handlePage({\n request,\n route,\n url: url2,\n loaderProps\n });\n } catch (err) {\n if (isResponse(err)) {\n return err;\n }\n throw err;\n }\n });\n if (response2) {\n if (isResponse(response2)) {\n if (isStatusRedirect(response2.status)) {\n const location = `${response2.headers.get(\"location\") || \"\"}`;\n forwardHeaders(response2, context);\n return context.redirect(location, response2.status);\n }\n return response2;\n }\n return next();\n }\n return next();\n }\n const url = getURLfromRequestURL(request);\n const response = await (() => {\n if (url.pathname.endsWith(LOADER_JS_POSTFIX_UNCACHED)) {\n const originalUrl = getPathFromLoaderPath(url.pathname);\n if (route.type === \"ssg\" && Object.keys(route.routeKeys).length > 0) {\n if (!routeMap[originalUrl]) {\n return new Response(\n make404LoaderJs(originalUrl, \"ssg route not in routeMap\"),\n {\n headers: { \"Content-Type\": \"text/javascript\" }\n }\n );\n }\n }\n const finalUrl = new URL(originalUrl, url.origin);\n finalUrl.search = url.search;\n const cleanedRequest = new Request(finalUrl, request);\n return resolveLoaderRoute(requestHandlers, cleanedRequest, finalUrl, route);\n }\n switch (route.type) {\n case \"api\": {\n if (debugRouter) {\n console.info(\n `[one] \\u26A1 ${url.pathname} \\u2192 matched API route: ${route.page}`\n );\n }\n return resolveAPIRoute(requestHandlers, request, url, route);\n }\n case \"ssg\":\n case \"spa\":\n case \"ssr\": {\n if (debugRouter) {\n console.info(\n `[one] \\u26A1 ${url.pathname} \\u2192 matched page route: ${route.page} (${route.type})`\n );\n }\n return resolvePageRoute(requestHandlers, request, url, route);\n }\n }\n })();\n if (response) {\n if (isResponse(response)) {\n if (isStatusRedirect(response.status)) {\n const location = `${response.headers.get(\"location\") || \"\"}`;\n forwardHeaders(response, context);\n return context.redirect(location, response.status);\n }\n if (isAPIRequest.get(request)) {\n try {\n if (!response.headers.has(\"cache-control\") && !response.headers.has(\"Cache-Control\")) {\n response.headers.set(\"cache-control\", \"no-store\");\n }\n return response;\n } catch (err) {\n console.info(\n `Error updating cache header on api route \"${context.req.path}\" to no-store, it is ${response.headers.get(\"cache-control\")}, continue`,\n err\n );\n }\n }\n if (!response.headers.has(\"cache-control\") && !response.headers.has(\"Cache-Control\")) {\n if (route.type === \"ssg\" || route.type === \"spa\") {\n response.headers.set(\n \"cache-control\",\n \"public, s-maxage=60, stale-while-revalidate=120\"\n );\n } else {\n response.headers.set(\"cache-control\", \"no-cache\");\n }\n }\n return response;\n }\n return next();\n }\n } catch (err) {\n console.error(` [one] Error handling request: ${err[\"stack\"]}`);\n }\n return next();\n };\n }\n const compiledManifest = compileManifest(buildInfo.manifest);\n for (const route of compiledManifest.apiRoutes) {\n app.get(route.urlPath, createHonoHandler(route));\n app.put(route.urlPath, createHonoHandler(route));\n app.post(route.urlPath, createHonoHandler(route));\n app.delete(route.urlPath, createHonoHandler(route));\n app.patch(route.urlPath, createHonoHandler(route));\n app.options(route.urlPath, createHonoHandler(route));\n if (route.urlPath !== route.urlCleanPath) {\n app.get(route.urlCleanPath, createHonoHandler(route));\n app.put(route.urlCleanPath, createHonoHandler(route));\n app.post(route.urlCleanPath, createHonoHandler(route));\n app.delete(route.urlCleanPath, createHonoHandler(route));\n app.patch(route.urlCleanPath, createHonoHandler(route));\n app.options(route.urlCleanPath, createHonoHandler(route));\n }\n }\n for (const route of compiledManifest.pageRoutes) {\n app.get(route.urlPath, createHonoHandler(route));\n if (route.urlPath !== route.urlCleanPath) {\n app.get(route.urlCleanPath, createHonoHandler(route));\n }\n }\n const { preloads, cssPreloads } = buildInfo;\n app.get(\"*\", async (c, next) => {\n if (PRELOAD_JS_POSTFIX_REGEX.test(c.req.path)) {\n if (!preloads[c.req.path]) {\n c.header(\"Content-Type\", \"text/javascript\");\n c.status(200);\n return c.body(``);\n }\n }\n if (CSS_PRELOAD_JS_POSTFIX_REGEX.test(c.req.path)) {\n if (!cssPreloads?.[c.req.path]) {\n c.header(\"Content-Type\", \"text/javascript\");\n c.status(200);\n return c.body(`export default Promise.resolve()`);\n }\n }\n if (c.req.path.endsWith(LOADER_JS_POSTFIX_UNCACHED)) {\n const request = c.req.raw;\n const url = getURLfromRequestURL(request);\n const originalUrl = getPathFromLoaderPath(c.req.path);\n for (const route of compiledManifest.pageRoutes) {\n if (route.file === \"\") {\n continue;\n }\n if (!route.compiledRegex.test(originalUrl)) {\n continue;\n }\n if (route.type === \"ssg\" && Object.keys(route.routeKeys).length > 0 && !routeMap[originalUrl]) {\n c.header(\"Content-Type\", \"text/javascript\");\n c.status(200);\n return c.body(make404LoaderJs(originalUrl, \"ssg route not in routeMap\"));\n }\n const loaderRoute = {\n ...route,\n routeFile: route.file,\n // preserve original for lazy route lookup\n file: route.loaderServerPath || c.req.path\n };\n const finalUrl = new URL(originalUrl, url.origin);\n finalUrl.search = url.search;\n const cleanedRequest = new Request(finalUrl, request);\n try {\n const resolved = await resolveLoaderRoute(\n requestHandlers,\n cleanedRequest,\n finalUrl,\n loaderRoute\n );\n return resolved;\n } catch (err) {\n if (err?.code === \"ERR_MODULE_NOT_FOUND\") {\n c.header(\"Content-Type\", \"text/javascript\");\n c.status(200);\n return c.body(`export function loader() { return undefined }`);\n }\n console.error(`Error running loader: ${err}`);\n return next();\n }\n }\n }\n return next();\n });\n}\nexport {\n oneServe\n};\n//# sourceMappingURL=oneServe.js.map\n"],"mappings":";;;;;;;;;;;;;;AAwBA,MAAM,cAAc,QAAQ,IAAI;AAChC,MAAM,mBAAmB;AACzB,SAAS,WAAW,KAAK,KAAK,OAAO,KAAK;CACxC,IAAI,IAAI,IAAI,GAAG,GAAG;EAChB,IAAI,IAAI,KAAK,KAAK;EAClB;CACF;CACA,IAAI,IAAI,QAAQ,KAAK;EACnB,MAAM,WAAW,IAAI,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC;EACnC,IAAI,aAAa,KAAK,GAAG,IAAI,OAAO,QAAQ;CAC9C;CACA,IAAI,IAAI,KAAK,KAAK;AACpB;AACA,SAAS,eAAe,UAAU,SAAS;CACzC,MAAM,aAAa,SAAS,QAAQ,eAAe;CACnD,IAAI,YAAY,QAAQ;EACtB,KAAK,MAAM,UAAU,YAAY;GAC/B,QAAQ,OAAO,cAAc,QAAQ,EAAE,QAAQ,KAAK,CAAC;EACvD;CACF;CACA,SAAS,QAAQ,SAAS,OAAO,QAAQ;EACvC,IAAI,QAAQ,cAAc;EAC1B,QAAQ,OAAO,KAAK,KAAK;CAC3B,CAAC;AACH;AACA,eAAe,eAAe,UAAU,SAAS,QAAQ;CACvD,MAAM,kBAAkB,mBAAmB;CAC3C,IAAI,iBAAiB;EACnB,MAAM,OAAO,MAAM,gBAAgB,QAAQ;EAC3C,IAAI,MAAM,OAAO;CACnB;CACA,IAAI;EACF,OAAO,MAAM,SAAS,KAAK,GAAG,OAAO,UAAU,QAAQ,GAAG,OAAO;CACnE,QAAQ;EACN,OAAO;CACT;AACF;AACA,eAAe,SAAS,YAAY,WAAW,KAAK,SAAS;CAC3D,MAAM,SAAS,UAAU,UAAU;CACnC,MAAM,EAAE,iBAAiB,oBAAoB,qBAAqB,MAAM,OAAO;CAC/E,MAAM,EAAE,eAAe,MAAM,OAAO;CACpC,MAAM,EAAE,q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