Skip to content

1.0.0-beta.92

Latest
Compare
Choose a tag to compare
@lahmatiy lahmatiy released this 19 Dec 01:57
  • Fixed missed render on unloadData event when modelfree extension is used
  • Added visual guide lines for expanded objects in signature view, similar to struct view
  • Added actionCopySource option to source view to customise behaviour of "copy to clipboard" button
  • Fixed rendering of "copy to clipboard" button in source view when a string is passed as data
  • Fixed markdown views to correctly set target="_blank" for links when the href attribute contains an interpolated value
  • Added propagation of meaningful source view props into nested views rendering (action buttons, prelude, and postlude) through the context as sourceViewProps
  • Standardized monospace font size and line height in struct, signature and source views to relay on root settings
  • Added suggestions toggle in query editor on "discovery" page
  • Added view editor visibility toggle when in "custom" mode on "discovery" page
  • Added Cmd+Click or Ctrl+Click in inspect mode to open hovered view page in view's showcase
  • Added computeClassName() and applyComputedClassName() methods to view render context API
  • Added root CSS properties: --discovery-monospace-font-size and --discovery-monospace-line-height
  • Changes in page hash state API:
    • Changed processing of page parameters so !anchor is now treated as pageAnchor. Previously, !anchor was included in pageParams, now it’s a separate value with its own property and event on the ViewModel instance
    • Updated pageStateChange event to no longer fire when !anchor in the page hash changes, meaning ViewModel will not initiate a render on !anchor hash parameter changes
    • Removed !anchor from ViewModel#pageParams
    • Added ViewModel#pageAnchor to store the page’s anchor value (!anchor) or null
    • Added pageAnchorChange event for ViewModel, which fires when pageAnchor changes
    • Changed Model#encodePageHash() to accept pageAnchor as the 4th parameter
    • Changed Model#decodePageHash() to return pageAnchor
    • Changed ViewModel#setPage() and ViewModel#setParams() to reset the anchor (pageAnchor) since pageParams can hold !anchor anymore
    • Added ViewModel#setPageHashState(pageState, replace) and ViewModel#setPageHashStateWithAnchor(pageStateWithAnchor, replace) methods
    • Added ViewModel#overridePageHashState(pageState, replace) and ViewModel#overridePageHashStateWithAnchor(pageStateWithAnchor, replace) methods
    • Added ViewModel#getPageHashState() and ViewModel#getPageHashStateWithAnchor() methods
    • Extended ViewModel#setPageHash() to transform hashes starting with #! (e.g. #!{value}) into #{current-hash}&!anchor={value}. Note that a #! hash will reset the anchor (set to null) but keep other values intact. This change doesn’t conflict with existing logic since a valid encoded anchor uses #&!anchor=...
    • Added ViewModel#applyPageAnchor() method to apply current pageAnchor to rendered page content
    • Updated the pageLink() jora query helper to accept a pageAnchor parameter
    • Embed API changes:
      • Added EmbedApp#setPageHashState() and EmbedApp#setPageHashStateWithAnchor() methods
      • Added EmbedApp#setPageAnchor() method
      • Added EmbedApp#pageAnchor observer
  • Changes in table view:
    • Added headerClassName option in col config which behaves the same way as className but applies to header cell
    • Added view-table-header-cell class to header cell elements
    • Fixed detail cells to toggle their state when clicked anywhere within the cell, including nested elements, unless the click event's propagation is stopped
  • Changes in input view:
    • Added htmlStep option
    • Added props normalization
    • Changed value option to no longer be interpreted as a query
  • Reworked color scheme API (darkmode) for simplicity and alignment with recent CSS updates and the Embed API:
    • Renamed DarkModeController class to ColorScheme
    • Renamed ViewModel options darkmode and darkmodePersistent to colorScheme and colorSchemePersistent (old options are still supported as fallbacks with a warning if the new options are not specified)
    • Renamed ViewModel#darkmode to ViewModel#colorScheme
    • Renamed navbuttons.darkmodeToggle to navbuttons.colorSchemeToggle
    • Changed ColorScheme#value from boolean to 'light' or 'dark'
    • Changed ColorScheme#mode values to 'auto', 'manual' and 'only'
    • Changed ColorScheme#persistent to store a boolean, indicating whether ColorScheme is backed by a persistent store
    • Added ColorScheme#state with possible values: 'auto', 'light', 'light-only', 'dark' and 'dark-only'
    • Changed change handler signature from (value: boolean, mode: Mode) => void to (value: ColorSchemeValue, mode: ColorSchemeState) => void
    • Aligned Embed API with the changes
  • Reworked persistent API:
    • Renamed localStorageEntry() to getLocalStorageEntry()
    • Renamed sessionStorageEntry() to getSessionStorageEntry()
    • Added getLocalStorageValue(key) and getSessionStorageValue(key) methods to read values directly from storage; these methods return null if no entry exists for the specified key or if the storage is unavailable
    • Changed storage entry to be an instance of PersistentStorageEntry class derived from Observer