Commit Graph

70 Commits

Author SHA1 Message Date
Kinneyzhang
c05174ff9d refactor!: publish transactions exclusively through protocol v2 2026-09-05 05:25:29 +08:00
Kinneyzhang
25cb66c040 feat(transaction): expose structured participant registration 2026-09-01 15:52:05 +08:00
Kinneyzhang
469bdff17d feat(transaction): cut over to structured publication authority 2026-09-01 15:37:29 +08:00
Kinneyzhang
76be75f674 feat: add TP v1+v2 transaction contract 2026-08-31 19:35:02 +08:00
Kinneyzhang
c2525a137b feat: expose transaction activity boundary 2026-08-27 22:49:21 +08:00
Kinneyzhang
479ee8f466 Harden TP transactions and preserve point 2026-08-22 06:18:51 +08:00
Kinneyzhang
db5864141a update 2026-08-13 14:40:44 +08:00
Kinneyzhang
0d35358e05 refactor(tp)!: implement retained reactive runtime
Replace the legacy managed layer renderer with one independent retained/reactive text runtime. TP now owns exact dependencies, stable objects, marker-backed mounts, property contribution composition, atomic publication, rollback, and direct text-property facades without ECSS or Ebox dependencies.\n\nBREAKING CHANGE: remove tp-render, tp-stack, scan-driven managed layers, inline runtime metadata, TP-owned CSS cascade APIs, and dollar-variable declarations.\n\nVerified: 290/290 ERT, shuffled 290/290 (seed 20260806), 8/8 doctests, WERROR compile-all, checkdoc, package-lint, diff-check, and isolated TP-only load.
2026-08-07 00:39:50 +08:00
Kinneyzhang
1195297011 feat(tp): isolate stylesheet rule domains
Give independent consumers their own rules, cascade layer ordering, and source-order counters so packages such as Ebox cannot pollute TP's default stylesheet or each other. Match generic class and state tokens by value and document caller-owned stylesheet lifecycle.

Verified: make clean; make test (728/728); make compile WERROR=t; checkdoc tp-style.el; git diff --check; Ebox make test against ../tp.
2026-08-06 13:59:08 +08:00
Kinneyzhang
e3d7d1dfc6 feat(tp): support disjoint logical object mounts
Allow retained logical objects to own multiple marker-backed output fragments without leaking handles or positions into pure plans. Expose only defensive numeric mount snapshots through the public object index.

Verified: 718 ERT tests, 92 doctests, WERROR compile-all, checkdoc, and git diff --check.
2026-08-06 03:50:59 +08:00
Kinneyzhang
8d108403ad feat(tp): add rollback-capable transaction participants
Publish client-owned side state after retained surfaces and roll it back in reverse order on any transaction failure.\n\nVerified: 715 ERT tests, 92 doctests, WERROR compile-all, checkdoc, git diff --check.
2026-08-06 03:40:40 +08:00
Kinneyzhang
905d3523ac feat(tp): add unified convenience APIs
Expose one-shot string and buffer styling plus reactive range watches over the same schema, mutation, binding, and retained surface core.

Verification: 712 ERT tests; 92 doctests; shuffled seed 20260806; compile-all WERROR=t.
2026-08-06 03:31:50 +08:00
Kinneyzhang
84ebf0a548 feat(tp): add retained surfaces and atomic publication
Introduce pure retained plans, stable objects, marker-backed range ownership, side indexes, content/property diffs, and multi-buffer rollback as the generic publication runtime.

Verification: 707 ERT tests; 92 doctests; shuffled seed 20260806; compile-all WERROR=t.
2026-08-06 03:23:59 +08:00
Kinneyzhang
183f49ed3e feat(tp): replace scan reactivity with binding graph
Introduce exact signal and binding dependencies, transactional scheduling, rollback, cycle detection, scoped variable adapters, owner disposal, and scheduler counters. Keep the legacy scanner isolated until retained surfaces complete the cutover.\n\nVerified: 681 ERT tests, 92 doctests, shuffled ERT seed 20260806, and WERROR byte compilation.
2026-08-06 02:36:11 +08:00
Kinneyzhang
ef31a67beb feat(tp): add schema-driven cascade engine
Introduce the pure TP 1.0 property schema, selector, cascade, custom-property, computed-value, provenance, and Emacs projection kernel. Compile static legacy layer definitions into canonical named styles without freezing parameterized or reactive definitions.\n\nVerified with 667 ERT tests, 92 doctests, shuffled seed 20260806, and compile-all with warnings as errors.
2026-08-06 02:12:32 +08:00
Kinneyzhang
6c5c08b0fe Organize tests and document GPLv3 licensing 2026-07-28 23:08:25 +08:00
Kinneyzhang
972b6d4e4c Complete text-property facade and managed lifecycle
Add canonical query semantics, managed metadata and transactions, overlay-aware lookup, reproducible benchmarks, and synchronized API documentation.
2026-07-28 22:42:55 +08:00
Kinneyzhang
fe2c03d2bd Document 0.3.0 across bilingual READMEs, doctests, and ARCHITECTURE.md
Some checks are pending
CI / test (28.1) (push) Waiting to run
CI / test (29.4) (push) Waiting to run
CI / test (30.1) (push) Waiting to run
README.md/README_CN.md gain verified sections for every 0.3.0 feature:
layer visibility (hide/show model, flatten/merge exclusion), lower and
canonical rotate orders, stack introspection (tp-layer-stack-at,
tp-describe-layer), the reactive layer-buffer registry and lifecycle
(track-buffer, anonymous-layer GC, minimal-diff tp-text), search
bounds/SUBEXP/PREDICATE, multi-argument parameterized layers, ABSOLUTE
interval coordinates, palette primaries, prefix-conforming define
aliases, and deprecation boxes for the raw search wrappers. Return
conventions corrected against probed behavior (add-to-layers mutates
in place; tp-clear now explicitly returns nil in code and docs), the
in-place string-mutation warning added for all 16 stack mutators, and
the stale pre-B43 with-range example fixed in both languages.
EN/CN parity is exact (132 headings, 158 fenced blocks each); all 316
blocks executed with 0 failures. tp-doctest.el grows 63 -> 88
assertions, all accessor-based for Emacs-28 print-order safety.
docs/ARCHITECTURE.md rewritten to the post-review truth: two hook
variables, verified per-module dependency table, relocated subsystem
homes, and a new mutable-state inventory.

Suite 578/578, doctests 88/88, shuffled green, compile clean.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-27 03:44:45 +08:00
Kinneyzhang
b454cbb061 Make two doctest assertions property-order-insensitive for Emacs 28
Emacs 28 stores/prints text-property plists in a different order than
29+; the S-mystyle and L-paramgroup assertions compared whole prin1
strings and failed on 28.1 only. Compare per property instead (face,
tp-name, tp-layers — the stack order inside tp-layers is stable), and
note the version-dependent print order beside both README examples.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-26 23:58:12 +08:00
Kinneyzhang
ca2f02dcdf Add tp-doctest.el: README examples as executable tests
63 assertions reproduce README code blocks and compare against the
exact documented outputs; make doctest runs them in batch and exits
non-zero on any mismatch, so docs and code cannot silently drift
again. Wired into the Makefile and mentioned in both READMEs.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-26 21:18:44 +08:00
Kinneyzhang
ecdd952b55 Unify -do shortfall to all-or-nothing on strings and buffers
tp-forward-do/tp-backward-do target the TIMES-th match specifically;
when fewer matches exist the string paths applied FUNCTION to the last
available match -- the wrong target -- while buffer paths applied
nothing. Both now apply nothing on shortfall and return the available
count. Updates the two legacy with-range tests that codified the
string behavior, adds four shortfall/exact-count regression tests, and
documents the contract in both READMEs and the docstrings. Suite
443/443 green.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-26 21:16:56 +08:00
Kinneyzhang
2b33495898 Align README (EN/CN) and docs/ with modular architecture and 0.2.0 semantics
README.md/README_CN.md: new verified Quick Start (fixes the dead
#quick-start nav link); Installation rewritten for the tp-*.el module
family; every broken or drifted example fixed and executed in batch
Emacs (mandatory () ARGLIST and quoted reactive keywords in all
define-tp/define-tps calls, corrected tp-search-map argument order,
interval-list returns, stacked duplicate-face results, gap intervals,
last-wins tp-plist, non-destructive string forms, per-pattern match
ordering, case-fold regexp outputs, rewired end-to-end theme example);
documents the symmetric tp-backward contract, the length-changing
replacement rules, all four tp-put-layer layer specs, and the
previously-missing tp-member, buffer/display macros, and palette
system; state resets now use tp-layer-reset; license corrected to
GPLv3+. CN mirrors EN exactly (119 headings / 258 fences each; code
blocks identical, comments translated).

docs/ARCHITECTURE.md rewritten around the real nine-module layering
and hook-variable inversions; nonexistent helper names removed.
docs/CODE-ANALYSIS.md marked as pre-split historical analysis with
locations/counts corrected. Reactive docs aligned with the fixed
engine semantics (replace-not-accumulate, buffer-local isolation,
nil computed values, batching union, first-render transform).

287 fenced blocks from both READMEs executed: 0 failures; 56-example
assertion suite passes; combined ERT suite 439/439 green.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-26 21:01:01 +08:00
copilot-swe-agent[bot]
d81bf6de18 Update Chinese documentation with string modification behavior details
Added detailed behavior table and examples to README_CN.md:
- tp-set, tp-reset, tp-add, tp-remove sections now explain:
  - Entire string form creates a NEW string (non-destructive)
  - Region form with string modifies in-place
  - Underlying implementation (propertize vs put-text-property)
- Updated return value documentation
- Updated tp-add-to-layers and tp-add-to-all-layers sections

Co-authored-by: Kinneyzhang <38454496+Kinneyzhang@users.noreply.github.com>
2026-01-06 17:00:44 +00:00
copilot-swe-agent[bot]
d7e54e3b3d docs: separate custom text properties and text property layers introduction
Co-authored-by: Kinneyzhang <38454496+Kinneyzhang@users.noreply.github.com>
2026-01-04 13:55:50 +00:00
copilot-swe-agent[bot]
7e0a8573da Update documentation with parameterized layer group examples
Co-authored-by: Kinneyzhang <38454496+Kinneyzhang@users.noreply.github.com>
2026-01-04 13:25:54 +00:00
copilot-swe-agent[bot]
7934749397 Complete refactoring: remove tp-define-layer and tp-define-layer-group, use only define-tp and define-tps
Co-authored-by: Kinneyzhang <38454496+Kinneyzhang@users.noreply.github.com>
2026-01-04 11:35:30 +00:00
copilot-swe-agent[bot]
4607f50a13 Add reactive features support (:props, :data, :compute, :watch, :transform) to define-tp macro
Co-authored-by: Kinneyzhang <38454496+Kinneyzhang@users.noreply.github.com>
2026-01-04 11:16:53 +00:00
copilot-swe-agent[bot]
fdaa2b0c54 Refactor tp-define-layer to define-tp/define-tps format with updated tests and documentation
Co-authored-by: Kinneyzhang <38454496+Kinneyzhang@users.noreply.github.com>
2026-01-04 10:23:47 +00:00
copilot-swe-agent[bot]
04feef0433 Add automatic property merging for duplicate keys in single call
Co-authored-by: Kinneyzhang <38454496+Kinneyzhang@users.noreply.github.com>
2026-01-01 16:49:16 +00:00
copilot-swe-agent[bot]
95f0f3d702 Add documentation for :transform, batch updates, and debug mode in English and Chinese
Co-authored-by: Kinneyzhang <38454496+Kinneyzhang@users.noreply.github.com>
2025-12-31 07:29:18 +00:00
copilot-swe-agent[bot]
a24bd264c1 Update define-tp format: use empty arglist () for non-parameterized layers
Co-authored-by: Kinneyzhang <38454496+Kinneyzhang@users.noreply.github.com>
2025-12-28 16:42:25 +00:00
copilot-swe-agent[bot]
11db0e3c04 Add English reactive text properties guide and link to detailed docs in both READMEs
Co-authored-by: Kinneyzhang <38454496+Kinneyzhang@users.noreply.github.com>
2025-12-28 11:01:35 +00:00
copilot-swe-agent[bot]
104b5b1d5c Update documentation to use quoted format for define-tp and define-tp-group
- Update README.md with new quoted format examples
- Update README_CN.md with new quoted format examples
- Simplify format descriptions (merged Format 2 and 3 into one)

Co-authored-by: Kinneyzhang <38454496+Kinneyzhang@users.noreply.github.com>
2025-12-21 02:25:20 +00:00
copilot-swe-agent[bot]
7d88744f85 Update documentation: tp-set entire-string form now supports layer names
Updated both English and Chinese documentation to reflect that
when setting text properties on an entire string, it now supports
not only flat properties (PROPERTY VALUE ...) but also layer names
defined by tp-define-layer or tp-define-layer-group.

Co-authored-by: Kinneyzhang <38454496+Kinneyzhang@users.noreply.github.com>
2025-12-20 14:10:42 +00:00
copilot-swe-agent[bot]
3c698dea8a Add detailed table of contents and layer name support in API documentation
Co-authored-by: Kinneyzhang <38454496+Kinneyzhang@users.noreply.github.com>
2025-12-20 11:48:45 +00:00
copilot-swe-agent[bot]
738ef6c34f docs: add tp-reactive-reset documentation section
Co-authored-by: Kinneyzhang <38454496+Kinneyzhang@users.noreply.github.com>
2025-12-20 11:29:11 +00:00
copilot-swe-agent[bot]
dde320314f docs: add reactive text properties documentation in English and Chinese
Co-authored-by: Kinneyzhang <38454496+Kinneyzhang@users.noreply.github.com>
2025-12-20 11:27:30 +00:00
copilot-swe-agent[bot]
cc98ac4ed8 Add tp-move-layer function and refactor layer switching functions to use it
Co-authored-by: Kinneyzhang <38454496+Kinneyzhang@users.noreply.github.com>
2025-12-18 03:05:44 +00:00
copilot-swe-agent[bot]
b6f3f87925 Separate tp-define-layer and tp-define-layer-group macros
Co-authored-by: Kinneyzhang <38454496+Kinneyzhang@users.noreply.github.com>
2025-12-17 16:08:10 +00:00
copilot-swe-agent[bot]
0903832e6f Fix documentation examples for tp-search-map and tp-forward-do in both README.md and README_CN.md
Co-authored-by: Kinneyzhang <38454496+Kinneyzhang@users.noreply.github.com>
2025-12-17 09:58:51 +00:00
copilot-swe-agent[bot]
8c068fb4a8 Refactor tp-search-map, tp-forward-do, tp-backward-do function signatures
- Updated tp-search-map signature to (function property &optional value object start end)
- Updated tp-forward-do signature to (function property &optional value object times start end)
- Updated tp-backward-do signature to (function property &optional value object times start end)
- Function callback for tp-search-map now accepts (text &optional start end idx)
- Function callback for tp-forward-do/tp-backward-do now accepts (text &optional start end)
- Updated internal helper functions tp--search-do, tp--forward-do, tp--backward-do
- Added new tests for the updated APIs
- Updated documentation in README.md and README_CN.md with examples

Co-authored-by: Kinneyzhang <38454496+Kinneyzhang@users.noreply.github.com>
2025-12-17 09:14:15 +00:00
copilot-swe-agent[bot]
ddd17794fd Add documentation for missing APIs: tp-add-to-layers, tp-add-to-all-layers, tp-intervals, tp-intervals-map, tp-region-layer-props, tp-plist, tp-empty-p
Co-authored-by: Kinneyzhang <38454496+Kinneyzhang@users.noreply.github.com>
2025-12-16 04:04:18 +00:00
copilot-swe-agent[bot]
47b6505d51 Update tp-forward-do/tp-backward-do docs and tests for "last match only" behavior
Co-authored-by: Kinneyzhang <38454496+Kinneyzhang@users.noreply.github.com>
2025-12-16 04:01:57 +00:00
copilot-swe-agent[bot]
e88337ff1f Add optional idx parameter support to tp-search-map function
The FUNCTION parameter in tp-search-map can now optionally accept a
second argument representing the 0-based index of the current match.
This is backwards compatible - functions that only accept one argument
continue to work as before.

Co-authored-by: Kinneyzhang <38454496+Kinneyzhang@users.noreply.github.com>
2025-12-15 15:27:33 +00:00
Kinneyzhang
c8383cb462 update readme 2025-12-15 22:46:21 +08:00
Kinneyzhang
8b3dcbbac2 update readme 2025-12-15 22:35:44 +08:00
Kinneyzhang
6e36931edd update readme 2025-12-15 22:27:52 +08:00
copilot-swe-agent[bot]
240e590f03 Replace put-text-property with tp-set in README examples
Co-authored-by: Kinneyzhang <38454496+Kinneyzhang@users.noreply.github.com>
2025-12-15 14:16:56 +00:00
copilot-swe-agent[bot]
dace5b5b8a Update README_CN.md API examples to be independently runnable
Co-authored-by: Kinneyzhang <38454496+Kinneyzhang@users.noreply.github.com>
2025-12-15 13:52:57 +00:00
copilot-swe-agent[bot]
c3ba26872a Simplify pattern matching API to (PATTERN PLIST &optional OBJECT) format
Co-authored-by: Kinneyzhang <38454496+Kinneyzhang@users.noreply.github.com>
2025-12-15 13:24:31 +00:00