Commit graph

470 commits

Author SHA1 Message Date
Aria Minaei
bac27777c4 Perf-gain: memoize the sequence editor panel's dims to avoid unnecessary re-renders 2022-07-12 13:34:29 +02:00
Aria Minaei
8f1d26536b Sanitize sequence's length and subUnitsPerUnit
Possibly fixes P-173
2022-07-08 14:08:57 +02:00
Aria Minaei
ac9345ddbd Fix for OutlinePanel not being scrollable sometimes
Fixes P-179
2022-07-08 14:08:57 +02:00
Aria Minaei
7f17f985ee Fix PlayheadPositionPopover not accepting '0' as input 2022-07-08 14:08:57 +02:00
Aria Minaei
0631d02d31 0.5.0-rc.2 2022-07-07 22:34:51 +02: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
Aria Minaei
13d612f4b7 Add a helpful warning on auto-discarded scrubs 2022-07-07 20:32:55 +02:00
Aria
a9910fecba
Unsuppress useful warnings in core. (#248)
This also temporarily removes `coreLogger`'s config from the public API One reason is that we don't have many logs that could benefit from suppressing (see diff) so the experimental API would not be useful to the user yet.

Also, the default config was suppressing useful warnings. Those warnings _would_ have been dead-code-eliminated in production mode anyway, so having a separate config to suppress them in dev mode makes it confusing.

Fixes P-171
2022-07-07 10:27:21 +02:00
Aria Minaei
88df1ef004 Show a helpful warning if the user hadn't called studio.initialize() in a timely manner 2022-07-06 16:13:29 +02:00
Fülöp Kovács
fb02b297f1 Enable the preview of easing presets when the curveEditorPopover opens 2022-07-01 14:15:25 +02:00
vezwork
2d3466ebfe Fix react fragments not having a key.
Co-authored-by: Or Fleisher <fleisher.or@gmail.com>
2022-06-28 11:14:41 -04:00
Elliot
006121da91
Fix extension buttons spacing, add extension example (#229)
* Fix extension buttons spacing & styles
* Refactor extension button styles
* Clean up extension prism
2022-06-26 16:00:59 +00:00
Cole Lawrence
39d897cd83 fix(SequenceEditor): horizontal scroll with shift in macOS Firefox 2022-06-24 09:52:56 -04:00
Cole Lawrence
977ddb6574 doc: Light doc comment for isPropConfigComposite 2022-06-24 09:52:56 -04:00
Cole Lawrence
bbf7ee9244 style: Ensure consistent font-sizes for DetailPanel inputs 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
df692427ca dev: Build playground files much faster and add watch 2022-06-16 17:10:43 -04:00
Elliot
2c2e421382
Fix outline panel blocking clicks incorrectly (#223)
Co-authored-by: Fülöp Kovács <kovacs.fulop@gmail.com>
Co-authored-by: Cole Lawrence <cole@colelawrence.com>
2022-06-16 16:14:51 +02:00
Cole Lawrence
4e4b8f83e9
Disable usePresence flags by default (#226) 2022-06-16 11:59:09 +00: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
Cole Lawrence
d4f572a744 feat: Add inline keyframe editing in graph editor 2022-06-13 10:03:09 -04:00
Andrew Prifer
c303748ca9 Fix transparencies in non-backdrop-blur browsers 2022-06-13 15:39:26 +02:00
Aria Minaei
1b36e8f6f9 Also highlight the hovered props in the sequence editor panel 2022-06-13 15:07:22 +02:00
Aria Minaei
4d92ad1932 Also highlight sheet objects 2022-06-13 15:07:22 +02:00
Aria Minaei
58bf030aaa Remove unused usePrism() 2022-06-13 15:07:22 +02:00
Aria Minaei
dc7e5a1128 Use text color rather than bg to highlight hovered props 2022-06-13 15:07:22 +02:00
Cole Lawrence
1b41f1afca feature: Add selecting a sheet object row via sequence editor 2022-06-13 15:07:22 +02:00
Cole Lawrence
0d9d78a032 docs: Remove useless/irrelevant comment 2022-06-13 15:07:22 +02:00
Cole Lawrence
ebf9b0e1cd dev: Remove unnecessary "files" field in tsconfig which screws with "Move to new file" refactor 2022-06-13 15:07:22 +02:00
Cole Lawrence
40d2c7fe04 docs: absoluteDims 2022-06-13 15:07:22 +02:00
Aria Minaei
c74aa1b930 Show hovered prop from sequence editor in details panel
* Remove an un-needed prism

Co-authored-by: Cole Lawrence <cole@colelawrence.com>
Co-authored-by: Aria Minaei <aria.minaei@gmail.com>
2022-06-13 15:07:22 +02:00
Andrew Prifer
8ef99aef1b Revert "Fix popover behavior when open and clicking on trigger"
This reverts commit 935ac36467.
2022-06-10 21:27:02 +02:00
Andrew Prifer
935ac36467 Fix popover behavior when open and clicking on trigger 2022-06-10 21:26:09 +02:00
Andrew Prifer
f2673b91fe
Fix useFrameStampPositionRef (#209) 2022-06-10 17:56:35 +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
Elliot
bebf281517
Fix process.env.version in browser-bundles (#206)
* Fix `process.env.version` in browser-bundles

- also fix tsdoc warns in mjs files

Co-authored-by: Fülöp Kovács <kovacs.fulop@gmail.com>
Co-authored-by: Cole Lawrence <cole@colelawrence.com>

* Change to `process.env.THEATRE_VERSION`

Co-authored-by: Fülöp Kovács <kovacs.fulop@gmail.com>
Co-authored-by: Cole Lawrence <cole@colelawrence.com>
2022-06-09 19:05:25 +02:00
Fülöp Kovács
d7fc381137 Make the keyframes dots smaller on hover 2022-06-08 19:12:05 +02:00
Fülöp Kovács
9b3031f0cc Make the dot bigger when the inline editor popover is open 2022-06-08 19:12:05 +02:00
Fülöp Kovács
6c943e176d Use a different color when a keyframe is selected AND the inline editor popup is open 2022-06-08 19:12:05 +02:00
Fülöp Kovács
5ce01e8350 Add initial solution for highlighting the keyframe that is being edited in the inline editor popup 2022-06-08 19:12:05 +02:00
Andrew Prifer
a90aee96f5
Fix aggregate keyframe dragging stopping in an edge case when the key for the drag element changes (#189)
Co-authored-by: Cole Lawrence <cole@colelawrence.com>
2022-06-08 18:57:58 +02:00
Fülöp Kovács
6b0b9f0ba6 Fix styling inconsistencies 2022-06-08 14:49:47 +02: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
b323588d78
Perfect snapping behavior for all snap targets (#203)
Co-authored-by: Andrew Prifer <AndrewPrifer@users.noreply.github.com>
2022-06-08 12:55:55 +02:00
Elliot
3b3a1b1d8a
Update selection colors (#200) 2022-06-07 17:14:14 +02:00
vezwork
fe12216ac8 Fix incorrect selection.delete on connector
Co-authored-by: Andrew Prifer <AndrewPrifer@users.noreply.github.com>
2022-06-07 08:05:22 -04: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
Aria Minaei
e0359cb4b0 Make it possible to start selections from below the dope sheet's rows 2022-06-06 12:34:30 +02:00
Andrew Prifer
c0fd71e4f9
Perfectly precise selections (#195)
Co-authored-by: Aria Minaei <aria.minaei@gmail.com>
2022-06-06 12:24:50 +02:00
Fülöp
c33467b4d0
Fix the height of the "new update"-text (#191)
Make sure that the version number of the container does not overflow to the next menu item
2022-06-01 21:42:12 +02:00
Aria Minaei
f8bb2d7ae6 0.5.0-rc.1 2022-06-01 15:51:33 +02:00
Andrew Prifer
763d37aee3
UI fixes (#187)
Co-authored-by: Aria Minaei <aria.minaei@gmail.com>
2022-06-01 14:46:37 +02:00
Aria
a9e86113ba
A basic update checker (#186) 2022-05-31 23:19:42 +02:00
Andrew Prifer
832c128c43 Fix react dep list 2022-05-30 13:17:33 -04:00
Cole Lawrence
eb15229463 Reorganize AggregateKeyframeEditor 2022-05-30 13:17:33 -04:00
Cole Lawrence
f222cc61dd fix: Ensure that AggregateKeyframes don't get recreated when dragging
Co-authored-by: Andrew Prifer <2991360+AndrewPrifer@users.noreply.github.com>
2022-05-30 13:17:33 -04:00
Cole Lawrence
243e77efe8 refactor/fix usePopover: dragging and closing when distant 2022-05-30 13:17:33 -04:00
Cole Lawrence
1862625433 docs(usePointerCapturing): Add info about why 2022-05-30 13:17:33 -04:00
Cole Lawrence
782e0f621e doc: Why useLockFrameStampPosition in useDragForSingleKeyframeDot
Co-authored-by: Andrew Prifer <2991360+AndrewPrifer@users.noreply.github.com>
2022-05-30 13:17:33 -04:00
Cole Lawrence
07febee992 fix: useLockFrameStampPosition not enough deps
Co-authored-by: Andrew Prifer <2991360+AndrewPrifer@users.noreply.github.com>
2022-05-30 13:17:33 -04:00
Cole Lawrence
adc712c205 refactor(layout): less needed for getDragHandlers
Co-authored-by: Andrew Prifer <2991360+AndrewPrifer@users.noreply.github.com>
2022-05-30 13:17:33 -04:00
Cole Lawrence
a5472e1047 docs + Nominals for ephemeral project root 2022-05-30 13:17:33 -04:00
Aria Minaei
9d767a08ac Hotfix for the aggregate tracks not getting updated on changes
Co-authored-by: Fülöp <fulopkovacs@users.noreply.github.com>
2022-05-30 16:43:01 +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
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
Elliot
cfbb6ab043 multi-curve curve popover editing (#176)
Co-authored-by: Aria Minaei <aria.minaei@gmail.com>
2022-05-25 21:28:17 +02:00
Andrew Prifer
0690a85ae2
UI improvements/sidebar pinning (#175)
Co-authored-by: Aria Minaei <aria.minaei@gmail.com>
2022-05-25 20:42:01 +02:00
Aria
ec18687a98
Re-do bundling, compat tests, and extension API (#174) 2022-05-25 00:37:18 +02:00
Cole Lawrence
e28a084dbb fix(studio): Duplicate keys in NamespaceTree 2022-05-20 12:02:38 -04:00
Cole Lawrence
9cf5c38aee
fix: useDrag now properly updates isDragging for React cycle (#173) 2022-05-20 17:36:25 +02:00
Cole Lawrence
bfc877ca8f style(OutlinePanel): remove hover highlight from .not-selectable header 2022-05-20 07:46:17 -04:00
Cole Lawrence
6b18054750 Add namespacing to Outline Panel 2022-05-20 07:46:17 -04:00
vezwork
0fa9608587 docs: add comment about topSoFar 2022-05-20 07:37:35 -04:00
vezwork
b84f2eb106 Refactor collapsing to be calculated in tree.
Co-authored-by: Fülöp <fulopkovacs@users.noreply.github.com>
2022-05-20 07:37:35 -04: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
6fd718a6e7 refactor: Remove unused styled components in PropWithChildrenRow 2022-05-20 07:37:35 -04:00
Cole Lawrence
79f2424a8a refactor for useTooltip remove unnecessary as $IntentionalAny 2022-05-20 07:37:35 -04:00
Cole Lawrence
9400aa12a1 refactor: Assorted VFCs, dead code removal, use Nominals in ahistoric 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
5d61060828 fix(useDrag): Refactor to separate detection
* Remove unecessary `modeRef`
 * Use "Domain modeling" principles to enforce state
2022-05-19 13:15:05 -04:00
vezwork
1f7206a66f Replace few usages of useRefAndState with useState 2022-05-19 13:15:05 -04:00
vezwork
c5ccb8c28d Add shouldPointerLock to useDrag, BasicNumberInput 2022-05-19 13:15:05 -04:00
vezwork
b547282d95 Remove DraggableArea in favor of useDrag 2022-05-19 13:15:05 -04:00
Don McCurdy
386a8fafac
theatre/r3f: Allow physical lighting in snapshot viewport (#114)
Co-authored-by: Andrew Prifer <andrew.prifer@gmail.com>
2022-05-19 12:48:59 +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
e140bb6fc4
docs: Minor adjustments to Curve docs (#160) 2022-05-16 07:53:56 -04:00
Elliot
bd110ed01a
Add input selection on curve change (#158) 2022-05-13 13:18:00 -04:00
Elliot
cd9d03076b
Fix curveEditorPopover overwriting existing curve (#151)
* Fix curveEditorPopover overwriting existing curve

* Fix existing curve overwrite, other reactivity
2022-05-10 13:14:32 -04:00
Aria Minaei
417233a7c6 Fix the color inconsistency that shows up when dragging the focus range 2022-05-10 18:56:43 +02:00
Aria Minaei
7ce3111e07 Fix the cursor for the middle-button drag gesture 2022-05-10 18:29:03 +02:00
Aria Minaei
202b61c48c Simplify useDrag()'s API and implement middle-button dragging in SequenceEditor 2022-05-10 15:31:16 +02:00
Aria Minaei
e12d495f29 Fix the bug where small wheel events would leak to cause unwanted scroll 2022-05-10 15:27:43 +02:00
Aria Minaei
ab8361d24a Document VerticalScrollContainer 2022-05-10 15:26:28 +02:00
Cole Lawrence
8c271d187d marker: Optimize MarkerVisualDot svg
Co-authored-by: Aria Minaei <aria.minaei@gmail.com>
2022-05-09 09:23:53 -04:00