@protobase/ui 0.45.11 → 0.45.13
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/dist/app/app.js +5 -14
- package/dist/app/main.js +5 -1
- package/dist/app/native-auth-fetch.d.ts +1 -0
- package/dist/app/native-keyboard.js +12 -0
- package/dist/app/start-address.js +33 -0
- package/dist/auth/auth-layout.d.ts +4 -1
- package/dist/auth/auth-layout.js +8 -5
- package/dist/package.js +1 -1
- package/dist/shell/assets/app-MiV8H8q5.js +9 -0
- package/dist/shell/assets/index-Cg51t-tt.js +2 -0
- package/dist/shell/assets/{index-Bq-Va32r.css → index-DE9AVN7c.css} +1 -1
- package/dist/shell/assets/{records-map-C7Yrt8CO.js → records-map-B790KKFd.js} +2 -2
- package/dist/shell/assets/{shared-protobase-ui-DXC2wqY-.js → shared-protobase-ui-DTa3Mk47.js} +2 -2
- package/dist/shell/index.html +4 -4
- package/dist/shell/protobase.shell.json +1 -1
- package/dist/shell/protobase.sw.js +2 -2
- package/dist/shell-source-maps/assets/app-MiV8H8q5.js.map +1 -0
- package/dist/shell-source-maps/assets/index-Cg51t-tt.js.map +1 -0
- package/dist/shell-source-maps/assets/{records-map-C7Yrt8CO.js.map → records-map-B790KKFd.js.map} +1 -1
- package/dist/shell-source-maps/assets/{shared-protobase-ui-DXC2wqY-.js.map → shared-protobase-ui-DTa3Mk47.js.map} +1 -1
- package/dist/theme.css +2 -0
- package/package.json +4 -4
- package/dist/shell/assets/app-BR3MIvSi.js +0 -9
- package/dist/shell/assets/index-wwDSTSGY.js +0 -2
- package/dist/shell-source-maps/assets/app-BR3MIvSi.js.map +0 -1
- package/dist/shell-source-maps/assets/index-wwDSTSGY.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-wwDSTSGY.js","names":["createRoot","StrictMode","projectUi","__exportAll","__toESM","require_react","require_client","require_jsx_runtime","uiFromModule","nativeBridgeOf","App","relList","link","processPreload","mutation","mutations","node","getFetchOpts","fetchOpts","import_react","import_client","_virtual_protobase_project_ui_exports","_virtual_protobase_project_ui_default","apiOriginMeta","nativeViewport","content","part","applyNativeViewport","meta","doc","apiOriginOf","contents","value","url","pageApiOrigin","import_jsx_runtime","root","nativeBridge","browserLocale"],"sources":["../../../../schema/src/api-origin-meta.ts","../../../src/app/native-viewport.ts","../../../src/app/page-api-origin.ts","../../../src/app/main.tsx"],"sourcesContent":["/**\n * The `<meta name>` whose `content` names the origin of the API the shell calls, such as `https://shop.example.com`, for\n * a page served from elsewhere: `protobase mobile` writes it into the app's `index.html`. Without it, the shell calls\n * the API on its own origin.\n */\nexport const apiOriginMeta = 'protobase-api-origin'\n","/**\n * The viewport of the iOS and Android app: as the page's, at a scale of one. Safari on iOS zooms into an input whose\n * text is smaller than 16px when it is focused, and in the app the page then stays zoomed with its right side cut off;\n * an app does not zoom, so its viewport stays at that scale, under a pinch too. The page in a browser keeps its zoom.\n */\nexport const nativeViewport = (content: string) => {\n const kept = content.split(',').map((part) => part.trim()).filter((part) => part && !/^maximum-scale\\s*=/.test(part))\n return [...kept, 'maximum-scale=1'].join(', ')\n}\n\n/** Gives the document's viewport the app's scale; a document without a viewport tag needs none. */\nexport const applyNativeViewport = (doc: Document) => {\n const meta = doc.querySelector('meta[name=\"viewport\"]')\n if (!meta) return\n meta.setAttribute('content', nativeViewport(meta.getAttribute('content') ?? ''))\n}\n","import { apiOriginMeta } from '@protobase/schema/internal'\n\n/**\n * The API origin the page's `<meta name=\"protobase-api-origin\">` tags name: `undefined` without one. Anything but one\n * tag holding exactly an http or https origin, such as `https://shop.example.com`, is an error.\n */\nexport const apiOriginOf = (contents: string[]) => {\n if (contents.length === 0) return undefined\n if (contents.length > 1) throw new Error(`The page has ${contents.length} ${apiOriginMeta} meta tags; it may have one`)\n const value = contents[0]!\n const url = URL.canParse(value) ? new URL(value) : undefined\n if (!url || (url.protocol !== 'http:' && url.protocol !== 'https:') || url.origin !== value) {\n throw new Error(`The page's ${apiOriginMeta} meta tag holds \"${value}\", which is not an http or https origin such as https://shop.example.com`)\n }\n return value\n}\n\n/** The API origin this page names in its `<meta name=\"protobase-api-origin\">` (see `apiOriginOf`). */\nexport const pageApiOrigin = () =>\n apiOriginOf([...document.querySelectorAll<HTMLMetaElement>(`meta[name=\"${apiOriginMeta}\"]`)].map((meta) => meta.content))\n","import { StrictMode } from 'react'\nimport { createRoot } from 'react-dom/client'\nimport * as projectUi from 'virtual:protobase-project-ui'\nimport '../styles.css'\nimport { browserLocale } from '../locale/active-locale'\nimport { App } from './app'\nimport { nativeBridgeOf, type NativeBridge } from './native-auth-fetch'\nimport { applyNativeViewport } from './native-viewport'\nimport { pageApiOrigin } from './page-api-origin'\nimport { uiFromModule } from './pages/ui-from-module'\n\nconst root = document.getElementById('root')\nif (!root) throw new Error('index.html needs an element with id \"root\"')\n\nconst nativeBridge = nativeBridgeOf(window as { Capacitor?: NativeBridge })\nif (nativeBridge) applyNativeViewport(document)\n\ncreateRoot(root).render(\n <StrictMode>\n <App baseUrl={`${pageApiOrigin() ?? ''}/api/v1`} ui={uiFromModule(projectUi)} locale={browserLocale()} nativeBridge={nativeBridge} />\n </StrictMode>,\n)\n"],"mappings":"85BAKauB,EAAgB,uBCAhBC,EAAkB,GAEtB,CAAC,GADKC,EAAQ,MAAM,GAAG,CAAC,CAAC,IAAK,GAASC,EAAK,KAAK,CAAC,CAAC,CAAC,OAAQ,GAASA,GAAQ,CAAC,qBAAqB,KAAKA,CAAI,CACxG,EAAM,iBAAiB,CAAC,CAAC,KAAK,IAAI,EAIlCC,EAAuB,GAAkB,CACpD,IAAMC,EAAOC,EAAI,cAAc,uBAAuB,EACjDD,GACLA,EAAK,aAAa,UAAWJ,EAAeI,EAAK,aAAa,SAAS,GAAK,EAAE,CAAC,CACjF,ECTaE,EAAe,GAAuB,CACjD,GAAIC,EAAS,SAAW,EAAG,OAC3B,GAAIA,EAAS,OAAS,EAAG,MAAU,MAAM,gBAAgBA,EAAS,OAA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