Skip to content

Releases

notionic v0.17.0

Choose a tag to compare

@github-actions github-actions released this 04 Nov 12:06

Minor Changes

notionic v0.16.1

Choose a tag to compare

@github-actions github-actions released this 28 Oct 23:43

Patch Changes

  • #58 420545f Thanks @nublson! - Keep the hairline around live embeds, YouTube players and videos on iOS and Safari. It now sits on a layer above the media, since WebKit painted their content over an outline on the element itself.

notionic v0.16.0

Choose a tag to compare

@github-actions github-actions released this 28 Oct 23:06

Minor Changes

  • #57 a48ffad Thanks @nublson! - Live embeds resize to the height their page reports via notionic:resize: a framed page that posts { type: "notionic:resize", height } to its parent gets a frame that many pixels tall (rounded, up to 9999). A message counts only from one of the renderer's live frames and from an origin embeds allows (with a function policy, the frame's own origin). ?height=, or 16:9, is the starting size. A page with live embeds ships a small client listener for this; pages without ship nothing new.

notionic v0.15.0

Choose a tag to compare

@github-actions github-actions released this 28 Oct 22:18

Minor Changes

  • #56 6326645 Thanks @nublson! - Live embeds take ?height= like demos: an embed of https://www.sanding.space/demos/surface?height=600 that embeds allows renders as a 600px-tall iframe instead of 16:9. The URL reaches the embedded page unchanged.

notionic v0.14.0

Choose a tag to compare

@github-actions github-actions released this 28 Oct 22:01

Minor Changes

  • #55 ec00c7f Thanks @nublson! - Live embeds: <NotionRenderer embeds={["codepen.io", "figma.com"]}> renders embeds of the listed hosts (subdomains included) in a sandboxed iframe with the caption below, instead of a preview card. embeds also takes true for every embed or a function of the URL. Only http(s) URLs are embedded, demos take precedence, and it's off by default. Exports the EmbedPolicy type.

notionic v0.13.0

Choose a tag to compare

@github-actions github-actions released this 28 Oct 13:24

Minor Changes

  • #53 377f0a1 Thanks @nublson! - Demo embeds take a height: …/demos/<name>?height=320 makes the demo's frame 320px tall, border included, with the demo centered and no vertical padding, so short frames stay as short as asked. Notion's API doesn't send the size an embed is given in Notion, so the URL carries it. Custom frames get it as the height prop (undefined without one); the default frame still fits the demo when there's none.

  • #52 0939992 Thanks @nublson! - Headings now render at their Notion level instead of one level down: heading 1 is <h1>, heading 2 <h2>, heading 3 <h3> and heading 4 <h4>, and blocksToMarkdown writes # through ####. The footnotes title follows its marker heading the same way. If your page title is also an <h1>, use heading 2 and below in Notion for sections.

notionic v0.12.0

Choose a tag to compare

@github-actions github-actions released this 27 Oct 08:28

Minor Changes

  • #50 9115f5b Thanks @nublson! - Link favicons can now use the icon each site declares for itself: linkFavicons: { siteIcons: true } (and fetchLinkFavicon(host, { siteIcons: true })) reads the site's home page first and takes its SVG icon, or the smallest PNG of 32px or more, or its /favicon.ico, before Google's and DuckDuckGo's services, whose stored copies can be stale or re-encoded (Purl's came back as a white-cornered JPEG). It's off by default, since it fetches URLs the linked sites choose; each hop is checked for private hosts, and a site's own icon is capped at 100 KB. Image blocks and link favicons get a soft hairline that follows the image's own shape (--notionic-image-edge: 25% black, or 25% white in dark mode) instead of a square outline, so a light, dark, round or transparent image keeps an edge without a box around it. Video and embed frames keep the square outline. Fetching also refuses host names that resolve to private addresses (where the runtime has DNS), for bookmark previews and favicons alike.

notionic v0.11.1

Choose a tag to compare

@github-actions github-actions released this 26 Oct 23:07

Patch Changes

  • #49 5678f81 Thanks @nublson! - Link favicons:
    • No icon vs. not looked up. A site without a favicon is now recorded as null and shows a globe. A site that wasn't looked up shows nothing, so <NotionRenderer linkFavicons> alone no longer puts a globe on every link.
    • Outages aren't cached. A host the favicon services couldn't answer for (a timeout, a 5xx, a rate limit) is left out, so it isn't cached as "no icon" and the next fetch asks again.
    • Subdomains fall back to their parent domain. you.substack.com gets Substack's icon.
    • Private hosts are never sent to the favicon services.

notionic v0.11.0

Choose a tag to compare

@github-actions github-actions released this 26 Oct 21:52

Minor Changes

  • #48 e68b044 Thanks @nublson! - Favicons on links to other sites: fetchBlocks(notion, id, { linkFavicons: true }) looks each linked host up once (Google's favicon service, then DuckDuckGo's) and attaches the icons to the blocks as data URLs, and <NotionRenderer linkFavicons> shows them before the link text, with a muted globe for a site without one. Both are off by default. Paths, anchors, mailto links and Notion pages get none. LinkProps gets favicon, which the new LinkFavicon component renders; notionic/fetch exports fetchLinkFavicon(host).

notionic v0.10.1

Choose a tag to compare

@github-actions github-actions released this 26 Oct 17:52

Patch Changes

  • #47 b64b616 Thanks @nublson! - A demo that throws no longer breaks the page: its frame stays, empty.

  • #47 b64b616 Thanks @nublson! - The default demo frame is taller (a 14rem stage), so a demo that fails keeps the same space as a working one.