Commit Graph

958 Commits

Author SHA1 Message Date
Ben Croker 31b0c51a76
Prep for beta.5 2025-02-09 17:29:43 -06:00
Delaney afa40c83aa
Idiomorph v0.5.0 breakage (#638)
Fixes #637
2025-02-09 17:27:40 -06:00
Ben Croker 2e9570f0ae
Bump PHP SDK version 2025-02-08 21:17:23 -06:00
Ben Croker 0a00bed483
Revert "update changelog"
This reverts commit bbdb8d6652.
2025-02-08 21:13:32 -06:00
Delaney Gillilan bbdb8d6652 update changelog 2025-02-08 19:11:18 -08:00
Delaney Gillilan 4042dc0e25 fix in memory fuzzy search embedded pathing 2025-02-08 19:11:01 -08:00
Ben Croker 860aa9e46d
Add videos link 2025-02-08 19:55:02 -06:00
Ben Croker c89da30a6d
Update version numbers 2025-02-08 19:49:01 -06:00
Ben Croker 1004107c93
Prep for 1.0.0-beta.4 2025-02-08 19:10:38 -06:00
Delaney 9945394a79
Idiomorph v0.5.0 (#634)
* Idiomorph v0.5.0
Fixes #633

* Build

---------

Co-authored-by: Ben Croker <ben@putyourlightson.com>
2025-02-08 17:40:34 -06:00
Ben Croker 8a0fedf30b
Merge Zig README 2025-02-08 17:22:27 -06:00
ravenclaw900 ed9f5748ac
Minor fixes for the Rust SDK (#632)
* Add necessary dev-dependencies for testing

* Update some crate metadata

* Replace all implementations of `Into` with `From`

* Replace `write!` with `writeln!` when applicable

* Replace `futures` crate with slightly more minimal `futures_util` crate

* Clarify uses of `Default::default()`
2025-02-08 17:16:39 -06:00
sdenovan 65b017d65f
docs: include byte[] casts for MergeSignals golang examples (#635) 2025-02-08 17:16:17 -06:00
Ben Croker c90c09e741
Add `viewtransition` modifier to `data-on` (#631)
* Add `viewtransition` modifier to `data-on`

* Refactor to use util

* Add example

* fix morty mistakes

* Add release note and docs

---------

Co-authored-by: Delaney Gillilan <delaneygillilan@gmail.com>
2025-02-08 17:14:26 -06:00
Ben Croker ef05be33a8
Improve `data-on` docs 2025-02-08 09:25:50 -06:00
Johnathan Stevers 6d16a23999
Prepare Zig SDK for standalone repo (#628)
* prepare zig sdk for its own repo

* fix missing opts

* update dependencies

* add option for http1

* update readme
2025-02-08 08:11:49 -06:00
Greg H 16714ed0ad
sdk/dotnet updates (#630)
* sdk/dotnet-updates - added ability to append custom headers to sse response

* sdk/dotnet-updates - updated README with Model Binding examples

* sdk/dotnet-updates - nuget package version should reflect properly. no release made in github

---------

Co-authored-by: Greg Holden <SpiralOSS@users.noreply.github.com>
2025-02-08 08:10:04 -06:00
Ben Croker 91f5f07413
Observe DOM only after loading core plugins (#629) 2025-02-08 07:47:15 -06:00
Ben Croker 305b8eca89
Tweak spacing 2025-02-07 21:16:30 -06:00
Ben Croker 4fb2aa5b6a
Fix typo 2025-02-07 17:58:46 -06:00
zangster300 bd17ab4809
update to smoketests, reducing failure rates (#626) 2025-02-07 08:29:30 -08:00
Ben Croker 01702f0fde
Fix file extension not file extension 2025-02-06 17:42:47 -06:00
Henry Laxen 18ea30972e
Haskell SDK (#622)
* ready for pull request

* I had the consts_haskell.qtpl in the wrong place

* made changes requested by Ben

* made changes requested by Ben

* fixed license and version in cabal

* more changes per Ben

* renamed dstar.cabal to datastar.cabal

* Update LICENSE

* Rename LICENSE to LICENSE.md

* Update datastar.cabal

---------

Co-authored-by: Ben Croker <57572400+bencroker@users.noreply.github.com>
2025-02-06 17:30:14 -06:00
Ben Croker 467aeb4312
Clarify that SDKs are optional 2025-02-06 09:04:56 -06:00
Ben Croker b874aa16e2
en-US 2025-02-06 08:03:31 -06:00
Ben Croker e1fb273cd8
Clarify SDK 2025-02-06 07:51:20 -06:00
Ben Croker 7314357d2e
Minor improvements 2025-02-05 21:43:29 -06:00
Ben Croker 39a4e1553c
Language fixes 2025-02-05 21:11:10 -06:00
Ismael Celis 229183f136
Ruby SDK support rails render_in interface (#617)
* Support Rails' #render_in(view_context) interface

So render arbitrary objects, including component libs like ViewComponent and Phlex Rails.

* Render anything that supports #to_s, including Rails' safe buffers

* Make sure Rails view_context is an ActionView::Base

* Document
2025-02-05 20:48:51 -06:00
Ben Croker 3e5f1aaa09
Revert removal of links 2025-02-05 20:42:04 -06:00
Ben Croker 0d08df81ec
Add release notes 2025-02-05 20:41:09 -06:00
Ben Croker ead432fe04
Tweak styling 2025-02-05 19:24:28 -06:00
Delaney b6319e9b1d
data-on-signals-change-foo (fixes #587) (#592)
* Add optional key to `data-on-signals-change`
Fixes #587

* support files

* Listen for changes to signal path

---------

Co-authored-by: Ben Croker <ben@putyourlightson.com>
2025-02-05 19:10:23 -06:00
Ben Croker c0adef6eea
Remove code comment
Build
2025-02-05 17:58:50 -06:00
Ben Croker 84a31ca6a0
Fix signals `__ifmissing` (#621)
* Add casing modifiers to attributes

* Lower case key

* Refactor text utils

* cleanup ternary

* fix case example

* Finish

* Upsert signals with `ifmissing`

* Add release note

---------

Co-authored-by: Delaney Gillilan <delaneygillilan@gmail.com>
2025-02-05 17:51:15 -06:00
Ben Croker d97cd5f40a
Add key casing modifiers (#618)
* Add casing modifiers to attributes

* Lower case key

* Refactor text utils

* cleanup ternary

* fix case example

* Finish

---------

Co-authored-by: Delaney Gillilan <delaneygillilan@gmail.com>
2025-02-05 17:39:52 -06:00
zangster300 4aafd4262f
update setup_test.go to change dir before kicking things off (#619) 2025-02-05 16:55:15 -06:00
Ben Croker d45517ffbb
Fix fragment morph (#608)
* Add example to demonstrate

* upgrade to latest idiomorph

* Remove test file

* fix possible removal on apply

---------

Co-authored-by: Delaney Gillilan <delaneygillilan@gmail.com>
2025-02-05 16:02:57 -06:00
JeremS 32a14d985a
Doc: fixed improper coordinates for using the clojure SDK (#613)
I mistakenly provided the wrong url in the docs, generating
an error for users wanting to use the sdk. It is now fixed.
2025-02-05 12:32:36 -06:00
Ismael Celis 5d46096dc2
Ruby SDK (#600)
* WiP initial setup, ServerSentEventGenerator class

* WiP working merge_fragments in Rails

* #merge_fragments and #merge_signals

* Handle SSE vs Data* options

* Test that #merge_fragments works with a #call(view_context:) interface

* Test Dispatcher#stream

* #remove_fragments

* #remove_signals

* #execute_script

* execute_script with attributes Hash

* Connection: keep-alive

* Use 2 line-breaks as message end, plus last line's 1 line break (3 total)

* Connection callbacks. #on_connect, #on_disconnect, #on_error

* Dispatcher#signals

* Omit retry if using default value (1000)

* Omit defaults

* Multiline scripts

* Test Rack endpoint

* Document test Rack endpoint

* Add missing defaults

* Spawn multiple streams in threads, client_disconnect and server_disconnect handlers

* Move ThreadSpawner to configuration

* Configure a RailsThreadSpawner when Rails detected

* Move Railtie one dir up

* Global error callback

Datastar.config.on_error { |err| Sentry.notify(err) }

* Catch exception from stream threads in main thread

* Linearlize exception handling

* Refactor dispatcher to handle single stream in main thread, multi streams in separate threads

* spawner => executor. Rails Async executor using fibers.

* Support Async for fiber-based concurrency

* Finalize response for Rack and Rails

* test Rack app

* Threaded demo

* Test Dispatcher#sse?

Also do not check for SSE Accept on stream.
Leave it up to the user.

* Do not check Accept header in test app. Test scripts don't send it properly.

* Document code

* Example progress bar Rack app

* README

* Link to D* SSE docs

* See examples

* Document callbacks

* List Ruby SDK in SDKs.md

* Ruby struct in consts.go

* Document running tasks with arguments via Docker

* Code-gen Ruby constants from shared data via template

* Make test rely on constants

* Datastar.from_rack_env(env) => Datastar::Dispatcher

* Ruby example snippets

* #redirect(location)

* Ruby snippet using #redirect(new_path)

* Add X-Accel-Buffering: no header

To disable response buffering by NGinx and other proxies.

* Clarify linearisation of updates in Readme

* Tidy-up progress example

* Move examples to /examples/ruby

* Document Rails and Phlex

* Version 1.0.0.beta.1

* Version 1.0.0.beta.1

* Do not set Connection header if not HTTP/1.1

* Don't touch BUILDING.md docs in this PR

* Remove Changelog for now

* Sort Ruby alphabetically (just "ruby", not the entire line)

* Add hello world example, remove progress bar one.

* Add hello-world example to code-gen

* Typos
2025-02-05 12:02:18 -06:00
Ben Croker ca5414c358
Stop kebabizing class (#611) 2025-02-05 10:02:10 -06:00
Roman Frołow 5a4b4d699e
Accomodate Zig SDK and examples to test runner changes (#601)
* update zig to work on master

* Updated deps, fixed to use tests.zig as root, add datastar as module, refactoring

* Update test_runner.zig. Move tests to root.zig.

* tokamak: use post0 when no body
2025-02-05 09:39:00 -06:00
zangster300 bc21b05164
switching tests back to one web server, many pages (#609) 2025-02-05 08:53:24 -06:00
Ben Croker d3b50bc3a9
Fix TypeScript snippets (#597)
* Fix snippets

* Use proper casing
2025-02-05 07:10:04 -06:00
Patrick Marchand 7a994bdff3
Add Accept: text/event-stream to bash tests (#607)
Datastar responses are also valid SSE responses, and the D* client already sends `Accept: text/event-stream` to the server, so tests should replicate that.

Some servers might rely on this for content negotiation.

Co-authored-by: Ismael Celis <ismaelct@gmail.com>
2025-02-04 16:41:41 -06:00
Patrick Marchand 1d74d2328a
Sdk ts web improvements (#551)
* sdk/typescript add support for ResponseInit in web stream method

This allows setting custom headers

* sdk/ts elide datalines with default values

* sdk/ts run deno fmt

* sdk/typescript deno lint

* sdk/typescript better error handling for streams

* sdk/typescript improve deno request abortion support and async completion

* sdk/typescript fix type error in error usage
2025-02-04 16:39:41 -06:00
Ben Croker 552c55939d
Dispatch `RETRYING` SSE event (#585) 2025-02-04 15:41:10 -06:00
Ben Croker 437f8bcf53
Add release note 2025-02-04 15:14:07 -06:00
Ben Croker 0c33439fa6
Restructuring 2025-02-04 12:32:42 -06:00
Ben Croker b4a11683fb
Add `run.go` 2025-02-04 12:31:21 -06:00