@shadow-js/dusk
The 81 exports of @shadow-js/dusk: 21 functions, 2 classes, 35 interfaces, 21 types, 1 const and 1 component.
Everything @shadow-js/dusk exports, from the TSDoc of its entry point.
Functions#
fallbackFontFace: A@font-facefor a locally installed font that stands in for the web font while it loads, scaled so its average character width matches the web font (size-adjust), and with its ascent, descent and line gap overridden in the same scale, so the line boxes do not change height when the web font arrives.fontFace: A@font-facerule for a web font.fontPreloadTag: The head link that preloads a font file: the browser starts the download before the stylesheet is read.h: Creates an element.imageProps: The attributes of an<img>for an image.isHttpError: True for an HttpError, also across two copies of this package.islandAttributes: The attributes of an island's element: its id, strategy, media query and props.isNotFound: True for a not-found signal.isRedirect: True for a redirect signal.jsonLdText: Writes a JSON-LD value as safe script text:<,>,&and the line separators become escapes.jsx: The JSX runtime entry for one child (jsx(type, props)).jsxs: The JSX runtime entry for several children (jsxs(type, props)).metadataFeature: The metadata feature of a router.notFound: Control flow: throw the result to report not-found.preloadImageTag: A head<link rel="preload">for a priority image, with the same candidates, so the browser starts the download before the markup is parsed.redirect: Creates the signal to throw for a redirect.redirectStatus: The HTTP status of a redirect signal: the one given to redirect, or 302 for a signal made by the router's ownredirect().scriptsHtml: The markup of a list of scripts for the document head: thebeforeInteractiveones first, then theafterInteractiveones, each source once, in the order given.scriptTag: The markup of one script:<script src nonce>(withasyncforafterInteractive), or nothing forlazyOnload, which the browser loads itself.useResponse: The response calls of the current request.viewportContent: Renders theviewportmeta content from its fields, in the order browsers document.
Classes#
HttpError: An error that carries an HTTP status.RedirectSignal: Thrown (not returned) frombeforeLoador a loader to send the navigation elsewhere.
Interfaces#
Alternates: Alternate URLs: the canonical address, the same page in other languages, for other media, and feeds.AppleWebApp: Safari's web app settings.AppLinks: Deep links for app-link services (al:*tags).Author: One author: a name and an optional profile URL.FacebookMetadata: Facebook settings.FontFaceOptions: Options of fontFace.FontMetrics: A font's vertical and width metrics, in font units.FontSource: One source of a font: its URL and format.FormatDetection: Phone numbers, e-mail and addresses detection (format-detection).HeadersArgs: Arguments of theheadersexport.HttpErrorOptions: Options of HttpError.IconDescriptor: An image of an icon or of a social card.ImageProps: The attributes imageProps returns; every key is an attribute name of<img>.ImagePropsOptions: Options of imageProps.IslandOptions: Options of islandAttributes.ItunesApp: The iTunes app banner.LinkDescriptor:<link>descriptor of thelinksexport (React Router style).MetaArgs: Arguments of themetaexport: the same asMetadataArgswithoutparent.Metadata: The document metadata of a route or layout (themetadataexport, or whatgenerateMetadatareturns).MetadataArgs: Arguments ofgenerateMetadataandgenerateViewport.OgElement: A drawable element.OpenGraphAudio: An audio clip of a social card.OpenGraphImage: An image of a social card (openGraph.images,twitter.images).OpenGraphVideo: A video of a social card.RedirectOptions: Options of redirect.ResponseHandle: The response calls.Robots: Robots: directives, plus agoogleBotblock for Google's crawler.RobotsDirectives: The robots directives.ScriptOptions: Options of scriptTag.ThemeColorDescriptor: A theme color, optionally for onemediaquery.TwitterAppCard: Twitter's app card: the store IDs and the deep links.TwitterPlayer: Twitter's player card.Verification: Site verification codes.Viewport: The viewport of a route or layout (theviewportexport, or whatgenerateViewportreturns): theviewportmeta, the theme color and the color scheme.ViewportFields: The viewport fields that build theviewportmeta.
Types#
ColorScheme: Thecolor-schemevalues.FontDisplay:font-displayvalues.FontFormat: The formats a@font-facesource may name.Icons: Icons: one URL, a list of descriptors, or the grouped form (icon,shortcut,apple,other).ImageFormat: The output formats the optimizer knows.ImageLoader: Builds the URL of one candidate.IslandStrategy: When an island is hydrated:load(as soon as the page is interactive),visible(it scrolls into view),idle(the browser is idle),interaction(the first pointer, key or focus on it), ormedia(a media query matches).JsonLdValue: AnythingJSON.stringifywrites as an object (structured data).MaxImagePreview:max-image-previewvalues.MetadataTitle: The title.MetadataUrl: A URL as a string or aURL.MetaDescriptor: One entry of themetaexport (React Router style): atitle, a<meta>byname,propertyorhttpEquivorcharSet, or atagName: "link"with link attributes.OgComponent: A function component: it receives the props and returns a node.OgNode: What a child may be.OgStyle: The inline style of an element, in camelCase.OpenGraph: The Open Graph block.OpenGraphImageInput: An image in a social card: a URL, a descriptor, or a bare string.RedirectStatus: Statuses a redirect can use.ReferrerPolicy: Where a referrer policy applies.ScriptStrategy: When a script runs:beforeInteractiveblocks parsing (for code the page needs first),afterInteractiveloads asynchronously as soon as possible,lazyOnloadloads after the window's load event, from the browser.TwitterMetadata: The Twitter card.
Constants#
IMAGE_WIDTHS: Every width the optimizer offers by default, ascending.
components#
Fragment: Fragment: its children, without a wrapping element.