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() }))`)
This commit creates `x.x.x-insiders.COMMIT_HASH` builds of all of our public packages, and publishes them to npm with the `insiders` tag, so one could say `npm install @theatre/core@0.4.8-insiders.bsdf387` and use the package at that particular commit.
Co-authored-by: Aria Minaei <aria.minaei@gmail.com>
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>
* 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>
* Support multiple/nested sheets and sheet instances
* Add playground for instances
* Fix playground and example
* Change r3f's objectKey to storeKey to avoid confusion
* Update all editable/uniqueName variables used as store key to storeKey too
* Fix lint warnings
* Use more Nominal types to help with internal code id usage consistency
* Broke apart StudioHistoricState type
Co-authored-by: Aria <aria.minaei@gmail.com>