Commit Graph

344 Commits

Author SHA1 Message Date
Ben Croker fe409baf4c
How-to Guides (#517)
* Add polling

* Rename file

* Add `how_to_redirect_the_page_from_the_backend`

* Add Hello World example guide

* Add to nav, start on polling

* Remove `.leading` from code snippets

* Fix typo

* How to bind keydown events to specific keys

* How to redirect from the backend (#565)

* Add how tos with demos

* Fixes

* Fixes

* Add snippets

* Rename to location in snippet

* Wording

* Tweaks

* Prep for merging

* Improve wording

---------

Co-authored-by: Dominik Tarnowski <dom@tdom.dev>
2025-02-03 08:39:38 -06:00
Lucian 38c0547dfa
Fix overflow issues and add menus (#567) (#575)
* mobile: fix overflow issues (#567)

* add dropdown

---------

Co-authored-by: Lucian Knock <git@lucianknock.com>
Co-authored-by: Delaney Gillilan <delaneygillilan@gmail.com>
2025-02-02 20:51:43 -06:00
Johnathan Stevers 93852fc1ad
Rust SDK framework integration + hello-world examples (#558)
* remove infinite scroll example

* add rocket and axum example

* rework how framework integration works

* rocket integration

* add .gitignore

* dont elide `retry`

* add "read signals" to rocket hello-world example

* don't elide `retry` in display

* remove mime dependency

* update cargo.toml

* add underscore to unused consts

* formatting

* use `async_stream` instead of "hand writing" streams

* add axum test

* fix errors

* implement custom sse stream for axum and rocket

* generate hello-world.html

* update readme

* don't track cargo.lock
2025-02-02 18:14:20 -06:00
Ben Croker ed980b3d4c
Update SDKs to ignore `retry` if set to default (#573)
* Update SDKs to ignore `retry` if set to default

* Remove from test output

* Build
2025-02-02 11:31:39 -06:00
Prateek Rungta 854ce6ed30
Fix missing `}` (#569) 2025-02-02 07:35:00 -06:00
Ben Croker 9b2d620499
Remove danglish URI [deploy-site] 2025-02-01 09:53:43 -06:00
Ben Croker c25cbec470
Update CDN links 2025-02-01 08:41:17 -06:00
Delaney 51671c666d
Bundler aliasing (#555)
* Bundler aliasing
Fixes #554

* Bundler aliasing
Fixes #554

* Add release note

* Improve alias prefix handling

* Check using `startsWith`

* Use raw key in removals

* Update JavaScript API docs

* Add aliased bundle

* Fix example

* Fix wording

* Fix logic

* skip flaky tests

* Fix and simplify logic

* Rewrite condition

---------

Co-authored-by: Ben Croker <ben@putyourlightson.com>
2025-01-31 20:03:53 -06:00
Ben Croker a5c2e8624b
Add missing runtime errors 2025-01-31 19:59:06 -06:00
Ben Croker 93e8e1405c
Fix example 2025-01-31 18:04:05 -06:00
Greg H 34556125ae
Sdk/dotnet updates (#560)
* sdk/dotnet-cleanup - removed all non-standard example and library code for dotnet

* sdk/dotnet - signals are request-based; missing trailing newline added; refactoring

* sdk/dotnet-cleanup - documentation updates

* sdk/dotnet-bugfix - no longer starting streaming response if only accessing signals

---------

Co-authored-by: Greg Holden <SpiralOSS@users.noreply.github.com>
2025-01-31 11:27:16 -06:00
Ben Croker 2234f3926f
Add more examples to SDKs page 2025-01-30 22:12:13 -06:00
Ben Croker d1fe079520
Add TextValueRequired error 2025-01-30 19:58:04 -06:00
Delaney ba6fba2b25
Revamp apply and cleanup to be based primarily on MutationObserver (#528)
* Revamp apply and cleanup to be based primarily on MutationObserver

* Improve `data-on` timing functions
Fixes #519

* inline cast

* Update library/src/engine/engine.ts

Co-authored-by: Thomas Threadgold <2460166+Regaez@users.noreply.github.com>

* cleanup and merge with develop

* Add timing example

* remove apply

---------

Co-authored-by: Thomas Threadgold <2460166+Regaez@users.noreply.github.com>
Co-authored-by: Ben Croker <ben@putyourlightson.com>
2025-01-30 11:06:20 -06:00
Ben Croker 0e241426e9
Add Clojure to homepage, remove language labels 2025-01-29 17:50:12 -06:00
JeremS 1e55dcf6d5
Clojure SDK (#540)
* Feature: added clojure sdk

Chore: rebasing on latest
(last commit from clojure-sdk d6259824908c)

* Fix: alphabetical order

* Docs: Actual broadcast example

* Test: adding shell test support

Fix: order of options in data-lines for execute scripts events

Fix: fixed signal handling / missing options

Refactor: using the generated constants for boolean options

* Test: passing shell tests

Chore: task build
2025-01-29 16:28:08 -06:00
Ben Croker ca6c591aef
Add podcast icon [deploy-site] 2025-01-28 20:50:44 -06:00
Johnathan Stevers a9cfaf8a78
Zig SDK framework integration + hello-world examples (#546)
* zig sdk framework integration

* hello-world examples

* update code snippets

* fix readme typo

* fix run.go path

* generated `hello-world.html`
2025-01-28 12:48:06 -06:00
Ben Croker c40f43bc9a
Fix bundler [deploy-site] 2025-01-28 11:51:53 -06:00
Ben Croker 490a26fa78
Remove version from source code (#545)
* Remove version from source code

* Remove from JS API

* Add release note
2025-01-28 10:42:56 -06:00
Ben Croker a1fcf54752
Fix element check in `custom-validity` plugin (#544)
* Fix hello world source

* Fix element check in `custom-validity` plugin

* Add HTMLSelectElement

* Update release note
2025-01-28 10:24:54 -06:00
Roman Frołow 929c32af4e
Update sdks.md - node.ts -> node.js (#537) 2025-01-27 17:23:25 -06:00
Johnathan Stevers 3850a0cb84
Fix Rust and Zig SDK Typos (#532)
* fix rust related typos

* swap zig and rust links to main
2025-01-27 07:37:02 -06:00
Ben Croker 1177a2d3ab
Improve SDK docs 2025-01-26 21:08:37 -06:00
Johnathan Stevers 44d758a1ca
Zig SDK (#531)
* zig sdk

* add Zig to `sdks.md`
2025-01-26 20:12:49 -06:00
Ben Croker 46773b5602
Document changes to expressions (#527)
* Add release note

* Add docs

* Add default value and trim

* Add multiline suggestion to error

* Join using semicolon only

* Revert removing line break

* Improve code comments

* Fix typo

* Fix

* Use button element

* Build
2025-01-26 09:00:44 -06:00
Ben Croker cf7807b39b
Improve SDK docs 2025-01-25 17:56:24 -06:00
Johnathan Stevers 081178321f
Rust SDK (#520)
* rust sdk

* add settle duration an use view transition to `RemoveFragments`

* replace `std::time::Duration` with `core::time::Duration`

* add `settle_duration` and `use_view_transition` setters to `RemoveFragments`

* remove `workspace` from `Cargo.toml`

* update `Cargo.lock`

* align documentation with official documentation

* change description

* use consts

* fix typo in `consts.go`

* code snippets

* add semi colons to bool consts

* fix example

* always include `retry_duration` in event body

* fix typo

* add extra newline to every event

* remove unnecessary `.as_ref()`

* remove `datastar-request: true` validation from `ReadSignals`

* add retry and extra newline to doc tests

* add tests and update package files
2025-01-25 16:25:48 -06:00
Anders Murphy b51853d464
Only support `;` statement delimiter (#525)
This means we don't need to write a JS parser in regex and keeps
things simple.

I haven't updated the docs to mention this or added specific error
handling. Figured that could be done in a separate PR.

This PR does fix all the tests where \n was used as a statement delimiter
2025-01-25 13:10:34 -06:00
Patrick Marchand 2b767131cf
Bring typescript snippets into line with other examples (#487)
* site sdk/typescript bring snippets into line with other examples

* sdk/typescript remove mention of readSignals in getting started snippet

---------

Co-authored-by: Ben Croker <57572400+bencroker@users.noreply.github.com>
2025-01-24 09:27:26 -06:00
Ben Croker b91d183b8c
Add SDKs to homepage [deploy-site] 2025-01-23 21:47:58 -06:00
Ben Croker 72375ae91c
Tweak red [deploy-site] 2025-01-23 21:22:33 -06:00
Ben Croker 30743468dd
Add videos [deploy-site] 2025-01-23 21:08:41 -06:00
Yaroslav Lapin 937c7ccec4
fix htttp -> http in sdk reference (#512) 2025-01-22 20:03:18 -06:00
Ben Croker 0fa34d99ce
Change `__delay` to `__duration` on `data-on-interval` (#513)
* Start fix

* Finish fix

* Add release note

* Remove `leading` modifier

* Add release note

* Remove from docs

* Fin

* Tweak example

* Change to `__duration` modifier

* Add `.leading` back in with cleanup

* Better comment
2025-01-22 19:57:36 -06:00
Darric Heng 5992480a97
fix: use matching quotes (#510) 2025-01-22 08:49:13 -06:00
Ben Croker 1ac2d8ac79
Improve polling example [deploy-site] 2025-01-21 16:39:11 -06:00
Ben Croker 44004a89e5
Fix sortable example [deploy-site]
Fixes #506
2025-01-21 12:17:03 -06:00
Ben Croker 0f2d428cbc
1.0.0-beta.2 2025-01-21 09:25:57 -06:00
Ben Croker 07b01321f7
Change behaviour of `data-star-ignore` (#505)
* Change behaviour of `data-star-ignore`, add mod

* Improve example
2025-01-21 09:10:30 -06:00
Ben Croker fdb41f3a0d
Add `data-on-interval` and `__delay` modifier (#504)
* Add `on-interval` and `__delay` modifier

* Add docs, fix example

* Improve code comment

* Add `.leading` to `__delay`

* Add release note
2025-01-21 08:23:40 -06:00
Delaney 7c8e2551b4
View transitions API demo doesn't transition (#502)
Fixes #501
2025-01-20 17:17:13 -06:00
Delaney e99c9e0654
Make plugin order depth-first per element, then per `data` attribute (#499)
* define plugin order depth first per element, then per data-* attribute
 remove vestigial macros

* Completely remove raw value

* Improve computed example in guide

* fix animation test

* Add release note

* Add release note

* Fix release note

* Document evaluation order

* Improve docs

* Add release note

* Remove `frontend`

---------

Co-authored-by: Ben Croker <ben@putyourlightson.com>
2025-01-20 12:08:34 -08:00
Ben Croker a79fb963b3
Fix fix [deploy-site] 2025-01-19 22:31:54 -06:00
Ben Croker b218e2115d
Fix typos in file upload example [deploy-site] 2025-01-19 21:39:53 -06:00
Ben Croker 8b43f29224
Add SDK page to docs (#486)
* Start SDK page

* Reorganise links

* Tweaks

* Fix link

* Add packages and examples

* Add link to reference

* Link authors

* Improve TS

* Fix path to consts

* Add PyPI package

* Fix spacing

* Add links to SDKs page

* Cleanup
2025-01-18 19:22:18 -06:00
Ben Croker 4d6ca33b23
Add suggestion for undefined string error 2025-01-18 17:11:45 -06:00
Greg H 48151b593c
sdk/dotnet - corrections to doco. fixed sample. keep-alive only if 1.1 (#496)
Co-authored-by: Greg Holden <SpiralOSS@users.noreply.github.com>
2025-01-18 10:08:24 -06:00
Ben Croker 723fca3395
Fixes #492 [deploy-site] 2025-01-17 09:11:35 -06:00
Ben Croker 0a67e27077
Fixes #489 2025-01-17 07:27:46 -06:00
Yizong ZHOU 76da175516
Fixed the frontend final example in the getting_started guide (#494) 2025-01-17 07:24:31 -06:00
Patrick Marchand 1ea565a34f
Ts sdk snippets (#483)
* sdk/ts add warning about http1

* sdk/ts improve readme example

and add snippets to go site

* sdk/ts fix type and import errors

* ts/sdk fix type error in node readme example

* sdk/ts improve snippets and examples

Slimmed down the snippets setup example and added it to the readme, then
moved the readme examples to their own files in a new examples folder to
make place for other examples.

Also fixed md links in readme.

* sdk/ts --unstable-sloppy-imports is no longer required

* sdk/ts fixed some type / import errors

* Rename sdk/ts to sdk/typescript

* sdk/typescript simplify setup snippet
2025-01-15 11:10:47 -06:00
Thomas Threadgold 7824c07223
Add signal prefix to code examples (#485) [deploy-site] 2025-01-15 07:08:50 -06:00
Ben Croker 9572b867a3
Fix docs links 2025-01-13 19:13:29 -06:00
Ben Croker 161d9fedc7
Fix sample code indentation 2025-01-13 19:07:34 -06:00
Ben Croker c36a7227b8
Rename image 2025-01-13 18:52:23 -06:00
Ben Croker 6b59265dc1
nested → namespaced 2025-01-12 21:07:25 -06:00
Delaney eee4e3c981
Better error on invalid expressions and signals (#466)
* Better error messages for nested signals
Fixes #452

* Add explicit check for invalid signal

* move to generic errors

* working towards better error pages

* Tweak errors

* more complete example

* bad templ

* Start porting over errors

* Better error messages for nested signals
Fixes #452

* fix nil pointers

* Migrate remaining errors

* Fix init errors

* Tweaks

* Add suggested signal names

* Improve styling and close input elements

* Cleanup

* syntax highlight

* Fixes

* More fixes

* Tweaks

* Update library size approximation

* fix lines and escaping

* add if

* Finish default error messages

* Finish PR

---------

Co-authored-by: Ben Croker <ben@putyourlightson.com>
2025-01-12 20:16:25 -06:00
Ben Croker 9f88878f04
Remove Node and Python examples [deploy-site] 2025-01-12 09:38:46 -06:00
Ben Croker 9a31383e2f
Tweak SDK docs [deploy-site] 2025-01-11 21:07:38 -06:00
Ben Croker e149f38be1
Tweak example [deploy-site] 2025-01-11 10:14:50 -06:00
Ben Croker 34d95080f3
Minor docs improvements [deploy-site] 2025-01-11 10:08:10 -06:00
Anders Murphy 39849bf23a
First draft of renaming nest/ed to namespace/d (#477)
* First draft of renaming nest/ed to namespace/d

After a lengthy discussion on discord it was suggested that we rename
`nested` signals to `namespaced` signals. For a few reasons:

1. Nested signals are used for namespacing.
2. We don't support or plan to support root nodes being signals
3. Nested signals should not be used to recreate SPAs and are there
   for namespacing convenience (bulk add/remove) not
   lookup (read/watch).
4. The naming was causing confusion.

Not sure if we still need to specify that only nodes are signals now
that nested signals are called namespaced signals.

I haven't renamed the implementation's yet as that's an implementation
detail we can address later.

Link to discord conversation:
https://discord.com/channels/1296224603642925098/1296225503610671224/1327365393563783238

* Fix persist example test

* Update datastar_expressions.md

* Update attribute_plugins.md

---------

Co-authored-by: Ben Croker <57572400+bencroker@users.noreply.github.com>
2025-01-11 09:32:54 -06:00
Jason Oppel 12273efe44
Fix typos __outsite in docs (#476)
Should read `__outside` instead

Fixes #475
2025-01-11 07:23:09 -06:00
Kenneth Ormandy ddcc835b8a
Fixes link to SSE docs (#472) 2025-01-10 17:45:07 -06:00
Ben Croker e2c24d20c3
Add enterkeyhint to TODO demo [deploy-site] 2025-01-09 07:57:56 -06:00
Ben Croker 81a9b4cf31
Improve wording [deploy-site] 2025-01-08 12:55:15 -06:00
Ben Croker 753412539d
Disable `lazy_load_test` 2025-01-08 12:35:04 -06:00
Ben Croker 953df608fe
Disable lazy_tabs_test to get tests passing 2025-01-08 12:30:42 -06:00
Ben Croker e1d30aebdb
Add `@clipboard` to docs [deploy-site] 2025-01-08 12:09:37 -06:00
Ben Croker 13da358729
Improve nestable signals explanation [deploy-site] 2025-01-08 08:18:34 -06:00
Ben Croker 755a5db9b8
Add links to guide [deploy-site] 2025-01-06 09:20:06 -06:00
Ben Croker cf60cab386
Fixes #460 [deploy-site] 2025-01-06 08:03:49 -06:00
Ben Croker a706cebb2d
Tweaks to docs [deploy-site] 2025-01-05 20:37:11 -06:00
Ben Croker 192900c7eb
Fix typo [deploy-site] 2025-01-05 18:47:08 -06:00
Ben Croker beef6b3602
Add clarification [deploy-site] 2025-01-05 18:37:37 -06:00
Ben Croker c0bdb00f39
Add Datastar Expressions to guide (#456) 2025-01-05 10:33:08 -06:00
Anders Murphy 1aeb613970
Animation docs say htmx when they should say Datastar (#457) 2025-01-05 08:47:57 -06:00
Ben Croker e5c6ec4b3d
Explain only leaf nodes are signals [deploy-site] 2025-01-04 16:17:31 -06:00
Ben Croker 182765419c
Update CDN URLs [deploy-site] 2025-01-03 21:25:44 -06:00
Ben Croker 05eaa113cd
Fix #447 [deploy-site] 2025-01-03 11:40:54 -06:00
Ben Croker 0483fa80c2
Fix #446 [deploy-site] 2025-01-03 10:26:44 -06:00
Ben Croker 4f70926469
Fix typo in example 2025-01-03 09:31:24 -06:00
Ben Croker f02da62231
Add specific CDN link 2025-01-02 18:31:05 -06:00
Ben Croker 891764569c
Fix links 2025-01-02 11:05:11 -06:00
Ben Croker dfb650011c
More docs fixes 2025-01-02 07:28:18 -06:00
Ben Croker bcf016b538
Fix docs, examples and error messages 2025-01-01 20:33:23 -06:00
Delaney f72d906ba2
Delaneyj/issue437 (#439)
* Biome Lint/Format (#396)

* Add `javascript_api` [deploy-site]

* Add note about JSON [deploy-site]

* Mark SDKs done

* Move conditional statement (#389)

* Add release note

* Add troubleshooting tips [deploy-site]

* Replace http.Flusher with http.ResponseController for SSE in Go SDK  (#392)

* refactor: replace http.Flusher with http.ResponseController

* refactor: replace http.Flusher with http.ResponseController reintroduced panic justification

---------

Co-authored-by: drahtzieher <admax@vmi2173525.contaboserver.net>

* Improve SDKs in docs [deploy-site]

* Improve `retry` option descriptions [deploy-site]

* Wording improvements [deploy-site]

* Improve wording [deploy-site]

* Fix & unify CDN in docs/examples (#394)

* Try Biome
Fixes #395

* format all

* more

* fix ignores

* Add comment to bundles (#401)

* Add comment to bundles

* One-liner

* Build

* Add `retryInterval` option to `sse()` action (#393)

* Add `retryInterval` option to `sse()` action

* Add to `sse` plugin too

* Build

* Add release note

* Add `Datastar's philosophy` [deploy-site]

* Use `path/to/datastar.js` [deploy-site]

* Fix local signals (#407)

* Fix bundler not exporting module (#406)

* Add Banner and Format

* Export Datastar in bundler

* Release note

* Fix export

* Add ref usage example [deploy-site]

* updatego deps

* Bump org.eclipse.jetty:jetty-server in /examples/java (#408)

Bumps org.eclipse.jetty:jetty-server from 11.0.15 to 11.0.24.

---
updated-dependencies:
- dependency-name: org.eclipse.jetty:jetty-server
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Add example to error page [deploy-site]

* fix const usage in Go

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Ben Croker <ben@putyourlightson.com>
Co-authored-by: Ben Croker <57572400+bencroker@users.noreply.github.com>
Co-authored-by: drahtzieher <josuah@rechtsteiner.net>
Co-authored-by: drahtzieher <admax@vmi2173525.contaboserver.net>
Co-authored-by: David Linke <dalito@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Revert "Biome Lint/Format (#396)"

This reverts commit 251f1391cf.

* PHP SDK 1.0.0-beta.4

* signals for mime types and names work

* Change import paths back to relative paths
Fixes #437

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Ben Croker <ben@putyourlightson.com>
Co-authored-by: Ben Croker <57572400+bencroker@users.noreply.github.com>
Co-authored-by: drahtzieher <josuah@rechtsteiner.net>
Co-authored-by: drahtzieher <admax@vmi2173525.contaboserver.net>
Co-authored-by: David Linke <dalito@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ian Smith <iansmith@iorca.ai>
2025-01-01 15:59:06 -06:00
Delaney Gillilan b74e2bfbb8 update filesize comparison 2025-01-01 13:34:09 -08:00
Ben Croker ba3c10fde7
Fix persist docs and tests 2025-01-01 13:00:10 -06:00
Ben Croker daf00c49c0
Improve poor example 2025-01-01 12:15:00 -06:00
Delaney abff1d05de
Can `.value` go away? (#429)
* Can .value be removed?
Fixes #428

* get dialog working

* add } to terminators

* Add fujs.svg

* whackamole

* sigh

* recursive regex tag template literals, lol

* Regex example

* (jacks|lack|of|complete|surprise)

* persist fixed

* fix current regex example

* current state

* Update all examples

* regex version of signals, actions and escapement

* Fix Go examples

* fix templates

* Add `@` to actions in examples

* Revert `.Value`

* frontpage

* all test pass

* move to @get/post/put/patch/delete

* Fix up docs and examples

* Add true client size to readme

* Add v1.0.0-beta.1 release notes

* @ → $

* Add space

* Fix more docs and examples

* missed files in merge

---------

Co-authored-by: Ben Croker <ben@putyourlightson.com>
2025-01-01 12:02:26 -06:00
Ben Croker 6e11ff8f74
More tweaks 2024-12-29 13:00:46 -06:00
Ben Croker 05121d96f2
Docs improvements 2024-12-29 12:11:51 -06:00
Ben Croker 1d7a2009fd
Add `Stop Overcomplicating It` to the guide (#431)
* Add `Stop Overcomplicating It` page

* Tweaks

* Add `data-bind` example

* Dispatch `change` event

* Finalise
2024-12-29 10:03:43 -06:00
Ben Croker 86b65595e2
Fix `outside` modifier (#425)
* Fix outside modifier

* Add release note
2024-12-25 12:41:27 -06:00
Ben Croker 2243144a52
Add custom validity plugin (#423)
* Add custom validity plugin and demo

* Add reference docs

* Add error pages
2024-12-25 11:49:09 -06:00
Ben Croker 6a999c2d7e
Rename `data-attributes` to `data-attr` (#422)
* Rename plugin

* Update examples, errors, tools, tests

* Rename error

* Add release note
2024-12-25 11:48:14 -06:00
Delaney Gillilan 945c213320 fix up some tests and wrong initial header setup in sse plugin 2024-12-23 09:09:53 -08:00
Ben Croker 1a0b9d29e5
Dispatch an SSE error event (#412)
* Dispatch an SSE error event

* Add `SseMaxRetries` error
2024-12-23 08:56:08 -06:00
Ben Croker 1325eec587
Clarify 2024-12-22 20:27:38 -06:00
Ben Croker c8fc7fd238
Improve `data-star-ignore` example 2024-12-22 20:26:46 -06:00
datashaman 5d52df0ba2
Fix first quiz example (#416)
In the first example, there is no `answer2` signal, resulting in an error on the console.
2024-12-22 18:45:15 -06:00
Ben Croker 47043504ab
Remove colon from example 2024-12-22 18:39:07 -06:00
Delaney 72b28b2a97
Modifiers need to be renamed tags (#415)
* Modifiers need to be renamed tags
Fixes #414

* fix merge
2024-12-21 17:13:18 -06:00
Ben Croker 56ae15a56f
Add tooling to docs 2024-12-21 09:21:07 -06:00
Ben Croker e446b3eedc
Add note about `data-on-submit` 2024-12-20 19:51:52 -06:00
Ben Croker 44f114c53f
Add `form` option to `sse()` action (#400)
* Start form mode

* Require closest form

* Validate form

* Use query selector if string

* Use `for` loop

* Create temporary form if none exists

* Better wording

* Change to `contentType` and `selector` options

* Add release note

* Improve wording

* Remove event listener on invalid form

* Add stricter types, don’t remove event listener

* Prevent default on submit events

* cleanup event listeners

* cleanupFns → cleanupFn

* i hate forms

* Add explanation to example

* Finish docs

---------

Co-authored-by: Delaney Gillilan <delaneygillilan@gmail.com>
2024-12-20 19:47:07 -06:00
Delaney b1de35a4f6
Biome Delaneyj/issue395 (#409)
* Try Biome
Fixes #395

* format all

* more

* fix ignores

* fix const usage in Go

* Fixes #395

* cleanup go.mod
2024-12-20 10:06:33 -08:00
Ben Croker d2c56ef730
Add example to error page [deploy-site] 2024-12-19 21:03:54 -06:00
Ben Croker 6b501be16c
Add ref usage example [deploy-site] 2024-12-19 08:23:03 -06:00
Ben Croker a7aabb49ff
Fix bundler not exporting module (#406)
* Add Banner and Format

* Export Datastar in bundler

* Release note

* Fix export
2024-12-19 07:42:59 -06:00
Ben Croker 66c0aa4fcf
Use `path/to/datastar.js` [deploy-site] 2024-12-18 19:36:05 -06:00
Ben Croker f1bfa080dc
Add `Datastar's philosophy` [deploy-site] 2024-12-18 19:31:52 -06:00
Ben Croker b411e9ed72
Add `retryInterval` option to `sse()` action (#393)
* Add `retryInterval` option to `sse()` action

* Add to `sse` plugin too

* Build

* Add release note
2024-12-18 10:39:26 -06:00
David Linke 2103f602ae
Fix & unify CDN in docs/examples (#394) 2024-12-17 16:34:16 -06:00
Ben Croker 46960ec505
Improve wording [deploy-site] 2024-12-17 16:31:55 -06:00
Ben Croker 2ad2457c93
Wording improvements [deploy-site] 2024-12-17 16:19:39 -06:00
Ben Croker 31e3648cc0
Improve `retry` option descriptions [deploy-site] 2024-12-17 11:06:17 -06:00
Ben Croker b3750b832a
Improve SDKs in docs [deploy-site] 2024-12-17 10:59:58 -06:00
Ben Croker 910c604045
Add troubleshooting tips [deploy-site] 2024-12-17 10:36:22 -06:00
Ben Croker 82369bc516
Add note about JSON [deploy-site] 2024-12-17 06:44:50 -06:00
Ben Croker d11108f933
Add `javascript_api` [deploy-site] 2024-12-16 10:31:58 -06:00
Ben Croker 67a05b0779
Finish reference [deploy-site] 2024-12-16 10:20:48 -06:00
Ben Croker 56059c5019
v0.21.3 (#386) 2024-12-16 10:18:15 -06:00
Ben Croker 192c27c59b
Add `data-star-ignore` attribute (#384)
* Add `data-star-ignore` attribute

* Update CHANGELOG.md

---------

Co-authored-by: Delaney <delaneygillilan@gmail.com>
2024-12-16 09:18:40 -06:00
zangster300 77e71c75f5
adds an alias map to the esbuild config to resolve lib files (#385) [deploy-site] 2024-12-16 08:11:05 -06:00
Ben Croker ba6ef70d40
Update social preview image [deploy-site] 2024-12-16 06:58:43 -06:00
Felix Ingram 040cfe3059
Make SDK icons wrap (#380)
Added `flex-wrap` as otherwise the SDK icons go off screen on mobile.
2024-12-16 02:14:41 -08:00
Ben Croker 0ea0f3cf37
Update `deploy-site.yml` 2024-12-15 19:07:04 -06:00
Ben Croker daa5c0496c
Fix broken link [deploy-site] 2024-12-15 18:46:41 -06:00
Ben Croker 634e28b594
Script include on single line [deploy-site] 2024-12-15 18:42:42 -06:00
Ben Croker fed87f584b
Tweaks [deploy-site] 2024-12-15 18:39:43 -06:00
Ben Croker d341409758
Redirect `datastar.fly.dev` [deploy-site] 2024-12-15 18:32:59 -06:00
Ben Croker c02f056d96
Better wording [deploy-site] 2024-12-15 17:23:47 -06:00
Ben Croker d99bdc3c39
Fix typo [deploy-site] 2024-12-15 17:06:49 -06:00
Ben Croker c6dbc96153
Improve wording (deploy-site) 2024-12-15 16:35:07 -06:00
Ben Croker 062753e1f5
Improve wording 2024-12-15 16:07:22 -06:00
Ben Croker 35aaa72c64
Update file size comparison 2024-12-15 13:18:29 -06:00
Ben Croker bb76da59cc
Update core bundle size 2024-12-15 13:03:17 -06:00
Ben Croker 494f0d4191
Add sample output headings 2024-12-15 12:43:22 -06:00
Ben Croker 636b203455
Hide JavaScript API page and clean up old pages 2024-12-15 12:41:18 -06:00
Ben Croker dbfdd77a94
Minor tweaks 2024-12-15 12:36:55 -06:00
Ben Croker a2fe65a9a1
Reorder content 2024-12-15 12:22:45 -06:00
Ben Croker 9d6443921b
Rewrite docs (#367)
* Rewrite reference docs

* Tweaks

* More concise

* Make modifier arguments lowercase

* Fix modifier arguments

* Document modifiers, rename `args` to `tags`

* Add social sharing image

* Add JS API page

* Formatting

* Skip element

* Rewrite Going Deeper

* Minor improvements

* Add to Unlearning

* Finish Going Deeper

* Redirect legacy pages

* Finish PR

* add 301s

* Consolidate redirects

---------

Co-authored-by: Delaney Gillilan <delaneygillilan@gmail.com>
2024-12-15 12:12:16 -06:00
Delaney d4a7d4af44
Bundler appears broken (#378)
Fixes #375
2024-12-15 12:04:23 -06:00
Ben Croker 9ca42b340e
Fix effect error (#373)
* Throw Datastar error

* Fix wording
2024-12-13 19:00:46 -06:00
zangster300 72fbff06ec
new approach working for all smoke tests (#369)
* Working on #353 new approach

* new approach working for all smoke tests

---------

Co-authored-by: Delaney Gillilan <delaneygillilan@gmail.com>
2024-12-13 16:44:45 -08:00
Delaney 6fca8a7c72
Road to v1 essay (#325)
* Write essay: The Road to 1.0
Fixes #315

* add to essays

* Editing

---------

Co-authored-by: Ben Croker <ben@putyourlightson.com>
2024-12-13 11:59:16 -06:00
Ben Croker 57c7f2d8ac
Add `selectorOrID` to error message 2024-12-11 19:06:46 -06:00
Ben Croker fe67174373
Add `SignalNotFound` error 2024-12-11 17:16:32 -06:00
Ben Croker dc06f31b77
v0.21.2 2024-12-11 16:16:40 -06:00
Ben Croker 2c87ee3bfa
Reverse logic 2024-12-11 15:45:12 -06:00
Ben Croker 34a04770be
Improve modifier docs 2024-12-11 15:36:11 -06:00
Delaney 941109e55b
Delaneyj/issue354 (#355)
* `data-on-keydown` preventing default
Fixes #354

* fix bulk example
2024-12-11 12:14:51 -08:00
Ben Croker 1c15dc1453
Fix links to library 2024-12-11 12:56:03 -06:00
Ben Croker 418cc3a80f
Fix modifier syntax in examples 2024-12-11 11:20:55 -06:00
Ben Croker f15bd3b87a
Improve error messages 2024-12-11 11:16:27 -06:00
Ben Croker 436e4ddbd8
Fix scroll into view example 2024-12-11 11:16:12 -06:00
Ben Croker 6ccc9e9c94
Uppercase first character in errors 2024-12-11 11:05:28 -06:00
Ben Croker f0327340fa
Update reference 2024-12-11 10:41:09 -06:00
Delaney 1f823de4a1
Path prefix test not working in `setAll()` and `toggleAll()` actions (#351)
Fixes #350
2024-12-11 10:37:28 -06:00
Ben Croker edf9ec6143
Merge branch 'develop' of https://github.com/starfederation/datastar into develop 2024-12-11 06:55:34 -06:00
Ben Croker 79041854e0
Improve getting started demos 2024-12-11 06:54:56 -06:00
Delaney Gillilan f8780010ae Restore file contents that were previously in LFS 2024-12-10 21:17:41 -08:00
Delaney 20ad2ff9ac
Release/0.21.0 (#348)
* scratch no longer has a /tmp dir, move to alpine
we need all the files cause Docker COPY doesn't support glob

* Update routes_home.templ (#319)

Remove two typos

* toggleAll & setAll use path instead of regex (#318)

* toggleAll & setAll use path instead of regex
Fixes #317

* Fix wording

---------

Co-authored-by: Ben Croker <57572400+bencroker@users.noreply.github.com>

* Update release note

* Update go_deeper.md (#320)

Minor edits to Signals section, for grammar, clarity

* Make retries and backoff configurable (#316)

Fixes #190

* Fix links to SDKs

* Tweak intro code

* Improve getting started guide

* Fix and improve getting started guide

* Add web components

* evt.detail.value not working for third party libs (#326)

* evt.detail.value not working for third party libs
Fixes #324

* regex is never fun

* fix possible xss on errors

* Add circular logo

* fix clipboard usage on front page

* Support closing SSE connection from client side (#327)

Fixes #276

* Fix link in readme

* refactor: `nodejs`, `npm`, and `pnpm` are needed for the `libpub` task

* data-ref bug (#333)

* data-ref bug
Fixes #331

* Merge branch 'develop' of github.com:starfederation/datastar into delaneyj/issue331

* adds context.WithTimeout to site smoketests (#334)

removes got lib refs

* Java SDK (#321)

* Examples

* SDK and Readme

* Added build files

* Fixed Readme

* add SDKs to frontpage

* TODONE: BEN!

* Importing Datastar (#335)

Fixes #329

* bad link

* Rename default constant (#330)

* Rename default constant

* Fix PHP usage

* Build

* Remove Teleport from docs

* Bundler bug (#347)

Fixes #339

* make modifiers spec compliant (#346)

* make modifiers spec compliant
Fixes #345

* `_` for modifier args is now back to `.`. Please let it end

* remove unused error

* bump version

* Release notes and VSCode release

* Update VSCode version number

* Fix up modifier docs

---------

Co-authored-by: Wm Talcott <32972881+codetalcott@users.noreply.github.com>
Co-authored-by: Ben Croker <57572400+bencroker@users.noreply.github.com>
Co-authored-by: Ben Croker <ben@putyourlightson.com>
Co-authored-by: Andrew Welch <andrew@nystudio107.com>
Co-authored-by: zangster300 <nick0xbb8@gmail.com>
Co-authored-by: Peter Humulock <rphumulock@gmail.com>
2024-12-10 17:21:06 -06:00
Ben Croker 326445dc43
Fix up modifier docs 2024-12-10 17:18:06 -06:00
Delaney Gillilan 35bfc89a42 remove unused error 2024-12-10 14:46:45 -08:00
Delaney 0551551c62
make modifiers spec compliant (#346)
* make modifiers spec compliant
Fixes #345

* `_` for modifier args is now back to `.`. Please let it end
2024-12-10 14:32:27 -08:00
Ben Croker 6f0293dec4
Remove Teleport from docs 2024-12-10 15:39:39 -06:00
Delaney Gillilan 6b8110671a bad link 2024-12-09 16:08:36 -08:00
Ben Croker b3ec534a5d
Merge branch 'docs/improvements' into develop 2024-12-09 16:47:33 -06:00
Ben Croker 82d669a42e
TODONE: BEN! 2024-12-09 16:47:05 -06:00
zangster300 d6826ca92d
adds context.WithTimeout to site smoketests (#334)
removes got lib refs
2024-12-09 10:58:30 -08:00
Delaney 4c20476b47
data-ref bug (#333)
* data-ref bug
Fixes #331

* Merge branch 'develop' of github.com:starfederation/datastar into delaneyj/issue331
2024-12-09 08:43:51 -08:00
Delaney 41fb2df3a8
Support closing SSE connection from client side (#327)
Fixes #276
2024-12-07 20:17:56 -08:00
Delaney Gillilan 14839abfb5 fix clipboard usage on front page 2024-12-07 15:02:35 -08:00
Ben Croker 75701f70d6
Add circular logo 2024-12-07 13:57:23 -06:00
Delaney Gillilan 208b94aefb Merge branch 'develop' of github.com:starfederation/datastar into develop 2024-12-07 11:34:09 -08:00
Delaney Gillilan afcd51126c fix possible xss on errors 2024-12-07 11:33:36 -08:00
Ben Croker cbdae3de93
Add web components 2024-12-07 07:34:45 -06:00
Ben Croker 7c0c37fb0f
Fix and improve getting started guide 2024-12-07 00:03:39 -06:00
Ben Croker 21749ef0d3
Improve getting started guide 2024-12-06 23:50:10 -06:00
Ben Croker 1000e2e95a
Tweak intro code 2024-12-06 20:02:47 -06:00
Delaney 39268eda93
Make retries and backoff configurable (#316)
Fixes #190
2024-12-06 13:50:49 -08:00
Wm Talcott 2759382e7c
Update go_deeper.md (#320)
Minor edits to Signals section, for grammar, clarity
2024-12-06 15:15:28 -06:00
Delaney 26d0e5ca20
toggleAll & setAll use path instead of regex (#318)
* toggleAll & setAll use path instead of regex
Fixes #317

* Fix wording

---------

Co-authored-by: Ben Croker <57572400+bencroker@users.noreply.github.com>
2024-12-06 15:11:06 -06:00
Wm Talcott b6128b5dde
Update routes_home.templ (#319)
Remove two typos
2024-12-06 14:54:20 -06:00
Ben Croker 0b7fbcf341
Tweak intro 2024-12-06 08:47:09 -06:00
Ben Croker 885830304b
Fix GitHub link 2024-12-06 08:36:45 -06:00
Ben Croker 1a129e3951
Fix computed plugin (#314) 2024-12-06 08:27:07 -06:00
Ben Croker ce895445e0
Add options to example 2024-12-05 21:43:00 -06:00
Delaney df109f91d2
Keep SSE connection while tab is inactive (#311)
Fixes #246
Add better sse handles and docs
2024-12-05 10:42:36 -08:00
Delaney 093aeac21a
v0.21.0-beta1
* Fix newline in SDK protocol for paths. (#281)

* Fix newline in SDK protocol for paths.
Fixes #272

* Update PHP SDK

* Fix newline in SDK protocol for paths in Go SDK #272

* Tweak wording

---------

Co-authored-by: Ben Croker <ben@putyourlightson.com>

* Rename data-store to data-merge-signals. (#280)

* Make title dynamic in site (#277)

* Make title dynamic in site
Fixes #263

* Update meta tags

---------

Co-authored-by: Ben Croker <ben@putyourlightson.com>

* Add release note

* Rename data-store to data-merge-signals.
Fixes #269

* Fix backend reference docs and example

* feat: Add fly-deploy.yaml, manually triggered via GH only for now

* Rename data-store to data-merge-signals.
Fixes #269

* Update SDK #269

---------

Co-authored-by: Ben Croker <ben@putyourlightson.com>
Co-authored-by: Andrew Welch <andrew@nystudio107.com>
Co-authored-by: Ben Croker <57572400+bencroker@users.noreply.github.com>

* side effects

* Delaneyj/issue270 (#282)

* Start work on data-model removal #270

* move files  #270

* move all test and examples to data-bind from data-model

* merge consts

* Add release note

---------

Co-authored-by: Ben Croker <ben@putyourlightson.com>

* Move to `@` for actions (#283)

* move to @ for actions

* Rename store to signals for #284  (#289)

* Rename store to signals #284 passes tests

---------

Co-authored-by: Delaney Gillilan <delaneygillilan@gmail.com>

* Update CHANGELOG.md

* Release notes

* Preprocessor to macro (#290)

* Preprocessor to macro Fixes #285

---------

Co-authored-by: Andrew Welch <andrew@nystudio107.com>

* Remove RefMacro

* Tweka wording

* Fix docs

* Support explicit syntax (#297)

* refactor: Use Docker-dev for the base image, and build all the things

* refactor: Log in to the registry

* refactor: Run on workflow changes

* chore: revert changes

* Improve homepage title

* delete everything first

* add top level sdk folder
move go SDK
add back bundles and stuff to make tsbuild work

* update go SDK url

* fix: Fix issue with `make task`

* fix: Fix multiple linux arch’s, add `support` as a `deploy` dep

* refactor: Install `flyctl`

* refactor: Output to the current directory

* refactor: ignore .out

* refactor: Run via Docker container

* refactor: Use `flyctl` instead of the alias

* refactor: Docker-in-Docker

As per “The Socket Solution” here: https://jpetazzo.github.io/2015/09/03/do-not-use-docker-in-docker-for-ci/

* refactor: Fix comment

* refactor: Make fly alias

* refactor: Use fly alias

* add vendored back in

* fix: Revert relative paths

* refactor: Revert ignoring `.out`

* refactor: Run flyctl in the CI container

* refactor: Remove flyctl

* refactor: Remove socket bind mount

* refactor: Add `flyctl` back in so `make task deploy` can be done locally

* add types and nested signals

* Add canonical meta tag

* add more stuff back in

* add ( i think ) the rest of the plugins

* lazy generation ReactiveExpresison, get click to edit working

* data-merge-signals to data-signals
start @action to action

* Add WIP release notes

* update more examples removing @ syntax and moving to sse action

* remove deprecated examples

* The great $ purge of 2024

* Add error codes

* working on v21 syntax  #296
fix bind/intersect lazy reactiveExpression gen

* Fix todo demo

* Reorder plugins

* Start markdown errors

* Finish markdown errors

* Update release notes

* Add release note

* Update release note

* remove dup and require checks

* fix signals JSON usage
fix throttle/debounce lead/trail port

* make js obj helper
auto formatting
signal value needed explicit period prefix for value
data-signals lazy generates due to possible expressons
removeSignal applies after eval

* update test, 127/127

* Create VSCode extension (#295)

* Add attributes

* Finish attributes

* Fix repo URL

* Finish

* change attributes

* fix attributes

* VSCode extension improvements

* fix data-attributes example

* Fix a BEN!

* support individual data-class-foo calls

* error page

* Rework error pages

* Simplify

* Rework errors

* Fixes

* Delete `console.log` from library

* #296 persist back in

* Add missing error

* remove mouse move until I implement correctly

* i hate javascript

* . syntax for modifiers now :

* Extract plugin rules

* Add clarification comment

* support xor key or value for bind/ref/indicator

* Add KeyValRules

* Remove unused properties

* Update VSCode extension

* Update docs

* Improve getting started guide

* logic restored

* autogen error sidebar links

* fixed Restructure folders #287

* fix scroll test
* Prep docs for release

* Fixed check for exclusive requirements

* Build

* img diff

* add errors to nested signals
fix getting started

---------

Co-authored-by: Andrew Welch <andrew@nystudio107.com>
Co-authored-by: Ben Croker <ben@putyourlightson.com>
Co-authored-by: Ben Croker <57572400+bencroker@users.noreply.github.com>

* fix signals type elision

---------

Co-authored-by: Ben Croker <ben@putyourlightson.com>
Co-authored-by: Andrew Welch <andrew@nystudio107.com>
Co-authored-by: Ben Croker <57572400+bencroker@users.noreply.github.com>
2024-12-05 09:09:04 -08:00