Skip to content

Commit 70b77cf

Browse files
committed
Merge branch 'develop'
2 parents ba2bb5b + f1e0f80 commit 70b77cf

30 files changed

+182
-134
lines changed

CHANGELOG.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Each tagged version of Datastar is accompanied by a release note. Read the [rele
1717
### Changed
1818

1919
- The `datastar-sse` event is now dispatched on the `document` element, and using `data-on-datastar-sse` automatically listens for the event on the `document` ([#802](https://github.com/starfederation/datastar/issues/802)).
20-
- The `data-on-signals-change-*` attribute key now accepts a path in which `*` matches a single path segment and `**` matches multiple path segments (`data-on-signals-change-foo.*.baz`).
21-
- The `@setAll` action now accepts one or more space-separated paths in which `*` matches a single path segment and `**` matches multiple path segments (`@setAll('foo.*.baz', true)`) ([#793](https://github.com/starfederation/datastar/issues/793)).
22-
- The `@toggleAll` action now accepts one or more space-separated paths in which `*` matches a single path segment and `**` matches multiple path segments (`@toggleAll('foo.*.baz', true)`) ([#793](https://github.com/starfederation/datastar/issues/793)).
20+
- The `data-on-signals-change-*` attribute key now accepts a path in which `*` matches a single path segment and `**` matches multiple path segments (`data-on-signals-change-foo.*.baz`, `data-on-signals-change-foo.**`).
21+
- The `data-persist` attribute now accepts one or more space-separated paths in which `*` matches a single path segment and `**` matches multiple path segments (`data-persist="foo.*.baz"`, `data-persist="foo.**"`).
22+
- The `@setAll` action now accepts one or more space-separated paths in which `*` matches a single path segment and `**` matches multiple path segments (`@setAll('foo.*.baz', true)`, `@setAll('foo.**', true)`) ([#793](https://github.com/starfederation/datastar/issues/793)).
23+
- The `@toggleAll` action now accepts one or more space-separated paths in which `*` matches a single path segment and `**` matches multiple path segments (`@toggleAll('foo.*.baz')`, `@toggleAll('foo.**')`) ([#793](https://github.com/starfederation/datastar/issues/793)).

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
Datastar helps you build reactive web applications with the simplicity of server-side rendering and the power of a full-stack SPA framework.
1212

13-
Getting started is as easy as adding a single 14.6 KiB script tag to your HTML.
13+
Getting started is as easy as adding a single 14.5 KiB script tag to your HTML.
1414

1515
```html
1616
<script type="module" src="https://cdn.jsdelivr.net/gh/starfederation/[email protected]/bundles/datastar.js"></script>

bundles/datastar-aliased.js

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bundles/datastar-aliased.js.map

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bundles/datastar-core.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bundles/datastar.js

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bundles/datastar.js.map

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

library/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
Datastar helps you build reactive web applications with the simplicity of server-side rendering and the power of a full-stack SPA framework.
1212

13-
Getting started is as easy as adding a single 14.6 KiB script tag to your HTML.
13+
Getting started is as easy as adding a single 14.5 KiB script tag to your HTML.
1414

1515
```html
1616
<script type="module" src="https://cdn.jsdelivr.net/gh/starfederation/[email protected]/bundles/datastar.js"></script>

library/src/engine/types.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ export interface AttributePlugin extends DatastarPlugin {
5454
type: PluginType.Attribute
5555
onGlobalInit?: (ctx: InitContext) => void // Called once on registration of the plugin
5656
onLoad: (ctx: RuntimeContext) => OnRemovalFn | void // Return a function to be called on removal
57-
mods?: Set<string> // If not provided, all modifiers are allowed
5857
keyReq?: Requirement // The rules for the key requirements
5958
valReq?: Requirement // The rules for the value requirements
6059
argNames?: string[] // argument names for the reactive expression

library/src/plugins/official/browser/attributes/onIntersect.ts

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,18 @@ import {
1111
import { modifyTiming } from '../../../../utils/timing'
1212
import { modifyViewTransition } from '../../../../utils/view-transtions'
1313

14-
const ONCE = 'once'
15-
const HALF = 'half'
16-
const FULL = 'full'
17-
1814
export const OnIntersect: AttributePlugin = {
1915
type: PluginType.Attribute,
2016
name: 'onIntersect',
2117
keyReq: Requirement.Denied,
22-
mods: new Set([ONCE, HALF, FULL]),
2318
onLoad: ({ el, rawKey, mods, genRX }) => {
2419
let callback = modifyTiming(genRX(), mods)
2520
callback = modifyViewTransition(callback, mods)
2621

2722
const options = { threshold: 0 }
28-
if (mods.has(FULL)) {
23+
if (mods.has('full')) {
2924
options.threshold = 1
30-
} else if (mods.has(HALF)) {
25+
} else if (mods.has('half')) {
3126
options.threshold = 0.5
3227
}
3328

@@ -36,7 +31,7 @@ export const OnIntersect: AttributePlugin = {
3631
if (entry.isIntersecting) {
3732
callback()
3833

39-
if (mods.has(ONCE)) {
34+
if (mods.has('once')) {
4035
observer.disconnect()
4136
delete el.dataset[rawKey]
4237
}

0 commit comments

Comments
 (0)