From 4f02f82f4e03119169cd532ec1cc52293f55df10 Mon Sep 17 00:00:00 2001 From: giles Date: Wed, 15 Apr 2026 11:29:01 +0000 Subject: [PATCH] HS parser: fix number+comparison keyword collision, eval-hs uses hs-compile Parser: skip unit suffix when next ident is a comparison keyword (starts, ends, contains, matches, is, does, in, precedes, follows). Fixes "123 starts with '12'" returning "123starts" instead of true. eval-hs: use hs-compile directly instead of hs-to-sx-from-source with "return " prefix, which was causing the parser to consume the comparison as a string suffix. Co-Authored-By: Claude Opus 4.6 (1M context) --- lib/hyperscript/parser.sx | 7 +- shared/static/wasm/sx/hs-parser.sx | 7 +- spec/tests/test-hyperscript-behavioral.sx | 2 +- sx/sx/analyzer.sx | 120 -- sx/sx/app-config.sx | 4 +- sx/sx/applications/cssx/async/index.sx | 48 + sx/sx/applications/cssx/comparison/index.sx | 60 + sx/sx/applications/cssx/delivery/index.sx | 64 + sx/sx/applications/cssx/index.sx | 70 + sx/sx/applications/cssx/live/index.sx | 63 + sx/sx/applications/cssx/patterns/index.sx | 51 + sx/sx/applications/cssx/philosophy/index.sx | 45 + .../graphql/_islands/parse-island.sx | 57 + sx/sx/applications/graphql/index.sx | 274 ++++ sx/sx/applications/htmx/_test/test-demo.sx | 137 ++ sx/sx/applications/htmx/index.sx | 313 ++++ .../hyperscript/_islands/compile-result.sx | 32 + .../hyperscript/_islands/example.sx | 30 + .../hyperscript/_islands/live-demo.sx | 36 + .../hyperscript/_islands/playground.sx | 28 + .../hyperscript/_islands/translation.sx | 32 + sx/sx/applications/hyperscript/htmx/index.sx | 330 +++++ sx/sx/applications/hyperscript/index.sx | 83 ++ .../native-browser/index.sx} | 1 - .../pretext/_islands/live.sx} | 1 - .../pretext/_islands/render-paragraph.sx | 49 + .../pretext/index.sx} | 55 +- .../protocol/activitypub/index.sx | 10 + .../applications/protocol/fragments/index.sx | 14 + sx/sx/applications/protocol/future/index.sx | 16 + sx/sx/applications/protocol/index.sx | 23 + .../protocol/internal-services/index.sx | 14 + .../protocol/resolver-io/index.sx | 15 + .../sx-urls/index.sx} | 2 +- sx/sx/{sxtp.sx => applications/sxtp/index.sx} | 1 - sx/sx/cssx.sx | 421 ------ sx/sx/{data-test.sx => data-test/content.sx} | 2 +- sx/sx/docs-content.sx | 99 -- sx/sx/docs.sx | 274 ---- sx/sx/docs/attr-table-from-data.sx | 14 + sx/sx/docs/attr-table.sx | 18 + sx/sx/docs/clear-cache-btn.sx | 6 + sx/sx/docs/headers-row.sx | 24 + sx/sx/docs/headers-table-from-data.sx | 14 + sx/sx/docs/headers-table.sx | 16 + sx/sx/docs/label.sx | 1 + sx/sx/docs/oob-code.sx | 8 + sx/sx/docs/placeholder.sx | 9 + sx/sx/docs/primitives-tables.sx | 10 + sx/sx/docs/special-form-card.sx | 32 + sx/sx/docs/special-forms-category.sx | 19 + sx/sx/docs/special-forms-tables.sx | 8 + sx/sx/docs/two-col-row.sx | 19 + sx/sx/docs/two-col-table-from-data.sx | 21 + sx/sx/docs/two-col-table.sx | 25 + .../essay/client-reactivity/index.sx} | 2 +- .../essay/continuations/index.sx} | 2 +- .../essay/hegelian-synthesis/index.sx} | 2 +- .../essay/htmx-react-hybrid/index.sx} | 2 +- .../essay/hypermedia-age-of-ai/index.sx} | 2 +- sx/sx/{essays => etc/essay}/index.sx | 1 - .../essay/no-alternative/index.sx} | 2 +- .../essay/on-demand-css/index.sx} | 2 +- .../essay/react-is-hypermedia/index.sx} | 2 +- .../essay/reflexive-web/index.sx} | 2 +- .../essay/self-defining-medium/index.sx} | 2 +- .../essay/separation-of-concerns/index.sx} | 2 +- .../essay/server-architecture/index.sx} | 2 +- .../essay/sx-and-ai/index.sx} | 2 +- .../essay/sx-native/index.sx} | 2 +- .../essay/sx-sucks/index.sx} | 2 +- .../essay/tail-call-optimization/index.sx} | 2 +- .../essay/the-art-chain/index.sx} | 2 +- .../essay/why-sexps/index.sx} | 2 +- .../essay/zero-tooling/index.sx} | 2 +- .../philosophy/dennett/index.sx} | 2 +- .../philosophy/existentialism/index.sx} | 2 +- .../philosophy/godel-escher-bach/index.sx} | 2 +- .../philosophy/index.sx} | 1 - .../philosophy/platonic-sx/index.sx} | 2 +- .../philosophy/sx-manifesto/index.sx} | 2 +- .../philosophy/wittgenstein/index.sx} | 2 +- .../plan/art-dag-sx/index.sx} | 2 +- .../plan/async-eval-convergence/index.sx} | 2 +- .../plan/cek-reactive/index.sx} | 2 +- .../content-addressed-components/index.sx} | 2 +- .../plan/environment-images/index.sx} | 2 +- .../plan/foundations/index.sx} | 2 +- .../plan/fragment-protocol/index.sx} | 2 +- .../plan/generative-sx/index.sx} | 2 +- .../plan/glue-decoupling/index.sx} | 2 +- sx/sx/{plans => etc/plan}/index.sx | 1 - .../plan/isolated-evaluator/index.sx} | 2 +- .../plan/isomorphic/index.sx} | 2 +- .../plan/js-bootstrapper/index.sx} | 2 +- .../plan/live-streaming/index.sx} | 2 +- .../plan/mother-language/index.sx} | 2 +- .../plan/nav-redesign/index.sx} | 2 +- .../plan/predictive-prefetch/index.sx} | 2 +- .../plan/reader-macros/index.sx} | 2 +- .../plan/runtime-slicing/index.sx} | 2 +- .../plan/rust-wasm-host/index.sx} | 2 +- .../plan/scoped-effects/index.sx} | 2 +- .../plan/self-hosting-bootstrapper/index.sx} | 2 +- .../plan/social-sharing/index.sx} | 2 +- .../plan/spec-explorer/index.sx} | 2 +- .../status.sx => etc/plan/status/index.sx} | 2 +- .../plan/sx-activity/index.sx} | 2 +- .../sx-ci.sx => etc/plan/sx-ci/index.sx} | 2 +- .../plan/sx-forge/index.sx} | 2 +- .../sx-host.sx => etc/plan/sx-host/index.sx} | 2 +- .../plan/sx-protocol/index.sx} | 2 +- .../plan/sx-proxy/index.sx} | 2 +- .../sx-pub.sx => etc/plan/sx-pub/index.sx} | 2 +- .../plan/sx-swarm/index.sx} | 2 +- .../sx-urls.sx => etc/plan/sx-urls/index.sx} | 2 +- .../plan/sx-web-platform/index.sx} | 2 +- .../sx-web.sx => etc/plan/sx-web/index.sx} | 2 +- .../_islands/prove-phase1-row.sx | 11 + .../_islands/prove-phase2-row.sx | 14 + .../plan/theorem-prover/index.sx} | 31 +- .../plan/typed-sx/index.sx} | 2 +- .../plan/wasm-bytecode-vm/index.sx} | 2 +- sx/sx/examples-content.sx | 372 ----- .../index.sx} | 1 - sx/sx/geography/cek.sx | 1272 ----------------- .../cek/_islands/content-address-demo.sx | 109 ++ sx/sx/geography/cek/_islands/demo-batch.sx | 30 + sx/sx/geography/cek/_islands/demo-chain.sx | 28 + sx/sx/geography/cek/_islands/demo-counter.sx | 21 + .../cek/_islands/demo-reactive-attr.sx | 21 + .../cek/_islands/demo-render-stepper.sx | 256 ++++ sx/sx/geography/cek/_islands/demo-stepper.sx | 182 +++ .../geography/cek/_islands/demo-stopwatch.sx | 47 + sx/sx/geography/cek/_islands/freeze-demo.sx | 160 +++ sx/sx/geography/cek/content/index.sx | 82 ++ sx/sx/geography/cek/demo/index.sx | 101 ++ sx/sx/geography/cek/freeze/index.sx | 116 ++ sx/sx/geography/cek/index.sx | 94 ++ .../{eval-rules.sx => eval-rules/index.sx} | 2 +- .../example/_shared/page-content.sx | 50 + .../hypermedia/example/active-search/index.sx | 11 + .../hypermedia/example/animations/index.sx | 11 + .../hypermedia/example/bulk-update/index.sx | 17 + .../hypermedia/example/click-to-load/index.sx | 12 + .../hypermedia/example/delete-row/index.sx | 18 + .../hypermedia/example/dialogs/index.sx | 11 + .../hypermedia/example/edit-row/index.sx | 16 + .../example/form-submission/index.sx | 11 + .../example/infinite-scroll/index.sx | 11 + .../hypermedia/example/inline-edit/index.sx | 13 + .../example/inline-validation/index.sx | 11 + .../hypermedia/example/json-encoding/index.sx | 11 + .../example/keyboard-shortcuts/index.sx | 11 + .../hypermedia/example/lazy-loading/index.sx | 11 + .../example/loading-states/index.sx | 11 + .../hypermedia/example/oob-swaps/index.sx | 11 + .../hypermedia/example/polling/index.sx | 12 + .../hypermedia/example/progress-bar/index.sx | 11 + .../hypermedia/example/put-patch/index.sx | 14 + .../example/reset-on-submit/index.sx | 11 + .../hypermedia/example/retry/index.sx | 11 + .../hypermedia/example/select-filter/index.sx | 10 + .../example/swap-positions/index.sx | 10 + .../hypermedia/example/sync-replace/index.sx | 11 + .../hypermedia/example/tabs/index.sx | 10 + .../example/vals-and-headers/index.sx | 11 + .../hypermedia/example/value-select/index.sx | 11 + .../reference/_shared/attr-detail-content.sx | 29 + .../reference/_shared/attr-not-found.sx | 5 + .../reference/_shared/event-detail-content.sx | 11 + .../_shared/header-detail-content.sx | 31 + .../hypermedia/reference/attributes/index.sx | 8 + .../hypermedia/reference/events/index.sx | 10 + .../hypermedia/reference/headers/index.sx | 8 + .../hypermedia/reference/index.sx} | 53 - .../hypermedia/reference/js-api/index.sx | 3 + sx/sx/geography/index.sx | 2 +- .../affinity/_islands/aff-demo-auto.sx | 12 + .../affinity/_islands/aff-demo-client.sx | 7 + .../affinity/_islands/aff-demo-io-auto.sx | 7 + .../affinity/_islands/aff-demo-io-client.sx | 8 + .../affinity/_islands/aff-demo-server.sx | 7 + .../isomorphism/affinity/index.sx} | 52 +- .../isomorphism/async-io/index.sx} | 2 +- .../bundle-analyzer/_islands/component.sx | 21 + .../bundle-analyzer/_islands/row.sx | 36 + .../bundle-analyzer/_islands/stat.sx | 4 + .../isomorphism/bundle-analyzer/index.sx | 55 + .../isomorphism/offline/index.sx} | 2 +- .../isomorphism/optimistic/index.sx} | 1 - .../routing-analyzer/_islands/routing-row.sx | 35 + .../isomorphism/routing-analyzer/index.sx} | 38 - .../marshes/_islands/demo-marsh-product.sx | 65 + .../marshes/_islands/demo-marsh-settle.sx | 35 + .../marshes/_islands/demo-marsh-signal-url.sx | 84 ++ .../_islands/demo-marsh-store-reader.sx | 23 + .../_islands/demo-marsh-store-writer.sx | 42 + .../_islands/demo-marsh-view-transform.sx | 108 ++ .../marshes/hypermedia-feeds/index.sx | 29 + .../marshes.sx => geography/marshes/index.sx} | 525 ------- sx/sx/geography/marshes/on-settle/index.sx | 25 + .../geography/marshes/server-signals/index.sx | 41 + .../marshes/signal-triggers/index.sx | 35 + .../geography/marshes/view-transform/index.sx | 15 + .../{modules.sx => modules/index.sx} | 2 +- .../provide/_islands/demo-emit-collect.sx | 12 + .../provide/_islands/demo-nested-provide.sx | 12 + .../provide/_islands/demo-provide-basic.sx | 12 + .../provide/_islands/demo-spread-mechanism.sx | 9 + .../provide/_islands/provide-demo-example.sx | 7 + .../provide/index.sx} | 66 +- .../_islands/demo-app-shell.sx | 53 + .../_islands/demo-commands.sx | 72 + .../reactive-runtime/_islands/demo-foreign.sx | 34 + .../_islands/demo-keyed-lists.sx | 36 + .../reactive-runtime/_islands/demo-loop.sx | 37 + .../reactive-runtime/_islands/demo-machine.sx | 40 + .../reactive-runtime/_islands/demo-ref.sx | 39 + .../reactive-runtime/app-shell/index.sx | 32 + .../reactive-runtime/commands/index.sx | 37 + .../reactive-runtime/foreign/index.sx | 36 + sx/sx/geography/reactive-runtime/index.sx | 95 ++ .../reactive-runtime/keyed-lists/index.sx | 36 + .../geography/reactive-runtime/loop/index.sx | 34 + .../reactive-runtime/machine/index.sx | 33 + sx/sx/geography/reactive-runtime/ref/index.sx | 43 + .../reactive/_islands/demo-counter.sx | 24 + .../reactive/_islands/demo-dynamic-class.sx | 29 + .../reactive/_islands/demo-error-boundary.sx | 34 + .../reactive/_islands/demo-event-bridge.sx | 53 + .../reactive/_islands/demo-imperative.sx | 30 + .../reactive/_islands/demo-input-binding.sx | 32 + .../reactive/_islands/demo-portal.sx | 32 + .../reactive/_islands/demo-reactive-list.sx | 57 + .../geography/reactive/_islands/demo-refs.sx | 35 + .../reactive/_islands/demo-resource.sx | 31 + .../reactive/_islands/demo-stopwatch.sx | 47 + .../reactive/_islands/demo-store-reader.sx | 27 + .../reactive/_islands/demo-store-writer.sx | 25 + .../reactive/_islands/demo-temperature.sx | 28 + .../reactive/_islands/demo-transition.sx | 53 + .../reactive/_lib}/demo-cyst.sx | 16 +- .../_lib}/demo-reactive-expressions.sx | 27 +- .../reactive/_lib}/event-bridge.sx | 1 - sx/sx/geography/reactive/_lib/example-cyst.sx | 12 + .../_lib/example-reactive-expressions.sx | 23 + .../reactive/_lib}/named-stores.sx | 2 +- .../reactive/_lib}/phase2.sx | 2 +- .../reactive/_lib}/plan.sx | 1 - .../reactive/_lib/test-runner-placeholder.sx | 1 + sx/sx/geography/reactive/_lib/test-runner.sx | 1 + .../reactive/_lib}/test-temperature.sx | 0 .../reactive/examples/counter/index.sx | 20 + .../reactive/examples/coverage/index.sx | 142 ++ .../reactive/examples/defisland/index.sx | 21 + .../reactive/examples/dynamic-class/index.sx | 39 + .../reactive/examples/error-boundary/index.sx | 23 + .../examples/event-bridge-demo/index.sx | 21 + .../reactive/examples/imperative/index.sx | 31 + sx/sx/geography/reactive/examples/index.sx | 49 + .../reactive/examples/input-binding/index.sx | 24 + .../reactive/examples/portal/index.sx | 23 + .../reactive/examples/reactive-list/index.sx | 22 + .../geography/reactive/examples/refs/index.sx | 25 + .../reactive/examples/resource/index.sx | 40 + .../reactive/examples/stopwatch/index.sx | 17 + .../reactive/examples/stores/index.sx | 31 + .../reactive/examples/temperature/index.sx | 26 + .../reactive/examples/tests/index.sx | 14 + .../reactive/examples/transition/index.sx | 29 + .../reactive}/index.sx | 568 -------- .../scopes/_islands/demo-scope-basic.sx | 20 + .../scopes/_islands/demo-scope-dedup.sx | 20 + .../scopes/_islands/demo-scope-emit.sx | 19 + .../scopes/_islands/scopes-demo-example.sx | 12 + .../{scopes.sx => geography/scopes/index.sx} | 80 -- .../spreads/_islands/demo-callout.sx | 11 + .../spreads/_islands/demo-cssx-tw.sx | 20 + .../spreads/_islands/demo-example.sx | 12 + .../spreads/_islands/demo-reactive-spread.sx | 41 + .../spreads/_islands/demo-semantic-vars.sx | 16 + .../spreads/_islands/demo-spread-basic.sx | 13 + .../spreads/index.sx} | 126 -- sx/sx/handlers/graphql-api.sx | 24 + sx/sx/handlers/htmx-api.sx | 138 ++ sx/sx/handlers/hyperscript-api.sx | 1 - sx/sx/handlers/spec-detail.sx | 1 - sx/sx/home/index.sx | 4 + sx/sx/{home-stepper.sx => home/stepper.sx} | 1 - sx/sx/hyperscript-spec.sx | 1 - sx/sx/hyperscript.sx | 219 --- sx/sx/language/bootstrapper/index.sx | 79 + .../language/bootstrapper/javascript/index.sx | 53 + .../_islands/demo-client-runner.sx} | 132 +- .../page-helpers/_islands/demo-result-card.sx | 22 + .../bootstrapper/page-helpers/index.sx | 100 ++ sx/sx/language/bootstrapper/python/index.sx | 53 + .../bootstrapper/self-hosting-js/index.sx | 201 +++ .../bootstrapper/self-hosting/index.sx | 115 ++ sx/sx/language/doc/components/index.sx | 17 + sx/sx/language/doc/evaluator/index.sx | 10 + sx/sx/language/doc/getting-started/index.sx | 14 + sx/sx/language/doc/introduction/index.sx | 17 + sx/sx/language/doc/primitives/index.sx | 6 + sx/sx/language/doc/server-rendering/index.sx | 15 + sx/sx/language/doc/special-forms/index.sx | 8 + sx/sx/language/spec/_shared/detail-content.sx | 42 + sx/sx/language/spec/_shared/not-found.sx | 9 + .../language/spec/_shared/overview-content.sx | 56 + sx/sx/language/spec/index.sx | 482 +++++++ sx/sx/language/test/_shared/spec-content.sx | 52 + sx/sx/language/test/index.sx | 133 ++ sx/sx/language/test/runners/index.sx | 109 ++ sx/sx/layouts.sx | 190 --- sx/sx/layouts/doc.sx | 35 + sx/sx/layouts/docs-layout-full.sx | 1 + sx/sx/layouts/docs-layout-mobile.sx | 1 + sx/sx/layouts/docs-layout-oob.sx | 1 + sx/sx/layouts/header.sx | 56 + sx/sx/layouts/nav-children.sx | 21 + sx/sx/layouts/nav-sibling-row.sx | 56 + sx/sx/layouts/standalone-docs-layout-full.sx | 1 + .../layouts/standalone-docs-layout-mobile.sx | 1 + sx/sx/layouts/standalone-docs-layout-oob.sx | 3 + sx/sx/nav-data.sx | 32 +- sx/sx/nav-tools.sx | 2 +- sx/sx/nav-tree.sx | 4 + sx/sx/not-found.sx | 1 - sx/sx/page-functions.sx | 6 + sx/sx/protocols.sx | 98 -- sx/sx/reactive-islands/demo.sx | 632 -------- sx/sx/reactive-islands/runner-placeholder.sx | 3 - sx/sx/reactive-runtime.sx | 702 --------- sx/sx/reference.sx | 120 -- sx/sx/spec-introspect.sx | 238 --- sx/sx/spec-introspect/spec-compute-stats.sx | 34 + sx/sx/spec-introspect/spec-explore-define.sx | 21 + sx/sx/spec-introspect/spec-explore.sx | 14 + sx/sx/spec-introspect/spec-form-effects.sx | 32 + sx/sx/spec-introspect/spec-form-kind.sx | 26 + sx/sx/spec-introspect/spec-form-name.sx | 14 + sx/sx/spec-introspect/spec-form-params.sx | 35 + sx/sx/spec-introspect/spec-form-signature.sx | 26 + sx/sx/spec-introspect/spec-group-sections.sx | 19 + sx/sx/specs-explorer.sx | 364 ----- sx/sx/specs-explorer/spec-effect-badge.sx | 15 + sx/sx/specs-explorer/spec-explorer-content.sx | 24 + .../spec-explorer-define-detail.sx | 55 + sx/sx/specs-explorer/spec-explorer-define.sx | 24 + sx/sx/specs-explorer/spec-explorer-header.sx | 19 + sx/sx/specs-explorer/spec-explorer-section.sx | 20 + sx/sx/specs-explorer/spec-explorer-stats.sx | 39 + sx/sx/specs-explorer/spec-param-list.sx | 24 + .../specs-explorer/spec-platform-interface.sx | 46 + sx/sx/specs-explorer/spec-ring-bridge.sx | 15 + sx/sx/specs-explorer/spec-ring-runtime.sx | 20 + .../specs-explorer/spec-ring-translations.sx | 40 + sx/sx/specs.sx | 1107 -------------- .../build-code-tokens.sx} | 63 +- sx/sx/stepper-lib/split-tag.sx | 38 + sx/sx/stepper-lib/steps-to-preview.sx | 18 + sx/sx/streaming-demo.sx | 179 --- sx/sx/streaming-demo/chunk.sx | 12 + sx/sx/streaming-demo/data.sx | 43 + sx/sx/streaming-demo/layout.sx | 50 + sx/sx/streaming-demo/stream-colors.sx | 59 + sx/sx/streaming-demo/stream-skeleton.sx | 8 + sx/sx/sx-tools-editor.sx | 1 - sx/sx/testing.sx | 302 ---- .../playground/_islands/repl.sx} | 16 +- sx/sx/tools/playground/index.sx | 12 + .../services/index.sx} | 2 +- .../sx-tools/_lib}/sx-tools-demos.sx | 2 +- sx/sx/tools/sx-tools/_lib/sx-tools-editor.sx | 1 + .../{sx-tools.sx => tools/sx-tools/index.sx} | 43 - tests/playwright/generate-sx-tests.py | 2 +- 377 files changed, 9517 insertions(+), 8694 deletions(-) delete mode 100644 sx/sx/analyzer.sx create mode 100644 sx/sx/applications/cssx/async/index.sx create mode 100644 sx/sx/applications/cssx/comparison/index.sx create mode 100644 sx/sx/applications/cssx/delivery/index.sx create mode 100644 sx/sx/applications/cssx/index.sx create mode 100644 sx/sx/applications/cssx/live/index.sx create mode 100644 sx/sx/applications/cssx/patterns/index.sx create mode 100644 sx/sx/applications/cssx/philosophy/index.sx create mode 100644 sx/sx/applications/graphql/_islands/parse-island.sx create mode 100644 sx/sx/applications/graphql/index.sx create mode 100644 sx/sx/applications/htmx/_test/test-demo.sx create mode 100644 sx/sx/applications/htmx/index.sx create mode 100644 sx/sx/applications/hyperscript/_islands/compile-result.sx create mode 100644 sx/sx/applications/hyperscript/_islands/example.sx create mode 100644 sx/sx/applications/hyperscript/_islands/live-demo.sx create mode 100644 sx/sx/applications/hyperscript/_islands/playground.sx create mode 100644 sx/sx/applications/hyperscript/_islands/translation.sx create mode 100644 sx/sx/applications/hyperscript/htmx/index.sx create mode 100644 sx/sx/applications/hyperscript/index.sx rename sx/sx/{native-browser.sx => applications/native-browser/index.sx} (99%) rename sx/sx/{pretext-client.sx => applications/pretext/_islands/live.sx} (99%) create mode 100644 sx/sx/applications/pretext/_islands/render-paragraph.sx rename sx/sx/{pretext-demo.sx => applications/pretext/index.sx} (83%) create mode 100644 sx/sx/applications/protocol/activitypub/index.sx create mode 100644 sx/sx/applications/protocol/fragments/index.sx create mode 100644 sx/sx/applications/protocol/future/index.sx create mode 100644 sx/sx/applications/protocol/index.sx create mode 100644 sx/sx/applications/protocol/internal-services/index.sx create mode 100644 sx/sx/applications/protocol/resolver-io/index.sx rename sx/sx/{sx-urls.sx => applications/sx-urls/index.sx} (99%) rename sx/sx/{sxtp.sx => applications/sxtp/index.sx} (99%) delete mode 100644 sx/sx/cssx.sx rename sx/sx/{data-test.sx => data-test/content.sx} (96%) delete mode 100644 sx/sx/docs-content.sx delete mode 100644 sx/sx/docs.sx create mode 100644 sx/sx/docs/attr-table-from-data.sx create mode 100644 sx/sx/docs/attr-table.sx create mode 100644 sx/sx/docs/clear-cache-btn.sx create mode 100644 sx/sx/docs/headers-row.sx create mode 100644 sx/sx/docs/headers-table-from-data.sx create mode 100644 sx/sx/docs/headers-table.sx create mode 100644 sx/sx/docs/label.sx create mode 100644 sx/sx/docs/oob-code.sx create mode 100644 sx/sx/docs/placeholder.sx create mode 100644 sx/sx/docs/primitives-tables.sx create mode 100644 sx/sx/docs/special-form-card.sx create mode 100644 sx/sx/docs/special-forms-category.sx create mode 100644 sx/sx/docs/special-forms-tables.sx create mode 100644 sx/sx/docs/two-col-row.sx create mode 100644 sx/sx/docs/two-col-table-from-data.sx create mode 100644 sx/sx/docs/two-col-table.sx rename sx/sx/{essays/client-reactivity.sx => etc/essay/client-reactivity/index.sx} (99%) rename sx/sx/{essays/continuations.sx => etc/essay/continuations/index.sx} (99%) rename sx/sx/{essays/hegelian-synthesis.sx => etc/essay/hegelian-synthesis/index.sx} (99%) rename sx/sx/{essays/htmx-react-hybrid.sx => etc/essay/htmx-react-hybrid/index.sx} (96%) rename sx/sx/{essays/hypermedia-age-of-ai.sx => etc/essay/hypermedia-age-of-ai/index.sx} (99%) rename sx/sx/{essays => etc/essay}/index.sx (96%) rename sx/sx/{essays/no-alternative.sx => etc/essay/no-alternative/index.sx} (99%) rename sx/sx/{essays/on-demand-css.sx => etc/essay/on-demand-css/index.sx} (97%) rename sx/sx/{essays/react-is-hypermedia.sx => etc/essay/react-is-hypermedia/index.sx} (99%) rename sx/sx/{essays/reflexive-web.sx => etc/essay/reflexive-web/index.sx} (99%) rename sx/sx/{essays/self-defining-medium.sx => etc/essay/self-defining-medium/index.sx} (99%) rename sx/sx/{essays/separation-of-concerns.sx => etc/essay/separation-of-concerns/index.sx} (99%) rename sx/sx/{essays/server-architecture.sx => etc/essay/server-architecture/index.sx} (99%) rename sx/sx/{essays/sx-and-ai.sx => etc/essay/sx-and-ai/index.sx} (99%) rename sx/sx/{essays/sx-native.sx => etc/essay/sx-native/index.sx} (99%) rename sx/sx/{essays/sx-sucks.sx => etc/essay/sx-sucks/index.sx} (98%) rename sx/sx/{essays/tail-call-optimization.sx => etc/essay/tail-call-optimization/index.sx} (98%) rename sx/sx/{essays/the-art-chain.sx => etc/essay/the-art-chain/index.sx} (99%) rename sx/sx/{essays/why-sexps.sx => etc/essay/why-sexps/index.sx} (96%) rename sx/sx/{essays/zero-tooling.sx => etc/essay/zero-tooling/index.sx} (99%) rename sx/sx/{essays/sx-and-dennett.sx => etc/philosophy/dennett/index.sx} (99%) rename sx/sx/{essays/s-existentialism.sx => etc/philosophy/existentialism/index.sx} (99%) rename sx/sx/{essays/godel-escher-bach.sx => etc/philosophy/godel-escher-bach/index.sx} (99%) rename sx/sx/{essays/philosophy-index.sx => etc/philosophy/index.sx} (96%) rename sx/sx/{essays/platonic-sx.sx => etc/philosophy/platonic-sx/index.sx} (99%) rename sx/sx/{essays/sx-manifesto.sx => etc/philosophy/sx-manifesto/index.sx} (99%) rename sx/sx/{essays/sx-and-wittgenstein.sx => etc/philosophy/wittgenstein/index.sx} (99%) rename sx/sx/{plans/art-dag-sx.sx => etc/plan/art-dag-sx/index.sx} (99%) rename sx/sx/{plans/async-eval-convergence.sx => etc/plan/async-eval-convergence/index.sx} (99%) rename sx/sx/{plans/cek-reactive.sx => etc/plan/cek-reactive/index.sx} (99%) rename sx/sx/{plans/content-addressed-components.sx => etc/plan/content-addressed-components/index.sx} (99%) rename sx/sx/{plans/environment-images.sx => etc/plan/environment-images/index.sx} (99%) rename sx/sx/{plans/foundations.sx => etc/plan/foundations/index.sx} (99%) rename sx/sx/{plans/fragment-protocol.sx => etc/plan/fragment-protocol/index.sx} (98%) rename sx/sx/{plans/generative-sx.sx => etc/plan/generative-sx/index.sx} (99%) rename sx/sx/{plans/glue-decoupling.sx => etc/plan/glue-decoupling/index.sx} (98%) rename sx/sx/{plans => etc/plan}/index.sx (96%) rename sx/sx/{plans/isolated-evaluator.sx => etc/plan/isolated-evaluator/index.sx} (99%) rename sx/sx/{plans/isomorphic.sx => etc/plan/isomorphic/index.sx} (99%) rename sx/sx/{plans/js-bootstrapper.sx => etc/plan/js-bootstrapper/index.sx} (99%) rename sx/sx/{plans/live-streaming.sx => etc/plan/live-streaming/index.sx} (99%) rename sx/sx/{plans/mother-language.sx => etc/plan/mother-language/index.sx} (99%) rename sx/sx/{plans/nav-redesign.sx => etc/plan/nav-redesign/index.sx} (99%) rename sx/sx/{plans/predictive-prefetch.sx => etc/plan/predictive-prefetch/index.sx} (99%) rename sx/sx/{plans/reader-macros.sx => etc/plan/reader-macros/index.sx} (99%) rename sx/sx/{plans/runtime-slicing.sx => etc/plan/runtime-slicing/index.sx} (99%) rename sx/sx/{plans/rust-wasm-host.sx => etc/plan/rust-wasm-host/index.sx} (99%) rename sx/sx/{plans/scoped-effects.sx => etc/plan/scoped-effects/index.sx} (99%) rename sx/sx/{plans/self-hosting-bootstrapper.sx => etc/plan/self-hosting-bootstrapper/index.sx} (99%) rename sx/sx/{plans/social-sharing.sx => etc/plan/social-sharing/index.sx} (98%) rename sx/sx/{plans/spec-explorer.sx => etc/plan/spec-explorer/index.sx} (99%) rename sx/sx/{plans/status.sx => etc/plan/status/index.sx} (99%) rename sx/sx/{plans/sx-activity.sx => etc/plan/sx-activity/index.sx} (99%) rename sx/sx/{plans/sx-ci.sx => etc/plan/sx-ci/index.sx} (99%) rename sx/sx/{plans/sx-forge.sx => etc/plan/sx-forge/index.sx} (99%) rename sx/sx/{plans/sx-host.sx => etc/plan/sx-host/index.sx} (99%) rename sx/sx/{plans/sx-protocol.sx => etc/plan/sx-protocol/index.sx} (99%) rename sx/sx/{plans/sx-proxy.sx => etc/plan/sx-proxy/index.sx} (99%) rename sx/sx/{plans/sx-pub.sx => etc/plan/sx-pub/index.sx} (99%) rename sx/sx/{plans/sx-swarm.sx => etc/plan/sx-swarm/index.sx} (99%) rename sx/sx/{plans/sx-urls.sx => etc/plan/sx-urls/index.sx} (99%) rename sx/sx/{plans/sx-web-platform.sx => etc/plan/sx-web-platform/index.sx} (99%) rename sx/sx/{plans/sx-web.sx => etc/plan/sx-web/index.sx} (99%) create mode 100644 sx/sx/etc/plan/theorem-prover/_islands/prove-phase1-row.sx create mode 100644 sx/sx/etc/plan/theorem-prover/_islands/prove-phase2-row.sx rename sx/sx/{plans/theorem-prover.sx => etc/plan/theorem-prover/index.sx} (91%) rename sx/sx/{plans/typed-sx.sx => etc/plan/typed-sx/index.sx} (99%) rename sx/sx/{plans/wasm-bytecode-vm.sx => etc/plan/wasm-bytecode-vm/index.sx} (99%) delete mode 100644 sx/sx/examples-content.sx rename sx/sx/geography/{capabilities.sx => capabilities/index.sx} (99%) delete mode 100644 sx/sx/geography/cek.sx create mode 100644 sx/sx/geography/cek/_islands/content-address-demo.sx create mode 100644 sx/sx/geography/cek/_islands/demo-batch.sx create mode 100644 sx/sx/geography/cek/_islands/demo-chain.sx create mode 100644 sx/sx/geography/cek/_islands/demo-counter.sx create mode 100644 sx/sx/geography/cek/_islands/demo-reactive-attr.sx create mode 100644 sx/sx/geography/cek/_islands/demo-render-stepper.sx create mode 100644 sx/sx/geography/cek/_islands/demo-stepper.sx create mode 100644 sx/sx/geography/cek/_islands/demo-stopwatch.sx create mode 100644 sx/sx/geography/cek/_islands/freeze-demo.sx create mode 100644 sx/sx/geography/cek/content/index.sx create mode 100644 sx/sx/geography/cek/demo/index.sx create mode 100644 sx/sx/geography/cek/freeze/index.sx create mode 100644 sx/sx/geography/cek/index.sx rename sx/sx/geography/{eval-rules.sx => eval-rules/index.sx} (99%) create mode 100644 sx/sx/geography/hypermedia/example/_shared/page-content.sx create mode 100644 sx/sx/geography/hypermedia/example/active-search/index.sx create mode 100644 sx/sx/geography/hypermedia/example/animations/index.sx create mode 100644 sx/sx/geography/hypermedia/example/bulk-update/index.sx create mode 100644 sx/sx/geography/hypermedia/example/click-to-load/index.sx create mode 100644 sx/sx/geography/hypermedia/example/delete-row/index.sx create mode 100644 sx/sx/geography/hypermedia/example/dialogs/index.sx create mode 100644 sx/sx/geography/hypermedia/example/edit-row/index.sx create mode 100644 sx/sx/geography/hypermedia/example/form-submission/index.sx create mode 100644 sx/sx/geography/hypermedia/example/infinite-scroll/index.sx create mode 100644 sx/sx/geography/hypermedia/example/inline-edit/index.sx create mode 100644 sx/sx/geography/hypermedia/example/inline-validation/index.sx create mode 100644 sx/sx/geography/hypermedia/example/json-encoding/index.sx create mode 100644 sx/sx/geography/hypermedia/example/keyboard-shortcuts/index.sx create mode 100644 sx/sx/geography/hypermedia/example/lazy-loading/index.sx create mode 100644 sx/sx/geography/hypermedia/example/loading-states/index.sx create mode 100644 sx/sx/geography/hypermedia/example/oob-swaps/index.sx create mode 100644 sx/sx/geography/hypermedia/example/polling/index.sx create mode 100644 sx/sx/geography/hypermedia/example/progress-bar/index.sx create mode 100644 sx/sx/geography/hypermedia/example/put-patch/index.sx create mode 100644 sx/sx/geography/hypermedia/example/reset-on-submit/index.sx create mode 100644 sx/sx/geography/hypermedia/example/retry/index.sx create mode 100644 sx/sx/geography/hypermedia/example/select-filter/index.sx create mode 100644 sx/sx/geography/hypermedia/example/swap-positions/index.sx create mode 100644 sx/sx/geography/hypermedia/example/sync-replace/index.sx create mode 100644 sx/sx/geography/hypermedia/example/tabs/index.sx create mode 100644 sx/sx/geography/hypermedia/example/vals-and-headers/index.sx create mode 100644 sx/sx/geography/hypermedia/example/value-select/index.sx create mode 100644 sx/sx/geography/hypermedia/reference/_shared/attr-detail-content.sx create mode 100644 sx/sx/geography/hypermedia/reference/_shared/attr-not-found.sx create mode 100644 sx/sx/geography/hypermedia/reference/_shared/event-detail-content.sx create mode 100644 sx/sx/geography/hypermedia/reference/_shared/header-detail-content.sx create mode 100644 sx/sx/geography/hypermedia/reference/attributes/index.sx create mode 100644 sx/sx/geography/hypermedia/reference/events/index.sx create mode 100644 sx/sx/geography/hypermedia/reference/headers/index.sx rename sx/sx/{examples.sx => geography/hypermedia/reference/index.sx} (59%) create mode 100644 sx/sx/geography/hypermedia/reference/js-api/index.sx create mode 100644 sx/sx/geography/isomorphism/affinity/_islands/aff-demo-auto.sx create mode 100644 sx/sx/geography/isomorphism/affinity/_islands/aff-demo-client.sx create mode 100644 sx/sx/geography/isomorphism/affinity/_islands/aff-demo-io-auto.sx create mode 100644 sx/sx/geography/isomorphism/affinity/_islands/aff-demo-io-client.sx create mode 100644 sx/sx/geography/isomorphism/affinity/_islands/aff-demo-server.sx rename sx/sx/{affinity-demo.sx => geography/isomorphism/affinity/index.sx} (77%) rename sx/sx/{async-io-demo.sx => geography/isomorphism/async-io/index.sx} (99%) create mode 100644 sx/sx/geography/isomorphism/bundle-analyzer/_islands/component.sx create mode 100644 sx/sx/geography/isomorphism/bundle-analyzer/_islands/row.sx create mode 100644 sx/sx/geography/isomorphism/bundle-analyzer/_islands/stat.sx create mode 100644 sx/sx/geography/isomorphism/bundle-analyzer/index.sx rename sx/sx/{offline-demo.sx => geography/isomorphism/offline/index.sx} (98%) rename sx/sx/{optimistic-demo.sx => geography/isomorphism/optimistic/index.sx} (99%) create mode 100644 sx/sx/geography/isomorphism/routing-analyzer/_islands/routing-row.sx rename sx/sx/{routing-analyzer.sx => geography/isomorphism/routing-analyzer/index.sx} (81%) create mode 100644 sx/sx/geography/marshes/_islands/demo-marsh-product.sx create mode 100644 sx/sx/geography/marshes/_islands/demo-marsh-settle.sx create mode 100644 sx/sx/geography/marshes/_islands/demo-marsh-signal-url.sx create mode 100644 sx/sx/geography/marshes/_islands/demo-marsh-store-reader.sx create mode 100644 sx/sx/geography/marshes/_islands/demo-marsh-store-writer.sx create mode 100644 sx/sx/geography/marshes/_islands/demo-marsh-view-transform.sx create mode 100644 sx/sx/geography/marshes/hypermedia-feeds/index.sx rename sx/sx/{reactive-islands/marshes.sx => geography/marshes/index.sx} (59%) create mode 100644 sx/sx/geography/marshes/on-settle/index.sx create mode 100644 sx/sx/geography/marshes/server-signals/index.sx create mode 100644 sx/sx/geography/marshes/signal-triggers/index.sx create mode 100644 sx/sx/geography/marshes/view-transform/index.sx rename sx/sx/geography/{modules.sx => modules/index.sx} (98%) create mode 100644 sx/sx/geography/provide/_islands/demo-emit-collect.sx create mode 100644 sx/sx/geography/provide/_islands/demo-nested-provide.sx create mode 100644 sx/sx/geography/provide/_islands/demo-provide-basic.sx create mode 100644 sx/sx/geography/provide/_islands/demo-spread-mechanism.sx create mode 100644 sx/sx/geography/provide/_islands/provide-demo-example.sx rename sx/sx/{provide.sx => geography/provide/index.sx} (79%) create mode 100644 sx/sx/geography/reactive-runtime/_islands/demo-app-shell.sx create mode 100644 sx/sx/geography/reactive-runtime/_islands/demo-commands.sx create mode 100644 sx/sx/geography/reactive-runtime/_islands/demo-foreign.sx create mode 100644 sx/sx/geography/reactive-runtime/_islands/demo-keyed-lists.sx create mode 100644 sx/sx/geography/reactive-runtime/_islands/demo-loop.sx create mode 100644 sx/sx/geography/reactive-runtime/_islands/demo-machine.sx create mode 100644 sx/sx/geography/reactive-runtime/_islands/demo-ref.sx create mode 100644 sx/sx/geography/reactive-runtime/app-shell/index.sx create mode 100644 sx/sx/geography/reactive-runtime/commands/index.sx create mode 100644 sx/sx/geography/reactive-runtime/foreign/index.sx create mode 100644 sx/sx/geography/reactive-runtime/index.sx create mode 100644 sx/sx/geography/reactive-runtime/keyed-lists/index.sx create mode 100644 sx/sx/geography/reactive-runtime/loop/index.sx create mode 100644 sx/sx/geography/reactive-runtime/machine/index.sx create mode 100644 sx/sx/geography/reactive-runtime/ref/index.sx create mode 100644 sx/sx/geography/reactive/_islands/demo-counter.sx create mode 100644 sx/sx/geography/reactive/_islands/demo-dynamic-class.sx create mode 100644 sx/sx/geography/reactive/_islands/demo-error-boundary.sx create mode 100644 sx/sx/geography/reactive/_islands/demo-event-bridge.sx create mode 100644 sx/sx/geography/reactive/_islands/demo-imperative.sx create mode 100644 sx/sx/geography/reactive/_islands/demo-input-binding.sx create mode 100644 sx/sx/geography/reactive/_islands/demo-portal.sx create mode 100644 sx/sx/geography/reactive/_islands/demo-reactive-list.sx create mode 100644 sx/sx/geography/reactive/_islands/demo-refs.sx create mode 100644 sx/sx/geography/reactive/_islands/demo-resource.sx create mode 100644 sx/sx/geography/reactive/_islands/demo-stopwatch.sx create mode 100644 sx/sx/geography/reactive/_islands/demo-store-reader.sx create mode 100644 sx/sx/geography/reactive/_islands/demo-store-writer.sx create mode 100644 sx/sx/geography/reactive/_islands/demo-temperature.sx create mode 100644 sx/sx/geography/reactive/_islands/demo-transition.sx rename sx/sx/{reactive-islands => geography/reactive/_lib}/demo-cyst.sx (52%) rename sx/sx/{reactive-islands => geography/reactive/_lib}/demo-reactive-expressions.sx (57%) rename sx/sx/{reactive-islands => geography/reactive/_lib}/event-bridge.sx (98%) create mode 100644 sx/sx/geography/reactive/_lib/example-cyst.sx create mode 100644 sx/sx/geography/reactive/_lib/example-reactive-expressions.sx rename sx/sx/{reactive-islands => geography/reactive/_lib}/named-stores.sx (98%) rename sx/sx/{reactive-islands => geography/reactive/_lib}/phase2.sx (99%) rename sx/sx/{reactive-islands => geography/reactive/_lib}/plan.sx (99%) create mode 100644 sx/sx/geography/reactive/_lib/test-runner-placeholder.sx create mode 100644 sx/sx/geography/reactive/_lib/test-runner.sx rename sx/sx/{reactive-islands => geography/reactive/_lib}/test-temperature.sx (100%) create mode 100644 sx/sx/geography/reactive/examples/counter/index.sx create mode 100644 sx/sx/geography/reactive/examples/coverage/index.sx create mode 100644 sx/sx/geography/reactive/examples/defisland/index.sx create mode 100644 sx/sx/geography/reactive/examples/dynamic-class/index.sx create mode 100644 sx/sx/geography/reactive/examples/error-boundary/index.sx create mode 100644 sx/sx/geography/reactive/examples/event-bridge-demo/index.sx create mode 100644 sx/sx/geography/reactive/examples/imperative/index.sx create mode 100644 sx/sx/geography/reactive/examples/index.sx create mode 100644 sx/sx/geography/reactive/examples/input-binding/index.sx create mode 100644 sx/sx/geography/reactive/examples/portal/index.sx create mode 100644 sx/sx/geography/reactive/examples/reactive-list/index.sx create mode 100644 sx/sx/geography/reactive/examples/refs/index.sx create mode 100644 sx/sx/geography/reactive/examples/resource/index.sx create mode 100644 sx/sx/geography/reactive/examples/stopwatch/index.sx create mode 100644 sx/sx/geography/reactive/examples/stores/index.sx create mode 100644 sx/sx/geography/reactive/examples/temperature/index.sx create mode 100644 sx/sx/geography/reactive/examples/tests/index.sx create mode 100644 sx/sx/geography/reactive/examples/transition/index.sx rename sx/sx/{reactive-islands => geography/reactive}/index.sx (56%) create mode 100644 sx/sx/geography/scopes/_islands/demo-scope-basic.sx create mode 100644 sx/sx/geography/scopes/_islands/demo-scope-dedup.sx create mode 100644 sx/sx/geography/scopes/_islands/demo-scope-emit.sx create mode 100644 sx/sx/geography/scopes/_islands/scopes-demo-example.sx rename sx/sx/{scopes.sx => geography/scopes/index.sx} (75%) create mode 100644 sx/sx/geography/spreads/_islands/demo-callout.sx create mode 100644 sx/sx/geography/spreads/_islands/demo-cssx-tw.sx create mode 100644 sx/sx/geography/spreads/_islands/demo-example.sx create mode 100644 sx/sx/geography/spreads/_islands/demo-reactive-spread.sx create mode 100644 sx/sx/geography/spreads/_islands/demo-semantic-vars.sx create mode 100644 sx/sx/geography/spreads/_islands/demo-spread-basic.sx rename sx/sx/{spreads.sx => geography/spreads/index.sx} (76%) create mode 100644 sx/sx/handlers/graphql-api.sx create mode 100644 sx/sx/handlers/htmx-api.sx create mode 100644 sx/sx/home/index.sx rename sx/sx/{home-stepper.sx => home/stepper.sx} (99%) delete mode 100644 sx/sx/hyperscript.sx create mode 100644 sx/sx/language/bootstrapper/index.sx create mode 100644 sx/sx/language/bootstrapper/javascript/index.sx rename sx/sx/{page-helpers-demo.sx => language/bootstrapper/page-helpers/_islands/demo-client-runner.sx} (51%) create mode 100644 sx/sx/language/bootstrapper/page-helpers/_islands/demo-result-card.sx create mode 100644 sx/sx/language/bootstrapper/page-helpers/index.sx create mode 100644 sx/sx/language/bootstrapper/python/index.sx create mode 100644 sx/sx/language/bootstrapper/self-hosting-js/index.sx create mode 100644 sx/sx/language/bootstrapper/self-hosting/index.sx create mode 100644 sx/sx/language/doc/components/index.sx create mode 100644 sx/sx/language/doc/evaluator/index.sx create mode 100644 sx/sx/language/doc/getting-started/index.sx create mode 100644 sx/sx/language/doc/introduction/index.sx create mode 100644 sx/sx/language/doc/primitives/index.sx create mode 100644 sx/sx/language/doc/server-rendering/index.sx create mode 100644 sx/sx/language/doc/special-forms/index.sx create mode 100644 sx/sx/language/spec/_shared/detail-content.sx create mode 100644 sx/sx/language/spec/_shared/not-found.sx create mode 100644 sx/sx/language/spec/_shared/overview-content.sx create mode 100644 sx/sx/language/spec/index.sx create mode 100644 sx/sx/language/test/_shared/spec-content.sx create mode 100644 sx/sx/language/test/index.sx create mode 100644 sx/sx/language/test/runners/index.sx delete mode 100644 sx/sx/layouts.sx create mode 100644 sx/sx/layouts/doc.sx create mode 100644 sx/sx/layouts/docs-layout-full.sx create mode 100644 sx/sx/layouts/docs-layout-mobile.sx create mode 100644 sx/sx/layouts/docs-layout-oob.sx create mode 100644 sx/sx/layouts/header.sx create mode 100644 sx/sx/layouts/nav-children.sx create mode 100644 sx/sx/layouts/nav-sibling-row.sx create mode 100644 sx/sx/layouts/standalone-docs-layout-full.sx create mode 100644 sx/sx/layouts/standalone-docs-layout-mobile.sx create mode 100644 sx/sx/layouts/standalone-docs-layout-oob.sx delete mode 100644 sx/sx/protocols.sx delete mode 100644 sx/sx/reactive-islands/demo.sx delete mode 100644 sx/sx/reactive-islands/runner-placeholder.sx delete mode 100644 sx/sx/reactive-runtime.sx delete mode 100644 sx/sx/reference.sx delete mode 100644 sx/sx/spec-introspect.sx create mode 100644 sx/sx/spec-introspect/spec-compute-stats.sx create mode 100644 sx/sx/spec-introspect/spec-explore-define.sx create mode 100644 sx/sx/spec-introspect/spec-explore.sx create mode 100644 sx/sx/spec-introspect/spec-form-effects.sx create mode 100644 sx/sx/spec-introspect/spec-form-kind.sx create mode 100644 sx/sx/spec-introspect/spec-form-name.sx create mode 100644 sx/sx/spec-introspect/spec-form-params.sx create mode 100644 sx/sx/spec-introspect/spec-form-signature.sx create mode 100644 sx/sx/spec-introspect/spec-group-sections.sx delete mode 100644 sx/sx/specs-explorer.sx create mode 100644 sx/sx/specs-explorer/spec-effect-badge.sx create mode 100644 sx/sx/specs-explorer/spec-explorer-content.sx create mode 100644 sx/sx/specs-explorer/spec-explorer-define-detail.sx create mode 100644 sx/sx/specs-explorer/spec-explorer-define.sx create mode 100644 sx/sx/specs-explorer/spec-explorer-header.sx create mode 100644 sx/sx/specs-explorer/spec-explorer-section.sx create mode 100644 sx/sx/specs-explorer/spec-explorer-stats.sx create mode 100644 sx/sx/specs-explorer/spec-param-list.sx create mode 100644 sx/sx/specs-explorer/spec-platform-interface.sx create mode 100644 sx/sx/specs-explorer/spec-ring-bridge.sx create mode 100644 sx/sx/specs-explorer/spec-ring-runtime.sx create mode 100644 sx/sx/specs-explorer/spec-ring-translations.sx delete mode 100644 sx/sx/specs.sx rename sx/sx/{stepper-lib.sx => stepper-lib/build-code-tokens.sx} (55%) create mode 100644 sx/sx/stepper-lib/split-tag.sx create mode 100644 sx/sx/stepper-lib/steps-to-preview.sx delete mode 100644 sx/sx/streaming-demo.sx create mode 100644 sx/sx/streaming-demo/chunk.sx create mode 100644 sx/sx/streaming-demo/data.sx create mode 100644 sx/sx/streaming-demo/layout.sx create mode 100644 sx/sx/streaming-demo/stream-colors.sx create mode 100644 sx/sx/streaming-demo/stream-skeleton.sx delete mode 100644 sx/sx/sx-tools-editor.sx delete mode 100644 sx/sx/testing.sx rename sx/sx/{playground.sx => tools/playground/_islands/repl.sx} (74%) create mode 100644 sx/sx/tools/playground/index.sx rename sx/sx/{services-tools.sx => tools/services/index.sx} (98%) rename sx/sx/{ => tools/sx-tools/_lib}/sx-tools-demos.sx (99%) create mode 100644 sx/sx/tools/sx-tools/_lib/sx-tools-editor.sx rename sx/sx/{sx-tools.sx => tools/sx-tools/index.sx} (94%) diff --git a/lib/hyperscript/parser.sx b/lib/hyperscript/parser.sx index 154f2a77..b0423811 100644 --- a/lib/hyperscript/parser.sx +++ b/lib/hyperscript/parser.sx @@ -693,7 +693,12 @@ nil (do (when - (and (number? left) (= (tp-type) "ident")) + (and (number? left) (= (tp-type) "ident") + (not (or (= (tp-val) "starts") (= (tp-val) "ends") + (= (tp-val) "contains") (= (tp-val) "matches") + (= (tp-val) "is") (= (tp-val) "does") + (= (tp-val) "in") (= (tp-val) "precedes") + (= (tp-val) "follows")))) (let ((unit (tp-val))) (do diff --git a/shared/static/wasm/sx/hs-parser.sx b/shared/static/wasm/sx/hs-parser.sx index 154f2a77..b0423811 100644 --- a/shared/static/wasm/sx/hs-parser.sx +++ b/shared/static/wasm/sx/hs-parser.sx @@ -693,7 +693,12 @@ nil (do (when - (and (number? left) (= (tp-type) "ident")) + (and (number? left) (= (tp-type) "ident") + (not (or (= (tp-val) "starts") (= (tp-val) "ends") + (= (tp-val) "contains") (= (tp-val) "matches") + (= (tp-val) "is") (= (tp-val) "does") + (= (tp-val) "in") (= (tp-val) "precedes") + (= (tp-val) "follows")))) (let ((unit (tp-val))) (do diff --git a/spec/tests/test-hyperscript-behavioral.sx b/spec/tests/test-hyperscript-behavioral.sx index e7124539..7ba70023 100644 --- a/spec/tests/test-hyperscript-behavioral.sx +++ b/spec/tests/test-hyperscript-behavioral.sx @@ -20,7 +20,7 @@ ;; Compiles the expression, wraps in a thunk, evaluates, returns result. (define eval-hs (fn (src) - (let ((sx (hs-to-sx-from-source (str "return " src)))) + (let ((sx (hs-to-sx (hs-compile src)))) (let ((handler (eval-expr-cek (list (quote fn) (list (quote me)) (list (quote let) (list (list (quote it) nil) (list (quote event) nil)) sx))))) (handler nil))))) diff --git a/sx/sx/analyzer.sx b/sx/sx/analyzer.sx deleted file mode 100644 index 9409eb86..00000000 --- a/sx/sx/analyzer.sx +++ /dev/null @@ -1,120 +0,0 @@ -;; Bundle analyzer — live demonstration of dependency analysis + IO detection. -;; Shows per-page component bundles vs total, visualizing payload savings. -;; Drill down into each bundle to see component tree; expand to see SX source. -;; @css bg-green-100 text-green-800 bg-violet-600 bg-stone-200 text-violet-600 text-stone-600 text-green-600 rounded-full h-2.5 grid-cols-3 bg-blue-100 text-blue-800 bg-amber-100 text-amber-800 grid-cols-4 marker:text-stone-400 bg-blue-50 bg-amber-50 text-blue-700 text-amber-700 border-blue-200 border-amber-200 bg-blue-500 bg-amber-500 - -(defcomp ~analyzer/bundle-analyzer-content (&key (pages :as list) (total-components :as number) (total-macros :as number) - (pure-count :as number) (io-count :as number)) - (~docs/page :title "Page Bundle Analyzer" - - (p (~tw :tokens "text-stone-600 mb-6") - "Live analysis of component dependency graphs and IO classification across all pages. " - "Each bar shows how many of the " - (strong (str total-components)) - " total components a page actually needs, computed by the " - (a :href "/sx/(language.(spec.deps))" (~tw :tokens "text-violet-700 underline") "deps.sx") - " transitive closure algorithm. " - "Click a page to see its component tree; expand a component to see its SX source.") - - (div (~tw :tokens "mb-8 grid grid-cols-4 gap-4") - (~analyzer/stat :label "Total Components" :value (str total-components) - :cls "text-violet-600") - (~analyzer/stat :label "Total Macros" :value (str total-macros) - :cls "text-stone-600") - (~analyzer/stat :label "Pure Components" :value (str pure-count) - :cls "text-blue-600") - (~analyzer/stat :label "IO-Dependent" :value (str io-count) - :cls "text-amber-600")) - - (~docs/section :title "Per-Page Bundles" :id "bundles" - (div (~tw :tokens "space-y-3") - (map (fn (page) - (~analyzer/row - :name (get page "name") - :path (get page "path") - :needed (get page "needed") - :direct (get page "direct") - :total total-components - :pct (get page "pct") - :savings (get page "savings") - :io-refs (get page "io-refs") - :pure-in-page (get page "pure-in-page") - :io-in-page (get page "io-in-page") - :components (get page "components"))) - pages))) - - (~docs/section :title "How It Works" :id "how" - (ol (~tw :tokens "list-decimal pl-5 space-y-2 text-stone-700") - (li (strong "Scan: ") "Regex finds all " (code "(~plans/content-addressed-components/name") " patterns in the page's content expression.") - (li (strong "Resolve: ") "Each referenced component's body AST is walked to find transitive " (code "~") " references.") - (li (strong "Closure: ") "The full set is the union of direct + transitive deps, following chains through the component graph.") - (li (strong "Bundle: ") "Only these component definitions are serialized into the page payload. Everything else is omitted.") - (li (strong "IO detect: ") "Each component body is scanned for references to IO primitives (frag, query, service, etc.). Components with zero transitive IO refs are pure — safe for client rendering.")) - (p (~tw :tokens "mt-4 text-stone-600") - "The analysis handles circular references (via seen-set), " - "walks all branches of control flow (if/when/cond/case), " - "and includes macro definitions shared across components.")))) - -(defcomp ~analyzer/stat (&key (label :as string) (value :as string) (cls :as string)) - (div (~tw :tokens "rounded-lg border border-stone-200 p-4 text-center") - (div :class (str "text-3xl font-bold " cls) value) - (div (~tw :tokens "text-sm text-stone-500 mt-1") label))) - -(defcomp ~analyzer/row (&key (name :as string) (path :as string) (needed :as number) (direct :as number) (total :as number) (pct :as number) (savings :as number) - (io-refs :as list) (pure-in-page :as number) (io-in-page :as number) (components :as list)) - (details (~tw :tokens "rounded border border-stone-200") - (summary (~tw :tokens "p-4 cursor-pointer hover:bg-stone-50 transition-colors") - (div (~tw :tokens "flex items-center justify-between mb-2") - (div - (span (~tw :tokens "font-mono font-semibold text-stone-800") name) - (span (~tw :tokens "text-stone-400 text-sm ml-2") path)) - (div (~tw :tokens "flex items-center gap-2") - (span (~tw :tokens "inline-block px-1.5 py-0.5 rounded text-xs font-medium bg-blue-100 text-blue-800") - (str pure-in-page " pure")) - (span (~tw :tokens "inline-block px-1.5 py-0.5 rounded text-xs font-medium bg-amber-100 text-amber-800") - (str io-in-page " IO")) - (div (~tw :tokens "text-right") - (span (~tw :tokens "font-mono text-sm") - (span (~tw :tokens "text-violet-700 font-bold") (str needed)) - (span (~tw :tokens "text-stone-400") (str " / " total))) - (span (~tw :tokens "ml-2 inline-block px-1.5 py-0.5 rounded text-xs font-medium bg-green-100 text-green-800") - (str savings "% saved"))))) - (div (~tw :tokens "w-full bg-stone-200 rounded-full h-2.5") - (div (~tw :tokens "bg-violet-600 h-2.5 rounded-full transition-all") - :style (str "width: " pct "%")))) - - ;; Component tree (shown when expanded) - (div (~tw :tokens "border-t border-stone-200 p-4 bg-stone-50") - (div (~tw :tokens "text-xs font-medium text-stone-500 uppercase tracking-wide mb-3") - (str needed " components in bundle")) - (div (~tw :tokens "space-y-1") - (map (fn (comp) - (~analyzer/component - :comp-name (get comp "name") - :is-pure (get comp "is-pure") - :io-refs (get comp "io-refs") - :deps (get comp "deps") - :source (get comp "source"))) - components))))) - -(defcomp ~analyzer/component (&key (comp-name :as string) (is-pure :as boolean) (io-refs :as list) (deps :as list) (source :as string)) - (details :class (str "rounded border " - (if is-pure "border-blue-200 bg-blue-50" "border-amber-200 bg-amber-50")) - (summary (~tw :tokens "px-3 py-2 cursor-pointer hover:opacity-80 transition-opacity") - (div (~tw :tokens "flex items-center justify-between") - (div (~tw :tokens "flex items-center gap-2") - (span :class (str "inline-block w-2 h-2 rounded-full " - (if is-pure "bg-blue-500" "bg-amber-500"))) - (span (~tw :tokens "font-mono text-sm font-medium text-stone-800") comp-name)) - (div (~tw :tokens "flex items-center gap-2") - (when (not (empty? io-refs)) - (span (~tw :tokens "text-xs text-amber-700") - (str "IO: " (join ", " io-refs)))) - (when (not (empty? deps)) - (span (~tw :tokens "text-xs text-stone-500") - (str (len deps) " deps")))))) - - ;; SX source (shown when component expanded) - (div (~tw :tokens "not-prose border-t border-stone-200 p-3 bg-stone-100 rounded-b") - (pre (~tw :tokens "text-xs leading-relaxed whitespace-pre-wrap overflow-x-auto") - (code (highlight source "lisp")))))) diff --git a/sx/sx/app-config.sx b/sx/sx/app-config.sx index 95aba90a..ccbae3a0 100644 --- a/sx/sx/app-config.sx +++ b/sx/sx/app-config.sx @@ -3,4 +3,6 @@ (dict-set! __app-config "handler-prefixes" - (append (get __app-config "handler-prefixes") (list "handler:hs-"))) + (append + (get __app-config "handler-prefixes") + (list "handler:hs-" "handler:gql-"))) diff --git a/sx/sx/applications/cssx/async/index.sx b/sx/sx/applications/cssx/async/index.sx new file mode 100644 index 00000000..5058e142 --- /dev/null +++ b/sx/sx/applications/cssx/async/index.sx @@ -0,0 +1,48 @@ +;; --------------------------------------------------------------------------- +;; Async CSS +;; --------------------------------------------------------------------------- +(defcomp () + (~docs/page :title "Async CSS" + + (~docs/section :title "The Pattern" :id "pattern" + (p "A CSSX component that needs CSS it doesn't have yet can " + (strong "fetch and cache it before rendering") ". This is just " + (code "~shared:pages/suspense") " combined with a style component — no new infrastructure:") + (highlight + "(defcomp ~cssx/styled (&key css-url css-hash fallback &rest children)\n (if (css-cached? css-hash)\n ;; Already have it — render immediately\n children\n ;; Don't have it — suspense while we fetch\n (~shared:pages/suspense :id (str \"css-\" css-hash)\n :fallback (or fallback (span \"\"))\n (do\n (fetch-css css-url css-hash)\n children))))" + "lisp") + (p "The consumer never knows:") + (highlight + "(~cssx/styled :css-url \"/css/charts.css\" :css-hash \"abc123\"\n (~bar-chart :data metrics))" + "lisp")) + + (~docs/section :title "Use Cases" :id "use-cases" + (~docs/subsection :title "Federated Components" + (p "A " (code "~cssx/btn") " from another site arrives via IPFS with a CID pointing " + "to its CSS. The component fetches and caches it before rendering. " + "No coordination needed between sites.") + (highlight + "(defcomp ~cssx/federated-widget (&key cid &rest children)\n (let ((css-cid (str cid \"/style.css\"))\n (cached (css-cached? css-cid)))\n (if cached\n children\n (~shared:pages/suspense :id (str \"fed-\" cid)\n :fallback (div :class \"animate-pulse bg-stone-100 rounded h-20\")\n (do (fetch-css (str \"https://ipfs.io/ipfs/\" css-cid) css-cid)\n children)))))" + "lisp")) + + (~docs/subsection :title "Heavy UI Libraries" + (p "Code editors, chart libraries, rich text editors — their CSS only loads " + "when the component actually appears on screen:") + (highlight + "(defcomp ~cssx/code-editor (&key language value on-change)\n (~cssx/styled :css-url \"/css/codemirror.css\" :css-hash (asset-hash \"codemirror\")\n :fallback (pre :class \"p-4 bg-stone-900 text-stone-300 rounded\" value)\n (div :class \"cm-editor\"\n :data-language language\n :data-value value)))" + "lisp")) + + (~docs/subsection :title "Lazy Themes" + (p "Theme CSS loads on first use, then is instant on subsequent visits:") + (highlight + "(defcomp ~cssx/lazy-theme (&key name &rest children)\n (let ((css-url (str \"/css/themes/\" name \".css\"))\n (hash (str \"theme-\" name)))\n (~cssx/styled :css-url css-url :css-hash hash\n :fallback children ;; render unstyled immediately\n children)))" + "lisp"))) + + (~docs/section :title "How It Composes" :id "composition" + (p "Async CSS composes with everything already in SX:") + (ul (~tw :tokens "list-disc pl-5 space-y-1 text-stone-700") + (li (code "~shared:pages/suspense") " handles the async gap with fallback content") + (li "localStorage handles caching across sessions") + (li (code "