Commit graph

69 commits

Author SHA1 Message Date
Aria Minaei
041627f7e4 Fix the dangling promises 2023-08-03 10:52:10 +02:00
Aria Minaei
6f8e91ed5f Make default and static overrides distinguishable
Right now it's easy for the user to distinguish between a sequenced prop and non-sequenced props.

However, among the non-sequenced ones, it's not possible to distinguish between those that have a static override, and those that don't. The goal of this commit is to make it easy to distinguish between the two.
2023-02-03 12:48:19 +01:00
Aria Minaei
2b10e46441 Fix the bugs in assetStorage 2023-01-25 15:08:22 +01:00
Aria Minaei
3c68ed26ad Remove Atom.set|getState() 2023-01-15 12:42:28 +01:00
Pumpudu
fa72c5ba5d
change component length limit from 32 characters to 64 (#376) 2023-01-10 20:33:17 +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
c58bc694ee Fix: Re-render the panels when object identity change
This fixes the pesky "Argument 'der' in 'useDerivation(der)' should not change between renders."
2022-12-31 22:54:52 +01:00
Andrew Prifer
8d8e2348dd Create idb-backed image prop (#366)
Co-authored-by: Clement Roche <rchclement@gmail.com>
2022-12-31 11:01:16 +01:00
Aria Minaei
19b5218278 Document propTypesUtils and privateAPIs.ts 2022-11-24 15:52:24 +01:00
Aria Minaei
f17ad3cbca Document several util functions 2022-11-24 15:41:08 +01:00
Aria Minaei
7899f8a965 Document nicestNumberBetween() 2022-11-24 14:17:22 +01:00
Aria Minaei
5ee13a20a0 Document more utils 2022-11-24 14:09:02 +01:00
Aria Minaei
3f5b902739 Document minimalOverride() 2022-11-24 13:36:52 +01:00
Aria Minaei
464ce24923 Document utilities and remove unused code 2022-11-24 13:17:19 +01:00
Aria Minaei
dd585b0790 Explain how SheetObject.getValues() works 2022-11-23 16:31:44 +01:00
Andrew Prifer
7ef016f3f0
Make notifications SSR ready (#341)
Properly check if window exists
2022-11-22 13:24:23 +00:00
Andrew Prifer
43714fdf17
Notification improvements (#324) 2022-10-21 20:32:53 +00:00
Andrew Prifer
965d7085dc
Add runtime type checks to r3f (#323)
* Add better error/warning messages to r3f

* Fix notifications playground
2022-10-21 19:17:45 +00:00
Andrew Prifer
62bc12ab51
Create a notification system that can display notifications in Theatre.js' Studio (#320)
* Implement an internal library for studio notifications

* Improve design a little

* Document code

* Change relative import to absolute one

* Fix tiny styling issue

* Add notifications playground

* Add notifications empty state and keep notifications buttons always visible

Also fix a bug related to not clearing the type and uniqueness checkers.

* Simplify notifications playground

* Treat window as optional in case it runs in server code
2022-10-21 15:51:13 +02:00
Elliot
39eb528af4
Add Sheet aggregate track (#284)
* Add Sheet aggregate track

* Update aggregate track keyframe copy algorithm

* Fix keyframe value sanitization

* Fix aggregate selections to be properly undefined

* Fix TS errors

* Remove incorrect comment and improve var name
2022-09-14 16:46:59 +00:00
Cole Lawrence
984a61347f Use "Theatre.js" for name consistency
Co-authored-by: Fülöp <fulopkovacs@users.noreply.github.com>
2022-07-25 12:01:26 -04:00
Aria Minaei
0e5b27d76d Add an extra test case to removePathFromObject() 2022-07-07 20:32:55 +02:00
Aria Minaei
ebf2a19900 Initialize the studio only once in tests 2022-07-07 20:32:55 +02:00
Cole Lawrence
977ddb6574 doc: Light doc comment for isPropConfigComposite 2022-06-24 09:52:56 -04:00
Cole Lawrence
28bd52d9e9 ux: color hex default to removeAlphaIfOpaque 2022-06-24 09:52:56 -04:00
Cole Lawrence
e8c8168f0b
UX: Add "PresenceFlag" item indicators (usePresence) (#184)
* feat/dev: Add usePresence and enable for keyframes & keyframe cursors
 * Enable hovered styles for AggregateKeyframeDot
 * Enable hovered styles for graph editor keyframes
2022-06-15 11:36:57 +00:00
Fülöp Kovács
54bf1c4567 Fix a link in a docstring 2022-06-08 14:49:47 +02:00
Fülöp Kovács
abdda0afab Support the three/four/six-value syntax variants of <hex-color> 2022-06-08 14:49:47 +02:00
Andrew Prifer
af079f2203 Fix invalid interpolated color values 2022-06-07 12:32:53 +02:00
Elliot
25372d8bb0
Copy & pasting keyframes in aggregate tracks (#190) 2022-06-07 10:38:17 +02:00
Cole Lawrence
e8c440f357
feature/2022-05/display aggregate keyframes in sequence editor (#170)
Co-authored-by: Fülöp <fulopkovacs@users.noreply.github.com>
Co-authored-by: Fülöp Kovács <kovacs.fulop@gmail.com>
2022-05-26 14:10:54 +02:00
Aria
d83d2b558c
Compound prop context menu (#157) 2022-05-26 01:18:45 +02:00
Cole Lawrence
bc5e687250 docs: slashPaths normalizeSlashedPath 2022-05-20 07:37:35 -04:00
Cole Lawrence
f6e408f610 feature: Add sequence editor row collapsing
* Add hover state for chevron
 * Add StudioSheetItemKey id for use with sequenceEditorCollapsableItems

Co-authored-by: Elliot <key.draw@gmail.com>
2022-05-20 07:37:35 -04:00
Cole Lawrence
84daaaf94a dev: Add configurable ITheatreLogger
Addresses the lack of options we currently have for surfacing issues in
our application via debugging tools. Prioritizes performance and
usability (visually) over clarity in some places that could have been
object mapped.

A logger with three separate audiences:

 * `internal`: Logs for developers maintaining Theatre.js
 * `dev`: Logs for developers using Theatre.js
 * `public`: Logs for everyone

This logger supports:
 * multiple logging levels (error, warn, debug, trace),
 * multiple audience levels (internal, dev, public),
 * multiple categories (general, todo, troubleshooting)
 * named and keyed loggers (e.g.
   `rootLogger.named("Project", project.id)`)
 * console styling with deterministic coloring
 * console devtool maintains accurate sourcemap link to logging origin
   (e.g. `coreExports.ts:71` as opposed to `logger.ts:45` or whatever)
 * swappable logger
 * customizable filtering
 * Accepts lazy `args`: `args: () => object` via
  `logger.lazy.<level>("message", () => <expensive computation>)` (e.g.
  `logger.lazy.debugDev("Loaded project state", () => ({ save: bigProject.exportToSaveable() }))`)
2022-05-19 16:34:34 -04: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
vezwork
030b6d2804 Initial marker features
- Add comments about cursor lock, framestamp lock
- Add PointableSet, Mark Ids, dataverse usage fix
- Add marker dragging, fix PointerCapturing

Co-authored-by: Cole Lawrence <cole@colelawrence.com>
Co-authored-by: Aria <aria.minaei@gmail.com>
2022-05-09 09:23:53 -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
Aria Minaei
c1cd25b906 Rename NonCompound to Simple
https://github.com/theatre-js/theatre/pull/118#discussion_r846633461
2022-04-10 20:51:45 +02:00
Aria Minaei
b2714ca876 Change all typeof x === 'undefined' to x === undefined`
https://github.com/theatre-js/theatre/pull/118#discussion_r846634374
2022-04-10 20:13:53 +02:00
Aria Minaei
65f9f1c850 Rename deserialize() to deserializeAndSanitize()
https://github.com/theatre-js/theatre/pull/118#discussion_r846631233
2022-04-10 19:47:59 +02:00
Aria
16c070b6e9
Standardize handling of non-compound types (#118) 2022-04-09 15:02:39 +02:00
Elliot
2bf081478f
Fix keyframe pasting to respect interpolation graph (#107) 2022-03-25 18:06:20 +01:00
Fulop
ffdebebfff
Add focus range (#94) 2022-03-25 16:44:18 +01:00
Andrew Prifer
bb2c7de299
Integrate Wallaby (#66) 2022-02-21 13:33:08 +01:00
Andrew Prifer
defb538561
Create color prop (#64)
Authored by andrew@theatrejs.com
2022-02-19 17:54:19 +01:00
Aria Minaei
67b8a708dc Refactored getArrayOfValidSequenceTracks() 2021-11-14 17:09:21 +01:00
Aria Minaei
14173fde0a Formatting changes for api docs 2021-10-04 10:39:12 +02:00
Aria Minaei
69c6aa9af2 Lint rule changes 2021-10-02 14:12:25 +02:00
Aria Minaei
dae14aebbd Implemented stableJsonTringify() 2021-09-20 11:09:30 +02:00