Releases: schultek/jaspr
Release list
v0.23.0
Version 0.23.0 adds Agent Skills, CLI Improvements, Standalone CSS and Unsafe Import Analysis.
Read the full release notes here.
jaspr, jaspr_cli
-
Added Agent Skills for Jaspr, which can be installed with
jaspr install-skills. -
Multiple improvements to the Jaspr CLI:
- Jaspr can now be installed with
dart install jaspr_cliinstead ofdart pub global activate jaspr_cli. - Added
jaspr convert-htmlcommand to automatically convert raw HTML to Jaspr code. - Breaking Removed
jaspr tooling-daemoncommand. The functionality is now provided by thejaspr_lintspackage. - Improved logging and overall stability.
- Jaspr can now be installed with
-
Added
jaspr: styles: standaloneoption topubspec.yaml.- When enabled, all
@cssdeclarations are rendered to a standalone.cssfile instead of being inlined in the pre-rendered HTML. @cssis now also allowed in client mode projects, where standalone mode is enabled by default.
- When enabled, all
jaspr_lints 0.7.0
- Added
unsafe_importslint rule to detect unsafe platform-specific imports in components depending on where they are rendered (server or client). - Component scopes are now calculated by this package, instead of the
jaspr tooling-daemoncommand.
v0.22.0
Version 0.22.0 is all about reducing magic in the framework and making it more expressive and modular.
Read the full Release Notes for this version here.
jaspr, jaspr_builder, jaspr_cli, jaspr_test 0.22.0
-
Breaking Changed project entrypoint conventions:
-
Any server entrypoint file must now end in
.server.dart(e.g.lib/main.server.dart). -
The generated server-side options file is now generated alongside the server entrypoint (e.g. as
lib/main.server.options.dart) containingdefaultServerOptions. -
Jaspr.initializeApp()now requires thepackage:jaspr/server.dartimport. -
The project can contain at least one client entrypoint file ending in
.client.dart(e.g.lib/main.client.dart) for client-side rendering (also available in client mode). -
A new client-side Jaspr options file is generated alongside the client entrypoint (e.g. as
lib/main.client.options.dart) containingdefaultClientOptions. -
Added a new
ClientAppcomponent that should be used inside the client entrypoint like this:// This file is lib/main.client.dart import 'package:jaspr/client.dart'; import 'main.client.options.dart'; void main() { Jaspr.initializeApp( options: defaultClientOptions, ); runApp( const ClientApp(), ); }
-
-
Breaking Renamed
package:jaspr/browser.dartlibrary topackage:jaspr/client.dart, as well as:- Renamed
BrowserAppBindingclass toClientAppBinding. - Renamed
package:jaspr_test/browser_test.dartlibrary topackage:jaspr_test/client_test.dart. - Renamed
testBrowser()class totestClient().
- Renamed
-
Breaking Moved all html components, style classes and dom utilities including
div()et al.,Styles,css,Coloret al.,events(),RawText, andViewTransitionMixinto a separatepackage:jaspr/dom.dartlibrary.This reduces the "pollution" of the global namespace when importing
package:jaspr/jaspr.dartand allows for more fine-grained control of imported APIs. -
Breaking All html components are now implemented as classes instead of functions, and can thereby used with
const.This is mostly a structural change, as all components keep their lowercase names to have the familiar html-like syntax and differentiate to other Components. All standard uses of these components should still work as before, with a few exceptions when used with inferred typing (such as
var child = div([]);), which may now require an explicit type annotation (such asComponent child = div([]);) when assigning other values (such aschild = span([]);). -
Deprecated
text(),fragment()andraw()functions in favor ofComponent.text(),Component.fragment()andRawText, respectively.// Before: text('Hello World'); fragment([ ... ]); raw('<div>Raw HTML</div>'); // After (with dot-shorthands): .text('Hello World'); .fragment([ ... ]); RawText('<div>Raw HTML</div>');
-
Added
dl,dt, andddhtml components topackage:jaspr/dom.dart. -
Breaking Removed deprecated
package:jaspr/ui.dartlibrary. -
Breaking Removed support for
jaspr.dev-commandoption inpubspec.yaml. -
Added support for
jaspr.portoption inpubspec.yamlto specify the default port used byjaspr serve.
This can still be overridden using the--portflag. If neither is set, the default port stays8080. -
Added support for
jaspr.flutteroption inpubspec.yamlto specify either support for Flutter embedding with'embedded'or support for Flutter plugins with'plugins'.This replaces the dependency on
jaspr_web_compilerspackage, which is now discontinued. Instead, make sure to depend onbuild_web_compilerswith a minimum version constraint of4.4.6or higher. -
Breaking: Removed
jaspr analyzecommand, as the latest version ofjaspr_lintscan now be used directly withdart analyze. -
Breaking:
ResponseLike.body(returned fromrenderComponent()) is now aUint8Listinstead ofString. -
Allow binary responses in
AppContext.setStatusCode. -
Global
@cssstyles from other packages will no longer be included automatically. To include them, import the file where they are defined. -
Breaking Changed
events()method to accept only one optional type parameter for bothonInputandonChangeevents. -
Added
Animation,QuotesCSS properties. -
Added
Curve.linearFn()easing function. -
Added
Gap.row()andGap.column()constructors. -
Added
Flex.grow(),Flex.shrink()andFlex.basis()constructors. -
Added
Border.all()constructor and deprecate the unnamedBorderconstructor. -
Breaking:
Transition'sdurationanddelayare now of typeDurationinstead ofdouble. -
Added
msandsecondsextensions tointfor simple conversion toDuration. -
Breaking: Changed
FontStyle.obliqueAngleto acceptAngleinstead ofdouble. -
Added
initial,inherit,revert,revertLayerandunsettoTransition,TextShadowandBoxShadow. -
Allow nesting non-empty
Filter.listinside each other.
jaspr_lints 0.6.0
- Breaking Removed
custom_lintdependency and migrated to newanalysis_server_plugin.
Changes inanalysis_options.yamlare needed, see Using plugins.
v0.21.7
Various bug fixes across packages.
jaspr, jaspr_builder 0.21.7
@Importnow supports defining extensions and properly checks elements inside theshowparameter.- Fixed bug when using
SyncStateMixinor@syncon a@clientcomponent. - Fixed bug with
checkedandindeterminateattributes not rendering correctly oninputelements. - Fixed allowing children for
pathtag by removing it from the list of self-closing tags. - Deprecate the
package:jaspr/ui.dartlibrary that provides legacy utility components.
For accessing Jaspr APIs, importpackage:jaspr/jaspr.dartinstead.
For the utility components, build your own or use a component library.
jaspr_content 0.4.4
- Adjust styling of
DocsLayoutto be more responsive on large screens.
jaspr_router 0.8.0
- Using a
redirectfunction onRouterorRoutewhile rendering on the server will now trigger a HTTP redirect (302) instead of rendering the target page.
v0.21.0
Read the full Release Notes for this version here.
jaspr, jaspr_builder, jaspr_cli, jaspr_test 0.21.0
-
Breaking Changed all
build()methods andbuilderfunctions to return a singleComponentinstead ofIterable<Component>. Usejaspr migrateto migrate automatically after updating. -
Breaking Introduced new
Component.element(),Component.text(),Component.fragment()andComponent.wrapElement()constructors, replacingDomComponent(),Text(),Fragment()andDomComponent.wrap(), respectively. Also addedComponent.empty()to create an empty fragment. -
Allow setting
Document(base: )tonull, and fix the path to the generated client script when no<base>element exists. -
Added
justifyItems,justifySelfandalignContentstyles properties. -
Added
filterandbackdropFilterstyles properties. -
Added
all,appearanceandaspectRatiostyles properties. -
Added
--include-source-mapsoption tojaspr buildcommand. -
Added
jaspr tooling-daemoncommand and component scope analysis. -
Fixed sitemap generation bug in top-level route ('/')
-
Require
sdk: ^3.8.0. -
Update
analyzerto^8.0.0andbuildto^4.0.0.
jaspr_content 0.4.0
- The
LiquidTemplateEngineis no longerconst. - Fixed resolution of partial files in
LiquidTemplateEngine. - Skip adding a
<style>element for an emptyContentTheme. - Fixed
HtmlParserto treat html files as fragments.
jaspr_lints 0.5.0
-
Extend
prefer_html_methodslint to also suggest usingtext()andfragment()methods, and offer fixes for them. -
Changed
Add stylesassist to create a getter instead of variable. -
Update
analyzerto^8.0.0. -
Update
custom_lintto^0.8.0.
v0.20.0
jaspr 0.20.0
- Breaking: Removed the children parameter from
inputandcolmethods as
they are void elements and shouldn't be passed children. - Breaking: Replaced the children parameter from
scriptmethod with aString? contentparameter, as it can only contain text content. Also madesrcparameter optional. - Breaking: Removed deprecated
Color.hexandColor.namedconstructors. - Breaking: Removed deprecated style groups (
Styles.box(),Styles.text(),Styles.background(), etc. as well as.box(),.text(), etc.). - Breaking: Removed deprecated
EdgeInsetstype. - Breaking: Removed deprecated
Border.allconstructor. - Added
withOpacity(),withLightness(),withHue()andwithValues()methods toColor. - Added
figureandfigcaptionhtml methods. - Added the
wbrhtml method for creating a line-break opportunity element. - Moved
DomValidatorclass to foundation library. - Added support for disabling the sitemap generation for specific pages of
jaspr_contentsites. - Better error handling for async components.
- Fixed an error where building too many routes in succession caused ports to be exhausted on macOS.
jaspr_content 0.3.0
- Breaking:
Page.datanow returns aPageDataMapwith typed getters for
the maps stored underpageandsite.
It's alsofinalnow and should be modified using thePage.applymethod. - Breaking: The
dataparameters inPage.newandMemoryPage.newhave been
renamed toinitialDatato reflect they don't necessarily specify the final data. - Breaking:
Headerhas been moved topackage:jaspr_content/components/header.dart. - Breaking:
Sidebarhas been moved topackage:jaspr_content/components/sidebar.dart. - Added a new
Markdowncomponent for directly rendering markdown content from aString. - Added support for
sitemap: falsein the page data to exclude pages from the sitemap. - Ignores files and folders in the content directory starting with
.(in addition to_). - Require Dart 3.6 or later to match the other Jaspr packages.
- Renamed the
GithubButtoncomponent toGitHubButton. - Fixed
GitHubButtonnot linking to the correct repository. - Renamed the
GithubLoaderroute loader toGitHubLoader. - Breaking: Made
GitHubPageSourceprivate. - Fixed subfolders in
Contentare not recognized on Windows.
v0.19.1
jaspr 0.19.1
- Added
Color.currentColorconstant. - Added
rxandryproperties for svgrect(). - Added
prefersContrast: Contrast.<more|less|noPreference>toMediaQuery. - Added
MediaQuery.raw()for creating a custom media query from aString. - Fixed rendering bug when nesting components with empty children.
jaspr_content 0.2.0
- Breaking: Changed
MemoryPage.builderto accept aBuildContextinstead of aPageparameter. - Adding or removing content files will now properly update the routes.
- Support
.ymlin addition to.yamlfor data files. - Fixed specifying the
layoutname in frontmatter. - Fixed
ContentTheme.noneto not apply any styles. - Fixed typo with
keepSuffixPatternparameter inFilesystemLoaderandGithubLoader.
jaspr_lints 0.4.0
- Added 'prefer_styles_getter' lint and fix.
v0.19.0
Introducing Jaspr Content
jaspr_content is a new first-party Jaspr package for building content-driven sites like documentation, blogs, or marketing pages.
It provides out-of-the-box tools for loading, parsing, and rendering content from various sources like markdown files. It is fully customizable and you are able to add your own implementations for each part.
Checkout the docs for more: https://docs.jaspr.site/content
Changelog
-
BREAKING
JasprOptions.useIsolatesis nowfalseby default (wastrue).If you want to keep the old behaviour of rendering each request in a separate isolate, use
Jaspr.initializeApp(..., useIsolates: true). -
Added
allowedPathSuffixesoption toJaspr.initializeApp()to enable handling route paths with extensions other thanhtml. -
Added support for generating a sitemap.xml in static mode. To enable this, pass
--sitemap-domain=my.domain.comtojaspr build.Add sitemap params like
changefreqandpriorityto your routes by usingRoute(settings: RouteSettings(priority: 0.5))or set them throughServerApp.requestRouteGeneration().Exclude routes from the sitemap through the
--sitemap-excludeoption tojaspr build.Read more about Generating a Sitemap.
-
Added support
@clientcomponents from other packages.Components annotated with
@clientfrom other dependent packages are now also part of the js bundle when used during pre-rendering. -
BREAKING The
Flex(basis: ...)style now accepts aUnitvalue directly instead of aFlexBasis. -
Allow nesting
css.mediaandcss.supportsrules. -
Deprecated
Color.hex()andColor.named()in favor of the defaultColor()constructor. -
Added
onReassemblestream toServerApp. -
Various bug fixes.
v0.18.0
jaspr
-
BREAKING Changed
AppBindingsUri get currentUritoString get currentUrl. -
BREAKING Changed return type of
renderComponent()fromFuture<String>toFuture<({int statusCode, String body, Map<String, List<String>> headers})>.The rendered html is accessible through the
bodyproperty.statusCodeandheaderscan be used to create a response object when part of a custom http handler. -
Added
context.urlextension getter on both client and server. -
Added
context.headers,context.headersAllandcontext.cookiesextension getters on the server. These can be used to access the headers and cookies of the currently handled request. -
Added
context.setHeader()andcontext.setCookie()andcontext.setStatusCode()extension on the server. These can be used to set headers, cookies and the status code of the response. -
Deprecated having seperate style groups (
Styles.box(),Styles.text(),Styles.background(), etc. as well as.box(),.text(), etc.). All styling properties are now available under the singleStyles()constructur and.styles()method.Before:
css('.main') .box(width: 100.px, height: 100.px) .text(align: TextAlign.center) .background(color: Colors.blue);
After:
css('.main').styles( width: 100.px, height: 100.px, textAlign: TextAlign.center, backgroundColor: Colors.blue, );
-
Deprecated
EdgeInsetsin favor ofPaddingandMargintypes. -
BREAKING Moved
zIndexproperty out ofPositionand directly intoStyles. -
Added
userSelect,pointerEventsandcontentproperties toStyles. -
Added
Unit.maxContent,Unit.minContent,Unit.fitContentandUnit.expression().
jaspr_lints
- Added 'styles_ordering' lint and quick fix.
v0.17.0
jaspr v0.17.0
-
BREAKING Removed
currentStatefromGlobalKey, useGlobalStateKeyinstead. -
Added
GlobalStateKey<T extends State>to access the state of a component usingcurrentState.// Use any State type as the type parameter. final GlobalStateKey<MyComponentState> myComponentKey = GlobalStateKey(); /* ... */ // Access the state from the key. MyComponentState? state = myComponentKey.currentState;
-
Added
GlobalNodeKey<T extends Node>to access native dom nodes usingcurrentNode.import 'package:universal_web/web.dart'; // Use any Node type (from package:universal_web) as the type parameter. final GlobalNodeKey<HTMLFormElement> myFormKey = GlobalNodeKey(); /* ... */ // Access the dom node from the key. HTMLFormElement? node = myFormKey.currentNode;
-
Migrated all web imports from
package:webtopackage:universal_web. -
Added
prefersColorSchemeparameter toMediaQuery.
v0.16.4
jaspr v0.16.4
- Fixed attribute validation to support attribute names including
@and:. - Added
tableand related html methods. - Added
valueparameter toselect()method. - Add 'standalone' option to
renderComponentmethod.
jaspr_cli v0.16.4
- Added
--dart-define,--dart-define-clientand--dart-define-servertoserveandbuildcommands.
jaspr_lints v0.2.0
- Updated
custom_lintto^0.7.0
jaspr_serverpod v0.5.0
- Bump
serverpodto2.3.0