Skip to content

1.0.0-beta.98

Choose a tag to compare

@lahmatiy lahmatiy released this 02 Jul 23:52

Highlights

Enhanced computation graph on the Discovery page:

image

Preview for image-like content strings in the struct view, with new Jora methods and assertions to work with such values:

Preview for image-like content strings in the `struct` view

New Jora methods for JSON, and first-class support for errors:

New Jora methods for JSON, and first-class support for errors

First-in-class diff view – text-diff:

First-in-class diff view: text-diff

All the changes

  • Bumped jora to 1.0.0-beta.15
  • Added addQueryMethods() and addQueryAssertions() methods for setup and prepare API
  • Deprecated addQueryHelpers(), use addQueryMethods() instead
  • Enhancements for value types:
    • JSON:
      • Added jsonSafeParse() and jsonSafeStringify() utility functions, which behave like JSON.parse() and JSON.stringify() but return an error instead of throwing an exception
      • Added experimental Jora query methods: jsonParse(), jsonStringify(), and jsonInfo() (the latter based on stringifyInfo() from json-ext)
    • Errors:
      • Added isError() utility function, serving as an alias for Error.isError() with a fallback if unavailable
      • Added error Jora assertion, based on isError(), enabling support for expr is error in queries
      • Added support for displaying error values (where isError() returns true) in struct view
    • Images:
      • Added utility functions:
        • isImageContent() returns true if value is image-like content strings, e.g. base64-encoded raw content (JPEG, PNG, SVG, GIF or ICO) or SVG-like string, which can be prefixed with image/* or data:image/*
        • getImageContent() returns { type, content } for image-like content strings, or null
        • isImageDataUri() returns true if value is a string starting with data:image/*,
        • getImageDataUri() produces an image data URI string from a image-like content strings if possible, or returns undefined otherwise
        • isImageSrc() return true if value is a path or an URL, including image data URI
        • getImageSrc() returns value itself if it's already an image-like src, or attempts produce a data URI from image-like content strings, or return undefined otherwise
      • Added utility functions:
        • isImageContent() returns true if the value is an image-like content string, e.g. base64-encoded raw content (JPEG, PNG, SVG, GIF, ICO) or an SVG-like string, optionally prefixed with image/* or data:image/*
        • getImageContent() returns { type, content } for image-like content strings, or null if not applicable
        • isImageDataUri() returns true if the value is a string starting with data:image/*,
        • getImageDataUri() produces an image data URI string from image-like content strings if possible, or returns undefined otherwise
        • isImageSrc() returns true if the value is a path or URL, including an image data URI
        • getImageSrc() returns the value itself if it is already an image-like src, or attempts to produce a data URI from image-like content strings; returns undefined otherwise
      • Added Jora query assertions based on utilities above: imagecontent, imagedatauri and imagesrc, e.g. expr is imagedatauri
      • Added Jora query methods: imagecontent(), imagedatauri() and imagesrc()
      • Changed image view:
        • When src is not explicitly specified in the config and the input data is a string, the data value is processed through imagesrc() and used as the src
        • Config entries with a value of undefined are ignored
      • Added a default image-like content string detection annotation in the struct view: when a string value is identified as image-like content, a badge image is displayed before the string, showing an image preview on hover
  • Added text-diff view
  • Added support for diff syntax in source view
  • Added hideOnTriggerClick option for popup and tooltip views
  • Reworked the computation graph on the discovery page and related features:
    • Enhanced the look and feel of the graph
    • Improved layout handling for complex graphs
    • Added labels to graph nodes, showing a fragment of the node's query or the content of a comment on the first line if it starts with //!
    • Added a "new root query" button
    • Removed the graph path query stack view above the query editor
    • Changed the "clone" and "stash" current query actions to insert a new node immediately after the current node
    • Fixed overriding of the parent node’s view config on graph node deletion
    • Fixed premature cancellation of a computing node when switching the current node during path computation if the node is part of the new extended path
    • Fixed "Copy page as JSON" action to include the graph
    • Various minor improvements and fixes
  • Changed table view to hide footer if no footer cells contain any content
  • Fixed table view footer rendering when cell rendering is disabled using the when option
  • Fixed table view to render the footer after the body. Although this change does not affect the visual presentation, it ensures proper selection of table content
  • Fixed an exception in source view when prefix or postfix is neither undefined nor a string
  • Fixed expand view to ensure expanded property is boolean
  • Fixed tooltip display with delayed showing by preventing it from appearing if the trigger element has been removed from the document