@ng-native/web 0.0.1 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +79 -1
  3. package/dist/browser-engine.d.ts +146 -0
  4. package/dist/browser-engine.js +585 -0
  5. package/dist/browser-engine.js.map +1 -0
  6. package/dist/browser-renderer.d.ts +87 -0
  7. package/dist/browser-renderer.js +295 -0
  8. package/dist/browser-renderer.js.map +1 -0
  9. package/dist/css-units.d.ts +9 -0
  10. package/dist/css-units.js +98 -0
  11. package/dist/css-units.js.map +1 -0
  12. package/dist/device-sources.d.ts +53 -0
  13. package/dist/device-sources.js +96 -0
  14. package/dist/device-sources.js.map +1 -0
  15. package/dist/dom-node.d.ts +63 -0
  16. package/dist/dom-node.js +103 -0
  17. package/dist/dom-node.js.map +1 -0
  18. package/dist/elements.d.ts +79 -0
  19. package/dist/elements.js +53 -0
  20. package/dist/elements.js.map +1 -0
  21. package/dist/index.d.ts +17 -0
  22. package/dist/index.js +18 -0
  23. package/dist/index.js.map +1 -0
  24. package/dist/island.d.ts +46 -0
  25. package/dist/island.js +109 -0
  26. package/dist/island.js.map +1 -0
  27. package/dist/jsdom-env.d.ts +4 -0
  28. package/dist/jsdom-env.js +67 -0
  29. package/dist/jsdom-env.js.map +1 -0
  30. package/dist/mount.d.ts +88 -0
  31. package/dist/mount.js +240 -0
  32. package/dist/mount.js.map +1 -0
  33. package/dist/native-style.d.ts +8 -0
  34. package/dist/native-style.js +108 -0
  35. package/dist/native-style.js.map +1 -0
  36. package/dist/props.d.ts +54 -0
  37. package/dist/props.js +608 -0
  38. package/dist/props.js.map +1 -0
  39. package/dist/reset-css.d.ts +26 -0
  40. package/dist/reset-css.js +163 -0
  41. package/dist/reset-css.js.map +1 -0
  42. package/dist/reset.css +282 -0
  43. package/dist/responder.d.ts +55 -0
  44. package/dist/responder.js +137 -0
  45. package/dist/responder.js.map +1 -0
  46. package/dist/web-view.d.ts +46 -0
  47. package/dist/web-view.js +93 -0
  48. package/dist/web-view.js.map +1 -0
  49. package/package.json +92 -3
  50. package/vite.d.mts +11 -0
  51. package/vite.mjs +41 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"props.js","sourceRoot":"","sources":["../src/props.ts"],"names":[],"mappings":"AAoCA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,SAAS,EAAE,CAAC,IAAiB;IAC3B,OAAO,IAAI,CAAC,EAAa,CAAC;AAC5B,CAAC;AAED,SAAS,WAAW,CAAC,IAAiB,EAAE,IAAY,EAAE,KAAc,EAAE,KAAc;IAClF,IAAI,KAAK;QAAE,EAAE,CAAC,IAAI,CAAC,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;;QACrC,EAAE,CAAC,IAAI,CAAC,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;AAClD,CAAC;AAED,SAAS,YAAY,CAAC,IAAiB,EAAE,IAAY,EAAE,KAAc,EAAE,KAAc;IACnF,MAAM,KAAK,GAAI,EAAE,CAAC,IAAI,CAAiB,CAAC,KAAK,CAAC;IAC9C,IAAI,KAAK;QAAE,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;;QACjC,KAAK,CAAC,WAAW,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC;AACtD,CAAC;AAED;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAqC;IACxD,IAAI,EAAE,cAAc;IACpB,MAAM,EAAE,QAAQ;IAChB,YAAY,EAAE,QAAQ;IACtB,IAAI,EAAE,MAAM;IACZ,MAAM,EAAE,WAAW;IACnB,KAAK,EAAE,KAAK;IACZ,UAAU,EAAE,QAAQ;IACpB,WAAW,EAAE,QAAQ;IACrB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AAS,CAAC,IAAiB,EAAE,GAAW,EAAE,KAAc,EAAE,KAAc;IACtF,MAAM,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;IACpD,MAAM,WAAW,GAAG,kBAAkB,CAAC,GAAG,CAAC,CAAC;IAC5C,IAAI,cAAc,IAAI,WAAW,EAAE,CAAC;QAClC,cAAc,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;QACrC,WAAW,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;QAClC,OAAO;IACT,CAAC;IACD,IAAI,KAAK,EAAE,CAAC;QACV,EAAE,CAAC,IAAI,CAAC,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC;QAC9B,OAAO;IACT,CAAC;IACD,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,KAAK,KAAK,SAAS,EAAE,CAAC;QACzF,EAAE,CAAC,IAAI,CAAC,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;IAC5C,CAAC;AACH,CAAC","sourcesContent":["/**\n * Every prop `BrowserEngine.setProp` gives a DOM or ARIA meaning to, keyed by prop name and\n * (where two elements use the same prop name differently) by the node's own template name.\n *\n * `packages/components/src/view-base.ts` is the biggest source of these - roughly forty\n * accessibility and identity inputs every host primitive carries - plus a smaller set each of\n * `text-input.ts`, `switch.ts`, `image.ts`, `safe-area-view.ts` and `modal.ts` layers on top for\n * their own element. A lookup table rather than a `switch`, for the same reason the prototype\n * (`examples/web-button/src/browser-engine.ts`) gives: this reads as data instead of control\n * flow, and it is where a review can see, at a glance, what the file's own comments below say in\n * prose - which props got a translated DOM meaning and which did not.\n *\n * ## The fallback for everything not in a table\n *\n * A prop with no handler here does not disappear the way it would if this file's tables were the\n * whole story: `applyProp`'s fallback writes any remaining string, number or boolean prop as a\n * plain attribute under its own name. This is not a guess - it is what a real prop reaches native\n * as too. `engine.ts`'s `Engine.setProp` puts *everything* in `node.props`, unconditionally, and\n * the whole bag is what a commit sends to the native view; native ignores what it does not\n * recognise rather than this package having to know in advance which of Tailwind's compiled\n * `data-*` attribute selectors (`data-slot`, `data-variant`, `data-state`, and whatever a future\n * component invents) a class string will need to match against. The fallback is what makes that\n * true here too, without enumerating every one.\n *\n * What genuinely gets nothing, because a plain attribute could not carry it or would be actively\n * wrong: an object or array prop with no scalar form (`hitSlop`'s insets, `accessibilityActions`,\n * the Android-drawable props), and iOS-only accessibility surfaces with no ARIA equivalent at all\n * (`accessibilityIgnoresInvertColors`, `accessibilityLargeContentTitle`,\n * `accessibilityShowsLargeContentViewer`, `accessibilityRespondsToUserInteraction`) - these last\n * four are strings/booleans that *would* fall through to the generic attribute write and sit\n * inertly in the DOM if not named here, which is harmless but worth being honest about rather\n * than implying they did something. Named in this comment rather than omitted from it, for the\n * reason `host.ts` gives for its own exclusions: a divergence that is not written down is the\n * failure this project cares about.\n */\nimport type { BrowserNode } from './dom-node.ts';\nimport { cssValue, dashCase } from './css-units.ts';\nimport { writeStyleKey } from './native-style.ts';\n\nfunction el(node: BrowserNode): Element {\n return node.el as Element;\n}\n\nfunction setOrRemove(node: BrowserNode, attr: string, value: unknown, clear: boolean): void {\n if (clear) el(node).removeAttribute(attr);\n else el(node).setAttribute(attr, String(value));\n}\n\nfunction setStyleProp(node: BrowserNode, prop: string, value: unknown, clear: boolean): void {\n const style = (el(node) as HTMLElement).style;\n if (clear) style.removeProperty(prop);\n else style.setProperty(prop, cssValue(prop, value));\n}\n\n/**\n * `accessibilityRole`/`role` values with a direct ARIA `role`. Not every RN role has one -\n * `pager`, `scrollview`, `horizontalscrollview`, `webview`, `drawerlayout`, `slidingdrawer`,\n * `keyboardkey` and `text` name platform widgets ARIA has no vocabulary for - those fall through\n * to the literal value, an unrecognised `role` an assistive technology ignores rather than a wrong\n * one it acts on. `element-props.test.ts` holds this list against `view-base.ts`'s own.\n */\nexport const ROLE_MAP: Readonly<Record<string, string>> = {\n none: 'presentation',\n button: 'button',\n togglebutton: 'button',\n link: 'link',\n search: 'searchbox',\n image: 'img',\n adjustable: 'slider',\n imagebutton: 'button',\n header: 'heading',\n // A summary of the screen, as a region with its own name; `contentinfo` is the page's footer.\n summary: 'region',\n alert: 'alert',\n checkbox: 'checkbox',\n combobox: 'combobox',\n menu: 'menu',\n menubar: 'menubar',\n menuitem: 'menuitem',\n progressbar: 'progressbar',\n radio: 'radio',\n radiogroup: 'radiogroup',\n scrollbar: 'scrollbar',\n spinbutton: 'spinbutton',\n switch: 'switch',\n tab: 'tab',\n tabbar: 'tablist',\n tablist: 'tablist',\n timer: 'timer',\n list: 'list',\n toolbar: 'toolbar',\n grid: 'grid',\n viewgroup: 'group',\n iconmenu: 'menu',\n};\n\nfunction applyRole(node: BrowserNode, value: unknown, clear: boolean): void {\n const role = typeof value === 'string' ? (ROLE_MAP[value] ?? value) : undefined;\n setOrRemove(node, 'role', role, clear || role === undefined);\n // Which attribute `checked` goes to depends on the role, and the two arrive in either order.\n const state = node.props['accessibilityState'];\n applyAccessibilityState(node, state, state === undefined || state === null);\n}\n\nfunction applyAccessibilityState(node: BrowserNode, value: unknown, clear: boolean): void {\n const state = clear ? undefined : (value as Record<string, unknown> | undefined);\n setOrRemove(node, 'aria-disabled', state?.['disabled'], state?.['disabled'] !== true);\n setOrRemove(node, 'aria-busy', state?.['busy'], state?.['busy'] !== true);\n setOrRemove(node, 'aria-selected', state?.['selected'], state?.['selected'] === undefined);\n setOrRemove(node, 'aria-expanded', state?.['expanded'], state?.['expanded'] === undefined);\n applyChecked(node, state?.['checked']);\n}\n\n/**\n * A button is pressed rather than checked: ARIA gives `aria-checked` no meaning on one, so a\n * screen reader said nothing of a checked `togglebutton`, where a device says \"on\".\n */\nfunction applyChecked(node: BrowserNode, checked: unknown): void {\n const pressed = el(node).getAttribute('role') === 'button';\n setOrRemove(node, 'aria-pressed', checked, checked === undefined || !pressed);\n setOrRemove(node, 'aria-checked', checked, checked === undefined || pressed);\n}\n\nfunction applyAccessibilityValue(node: BrowserNode, value: unknown, clear: boolean): void {\n const v = clear ? undefined : (value as Record<string, unknown> | undefined);\n setOrRemove(node, 'aria-valuemin', v?.['min'], v?.['min'] === undefined);\n setOrRemove(node, 'aria-valuemax', v?.['max'], v?.['max'] === undefined);\n setOrRemove(node, 'aria-valuenow', v?.['now'], v?.['now'] === undefined);\n setOrRemove(node, 'aria-valuetext', v?.['text'], v?.['text'] === undefined);\n}\n\nfunction joinIfArray(value: unknown): unknown {\n return Array.isArray(value) ? value.join(' ') : value;\n}\n\ntype Handler = (node: BrowserNode, value: unknown, clear: boolean) => void;\n\n/** For a prop that genuinely has nothing to do on the web; see the file doc comment. */\nconst noop: Handler = () => {};\n\n/** The keys the last whole `style` object wrote, so the next one can remove what it leaves out. */\nconst writtenStyles = new WeakMap<BrowserNode, Set<string>>();\n\n/**\n * A static `style=\"flex: 1; margin-top: 4px\"`, which Angular writes whole through `setAttribute`,\n * as the object it declares. Parsed by a scratch declaration rather than split on `;` and `:`,\n * because on the web a value can hold both: `url(data:image/png;base64,...)`.\n */\nfunction declarations(node: BrowserNode, css: string): Record<string, string> {\n const scratch = el(node).ownerDocument.createElement('div').style;\n scratch.cssText = css;\n const out: Record<string, string> = {};\n for (const name of Array.from(scratch)) out[name] = scratch.getPropertyValue(name);\n return out;\n}\n\n/**\n * A whole style object as the `style` prop: what `[animatedStyle]` writes each frame. Angular's\n * own `[style]` bindings arrive one key at a time through the renderer's `setStyle` instead, and\n * a static `style` attribute arrives here too, as a string.\n */\nfunction applyStyleObject(node: BrowserNode, value: unknown, clear: boolean): void {\n const style = (el(node) as HTMLElement).style;\n const next = new Set<string>();\n // Kept as the object too, so a later `setStyle` mirrors into declarations rather than a string.\n if (typeof value === 'string') value = node.props['style'] = declarations(node, value);\n if (!clear && typeof value === 'object') {\n const keyed: Record<string, unknown> = {};\n for (const [name, v] of Object.entries(value as Record<string, unknown>)) {\n if (v !== null && v !== undefined) keyed[dashCase(name)] = v;\n }\n for (const key of Object.keys(keyed)) {\n for (const written of writeStyleKey(style, key, keyed)) next.add(written);\n }\n }\n for (const key of writtenStyles.get(node) ?? []) if (!next.has(key)) style.removeProperty(key);\n writtenStyles.set(node, next);\n}\n\n/** `ViewBase`'s own props: identical meaning on every element, whatever it committed as. */\nconst VIEW_BASE_HANDLERS: Record<string, Handler> = {\n style: applyStyleObject,\n accessibilityLabel: (n, v, c) => setOrRemove(n, 'aria-label', v, c),\n accessibilityHint: (n, v, c) => setOrRemove(n, 'aria-description', v, c),\n accessibilityLabelledBy: (n, v, c) => setOrRemove(n, 'aria-labelledby', joinIfArray(v), c),\n accessibilityRole: applyRole,\n role: applyRole,\n accessibilityState: applyAccessibilityState,\n accessibilityValue: applyAccessibilityValue,\n accessibilityLiveRegion: (n, v, c) => setOrRemove(n, 'aria-live', v === 'none' ? 'off' : v, c),\n accessibilityElementsHidden: (n, v, c) => setOrRemove(n, 'aria-hidden', v, c || v !== true),\n // `no` and `no-hide-descendants` both hide the subtree on the web: ARIA has no way to hide a\n // node from the accessibility tree while keeping its descendants individually reachable, which\n // is the one place `no` and `no-hide-descendants` differ on Android.\n importantForAccessibility: (n, v, c) => {\n const hide = v === 'no' || v === 'no-hide-descendants';\n setOrRemove(n, 'aria-hidden', true, c || !hide);\n },\n accessibilityViewIsModal: (n, v, c) => setOrRemove(n, 'aria-modal', v, c || v !== true),\n accessibilityLanguage: (n, v, c) => setOrRemove(n, 'lang', v, c),\n nativeID: (n, v, c) => setOrRemove(n, 'id', v, c),\n id: (n, v, c) => setOrRemove(n, 'id', v, c),\n testID: (n, v, c) => setOrRemove(n, 'data-testid', v, c),\n focusable: (n, v, c) => setOrRemove(n, 'tabindex', v ? '0' : '-1', c),\n pointerEvents: (n, v, c) => {\n // `none` and `auto` map onto the CSS property directly. `box-none` and `box-only` have no\n // exact CSS equivalent - native's version lets a *box* opt out of hit-testing while every\n // descendant keeps receiving touches regardless of its own props; CSS `pointer-events` only\n // has inheritance, which an explicit `auto` on a descendant can override but a plain,\n // untouched descendant cannot escape. Approximated rather than left as a no-op: `box-none`\n // sets `none` on the node itself, `box-only` sets `auto`, which is the more useful default in\n // both directions: a full-window layer that is `box-none` lets touches through to the app\n // under it, and a card inside that sets its own `pointerEvents: 'auto'` opts back in, which\n // is precisely CSS's override rule and needs no web-specific code of its own to work.\n //\n // What this does not do: it does not make an *untouched* descendant of a `box-none` node\n // clickable the way native does automatically - a component that never had to say\n // `pointerEvents=\"auto\"` on native because `box-none` only ever excluded the box itself will\n // need to say so here too. `overlay-host`'s own content is the only place this project has\n // exercised the gap.\n if (v === 'none' || v === 'box-none') setStyleProp(n, 'pointer-events', 'none', c);\n else if (v === 'auto' || v === 'box-only') setStyleProp(n, 'pointer-events', 'auto', c);\n else setStyleProp(n, 'pointer-events', '', true);\n },\n // Object/array props with no scalar form the generic fallback could write, and iOS-only\n // accessibility surfaces with no ARIA equivalent at all. See the file doc comment's second\n // section for why these are named rather than left to fall through.\n hitSlop: noop,\n accessibilityActions: noop,\n nativeBackgroundAndroid: noop,\n nativeForegroundAndroid: noop,\n accessibilityIgnoresInvertColors: noop,\n accessibilityLargeContentTitle: noop,\n accessibilityShowsLargeContentViewer: noop,\n accessibilityRespondsToUserInteraction: noop,\n};\n\n/** `text-input.ts`'s own props, applied to the `<textarea>` `elements.ts` creates for it. */\nconst TEXT_INPUT_HANDLERS: Record<string, Handler> = {\n text: (n, v, c) => {\n const textarea = el(n) as HTMLTextAreaElement;\n const next = c ? '' : String(v);\n // Only when it actually differs: the caret and scroll position reset on every write, even\n // one that sets the value to what it already was, and `TextInput`'s own echo write does\n // exactly that on every keystroke unless this guard is here.\n if (textarea.value !== next) textarea.value = next;\n },\n placeholder: (n, v, c) => setOrRemove(n, 'placeholder', v, c),\n // No inline way to style a pseudo-element, so the colour travels as a custom property and\n // `reset.css` reads it back with `::placeholder`.\n placeholderTextColor: (n, v, c) => setStyleProp(n, '--rn-placeholder-color', v, c),\n keyboardType: (n, v, c) => {\n const map: Record<string, string> = {\n numeric: 'numeric',\n 'number-pad': 'numeric',\n 'decimal-pad': 'decimal',\n 'email-address': 'email',\n 'phone-pad': 'tel',\n url: 'url',\n };\n const mode = typeof v === 'string' ? map[v] : undefined;\n setOrRemove(n, 'inputmode', mode, c || mode === undefined);\n },\n returnKeyType: (n, v, c) => {\n const known = new Set(['done', 'go', 'next', 'search', 'send', 'previous']);\n const hint = typeof v === 'string' && known.has(v) ? v : undefined;\n setOrRemove(n, 'enterkeyhint', hint, c || hint === undefined);\n },\n secureTextEntry: (n, v, c) => setStyleProp(n, '-webkit-text-security', v ? 'disc' : '', c || !v),\n autoCapitalize: (n, v, c) => setOrRemove(n, 'autocapitalize', v === 'none' ? 'off' : v, c),\n autoCorrect: (n, v, c) => setOrRemove(n, 'autocorrect', v ? 'on' : 'off', c),\n autoFocus: (n, v, c) => {\n if (!c && v) (el(n) as HTMLElement).focus();\n },\n maxLength: (n, v, c) => setOrRemove(n, 'maxlength', v, c),\n multiline: (n, v, c) => setOrRemove(n, 'data-multiline', '', c || v !== true),\n numberOfLines: (n, v, c) => setOrRemove(n, 'rows', v, c || n.props['multiline'] !== true),\n editable: (n, v, c) => {\n (el(n) as HTMLTextAreaElement).readOnly = !c && v === false;\n },\n selection: (n, v, c) => {\n if (c) return;\n const range = v as { start: number; end?: number };\n (el(n) as HTMLTextAreaElement).setSelectionRange(range.start, range.end ?? range.start);\n },\n selectTextOnFocus: (n, v, c) => setOrRemove(n, 'data-select-on-focus', '', c || v !== true),\n textAlign: (n, v, c) => setStyleProp(n, 'text-align', v, c),\n spellCheck: (n, v, c) => setOrRemove(n, 'spellcheck', v ? 'true' : 'false', c),\n autoComplete: (n, v, c) => setOrRemove(n, 'autocomplete', v, c),\n};\n\n/** `switch.ts`'s own props, applied to the `<input type=\"checkbox\">` `elements.ts` creates. */\nconst SWITCH_HANDLERS: Record<string, Handler> = {\n on: (n, v, c) => {\n (el(n) as HTMLInputElement).checked = !c && v === true;\n },\n value: (n, v, c) => {\n (el(n) as HTMLInputElement).checked = !c && v === true;\n },\n disabled: (n, v, c) => {\n (el(n) as HTMLInputElement).disabled = !c && v === true;\n },\n};\n\n/** `image.ts`'s own props. `image` paints with `background-image`; see `elements.ts`. */\nconst IMAGE_HANDLERS: Record<string, Handler> = {\n source: (n, v, c) => {\n const uri = sourceUri(c ? undefined : v);\n setStyleProp(n, 'background-image', uri ? `url(\"${cssEscape(uri)}\")` : '', !uri);\n if (uri) watchImageLoad(n, uri);\n },\n resizeMode: (n, v, c) => {\n const size: Record<string, string> = {\n cover: 'cover',\n contain: 'contain',\n stretch: '100% 100%',\n };\n const mode = typeof v === 'string' ? v : undefined;\n setStyleProp(n, 'background-size', mode ? (size[mode] ?? 'auto') : '', c || !mode);\n setStyleProp(n, 'background-repeat', mode === 'repeat' ? 'repeat' : 'no-repeat', c);\n setStyleProp(n, 'background-position', 'center', c);\n },\n blurRadius: (n, v, c) =>\n setStyleProp(n, 'filter', typeof v === 'number' ? `blur(${v}px)` : '', c),\n /**\n * The picture's own size, which on native is a default the cascade can override. Written as\n * custom properties that `reset.css` reads at the weakest specificity there is, since an inline\n * `width` would beat the app's own classes here exactly as it would on a device.\n */\n intrinsicSize: (n, v, c) => {\n const size = c ? undefined : (v as { width?: unknown; height?: unknown } | undefined);\n const px = (value: unknown) => (typeof value === 'number' ? `${value}px` : '');\n setStyleProp(n, '--rn-intrinsic-width', px(size?.width), !px(size?.width));\n setStyleProp(n, '--rn-intrinsic-height', px(size?.height), !px(size?.height));\n },\n};\n\n/**\n * Says whether a `background-image` loaded, which the property itself will not.\n *\n * An `<image>` paints with `background-image` here (see `elements.ts` for why), and a background\n * fires no `load` or `error` event - only a real `<img>` does. React Native's `Image` reports\n * both, and things depend on it: an avatar-style component that swaps to a fallback when the\n * image errors needs exactly this signal. Without it a broken image URL sat blank forever,\n * showing neither a picture nor a fallback.\n *\n * A detached `Image()` is the standard way to ask. It shares the browser's cache with the\n * background the element is already painting, so this costs a cache lookup rather than a second\n * download.\n *\n * The answer is dispatched as an ordinary DOM event on the element itself, rather than pushed\n * through the engine, so it reaches `(load)` and `(error)` by the same path every other plain\n * binding takes. That is also why `topLoad` and `topError` are not in `browser-engine.ts`'s\n * reserved set: there is a real DOM event of each name here, and it is this one.\n *\n * The uri is remembered so a source that changes mid-flight cannot have its old answer arrive\n * late and overwrite the new one, which is the stale-response guard any fetch needs.\n */\nconst IMAGE_LOADS = new WeakMap<object, string>();\n\nfunction watchImageLoad(node: BrowserNode, uri: string): void {\n IMAGE_LOADS.set(node, uri);\n const el = node.el as Element;\n const view = el.ownerDocument.defaultView;\n if (!view) return;\n const probe = new view.Image();\n const settle = (type: 'load' | 'error') => () => {\n if (IMAGE_LOADS.get(node) === uri) el.dispatchEvent(new view.Event(type));\n };\n probe.addEventListener('load', settle('load'));\n probe.addEventListener('error', settle('error'));\n probe.src = uri;\n}\n\nfunction sourceUri(value: unknown): string | undefined {\n if (!value) return undefined;\n if (typeof value === 'object' && 'uri' in (value as object)) {\n return (value as { uri?: string }).uri;\n }\n if (Array.isArray(value) && value.length > 0) return sourceUri(value[0]);\n return undefined;\n}\n\nfunction cssEscape(value: string): string {\n return value.replace(/[\"\\\\]/g, (c) => `\\\\${c}`);\n}\n\n/**\n * `safe-area-view.ts`'s `edges`/`mode`. Applied on either changing, from both current values,\n * because native takes all four edges together and this follows the same rule (see that file's\n * own `resolvedEdges` comment).\n *\n * `env(safe-area-inset-*)` is the real CSS mechanism for this - a phone with a notch reports a\n * non-zero inset through it, the same number `react-native-safe-area-context` reads on iOS. What\n * is not reproduced: `additive` mode is documented as adding the inset to whatever padding a\n * caller's own class already put there, and there is no way to read that back out of a\n * stylesheet this engine cannot inspect - so `additive` and `maximum` both resolve to `env()`\n * alone here, which is `maximum` against a base of zero. A caller relying on `additive` stacking\n * with its own padding will see less padding on the web than on native.\n */\nconst EDGE_PROP: Record<string, string> = {\n top: 'top',\n right: 'right',\n bottom: 'bottom',\n left: 'left',\n};\n\nfunction applySafeAreaInsets(node: BrowserNode): void {\n const edges = node.props['edges'] as Record<string, string> | undefined;\n const mode = (node.props['mode'] as string | undefined) ?? 'padding';\n const family = mode === 'margin' ? 'margin' : 'padding';\n // The family not in use is cleared too, or switching mode left the old insets behind.\n const other = family === 'margin' ? 'padding' : 'margin';\n for (const edge of Object.keys(EDGE_PROP)) {\n const edgeMode = edges?.[edge];\n const prop = `${family}-${EDGE_PROP[edge]}`;\n setStyleProp(node, `${other}-${EDGE_PROP[edge]}`, '', true);\n if (!edgeMode || edgeMode === 'off') setStyleProp(node, prop, '', true);\n else setStyleProp(node, prop, `env(safe-area-inset-${edge})`, false);\n }\n}\n\nconst SAFE_AREA_HANDLERS: Record<string, Handler> = {\n edges: (n) => applySafeAreaInsets(n),\n mode: (n) => applySafeAreaInsets(n),\n};\n\n/**\n * `modal.ts`'s own props. `visible` defaults to `true` there specifically so a mounted-but-hidden\n * host does not swallow touches over nothing (see that file's doc comment); on the web the same\n * concern is a `hidden` attribute, which `reset.css` gives higher specificity than the layout\n * reset's `display: flex` so it actually hides rather than being immediately overridden by it.\n */\nconst MODAL_HANDLERS: Record<string, Handler> = {\n visible: (n, v, c) => setOrRemove(n, 'hidden', '', c || v !== false),\n transparent: (n, v, c) => setStyleProp(n, 'background-color', 'transparent', c || v !== true),\n};\n\n/**\n * `packages/icons/src/svg-props.ts`'s translation, read back the other way.\n *\n * `fill`/`stroke` arrive as a *brush*, not a colour string: `null` for \"paint nothing\", a real\n * `{type: 0, payload}` object for an actual colour (`payload` already run through\n * `BrowserEngine.color`, which passes a normal CSS colour string straight through), `{type: 2}`\n * for `currentColor`, `{type: 1, brushRef}` for a gradient reference. `strokeLinecap`/\n * `strokeLinejoin`/`fillRule`/`clipRule` arrive as the integers `svg-props.ts` encodes SVG's\n * keywords as - native prop values, not the strings a `<svg-path stroke-linecap=\"round\">` was\n * written with - so the tables below are `svg-props.ts`'s own `LINECAP`/`LINEJOIN`/`FILL_RULE`\n * read backwards. `strokeDasharray` arrives as a string array, already split on commas/whitespace\n * rather than the original string; `matrix` as the six numbers of a 2x3 matrix rather than the\n * `transform` string they came from. All are reconstructed here into the attribute form a browser\n * wants.\n *\n * `propList` gets nothing: it is native prop names this element declared for itself, so that\n * *its* `RNSVGGroup`/`RNSVGPath` inherits nothing it did not ask to inherit - a fake for\n * inheritance real SVG attributes already do on their own, which is the entire reason\n * `svg-props.ts` had to invent it.\n *\n * Geometry (`d`, `cx`, `cy`, `r`, `rx`, `ry`, `x`, `y`, `width`, `height`, `x1`, `y1`, `x2`, `y2`)\n * gets no handler either, on purpose: those prop names are already the SVG attribute names,\n * untouched by `nativeProps`, so `applyProp`'s generic string/number fallback at the bottom of\n * this file writes them correctly with nothing said here.\n */\nfunction brushAttr(value: unknown): string | undefined {\n const brush = value as { type: number; payload?: unknown; brushRef?: string };\n if (brush.type === 2) return 'currentColor';\n if (brush.type === 1) return `url(#${brush.brushRef})`;\n if (brush.type === 0) return typeof brush.payload === 'string' ? brush.payload : undefined;\n return undefined;\n}\n\n/**\n * `fill`/`stroke`. Reads `value` itself rather than the `clear` flag `applyProp` would otherwise\n * pass every other handler, because `clear` alone cannot tell apart the two things a cleared\n * brush prop means: `undefined` (\"never declared - inherit from the ancestor group, same as real\n * SVG's own cascade\") and the brush `null` (\"declared as `none` - paint nothing, even if an\n * ancestor would otherwise supply a paint\"). Only the second needs an attribute written at all.\n * `dom-node.ts`'s `SVG_BRUSH_ELEMENTS` seeding is what makes sure this handler is even reached for\n * a shape's first `fill=\"none\"`/`stroke=\"none\"` - see that file's own doc comment for why a\n * `null` brush needs help getting here in the first place.\n */\nfunction applyBrush(node: BrowserNode, attr: string, value: unknown): void {\n if (value === undefined) {\n el(node).removeAttribute(attr);\n return;\n }\n if (value === null) {\n el(node).setAttribute(attr, 'none');\n return;\n }\n const resolved = brushAttr(value);\n if (resolved === undefined) el(node).removeAttribute(attr);\n else el(node).setAttribute(attr, resolved);\n}\n\nconst LINECAP_KEYWORD: Record<number, string> = { 0: 'butt', 1: 'round', 2: 'square' };\nconst LINEJOIN_KEYWORD: Record<number, string> = { 0: 'miter', 1: 'round', 2: 'bevel' };\nconst FILL_RULE_KEYWORD: Record<number, string> = { 0: 'evenodd', 1: 'nonzero' };\n\nfunction applyKeyword(\n node: BrowserNode,\n attr: string,\n map: Readonly<Record<number, string>>,\n value: unknown,\n clear: boolean,\n): void {\n const resolved = typeof value === 'number' ? map[value] : undefined;\n setOrRemove(node, attr, resolved, clear || resolved === undefined);\n}\n\n/**\n * Every shape `ng-icon.ts` parses out of an icon's markup - `svg-path`, `svg-rect`, `svg-circle`,\n * `svg-line`, plus `svg-g` and `svg-ellipse` - shares this one set of presentation props, the\n * same names `svg-props.ts`'s own `PRESENTATION` table lists.\n */\nconst SVG_PRESENTATION_HANDLERS: Record<string, Handler> = {\n fill: (n, v) => applyBrush(n, 'fill', v),\n stroke: (n, v) => applyBrush(n, 'stroke', v),\n fillOpacity: (n, v, c) => setOrRemove(n, 'fill-opacity', v, c),\n strokeOpacity: (n, v, c) => setOrRemove(n, 'stroke-opacity', v, c),\n strokeWidth: (n, v, c) => setOrRemove(n, 'stroke-width', v, c),\n strokeLinecap: (n, v, c) => applyKeyword(n, 'stroke-linecap', LINECAP_KEYWORD, v, c),\n strokeLinejoin: (n, v, c) => applyKeyword(n, 'stroke-linejoin', LINEJOIN_KEYWORD, v, c),\n fillRule: (n, v, c) => applyKeyword(n, 'fill-rule', FILL_RULE_KEYWORD, v, c),\n clipRule: (n, v, c) => applyKeyword(n, 'clip-rule', FILL_RULE_KEYWORD, v, c),\n strokeDasharray: (n, v, c) => {\n const joined = Array.isArray(v) ? v.join(',') : undefined;\n setOrRemove(n, 'stroke-dasharray', joined, c || joined === undefined);\n },\n strokeDashoffset: (n, v, c) => setOrRemove(n, 'stroke-dashoffset', v, c),\n strokeMiterlimit: (n, v, c) => setOrRemove(n, 'stroke-miterlimit', v, c),\n opacity: (n, v, c) => setOrRemove(n, 'opacity', v, c),\n matrix: (n, v, c) => {\n const matrix = Array.isArray(v) ? `matrix(${v.join(',')})` : undefined;\n setOrRemove(n, 'transform', matrix, c || matrix === undefined);\n },\n propList: noop,\n};\n\n/**\n * The SVG root's own sizing props - `ng-icon.ts`'s host bindings, none of which go through\n * `svg-props.ts`'s `nativeProps` (they are written directly, not parsed off markup).\n * `minX`/`minY`/`vbWidth`/`vbHeight` build one `viewBox` attribute together, and\n * `align`/`meetOrSlice` build one `preserveAspectRatio` together, so each handler rereads every\n * prop in its group off `node.props` rather than trusting the single value it was called with -\n * the same pattern `applySafeAreaInsets` above uses for `edges`/`mode`, needed for the same\n * reason: Angular commits host bindings one at a time, so whichever of a group changes first would\n * otherwise write an attribute built from the rest still being stale (`undefined`, before their\n * own first commit) or from a previous render's values.\n */\nfunction applySvgViewBox(node: BrowserNode): void {\n const minX = node.props['minX'];\n const minY = node.props['minY'];\n const vbWidth = node.props['vbWidth'];\n const vbHeight = node.props['vbHeight'];\n const complete =\n typeof minX === 'number' &&\n typeof minY === 'number' &&\n typeof vbWidth === 'number' &&\n typeof vbHeight === 'number';\n setOrRemove(\n node,\n 'viewBox',\n complete ? `${minX} ${minY} ${vbWidth} ${vbHeight}` : undefined,\n !complete,\n );\n}\n\n/**\n * `bbWidth`/`bbHeight` are the root's own rendered size in points - `NgIcon`'s `size()` input -\n * kept as real `width`/`height` attributes alongside the `[style]` host binding that sizes the\n * box for layout, so an inspector reading the SVG element in isolation sees the same size CSS is\n * about to give it.\n */\nfunction applySvgSize(node: BrowserNode): void {\n const bbWidth = node.props['bbWidth'];\n const bbHeight = node.props['bbHeight'];\n setOrRemove(node, 'width', bbWidth, typeof bbWidth !== 'number');\n setOrRemove(node, 'height', bbHeight, typeof bbHeight !== 'number');\n}\n\n/**\n * `0`/`1`/`2` are `RNSVGSvgView`'s own encoding of `meet`/`slice`/`none` - see `svg-props.ts`'s\n * `viewBoxProps`, which always sends `0` for both roots today. `slice`/`none` are translated on\n * the chance a future caller sets one directly, not because either root emits them yet; that\n * would be a divergence worth noting if it ever mattered, but nothing in this codebase exercises\n * it.\n */\nconst MEET_OR_SLICE: Record<number, string> = { 0: 'meet', 1: 'slice', 2: 'none' };\n\nfunction applySvgAspectRatio(node: BrowserNode): void {\n const align = node.props['align'];\n const meetOrSlice = node.props['meetOrSlice'];\n if (typeof align !== 'string') {\n el(node).removeAttribute('preserveAspectRatio');\n return;\n }\n const slice = typeof meetOrSlice === 'number' ? (MEET_OR_SLICE[meetOrSlice] ?? 'meet') : 'meet';\n el(node).setAttribute('preserveAspectRatio', `${align} ${slice}`);\n}\n\nconst SVG_ROOT_HANDLERS: Record<string, Handler> = {\n minX: (n) => applySvgViewBox(n),\n minY: (n) => applySvgViewBox(n),\n vbWidth: (n) => applySvgViewBox(n),\n vbHeight: (n) => applySvgViewBox(n),\n bbWidth: (n) => applySvgSize(n),\n bbHeight: (n) => applySvgSize(n),\n align: (n) => applySvgAspectRatio(n),\n meetOrSlice: (n) => applySvgAspectRatio(n),\n // `NgIcon`'s own `[color]` host binding - what a shape's `currentColor` brush (`brushAttr`'s\n // `{type: 2}` case, written as the literal attribute value `currentColor`) resolves against.\n // Real SVG's `currentColor` already means \"this element's computed CSS `color`\", so setting it\n // here as an inline style *is* the whole translation - no downstream shape needs to know the\n // actual value, exactly as native's brush stays unresolved until the view paints.\n color: (n, v, c) => setStyleProp(n, 'color', v, c || typeof v !== 'string'),\n};\n\n/**\n * `activity-indicator.ts`'s colour, as the `color` its spinner in `reset.css` paints with. The\n * spinner is drawn by the stylesheet, and `animating` and `hidesWhenStopped` reach it as the\n * plain attributes the fallback writes.\n */\nconst ACTIVITY_INDICATOR_HANDLERS: Record<string, Handler> = {\n color: (n, v, c) => setStyleProp(n, 'color', v, c || typeof v !== 'string'),\n};\n\nconst BY_ELEMENT: Record<string, Record<string, Handler>> = {\n 'activity-indicator': ACTIVITY_INDICATOR_HANDLERS,\n 'text-input': TEXT_INPUT_HANDLERS,\n switch: SWITCH_HANDLERS,\n image: IMAGE_HANDLERS,\n 'safe-area-view': SAFE_AREA_HANDLERS,\n modal: MODAL_HANDLERS,\n 'svg-g': SVG_PRESENTATION_HANDLERS,\n 'svg-path': SVG_PRESENTATION_HANDLERS,\n 'svg-circle': SVG_PRESENTATION_HANDLERS,\n 'svg-ellipse': SVG_PRESENTATION_HANDLERS,\n 'svg-rect': SVG_PRESENTATION_HANDLERS,\n 'svg-line': SVG_PRESENTATION_HANDLERS,\n 'ng-icon': SVG_ROOT_HANDLERS,\n};\n\n/**\n * Apply one prop to its node. `clear` is `value === undefined || value === null`.\n *\n * A key with a handler - either element-specific or from `ViewBase`'s own set - runs exactly\n * that translation. Everything else falls to the generic attribute write the file doc comment\n * describes, which is why a `noop` entry (`hitSlop`, `accessibilityActions`, ...) has to be a\n * real entry rather than an absent one: an absent key falls through and gets written as a raw\n * attribute, a `noop` key is claimed and genuinely does nothing.\n */\nexport function applyProp(node: BrowserNode, key: string, value: unknown, clear: boolean): void {\n const elementHandler = BY_ELEMENT[node.name]?.[key];\n const baseHandler = VIEW_BASE_HANDLERS[key];\n if (elementHandler || baseHandler) {\n elementHandler?.(node, value, clear);\n baseHandler?.(node, value, clear);\n return;\n }\n if (clear) {\n el(node).removeAttribute(key);\n return;\n }\n if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n el(node).setAttribute(key, String(value));\n }\n}\n"]}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * `reset.css`'s content, as a string `mount()` can inject with no bundler CSS loader required.
3
+ *
4
+ * A second copy of `reset.css`, because this package ships raw TypeScript with no build step of
5
+ * its own (see `package.json`), so there is nothing here to run a codegen script as part of. A
6
+ * consumer with no CSS loader in their bundler still gets a working stylesheet from
7
+ * `mount({ injectReset: true })` alone, and an app that would rather control ordering against
8
+ * Tailwind imports the `.css` file instead.
9
+ *
10
+ * `reset.css` is the one to read and to edit. This one carries the same rules with the comments
11
+ * stripped, and `reset-parity.test.ts` fails the moment the two disagree about a single
12
+ * declaration - which is not a nicety. The first edit after this file was written landed in the
13
+ * `.css` only, and the version `mount` actually injects would have gone on shipping the old
14
+ * rules with nothing to say so.
15
+ */
16
+ export declare const RESET_CSS = "\n[data-rn] {\n box-sizing: border-box;\n position: relative;\n flex-shrink: 0;\n min-width: 0;\n min-height: 0;\n}\n\n[data-rn]:where(:not([data-rn='root'])) {\n border-width: 0;\n border-style: solid;\n border-color: black;\n}\n\nhtml,\nbody {\n height: 100%;\n}\n\n[data-rn-root] {\n height: 100%;\n display: flex;\n flex-direction: column;\n}\n\nbody {\n font-family: var(\n --font-sans,\n system-ui,\n -apple-system,\n 'Segoe UI',\n Roboto,\n 'Helvetica Neue',\n Arial,\n sans-serif\n );\n font-size: 14px;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n[data-rn]:not([data-rn='text']) {\n display: flex;\n flex-direction: column;\n align-items: stretch;\n}\n\n[data-rn='text'] {\n display: inline;\n}\n\n[data-rn='scroll-view'],\n[data-rn='virtual-list'] {\n flex-grow: 1;\n flex-shrink: 1;\n flex-direction: column;\n overflow: auto;\n -webkit-overflow-scrolling: touch;\n}\n\n[data-rn='scroll-view'][flexdirection='row'] {\n flex-direction: row;\n}\n\n[data-rn='scroll-view'][scrollenabled='false'] {\n overflow: hidden;\n}\n\n[data-rn='image'] {\n background-size: cover;\n background-repeat: no-repeat;\n background-position: center;\n}\n\n:where([data-rn='image']) {\n width: var(--rn-intrinsic-width, auto);\n height: var(--rn-intrinsic-height, auto);\n}\n\n[data-rn='modal'] {\n position: fixed;\n inset: 0;\n z-index: 1000;\n background-color: rgb(0 0 0 / 50%);\n}\n[data-rn='modal'][hidden] {\n display: none;\n}\n\n[data-rn='input-accessory-view'] {\n position: fixed;\n left: 0;\n right: 0;\n bottom: 0;\n}\n\n[data-rn='activity-indicator'] {\n color: #999999;\n}\n[data-rn='activity-indicator']::after {\n content: '';\n box-sizing: border-box;\n flex: 1;\n border: 2px solid currentColor;\n border-right-color: transparent;\n border-radius: 50%;\n animation: rn-activity-indicator 0.8s linear infinite;\n}\n[data-rn='activity-indicator'][animating='false']::after {\n animation-play-state: paused;\n}\n[data-rn='activity-indicator'][animating='false']:not([hideswhenstopped='false'])::after {\n visibility: hidden;\n}\n@keyframes rn-activity-indicator {\n to {\n transform: rotate(360deg);\n }\n}\n\n[data-rn='text-input'] {\n background-color: transparent;\n font: inherit;\n color: inherit;\n letter-spacing: inherit;\n text-transform: inherit;\n margin: 0;\n padding: 0;\n resize: none;\n}\n\n[data-rn='text-input']::placeholder {\n /* A device draws an unset placeholder grey; this is the text colour, faded, on any theme. */\n color: var(--rn-placeholder-color, color-mix(in srgb, currentColor 45%, transparent));\n}\n";
17
+ /**
18
+ * The reset for an island inside someone else's page: `RESET_CSS` without the two rules that
19
+ * reach outside the island.
20
+ *
21
+ * `html, body { height: 100% }` and `body`'s font are right for a page this package owns, and
22
+ * wrong for a page it is a guest on - they would resize and re-font the host app around the
23
+ * island. So they go, and the font moves onto `[data-rn-root]`, where text inside the island
24
+ * still inherits it. Derived rather than written out, so it cannot drift from `RESET_CSS`.
25
+ */
26
+ export declare const ISLAND_RESET_CSS: string;
@@ -0,0 +1,163 @@
1
+ /**
2
+ * `reset.css`'s content, as a string `mount()` can inject with no bundler CSS loader required.
3
+ *
4
+ * A second copy of `reset.css`, because this package ships raw TypeScript with no build step of
5
+ * its own (see `package.json`), so there is nothing here to run a codegen script as part of. A
6
+ * consumer with no CSS loader in their bundler still gets a working stylesheet from
7
+ * `mount({ injectReset: true })` alone, and an app that would rather control ordering against
8
+ * Tailwind imports the `.css` file instead.
9
+ *
10
+ * `reset.css` is the one to read and to edit. This one carries the same rules with the comments
11
+ * stripped, and `reset-parity.test.ts` fails the moment the two disagree about a single
12
+ * declaration - which is not a nicety. The first edit after this file was written landed in the
13
+ * `.css` only, and the version `mount` actually injects would have gone on shipping the old
14
+ * rules with nothing to say so.
15
+ */
16
+ export const RESET_CSS = `
17
+ [data-rn] {
18
+ box-sizing: border-box;
19
+ position: relative;
20
+ flex-shrink: 0;
21
+ min-width: 0;
22
+ min-height: 0;
23
+ }
24
+
25
+ [data-rn]:where(:not([data-rn='root'])) {
26
+ border-width: 0;
27
+ border-style: solid;
28
+ border-color: black;
29
+ }
30
+
31
+ html,
32
+ body {
33
+ height: 100%;
34
+ }
35
+
36
+ [data-rn-root] {
37
+ height: 100%;
38
+ display: flex;
39
+ flex-direction: column;
40
+ }
41
+
42
+ body {
43
+ font-family: var(
44
+ --font-sans,
45
+ system-ui,
46
+ -apple-system,
47
+ 'Segoe UI',
48
+ Roboto,
49
+ 'Helvetica Neue',
50
+ Arial,
51
+ sans-serif
52
+ );
53
+ font-size: 14px;
54
+ -webkit-font-smoothing: antialiased;
55
+ -moz-osx-font-smoothing: grayscale;
56
+ }
57
+
58
+ [data-rn]:not([data-rn='text']) {
59
+ display: flex;
60
+ flex-direction: column;
61
+ align-items: stretch;
62
+ }
63
+
64
+ [data-rn='text'] {
65
+ display: inline;
66
+ }
67
+
68
+ [data-rn='scroll-view'],
69
+ [data-rn='virtual-list'] {
70
+ flex-grow: 1;
71
+ flex-shrink: 1;
72
+ flex-direction: column;
73
+ overflow: auto;
74
+ -webkit-overflow-scrolling: touch;
75
+ }
76
+
77
+ [data-rn='scroll-view'][flexdirection='row'] {
78
+ flex-direction: row;
79
+ }
80
+
81
+ [data-rn='scroll-view'][scrollenabled='false'] {
82
+ overflow: hidden;
83
+ }
84
+
85
+ [data-rn='image'] {
86
+ background-size: cover;
87
+ background-repeat: no-repeat;
88
+ background-position: center;
89
+ }
90
+
91
+ :where([data-rn='image']) {
92
+ width: var(--rn-intrinsic-width, auto);
93
+ height: var(--rn-intrinsic-height, auto);
94
+ }
95
+
96
+ [data-rn='modal'] {
97
+ position: fixed;
98
+ inset: 0;
99
+ z-index: 1000;
100
+ background-color: rgb(0 0 0 / 50%);
101
+ }
102
+ [data-rn='modal'][hidden] {
103
+ display: none;
104
+ }
105
+
106
+ [data-rn='input-accessory-view'] {
107
+ position: fixed;
108
+ left: 0;
109
+ right: 0;
110
+ bottom: 0;
111
+ }
112
+
113
+ [data-rn='activity-indicator'] {
114
+ color: #999999;
115
+ }
116
+ [data-rn='activity-indicator']::after {
117
+ content: '';
118
+ box-sizing: border-box;
119
+ flex: 1;
120
+ border: 2px solid currentColor;
121
+ border-right-color: transparent;
122
+ border-radius: 50%;
123
+ animation: rn-activity-indicator 0.8s linear infinite;
124
+ }
125
+ [data-rn='activity-indicator'][animating='false']::after {
126
+ animation-play-state: paused;
127
+ }
128
+ [data-rn='activity-indicator'][animating='false']:not([hideswhenstopped='false'])::after {
129
+ visibility: hidden;
130
+ }
131
+ @keyframes rn-activity-indicator {
132
+ to {
133
+ transform: rotate(360deg);
134
+ }
135
+ }
136
+
137
+ [data-rn='text-input'] {
138
+ background-color: transparent;
139
+ font: inherit;
140
+ color: inherit;
141
+ letter-spacing: inherit;
142
+ text-transform: inherit;
143
+ margin: 0;
144
+ padding: 0;
145
+ resize: none;
146
+ }
147
+
148
+ [data-rn='text-input']::placeholder {
149
+ /* A device draws an unset placeholder grey; this is the text colour, faded, on any theme. */
150
+ color: var(--rn-placeholder-color, color-mix(in srgb, currentColor 45%, transparent));
151
+ }
152
+ `;
153
+ /**
154
+ * The reset for an island inside someone else's page: `RESET_CSS` without the two rules that
155
+ * reach outside the island.
156
+ *
157
+ * `html, body { height: 100% }` and `body`'s font are right for a page this package owns, and
158
+ * wrong for a page it is a guest on - they would resize and re-font the host app around the
159
+ * island. So they go, and the font moves onto `[data-rn-root]`, where text inside the island
160
+ * still inherits it. Derived rather than written out, so it cannot drift from `RESET_CSS`.
161
+ */
162
+ export const ISLAND_RESET_CSS = RESET_CSS.replace(/html,\s*body\s*\{[^}]*\}\s*/, '').replace(/(^|\n)body\s*\{/, '$1[data-rn-root] {');
163
+ //# sourceMappingURL=reset-css.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reset-css.js","sourceRoot":"","sources":["../src/reset-css.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwIxB,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,SAAS,CAAC,OAAO,CAAC,6BAA6B,EAAE,EAAE,CAAC,CAAC,OAAO,CAC1F,iBAAiB,EACjB,oBAAoB,CACrB,CAAC","sourcesContent":["/**\n * `reset.css`'s content, as a string `mount()` can inject with no bundler CSS loader required.\n *\n * A second copy of `reset.css`, because this package ships raw TypeScript with no build step of\n * its own (see `package.json`), so there is nothing here to run a codegen script as part of. A\n * consumer with no CSS loader in their bundler still gets a working stylesheet from\n * `mount({ injectReset: true })` alone, and an app that would rather control ordering against\n * Tailwind imports the `.css` file instead.\n *\n * `reset.css` is the one to read and to edit. This one carries the same rules with the comments\n * stripped, and `reset-parity.test.ts` fails the moment the two disagree about a single\n * declaration - which is not a nicety. The first edit after this file was written landed in the\n * `.css` only, and the version `mount` actually injects would have gone on shipping the old\n * rules with nothing to say so.\n */\nexport const RESET_CSS = `\n[data-rn] {\n box-sizing: border-box;\n position: relative;\n flex-shrink: 0;\n min-width: 0;\n min-height: 0;\n}\n\n[data-rn]:where(:not([data-rn='root'])) {\n border-width: 0;\n border-style: solid;\n border-color: black;\n}\n\nhtml,\nbody {\n height: 100%;\n}\n\n[data-rn-root] {\n height: 100%;\n display: flex;\n flex-direction: column;\n}\n\nbody {\n font-family: var(\n --font-sans,\n system-ui,\n -apple-system,\n 'Segoe UI',\n Roboto,\n 'Helvetica Neue',\n Arial,\n sans-serif\n );\n font-size: 14px;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n[data-rn]:not([data-rn='text']) {\n display: flex;\n flex-direction: column;\n align-items: stretch;\n}\n\n[data-rn='text'] {\n display: inline;\n}\n\n[data-rn='scroll-view'],\n[data-rn='virtual-list'] {\n flex-grow: 1;\n flex-shrink: 1;\n flex-direction: column;\n overflow: auto;\n -webkit-overflow-scrolling: touch;\n}\n\n[data-rn='scroll-view'][flexdirection='row'] {\n flex-direction: row;\n}\n\n[data-rn='scroll-view'][scrollenabled='false'] {\n overflow: hidden;\n}\n\n[data-rn='image'] {\n background-size: cover;\n background-repeat: no-repeat;\n background-position: center;\n}\n\n:where([data-rn='image']) {\n width: var(--rn-intrinsic-width, auto);\n height: var(--rn-intrinsic-height, auto);\n}\n\n[data-rn='modal'] {\n position: fixed;\n inset: 0;\n z-index: 1000;\n background-color: rgb(0 0 0 / 50%);\n}\n[data-rn='modal'][hidden] {\n display: none;\n}\n\n[data-rn='input-accessory-view'] {\n position: fixed;\n left: 0;\n right: 0;\n bottom: 0;\n}\n\n[data-rn='activity-indicator'] {\n color: #999999;\n}\n[data-rn='activity-indicator']::after {\n content: '';\n box-sizing: border-box;\n flex: 1;\n border: 2px solid currentColor;\n border-right-color: transparent;\n border-radius: 50%;\n animation: rn-activity-indicator 0.8s linear infinite;\n}\n[data-rn='activity-indicator'][animating='false']::after {\n animation-play-state: paused;\n}\n[data-rn='activity-indicator'][animating='false']:not([hideswhenstopped='false'])::after {\n visibility: hidden;\n}\n@keyframes rn-activity-indicator {\n to {\n transform: rotate(360deg);\n }\n}\n\n[data-rn='text-input'] {\n background-color: transparent;\n font: inherit;\n color: inherit;\n letter-spacing: inherit;\n text-transform: inherit;\n margin: 0;\n padding: 0;\n resize: none;\n}\n\n[data-rn='text-input']::placeholder {\n /* A device draws an unset placeholder grey; this is the text colour, faded, on any theme. */\n color: var(--rn-placeholder-color, color-mix(in srgb, currentColor 45%, transparent));\n}\n`;\n\n/**\n * The reset for an island inside someone else's page: `RESET_CSS` without the two rules that\n * reach outside the island.\n *\n * `html, body { height: 100% }` and `body`'s font are right for a page this package owns, and\n * wrong for a page it is a guest on - they would resize and re-font the host app around the\n * island. So they go, and the font moves onto `[data-rn-root]`, where text inside the island\n * still inherits it. Derived rather than written out, so it cannot drift from `RESET_CSS`.\n */\nexport const ISLAND_RESET_CSS = RESET_CSS.replace(/html,\\s*body\\s*\\{[^}]*\\}\\s*/, '').replace(\n /(^|\\n)body\\s*\\{/,\n '$1[data-rn-root] {',\n);\n"]}
package/dist/reset.css ADDED
@@ -0,0 +1,282 @@
1
+ /*
2
+ * The layout reset: React Native's flex defaults, applied to every element this package creates,
3
+ * so the same compiled class string lays out the same way on both platforms.
4
+ *
5
+ * A browser's flex defaults and Yoga's are not the same default. Without this, `flex-row` on a
6
+ * `<view>` behaves identically on both platforms (it sets `flex-direction` explicitly either
7
+ * way), but a `<view>` with *no* flex properties set at all does not: Yoga starts every node at
8
+ * `display: flex; flex-direction: column; align-items: stretch; flex-shrink: 0`, and a browser
9
+ * starts a `<view>` (an unknown element, like any other) at `display: inline; flex-shrink: 1`
10
+ * when it becomes a flex item at all. A `w-full` row of boxes that relies on a browser's own
11
+ * `flex-shrink: 1` to shrink to fit its container needs an explicit `flex-1` on native, because
12
+ * Yoga does not shrink for free - this stylesheet is what makes the *web* class string agree with
13
+ * that same layout too, rather than only native - a class string that only lays out right on one
14
+ * of the two platforms has quietly failed the point of sharing it.
15
+ *
16
+ * `react-native-web`'s own reset is worth reading as prior art (it solves the same problem this
17
+ * one does), but this is written from this project's own assumptions rather than copied from it:
18
+ * it targets `[data-rn]`, the marker `elements.ts` puts on every node this package creates
19
+ * (`data-rn="<template name>"`) rather than the tag itself, because two elements - `text-input`
20
+ * and `switch` - commit as a real `<textarea>`/`<input>` rather than their own tag (see
21
+ * `elements.ts`'s doc comment for why), and a tag selector would miss them.
22
+ *
23
+ * `box-sizing: border-box` matches Yoga, where a node's `width`/`height` already includes its
24
+ * border and padding; a browser's default (`content-box`) does not.
25
+ *
26
+ * `<text>` is excluded from the flex reset on purpose. RN's `Text` lays out its content as text -
27
+ * wrapping, inline runs for a nested `<text>` - not as a flex container, and giving it
28
+ * `display: flex` would stop it wrapping at all (a flex row does not wrap text mid-run the way
29
+ * inline layout does). `display: inline` is the flow layout that wraps correctly, at a real cost:
30
+ * an inline element ignores an explicit `width`/`height` style, where RN's `Text` (a full Yoga
31
+ * node) accepts one. A `<text>` that needs an explicit size needs `class="block"` (or an
32
+ * equivalent utility) from its caller on the web; that is not automatic here.
33
+ */
34
+ [data-rn] {
35
+ box-sizing: border-box;
36
+ position: relative;
37
+ flex-shrink: 0;
38
+ min-width: 0;
39
+ min-height: 0;
40
+ }
41
+
42
+ /*
43
+ * React Native's border: a width alone draws a line, solid and black, because those are a view's
44
+ * own `borderStyle` and `borderColor` until something says otherwise. CSS starts every element at
45
+ * `border-style: none`, which draws nothing at any width, so `borderWidth: 2` in a `[style]` or a
46
+ * component's own `border-width: 2px` drew a border on a device and none here.
47
+ *
48
+ * The mount point is left out, since it belongs to the page, and `:where` keeps the selector as
49
+ * weak as a single attribute, so a component's own `border-color` beats it wherever it lands.
50
+ */
51
+ [data-rn]:where(:not([data-rn='root'])) {
52
+ border-width: 0;
53
+ border-style: solid;
54
+ border-color: black;
55
+ }
56
+
57
+ /*
58
+ * The typeface, which nothing else in the stack sets.
59
+ *
60
+ * React Native draws text in the platform's own UI font without being asked - San Francisco, or
61
+ * Roboto - and at 14pt, which is what its `Text` defaults to. A browser's defaults are a serif
62
+ * face at 16px, and this project deliberately does not import Tailwind's preflight: preflight is
63
+ * a browser reset and means nothing on a phone. So nothing anywhere in the chain named a font, and
64
+ * every `<text>` on a page came out in Times New Roman at the wrong size while the same component
65
+ * on a phone looked right.
66
+ *
67
+ * On `body` rather than on `[data-rn]`, and that distinction is the whole of getting this right.
68
+ * Font size and family are inherited properties, and this cascade emulates that inheritance on
69
+ * native too (`css.ts`'s `INHERITED`), so `<view class="text-lg"><text>...` sizes the text from
70
+ * its parent on both platforms. Setting either on every element would break exactly that: the
71
+ * `<text>` would win over the `text-lg` above it and quietly stop inheriting.
72
+ *
73
+ * On `body` rather than on `html` for a different reason, and a sharper one. `rem` resolves
74
+ * against the root font size, and Tailwind's entire spacing scale is in `rem` - so
75
+ * `html { font-size: 14px }` would not set a text size, it would silently rescale every padding,
76
+ * margin, gap and width in the design by 0.875. `body` leaves the root alone.
77
+ *
78
+ * `--font-sans` is Tailwind's own theme variable, so an app that sets a brand font in its theme
79
+ * gets it here without touching this file. The stack behind it is the fallback for an app that
80
+ * never defined one, and leads with `system-ui` because matching the platform's UI font is what
81
+ * the native side does by definition.
82
+ */
83
+ /*
84
+ * A root with a real height, which is what makes `flex: 1` mean anything.
85
+ *
86
+ * React Native's root view is the screen: it has a definite size before an app renders a thing,
87
+ * so `flex: 1` on a page fills it. A browser's `html` and `body` are auto-height, so the same
88
+ * page resolved its `flex: 1` against nothing and every `flex-1` box inside it collapsed to zero.
89
+ * A chart drew its axes and legend around a plot area with no height; a story page's content
90
+ * measured shorter than its own scroll view.
91
+ *
92
+ * `height: 100%` rather than `100vh` on purpose, so this composes. On `body` it is the viewport,
93
+ * and on an app mounted into some smaller box it is that box - which is the behaviour an app
94
+ * embedding this into an existing page wants, and what `100vh` would take away.
95
+ *
96
+ * The root element itself is a flex column for the same reason every other view is: it is the
97
+ * parent that a page's `flex: 1` is measured against, so it has to be a flex container or the
98
+ * child has no main axis to grow along.
99
+ */
100
+ html,
101
+ body {
102
+ height: 100%;
103
+ }
104
+
105
+ [data-rn-root] {
106
+ height: 100%;
107
+ display: flex;
108
+ flex-direction: column;
109
+ }
110
+
111
+ body {
112
+ font-family: var(
113
+ --font-sans,
114
+ system-ui,
115
+ -apple-system,
116
+ 'Segoe UI',
117
+ Roboto,
118
+ 'Helvetica Neue',
119
+ Arial,
120
+ sans-serif
121
+ );
122
+ font-size: 14px;
123
+ -webkit-font-smoothing: antialiased;
124
+ -moz-osx-font-smoothing: grayscale;
125
+ }
126
+
127
+ [data-rn]:not([data-rn='text']) {
128
+ display: flex;
129
+ flex-direction: column;
130
+ align-items: stretch;
131
+ }
132
+
133
+ [data-rn='text'] {
134
+ display: inline;
135
+ }
136
+
137
+ /*
138
+ * `ScrollView.js`'s own base style (`engine.ts`'s `DEFAULT_PROPS.ScrollView`): a native scroll
139
+ * view does not clip its content on its own, so without this the content spills straight out of
140
+ * the scroll view's bounds instead of scrolling. `virtual-list` commits as the same Fabric
141
+ * `ScrollView` (`engine.ts`'s `VIEW_NAMES`) and gets the same base here.
142
+ */
143
+ [data-rn='scroll-view'],
144
+ [data-rn='virtual-list'] {
145
+ flex-grow: 1;
146
+ flex-shrink: 1;
147
+ flex-direction: column;
148
+ overflow: auto;
149
+ -webkit-overflow-scrolling: touch;
150
+ }
151
+
152
+ /*
153
+ * A horizontal scroll view's own direction. `scroll-view.ts` sends it as a top-level
154
+ * `flexDirection` prop rather than a style, so a caller's own style still wins, as it does in
155
+ * React Native; that prop reaches the element as an attribute, and this is what reads it. Without
156
+ * it the content view stretched to the scroll view's width instead of taking its children's, so
157
+ * its background stopped at the first screen and `(contentSizeChange)` reported the viewport.
158
+ */
159
+ [data-rn='scroll-view'][flexdirection='row'] {
160
+ flex-direction: row;
161
+ }
162
+
163
+ /*
164
+ * `scrollEnabled: false`, read the same way. A device stops the user scrolling and still lets
165
+ * `scrollTo` move the view, which is exactly what `overflow: hidden` does.
166
+ */
167
+ [data-rn='scroll-view'][scrollenabled='false'] {
168
+ overflow: hidden;
169
+ }
170
+
171
+ /*
172
+ * `Image`'s default `resizeMode`, which is `cover`. `props.ts` paints an image with
173
+ * `background-image` and writes a fit only when `resizeMode` is bound, and `Image` binds it only
174
+ * when the caller set one - so without this an image with just a `source` took the browser's own
175
+ * background default instead: natural size, tiled from the top-left corner.
176
+ */
177
+ [data-rn='image'] {
178
+ background-size: cover;
179
+ background-repeat: no-repeat;
180
+ background-position: center;
181
+ }
182
+
183
+ /*
184
+ * An image's own pixel size, when its source gives one, as the box it takes when nothing else
185
+ * sizes it. `:where` keeps this below any class the app writes, which is where a replaced
186
+ * element's natural size sits in CSS; `props.ts` writes the two properties.
187
+ */
188
+ :where([data-rn='image']) {
189
+ width: var(--rn-intrinsic-width, auto);
190
+ height: var(--rn-intrinsic-height, auto);
191
+ }
192
+
193
+ /*
194
+ * `Modal.js`'s base style is `{position: 'absolute'}`, sized to fill RN's window because that is
195
+ * what an absolutely-positioned view with no other constraint does inside it. A web page has no
196
+ * such guaranteed-full-viewport positioned ancestor, so this uses `fixed` instead - the layout
197
+ * equivalent for a host that has to cover the viewport regardless of where in the document it was
198
+ * mounted. `props.ts`'s `visible` handler toggles the `hidden` attribute; the second rule below
199
+ * gives that more specificity than the `display: flex` two rules up, so `hidden` actually hides
200
+ * the modal instead of being immediately overridden by it.
201
+ */
202
+ [data-rn='modal'] {
203
+ position: fixed;
204
+ inset: 0;
205
+ z-index: 1000;
206
+ background-color: rgb(0 0 0 / 50%);
207
+ }
208
+ [data-rn='modal'][hidden] {
209
+ display: none;
210
+ }
211
+
212
+ /* `InputAccessoryView.js`'s base style. Docked at the bottom; see `elements.ts`'s divergence note - there is no keyboard to track on the web, so it only ever sits at the foot of the viewport. */
213
+ [data-rn='input-accessory-view'] {
214
+ position: fixed;
215
+ left: 0;
216
+ right: 0;
217
+ bottom: 0;
218
+ }
219
+
220
+ /*
221
+ * `ActivityIndicator`'s spinner. A device draws its own, and a browser has nothing to draw
222
+ * one with, so the element was an empty box with a progressbar role. This is a ring with a gap
223
+ * in it, turning, in the `color` `props.ts` writes and iOS's grey without one. Stopped,
224
+ * it stands still, and it is hidden unless `hidesWhenStopped` is false, the default on iOS.
225
+ */
226
+ [data-rn='activity-indicator'] {
227
+ color: #999999;
228
+ }
229
+ [data-rn='activity-indicator']::after {
230
+ content: '';
231
+ box-sizing: border-box;
232
+ flex: 1;
233
+ border: 2px solid currentColor;
234
+ border-right-color: transparent;
235
+ border-radius: 50%;
236
+ animation: rn-activity-indicator 0.8s linear infinite;
237
+ }
238
+ [data-rn='activity-indicator'][animating='false']::after {
239
+ animation-play-state: paused;
240
+ }
241
+ [data-rn='activity-indicator'][animating='false']:not([hideswhenstopped='false'])::after {
242
+ visibility: hidden;
243
+ }
244
+ @keyframes rn-activity-indicator {
245
+ to {
246
+ transform: rotate(360deg);
247
+ }
248
+ }
249
+
250
+ /*
251
+ * A text field paints nothing of its own, the way React Native's does.
252
+ *
253
+ * A browser gives `<input>` and `<textarea>` a `background-color: field` and a `color: fieldtext`,
254
+ * and resolves both against the page's `color-scheme` - which is `normal` here, so they stay the
255
+ * light-mode white and black whatever the app's theme says. React Native's `TextInput` has no
256
+ * background at all: the box around it is drawn by whatever styles a caller wraps it in.
257
+ *
258
+ * So in dark mode every field on a page was a white box, and `color` *is* inherited from the
259
+ * cascade - meaning near-white theme text on a white ground, i.e. an invisible value in an
260
+ * apparently blank field. Transparent is both the faithful behaviour and the fix.
261
+ *
262
+ * The rest of a browser's field chrome goes for the same reason. A `<textarea>` sets its own font,
263
+ * which is monospace at 13.33px in Chromium, where a device's field takes the text styles around
264
+ * it, as `<text>` does, and a platform font at 14 when there are none. It also adds padding and a
265
+ * resize handle that a device's field does not have.
266
+ */
267
+ [data-rn='text-input'] {
268
+ background-color: transparent;
269
+ font: inherit;
270
+ color: inherit;
271
+ letter-spacing: inherit;
272
+ text-transform: inherit;
273
+ margin: 0;
274
+ padding: 0;
275
+ resize: none;
276
+ }
277
+
278
+ /* `text-input.ts`'s `placeholderTextColor`, carried in as a custom property by `props.ts`. */
279
+ [data-rn='text-input']::placeholder {
280
+ /* A device draws an unset placeholder grey; this is the text colour, faded, on any theme. */
281
+ color: var(--rn-placeholder-color, color-mix(in srgb, currentColor 45%, transparent));
282
+ }