wickchart 1.7.0 → 2.0.2

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/README.md CHANGED
@@ -1260,26 +1260,48 @@ WICK_E2E_VISUAL=1 npm run test:e2e -- --update-snapshots
1260
1260
  - Incremental (O(1)) indicator updates for high-frequency streaming
1261
1261
  - Min/max downsampling and/or an offscreen hover layer if profiling ever demands
1262
1262
 
1263
- ## Migrating from 0.x (HabView)
1263
+ ## Migrating from 1.x to 2.x
1264
1264
 
1265
- 1.0 renames the public surface to the WickChart brand. The 0.x names keep
1266
- working as **deprecated aliases** (removed in 2.0), so upgrading is safe to
1267
- do lazily:
1265
+ 2.0 removes the deprecated 0.x `hab-*` aliases (they warn once per surface
1266
+ from **1.7.1**) and moves the six optional feature families out of the core
1267
+ entry into their own packages — the core drops back under ~65 KB gz. The
1268
+ full plan and delivery sequence: [ROADMAP-V2.md](./ROADMAP-V2.md).
1268
1269
 
1269
- | 0.x (deprecated alias) | 1.0 canonical |
1270
+ **Aliases removed.** Renaming is mechanical; each warns in 1.7.1 already:
1271
+
1272
+ | removed in 2.0 | use instead |
1270
1273
  |---|---|
1271
1274
  | `<hab-chart>` / `<hab-feed>` | `<wick-chart>` / `<wick-feed>` |
1272
- | `hab:range`, `hab:select`, `hab:alert`, `hab:crosshair`, `hab:measure`, `hab:annotations` | `wick:*` of the same name (both fire during 1.x) |
1273
- | `hab-feed:status` / `hab-feed:fallback` | `wick-feed:status` / `wick-feed:fallback` (both fire during 1.x) |
1274
- | `--hab-bg`, `--hab-up`, … | `--wick-*` of the same name (`--wick-*` wins; `--hab-*` is the fallback) |
1275
- | `HabChart` / `HabFeed` classes | `WickChart` / `WickFeed` (also as named exports) |
1276
- | HabScript (the `expr:{…}` language) | WickScriptsyntax unchanged |
1277
- | `import from 'wickchart/src/hab-chart.js'` | use the package entry points (`wickchart`, `wickchart/core`, `wickchart/feed`) — module files are renamed |
1278
-
1279
- Two behavioral notes: custom indicators registered via
1280
- `WickChart.registerIndicator()` are shared with the legacy `<hab-chart>`
1281
- alias (one registry), and cross-tab co-view channels are now prefixed
1282
- `wick-co-view:` (a 0.x tab and a 1.x tab won't pair — refresh both).
1275
+ | `hab:*` events (every chart event fired twice in 1.x) | `wick:*` of the same name |
1276
+ | `hab-feed:*` events | `wick-feed:*` |
1277
+ | `--hab-bg`, `--hab-up`, … (runtime **and** stylesheet fallbacks) | `--wick-*` of the same name |
1278
+
1279
+ Still on 0.x? Upgrade through 1.x firstthe 1.x releases carry the
1280
+ aliases with warnings, so the rename can be done lazily there.
1281
+
1282
+ **Features moved to packages.** Calls keep their shape: each
1283
+ `attachX(chart)` installs the familiar methods *on the instance*, so
1284
+ existing call sites survive with one added import line. Without the
1285
+ package, the core methods become warn-once stubs naming it:
1286
+
1287
+ | 1.x (in core) | 2.0 package |
1288
+ |---|---|
1289
+ | `narrate()` · `walk()` / `stopWalk()` · `playRange()` · the `sonify` attribute · `captureScene()` / `getStory()` / `playStory()` / `stopStory()` | `wickchart-narrator` |
1290
+ | the `co-view` / `co-view-name` attributes · `getPeers()` | `wickchart-coview` |
1291
+ | `setScenario()` / `clearScenario()` · `setRiskPlan()` / `clearRiskPlan()` | `wickchart-scenario` |
1292
+ | `aiTools()` · `aiPrompt()` · `aiContext()` · `applyAI()` · `ask()` | `wickchart-ai` |
1293
+
1294
+ ```js
1295
+ import { attachNarrator } from 'wickchart-narrator';
1296
+ attachNarrator(chart); // chart.narrate() / walk() / playStory() … work as before
1297
+ ```
1298
+
1299
+ **Unaffected:** `getDataWindow()` stays in core (a data API, not an LLM
1300
+ API), `getState()` / `setState()` serialize none of the moved features, and
1301
+ all four packages are already published and documented on the
1302
+ [plugins hub](https://benyblack.github.io/wickchart/plugins.html) — you can
1303
+ adopt them today, on 1.x (attaching simply shadows the core's identical
1304
+ methods).
1283
1305
 
1284
1306
  ## Releases
1285
1307
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wickchart",
3
- "version": "1.7.0",
3
+ "version": "2.0.2",
4
4
  "description": "<wick-chart> — a modern, dependency-free financial charting web component. Candles, line & area charts, crosshair, zoom/pan, indicators (incl. a safe expression mini-language), live streaming via <wick-feed> (incl. tick/volume/dollar bars), a worker compute path for 1M-bar histories, report export, theming.",
5
5
  "type": "module",
6
6
  "main": "src/wick-chart.js",
@@ -50,11 +50,11 @@
50
50
  },
51
51
  "scripts": {
52
52
  "dev": "npx --yes serve . -l 5173",
53
- "test": "node --test \"tests/*.test.mjs\" \"plugins/draw/tests/*.test.mjs\" \"plugins/sessions/tests/*.test.mjs\" \"plugins/replay/tests/*.test.mjs\" \"plugins/compare/tests/*.test.mjs\" \"plugins/navigator/tests/*.test.mjs\" \"plugins/alerts-plus/tests/*.test.mjs\" \"plugins/layouts/tests/*.test.mjs\" \"plugins/signals/tests/*.test.mjs\" \"plugins/tape/tests/*.test.mjs\" \"plugins/grid/tests/*.test.mjs\" \"plugins/paper/tests/*.test.mjs\"",
53
+ "test": "node --test \"tests/*.test.mjs\" \"plugins/draw/tests/*.test.mjs\" \"plugins/sessions/tests/*.test.mjs\" \"plugins/replay/tests/*.test.mjs\" \"plugins/compare/tests/*.test.mjs\" \"plugins/navigator/tests/*.test.mjs\" \"plugins/alerts-plus/tests/*.test.mjs\" \"plugins/layouts/tests/*.test.mjs\" \"plugins/signals/tests/*.test.mjs\" \"plugins/tape/tests/*.test.mjs\" \"plugins/grid/tests/*.test.mjs\" \"plugins/paper/tests/*.test.mjs\" \"plugins/narrator/tests/*.test.mjs\" \"plugins/coview/tests/*.test.mjs\" \"plugins/scenario/tests/*.test.mjs\" \"plugins/ai/tests/*.test.mjs\"",
54
54
  "test:e2e": "playwright test",
55
55
  "build:types": "node -e \"require('fs').rmSync('types', { recursive: true, force: true });\" && tsc -p tsconfig.json",
56
56
  "prepack": "npm run build:types",
57
- "ci": "npm run build:types && npm test && node --check src/wick-chart.js && node --check src/wick-feed.js && node --check src/core.js && node --check src/react.js && node --check src/react-core.js && node --check src/worker.js && node --check src/worker-core.js && node --check src/report.js && node --check demo/app.js && node --check plugins/draw/core.mjs && node --check plugins/draw/draw.mjs && node --check plugins/sessions/core.mjs && node --check plugins/sessions/sessions.mjs && node --check plugins/replay/replay.mjs && node --check plugins/compare/core.mjs && node --check plugins/compare/compare.mjs && node --check plugins/navigator/core.mjs && node --check plugins/navigator/navigator.mjs && node --check plugins/alerts-plus/alerts-plus.mjs && node --check plugins/layouts/layouts.mjs && node --check plugins/signals/core.mjs && node --check plugins/signals/signals.mjs && node --check plugins/tape/core.mjs && node --check plugins/tape/tape.mjs && node --check plugins/grid/core.mjs && node --check plugins/grid/grid.mjs && node --check plugins/paper/core.mjs && node --check plugins/paper/paper.mjs"
57
+ "ci": "npm run build:types && npm test && node --check src/wick-chart.js && node --check src/wick-feed.js && node --check src/core.js && node --check src/react.js && node --check src/react-core.js && node --check src/worker.js && node --check src/worker-core.js && node --check src/report.js && node --check demo/app.js && node --check plugins/draw/core.mjs && node --check plugins/draw/draw.mjs && node --check plugins/sessions/core.mjs && node --check plugins/sessions/sessions.mjs && node --check plugins/replay/replay.mjs && node --check plugins/compare/core.mjs && node --check plugins/compare/compare.mjs && node --check plugins/navigator/core.mjs && node --check plugins/navigator/navigator.mjs && node --check plugins/alerts-plus/alerts-plus.mjs && node --check plugins/layouts/layouts.mjs && node --check plugins/signals/core.mjs && node --check plugins/signals/signals.mjs && node --check plugins/tape/core.mjs && node --check plugins/tape/tape.mjs && node --check plugins/grid/core.mjs && node --check plugins/grid/grid.mjs && node --check plugins/paper/core.mjs && node --check plugins/paper/paper.mjs && node --check plugins/narrator/core.mjs && node --check plugins/narrator/narrator.mjs && node --check plugins/coview/core.mjs && node --check plugins/coview/coview.mjs && node --check plugins/scenario/core.mjs && node --check plugins/scenario/scenario.mjs && node --check plugins/ai/core.mjs && node --check plugins/ai/ai.mjs"
58
58
  },
59
59
  "keywords": [
60
60
  "chart",
@@ -89,6 +89,7 @@
89
89
  "jsdom": "^26.1.0",
90
90
  "react": "^19.1.0",
91
91
  "react-dom": "^19.1.0",
92
- "typescript": "^7.0.2"
92
+ "typescript": "^7.0.2",
93
+ "wickchart": "file:."
93
94
  }
94
95
  }