Commit graph

171 commits

Author SHA1 Message Date
Aria Minaei
bfba1d4879 Unify Derivation and Prism 2/n 2023-01-04 20:49:43 +01:00
Aria Minaei
12b3f477bc Unify Derivation and Prism (1/n) 2023-01-04 20:49:43 +01:00
Aria Minaei
e9bbb0ef41 Remove PrismDerivation.map/flatMap() 2023-01-04 20:49:43 +01:00
Aria Minaei
a073984b2f Mark add/removeDependent() as internal 2023-01-04 20:49:43 +01:00
Aria Minaei
194de8d833 Simplify Derivation.onChange()
It no longer uses `DerivationEmitter`.
2023-01-04 20:49:43 +01:00
Aria Minaei
a24a149a52 Remove Derivation.tapImmediate()
This is now just an extra flag on `Derivation.onChange()`
2023-01-04 20:49:43 +01:00
Aria Minaei
f2bb24ef99 Change the signature of Derivation.changes() to Derivation.onChange()
This way, we no longer expose the `Tappable` interface so we can remove it later.
2023-01-04 20:49:43 +01:00
Aria Minaei
f1cb8edc91 Simplify Derivation.onStale() 2023-01-04 20:49:43 +01:00
Aria Minaei
5c1aa1cd50 Remove Derivation.changesWithoutValues()
And replace it with `Derivation.onStale()`
2023-01-04 20:49:43 +01:00
Aria Minaei
9094e3041e Remove AbstractDerivation
At this point, the only derivation that we have is `PrismDerivation`.
2023-01-04 20:49:43 +01:00
Aria Minaei
63228fd86a Simplify prism.state() 2023-01-04 20:49:43 +01:00
Aria Minaei
ee68112867 Implement prism.source() 2023-01-04 20:49:43 +01:00
Aria Minaei
b117ee0aff Retire DerivationFromSource (1/2)
This is supposed to break the build. In the next commit, I'll implement `HotScope.source()` to fix the build.
2023-01-04 20:49:43 +01:00
Aria Minaei
918dd754a7 Retire ConstantDerivation 2023-01-04 20:49:43 +01:00
Aria Minaei
ed322b66de Separate the hot path from the cold path in prisms 2023-01-04 20:49:43 +01:00
Aria Minaei
c81fe11e52 Rename Prism.changesWithoutValues() to onStale() 2023-01-04 20:49:43 +01:00
Aria Minaei
a71fff0c73 Don't expose PrismDerivation as a class 2023-01-04 20:49:43 +01:00
Aria Minaei
e0a61981c9 Have PrismDerivation no longer extend AbstractDerivation 2023-01-04 20:49:43 +01:00
Aria Minaei
0655e5b1c4 Add performance note about prism scopes 2023-01-04 20:49:43 +01:00
Aria Minaei
83832ef85b Note down that map/flatMap must be removed 2023-01-04 20:49:43 +01:00
Aria Minaei
6d7d461223 Remove all WeakMaps from prism's scope
... making it easier to debug prism scopes. Again, there is a perf regression here.
2023-01-04 20:49:43 +01:00
Aria Minaei
1c69cb7055 Save prism effects in the prism scope, rather than a WeakMap
... for easier debugging, but there is a perf regression which I
can't yet quantify as the benchmark suit doesn't support comparisons.
2023-01-04 20:49:43 +01:00
Aria Minaei
ae8be59366 Implement a basic benchmark test, and deprecate derivation.map()/flatMap()
This starts a new workspace at `packages/benchmarks` where future benchmarks
are going to sit. For now, it only contains a basic profile of a `sequence.play()`
setup.

It also removes all uses of `AbstractDerivation.map()/flatMap()` and uses prisms
instead.
2023-01-04 20:49:35 +01:00
Aria Minaei
45b548660c 0.6.0-dev.3 2023-01-04 20:35:56 +01:00
Aria Minaei
f6361e7905 0.6.0-dev.2 2023-01-02 22:34:50 +01:00
Aria Minaei
438a83d2d4 0.6.0-dev.1 2023-01-02 19:47:23 +01:00
Aria Minaei
95b329b02d 0.5.1 2022-12-31 10:54:27 +01:00
Aria Minaei
fcd3ab7ec5 0.5.1-rc.2 2022-12-07 10:24:50 +01:00
Aria Minaei
a9adc2640c 0.5.1-rc.1 2022-11-25 11:21:28 +01:00
Aria Minaei
6d49e5977c Remove the warning about SSR mode
It's being misunderstood as an error message https://discord.com/channels/870988717190426644/870988717190426647/1020751857024503828
2022-09-27 23:28:23 +02:00
Aria Minaei
87acdbe9ea 0.5.0 2022-09-17 18:54:11 +02:00
Aria Minaei
c97377d868 0.5.0-rc.4 2022-09-17 18:54:11 +02:00
vezwork
fdf268ad43 Add comments and remove extra performance measure
Co-authored-by: Cole Lawrence <cole@colelawrence.com>
2022-08-04 13:34:08 -04:00
Cole Lawrence
62def1e883 Add r3f stress + Ticker.__ticks counter 2022-08-04 13:34:08 -04:00
Cole Lawrence
963b03ab6e dev: Add warning for unbound .tick() call 2022-08-03 11:38:44 -04:00
Cole Lawrence
415e493834 doc: Add doc to Ticker.raf 2022-07-25 12:01:26 -04:00
Aria Minaei
a8176a36f7 0.5.0-rc.3 2022-07-12 18:37:04 +02:00
Aria Minaei
0631d02d31 0.5.0-rc.2 2022-07-07 22:34:51 +02:00
Cole Lawrence
f1844952ea
Add initial tools for managing derivations and React compatibility (#202)
Co-authored-by: Cole Lawrence <cole@colelawrence.com>
Co-authored-by: Elliot <key.draw@gmail.com>
Co-authored-by: Aria <aria.minaei@gmail.com>
2022-06-09 19:12:40 +02:00
Aria Minaei
f8bb2d7ae6 0.5.0-rc.1 2022-06-01 15:51:33 +02:00
Elliot
564e54c314
Single tween editor for aggregate rows (#178)
Co-authored-by: Cole Lawrence <cole@colelawrence.com>
Co-authored-by: Aria Minaei <aria.minaei@gmail.com>
2022-05-29 13:12:30 +02:00
Aria
ec18687a98
Re-do bundling, compat tests, and extension API (#174) 2022-05-25 00:37:18 +02:00
Fülöp
3d10325873
Add tests for Theatre.js + popular setups in the ecosystem (#165)
This implements some basic infra for testing Theatre.js with popular setups such as npm/yarn/pnpm, webpack/vite/parcel, js/ts, etc.

So far, the only existing setup has been with create-react-app. Will add more in the future.

Co-authored-by: Fülöp <fulopkovacs@users.noreply.github.com>
Co-authored-by: Aria Minaei <aria.minaei@gmail.com>
2022-05-17 20:53:01 +02:00
Cole Lawrence
2324218453
Implement inline keyframe editing (#135)
* refactor: improve idents near DeterminePropEditor

* fix: Allow `MouseEvent` for `usePopover` `OpenFn`
 * Anticipate to be used with `useDrag` (which is written using `MouseEvent`s)

* refactor: rename local variable depth to visualIndentation

* fix: Hide out of bounds LengthIndicator

* pointer: Fix type errors with `getPointerParts` using generics

 * Fix param type for `getPointerMeta`

* Inline keyframe editor + popover nesting
 * Complete inline editor,
 * add reason for close popover, &
 * enable popover nesting
 * enable inline keyframe editing with splitting of DeterminePropEditor
 * usePopover has PopoverAutoCloseLock helper

Co-authored-by: Elliot <key.draw@gmail.com>
Co-authored-by: Aria <aria.minaei@gmail.com>

* prop editor: Reorganize prop-editors & improve documentation

Co-authored-by: Cole Lawrence <cole@colelawrence.com>
Co-authored-by: Elliot <key.draw@gmail.com>

Co-authored-by: Elliot <key.draw@gmail.com>
Co-authored-by: Aria <aria.minaei@gmail.com>
2022-05-16 14:14:47 +02:00
Cole Lawrence
abd79b197f doc + optimize: prism.ts (use Maps) 2022-05-05 07:58:44 -04:00
Cole Lawrence
1387ce62d2 refactor: Add working Nominal types, clarify identifiers
* Use more Nominal types to help with internal code id usage consistency
 * Broke apart StudioHistoricState type

Co-authored-by: Aria <aria.minaei@gmail.com>
2022-05-05 07:58:44 -04:00
Elliot
4b5f7adf21
Add hotness details to dataverse docs (#138)
* Add hotness details to dataverse docs

* Add reference for hot observables
2022-04-29 19:04:21 +02:00
Elliot
b6e0a217cd
Fix typo? (#137) 2022-04-28 15:11:20 -04:00
Cole Lawrence
909ffccafb
refactor: Improve identifiers in pointer.ts + use Map over object (#134)
Co-authored-by: Elliot <key.draw@gmail.com>
2022-04-27 22:21:51 +02:00
PaleHazy
a4c9b8d75a
isIdentityChangeProvider --> isIdentityDerivationProvider (#128) 2022-04-23 21:32:12 +02:00
Cole Lawrence
b10ae71b92
Fix example code in doc 2022-04-22 14:08:11 -04:00
Andrew Prifer
39da042edc
Fix various issues with the build system (#129)
* Fix react-icons breaking in CRA 5 for some reason

* Replace fuzzysort with fuzzy so we don't break Webpack

Webpack messes up esbuild’s internal modules if the inlined module is an AMD module. Check any new dep you add if it is an AMD module.

* Inline dataverse deps.

Mainly because the CJS build consuming the ESM lodash-es broke some bundlers.

* react-icons fix nr 2

* Stop eslint breaking in CRA 5

* Update r3f-cra example to CRA 5 and fix double-bundling react & co

* Fix r3f tree-shaking and switch to ESM only output

* Make r3f example shake studio and its extension in prod

* Examples have separate and wildly differing build setups so remove them from the pre-commit hook linting

* Update out-of-date yarn.lock
2022-04-21 22:03:51 +02:00
Aria Minaei
5ab47c2ad2 0.4.8-dev.3 2022-04-15 13:28:14 +02:00
Aria Minaei
72ada325be Clarify the remark about the Pointer<O> type
https://github.com/theatre-js/theatre/pull/118#discussion_r846628315
2022-04-09 17:09:51 +02:00
Aria Minaei
bd8999f0f2 Deprecate OpaqueToPointers for now
https://github.com/theatre-js/theatre/pull/118#discussion_r846628039
2022-04-09 17:08:08 +02:00
Aria Minaei
c9959b9541 More lint fixes 2022-04-09 15:30:20 +02:00
Aria
16c070b6e9
Standardize handling of non-compound types (#118) 2022-04-09 15:02:39 +02:00
Cole Lawrence
77c7fc969f
Update GET_STARTED.md (#119) 2022-04-06 19:45:49 +02:00
Fulop
949fe935cb
Improve the documentation of dataverse (#116) 2022-04-06 17:28:08 +02:00
Aria Minaei
e2c98669f9 Document more of prism 2022-03-15 14:55:06 +01:00
Aria Minaei
0d4d0c446e Fix the rest of the eslint warnings 2022-02-23 23:07:05 +01:00
Aria Minaei
aec6b2a251 Fix a bunch of eslint warnings 2022-02-23 22:53:39 +01:00
Andrew Prifer
bb2c7de299
Integrate Wallaby (#66) 2022-02-21 13:33:08 +01:00
Andrew Prifer
b643739ec7 Fix some TSDoc comments 2022-02-15 22:59:34 +01:00
Andrew Prifer
599cc101c9 Document dataverse API 2022-01-19 15:55:36 +01:00
Aria Minaei
2ddd3a1259 0.4.8-dev.2 2021-12-17 17:38:29 +00:00
Aria Minaei
607d6afe2b 0.4.8-dev.1 2021-11-25 18:39:17 +01:00
Aria Minaei
76533d9f82 0.4.7 2021-10-14 18:48:21 +02:00
Aria Minaei
de6161e1cc 0.4.7-rc.1 2021-10-08 11:42:14 +02:00
Aria Minaei
5873e65d4d More docs 2021-10-05 12:22:43 +02:00
Aria Minaei
f7cc267746 A simple README for @theatre/dataverse 2021-10-05 12:10:03 +02:00
Aria Minaei
69c6aa9af2 Lint rule changes 2021-10-02 14:12:25 +02:00
Aria Minaei
90520dfb25 Started adopting api-extractor 2021-10-02 13:48:02 +02:00
Aria Minaei
3e71d6dacc Removed dead code 2021-10-02 12:32:40 +02:00
Aria Minaei
4b2a6471dc 0.4.6 2021-10-01 17:49:04 +02:00
Aria Minaei
0eec2041a3 0.4.5 2021-10-01 12:35:50 +02:00
Aria Minaei
3d56f236e1 0.4.5-dev.3 2021-10-01 12:34:11 +02:00
Aria Minaei
f3367f0719 0.4.5-dev.2 2021-10-01 12:32:38 +02:00
Aria Minaei
fcfe2cbef4 0.4.5-dev.1 2021-10-01 10:54:49 +02:00
Aria Minaei
b3945e2a61 0.4.4 2021-09-30 22:02:45 +02:00
Aria Minaei
4a12a92428 0.4.3 2021-09-30 10:29:39 +02:00
Aria Minaei
2c4b317934 0.4.2 2021-09-22 21:18:48 +02:00
Aria Minaei
2232fe5662 0.4.1 2021-09-21 21:25:28 +02:00
Aria Minaei
f48038d649 0.4.0 2021-09-20 11:20:50 +02:00
Aria Minaei
d7542883f7 More docs 2021-09-18 16:31:05 +02:00
Aria Minaei
378d9b7abf 0.4.0-dev.20 2021-09-17 17:32:02 +02:00
Aria Minaei
a86e220bdc 0.4.0-dev.19 2021-09-14 12:43:58 +02:00
Aria Minaei
bbf77123b2 0.4.0-dev.18 2021-09-13 19:17:34 +02:00
Aria Minaei
a1712fce4a 0.4.0-dev.17 2021-09-13 18:50:52 +02:00
Aria Minaei
46f13759e5 0.4.0-dev.16 2021-09-13 18:06:01 +02:00
Aria Minaei
b5fa729e5d 0.4.0-dev.15 2021-09-06 21:13:20 +02:00
Aria Minaei
0ff68e5dbf 0.4.0-dev.14 2021-09-05 18:01:43 +02:00
Aria Minaei
46f19dddbc 0.4.0-dev.13 2021-09-02 12:20:14 +02:00
Aria Minaei
b63fcb9f1e 0.4.0-dev.12 2021-09-02 09:51:13 +02:00
Aria Minaei
5d37c15173 Upgrade deps 2021-09-01 10:41:54 +02:00
Aria Minaei
456e281954 0.4.0-dev.11 2021-08-08 10:34:38 +02:00
Aria Minaei
1916747e8b Upgrade typescript 2021-08-08 10:12:23 +02:00
Aria Minaei
bafa819b39 0.4.0-dev.10 2021-08-07 23:39:55 +02:00
Aria Minaei
fee173d09f Removed prepack scripts
They're not needed, as everything is built from yarn deploy
2021-08-07 23:38:24 +02:00
Aria Minaei
2a57433bf6 0.4.0-dev.9 2021-08-07 23:35:32 +02:00