@livx.cc/appwrap 0.51.2 → 0.51.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@livx.cc/appwrap",
3
- "version": "0.51.2",
3
+ "version": "0.51.3",
4
4
  "description": "Wrap any PWA into a native app with native capabilities (appwrap runtime + @livx.cc/native-kit).",
5
5
  "license": "MIT",
6
6
  "author": "Elya Livshitz",
@@ -236,14 +236,22 @@ export async function handleEnvDeepLink(link: string): Promise<void> {
236
236
  }
237
237
  }
238
238
 
239
- /** Free-form URL entry, gated by `allowPattern` (default-deny). Rejects a non-matching URL. */
239
+ /** Free-form URL entry, gated by `allowPattern` (default-deny). Rejects a non-matching URL.
240
+ *
241
+ * The field is deliberately EMPTY — do NOT re-add a `defaultText: 'https://'` prefill. A URL is the one
242
+ * input class users always PASTE, and a copied URL already carries its own scheme, so a prefill breaks
243
+ * exactly the case this field exists for: iOS pastes at the caret (which sits AFTER the prefill), giving
244
+ * `https://https://host` → rejected by `allowPattern` as "Not allowed". Typing masks the bug (you type the
245
+ * host after the prefix), which is why it reads as "paste doesn't work". An empty field is also where iOS
246
+ * offers Paste most readily — long-pressing a NON-empty field raises the cursor loupe, not the edit menu.
247
+ * The `https://` hint lives in `message` instead, where it can't contaminate the value.
248
+ */
240
249
  async function promptOther(): Promise<void> {
241
250
  const res = await Dialogs.prompt({
242
251
  title: 'Custom environment',
243
- message: 'Enter an allowed URL (https://…).',
252
+ message: 'Enter or paste an allowed URL (https://…).',
244
253
  okButtonText: 'Next',
245
254
  cancelButtonText: 'Cancel',
246
- defaultText: 'https://',
247
255
  inputType: 'text',
248
256
  });
249
257
  if (!res?.result || !res.text) return;