marionette 5.0.0-beta.2 → 5.0.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/changelog.md +31 -0
- package/dist/agent-skill/SKILL.md +52 -75
- package/dist/docs/config/api-contracts/inventory.json +107 -138
- package/dist/docs/config/api-contracts/semantics.json +106 -41
- package/dist/docs/config/diagnostics/catalog.json +3 -1
- package/dist/docs/docs/agent-tools.md +48 -1
- package/dist/docs/docs/agents.md +58 -28
- package/dist/docs/docs/application-agent-template.md +3 -2
- package/dist/docs/docs/application-effects.md +151 -0
- package/dist/docs/docs/application-refresh.md +180 -0
- package/dist/docs/docs/beta.md +18 -12
- package/dist/docs/docs/choosing-integrations.md +2 -5
- package/dist/docs/docs/common.md +7 -2
- package/dist/docs/docs/compact-reference.md +3 -3
- package/dist/docs/docs/data.api.md +1 -1
- package/dist/docs/docs/events.class.md +4 -17
- package/dist/docs/docs/events.md +38 -21
- package/dist/docs/docs/installation.md +9 -9
- package/dist/docs/docs/marionette.application.md +156 -58
- package/dist/docs/docs/marionette.region.md +22 -0
- package/dist/docs/docs/marionette.state.md +4 -0
- package/dist/docs/docs/migration-from-v4.md +11 -6
- package/dist/docs/docs/optional-backbone.md +1 -1
- package/dist/docs/docs/radio.md +18 -9
- package/dist/docs/docs/readme.md +3 -0
- package/dist/docs/docs/routing.md +241 -118
- package/dist/docs/manifest.json +48 -34
- package/dist/docs/packages/adapters/readme.md +5 -5
- package/dist/docs/packages/data/readme.md +1 -1
- package/dist/docs/packages/radio/readme.md +1 -1
- package/dist/docs/packages/utils/readme.md +5 -3
- package/dist/docs/readme.md +3 -3
- package/dist/docs/skills/marionette/SKILL.md +52 -75
- package/dist/docs/starter/AGENTS.md +18 -19
- package/dist/docs/starter/package.json +5 -5
- package/dist/docs/starter/workspace.test.mjs +35 -0
- package/dist/docs/starter/workspace.ts +32 -28
- package/dist/docs/test/fixtures/docs-application-guides/validate.mjs +3 -0
- package/dist/docs/test/fixtures/docs-routing/package.json +2 -1
- package/dist/docs/test/fixtures/docs-routing/validate.mjs +45 -0
- package/dist/docs/upgradeGuide.md +48 -0
- package/dist/eslint/index.cjs +1 -1
- package/dist/eslint/index.js +1 -1
- package/dist/marionette.cjs +94 -57
- package/dist/marionette.cjs.map +1 -1
- package/dist/marionette.js +94 -57
- package/dist/marionette.js.map +1 -1
- package/dist/marionette.min.js +1 -1
- package/dist/marionette.min.js.map +1 -1
- package/dist/marionette.umd.js +106 -127
- package/dist/marionette.umd.js.map +1 -1
- package/dist/types/cjs/modules/application.d.ts +2 -0
- package/dist/types/esm/modules/application.d.ts +2 -0
- package/package.json +12 -11
- package/readme.md +4 -3
- package/upgradeGuide.md +48 -0
package/changelog.md
CHANGED
|
@@ -1,3 +1,34 @@
|
|
|
1
|
+
### Unreleased
|
|
2
|
+
|
|
3
|
+
### v5.0.0-beta.3
|
|
4
|
+
|
|
5
|
+
> Fewer surprise events and surprise startups, because whitespace is not an API and ownership is not a scheduler.
|
|
6
|
+
|
|
7
|
+
* Add `Application#setView(view)` and no-argument `showView()` so an Application
|
|
8
|
+
can compose a complete root View tree before handing it to its Region. `getView()`
|
|
9
|
+
returns the prepared View first and the displayed View after handoff.
|
|
10
|
+
* Make child Application activation explicit. Registration owns teardown without
|
|
11
|
+
starting children; parent restart does not automatically reactivate registered children.
|
|
12
|
+
Successful stop and destruction drain active descendants through stopped owners,
|
|
13
|
+
and descendant `start()` or `restart()` resolves `false` while an ancestor is
|
|
14
|
+
stopping or terminal.
|
|
15
|
+
* Resolve `triggerMethod` lifecycle hooks from instance and prototype methods only;
|
|
16
|
+
constructor-option hooks no longer override or suppress those methods.
|
|
17
|
+
* Treat Events and Radio request names as literal strings across registration,
|
|
18
|
+
dispatch, and removal. Replace whitespace-batched operations with separate calls
|
|
19
|
+
or map entries; object-form event dispatch and the shared `eventSplitter` export
|
|
20
|
+
are removed.
|
|
21
|
+
* Remove View Region registration/removal lifecycle events. Observe a specific
|
|
22
|
+
Region's destruction lifecycle when teardown notification is required.
|
|
23
|
+
* Fix `getOption` so numeric zero and empty-string property keys resolve through
|
|
24
|
+
the normal option-before-instance lookup.
|
|
25
|
+
* Clarify selector-backed versus Element-backed Region placeholder identity after
|
|
26
|
+
a parent render, with public regression coverage for replacement and cleanup.
|
|
27
|
+
* Improve the typed starter's View ownership and missing-field rendering, and add
|
|
28
|
+
consumer-first migration and native/Backbone routing guidance.
|
|
29
|
+
* Add executable Application guidance for explicit effect lifetimes, navigation,
|
|
30
|
+
and latest-request refreshes that preserve active View and row identity.
|
|
31
|
+
|
|
1
32
|
### v5.0.0-beta.2
|
|
2
33
|
|
|
3
34
|
> Now with source maps, so “the AI wrote it” is slightly less useful as a debugging strategy.
|
|
@@ -1,89 +1,66 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: marionette
|
|
3
|
-
description: Build
|
|
3
|
+
description: Build or debug Marionette v5 applications using version-matched docs. For changes to the library itself, use its repository guidance.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Build with Marionette
|
|
7
7
|
|
|
8
|
-
Use the application's installed contract
|
|
9
|
-
|
|
8
|
+
Use the application's installed contract and preserve compatible integration
|
|
9
|
+
choices. This skill does not authorize dependency upgrades.
|
|
10
10
|
|
|
11
|
-
##
|
|
11
|
+
## Locate matching docs
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
in a monorepo. Do not use the skill's own directory as the application root.
|
|
16
|
-
|
|
17
|
-
Run the bundled helper with Node 24 or later (replace both absolute paths):
|
|
13
|
+
Resolve the package from the application workspace, not the copied skill directory
|
|
14
|
+
or a neighboring monorepo package. The read-only helper requires Node 24 or later:
|
|
18
15
|
|
|
19
16
|
```sh
|
|
20
17
|
node /path/to/marionette/scripts/docs.mjs --project /path/to/application --list
|
|
21
18
|
node /path/to/marionette/scripts/docs.mjs --project /path/to/application --page docs/agents.md
|
|
22
19
|
```
|
|
23
20
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
and
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
The
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
Preserve a compatible established integration. For a new application, use built-in
|
|
72
|
-
behavior when it supplies the capability; select an observable source when updates
|
|
73
|
-
need observation. Choose DataApi, StateApi, renderer, DomApi, EventDelegator, and
|
|
74
|
-
router independently. A Backbone router does not require Backbone data or state.
|
|
75
|
-
Register configuration before creating its consumers; use an isolated runtime only
|
|
76
|
-
when independent configurations must coexist.
|
|
77
|
-
|
|
78
|
-
Name the owner and cleanup operation for Views, subscriptions, widgets, and async
|
|
79
|
-
work. Use public lifecycle APIs. Check stale work before committing side effects;
|
|
80
|
-
framework cancellation cannot undo arbitrary writes by application code. Consult
|
|
81
|
-
the current reference for exact return and readiness behavior rather than inferring
|
|
82
|
-
it from a method name.
|
|
83
|
-
|
|
84
|
-
Use the application's own test commands. Exercise the requested behavior and its
|
|
85
|
-
relevant boundary: stale navigation, surviving edits/focus, rerendered event
|
|
86
|
-
handlers, or resource cleanup. Browser behavior needs a browser check. Report
|
|
87
|
-
commands actually run and untested boundaries; a successful build is not proof of
|
|
88
|
-
those interactions. Record changed integration decisions in the application's own
|
|
89
|
-
instructions without copying the library's maintainer policy.
|
|
21
|
+
These are lookup options, not a required sequence. `--list` returns provenance and
|
|
22
|
+
available page paths; `--page` reads one source path. The helper checks packaged
|
|
23
|
+
documentation hashes and version without executing project code or using a network.
|
|
24
|
+
For installations without `node_modules`, supply `--package-root` with the physical
|
|
25
|
+
package directory obtained from that application's package manager.
|
|
26
|
+
|
|
27
|
+
If packaged docs are absent, use the exact release or known source commit and
|
|
28
|
+
installed exports/declarations. Do not silently substitute current website docs,
|
|
29
|
+
`master`, or another workspace's package. An alpha version alone does not establish
|
|
30
|
+
source identity; `sourceDirty: true` is not an immutable release. Documentation
|
|
31
|
+
hashes do not prove a custom runtime matches them; test uncertain runtime behavior.
|
|
32
|
+
|
|
33
|
+
## Select the relevant contract
|
|
34
|
+
|
|
35
|
+
Pass the task page's `source` field from the manifest or `--list` output to
|
|
36
|
+
`--page`. The returned absolute `path` is for reading the file directly:
|
|
37
|
+
|
|
38
|
+
| Task | Packaged page |
|
|
39
|
+
| --- | --- |
|
|
40
|
+
| New application | `docs/development.md` for the typed starter; `docs/choosing-integrations.md` for integration decisions |
|
|
41
|
+
| Migrating an existing application | `docs/agent-tools.md` (pre-migration setup); `docs/migration-from-v4.md` and `upgradeGuide.md` from that target |
|
|
42
|
+
| Application architecture or unfamiliar ownership | `docs/agents.md` |
|
|
43
|
+
| Rendering or screen replacement | `docs/marionette.view.md`, `docs/marionette.region.md`, `docs/view.lifecycle.md` |
|
|
44
|
+
| Changing lists or observable records | `docs/marionette.collectionview.md`, `docs/data.api.md` |
|
|
45
|
+
| Async features or navigation | `docs/marionette.application.md`, `docs/routing.md` |
|
|
46
|
+
| State ownership or framework error | `docs/marionette.state.md` or `docs/diagnostic-catalog.md` |
|
|
47
|
+
| Skill setup or optional documentation MCP | `docs/agent-tools.md` |
|
|
48
|
+
|
|
49
|
+
Follow relevant links rather than loading an overview and every reference. For MCP,
|
|
50
|
+
read the retrieval rules in `docs/agent-tools.md` before remote use: exact version
|
|
51
|
+
and source must match. Installed Markdown remains sufficient. For v4 applications,
|
|
52
|
+
use matching migration material and installed APIs; this skill is not an upgrade plan.
|
|
53
|
+
|
|
54
|
+
DataApi, StateApi, renderer, DomApi, EventDelegator, and router are independent
|
|
55
|
+
choices; a Backbone router does not require Backbone data. Register configuration
|
|
56
|
+
before consumers. Use templates, named Regions, and public lifecycle APIs; domain
|
|
57
|
+
records belong in data sources, not child View traversal. For application design,
|
|
58
|
+
including personalized examples, use `docs/agents.md`.
|
|
59
|
+
|
|
60
|
+
## Completion
|
|
61
|
+
|
|
62
|
+
The requested application behavior works against the installed package, preserves
|
|
63
|
+
unrelated edits/focus and ownership, and has evidence for the affected interaction
|
|
64
|
+
and cleanup boundary. Use the application's checks; browser interactions require
|
|
65
|
+
browser evidence. Report actual results and untested boundaries. Record changed
|
|
66
|
+
integration decisions in the application's notes, keeping API details in the docs.
|