f4b3693cfeat: Drop CommonJS output
As `@figspec/components` no longer have CJS dist.
Shota FUJI
authored at
Shota FUJI
comitted at
0f4646b4feat: Upgrade to Figspec v2
`@lit-labs/react` is also needed to upgrade because somehow the old
version is not able to detect properties correctly and sets props as
attributes (attribute usage is not supported in Figspec v2).
Shota FUJI
authored at
Shota FUJI
comitted at
495f0b54chore: Fix release workflow cannot publish the package
...again. I forgot the fact Yarn ignores npm config.
Shota Fuji
authored at
Shota Fuji
comitted at
5dc5fa6cdocs: Fix CHANGELOG content to align with keepachangelog
I didn't noticed there are links at the bottom...
Shota Fuji
authored at
Shota Fuji
comitted at
c7137440chore: Upgrade `@figspec/components` to v1.0.1
https://github.com/pocka/storybook-addon-designs/issues/161#issuecomment-1208178843
In order to avoid importing `copy-to-clipboard` package, which was
[removed](https://github.com/pocka/figspec/pull/36) at v1.0.1.
That package is written CJS so v1.0.0 ESM build does not work
at all.
Shota Fuji
authored at
Shota Fuji
comitted at
caed0004chore: Add `repository` field to package.json
This is helpful. Why did I leave this field missing?
Shota Fuji
authored at
Shota Fuji
comitted at
323fc9d9docs: Update README.md
* I love badges.
* More friendly installation section.
* Place a link for `@figspec/components` as there are none.
Shota Fuji
authored at
Shota Fuji
comitted at
4ec53c79chore: Use Yarn v3
Yarn v1 is deprecated.
I ended up adding
[this](https://github.com/sachinraja/yarn-plugin-postinstall-dev)
plugin due to Yarn berry no longer support `prepare` script.
Good plugin.
Shota Fuji
authored at
Shota Fuji
comitted at
0c278967chore: Configure prettier and hooks
These were root package.json in monorepo.
Shota Fuji
authored at
Shota Fuji
comitted at
794b8922fix: Remove type params from `createComponent`
`@lit-labs/react@1.0.3` [0] introduced a breaking change for typings.
- Before: 2nd type param is `Record<string, (e: Event) => void>`
- After: 2nd type param is `Record<string, string>`
(both simplified)
Because we can't omit the 2nd type parameter, I deleted both type
parameters. These were only for preventing typo at 4th parameter, do not
affect to exported typing as there are already `as unknown as ...`.
[0]: https://github.com/lit/lit/blob/93b30f7de81eb203ad88abfc1e0e87a719d132c5/packages/labs/react/CHANGELOG.md#103
Shota Fuji
authored at
Shota Fuji
comitted at
fe86446frefactor: Move workspace-d dir to root
In order to retain git history as much as possible, changes to files
are minimized (will be in separated commits).
Shota Fuji
authored at
Shota Fuji
comitted at
abb01ba7chore: Remove scripts/
This package is just a binding. Rendering tests should be done on
`@figspec/components`.
Shota Fuji
authored at
Shota Fuji
comitted at
f8308400refactor: Quit monorepo (remove components dir)
* Each package don't recieve frequent updates.
* Uses independent versioning.
* Create tags and releases has been hard.
* It's far easier to manage devDependencies in single repo than in
monorepo. No need to worry about mixing Storybook versions.
* User friendly.
Shota Fuji
authored at
Shota Fuji
comitted at
5b68255dtest: Move @types/react devDeps to correct place
I needed to add `skipLibCheck` because a lot of React packages
Storybook internally uses start emitting errors due to changes
between `@types/react@16` to `@17` and/or `@18` (...probably.
I immediately turned on `skipLibCheck` after seeing
"Found 180 errors.", without investigation).
Shota Fuji
authored at
Shota Fuji
comitted at
afa8fad3test(react): Use React@18 for Storybook
To ensure this package works with React 18.
Shota Fuji
authored at
Shota Fuji
comitted at
fd11a1d2Merge pull request #43 from brettdewoody/41-support-react-18
Add React 18 as peer dependency.Shota FUJI
authored at
GitHub
comitted at
bbe9ce67feat(components): Basic touch gestures
https://github.com/pocka/figspec/issues/3
Added a dead simple touch gestures.
Shota Fuji
authored at
Shota Fuji
comitted at
d0e35457docs(components): Update TODO comment
To reflect the current state correctly.
Shota Fuji
authored at
Shota Fuji
comitted at
311b1aaddocs: Update README
Simplified. Remove bloated feature goals.
Shota Fuji
authored at
Shota Fuji
comitted at
404f5196chore(components): Declare lit-html as a regular dependency
https://github.com/pocka/figspec/issues/29
Removed the use of transitive dependency in the package. Now works
on PnP-ed projects without any configuration.
Shota Fuji
authored at
Shota Fuji
comitted at
9547cdf2fix(components): Use Figma's default background colour
https://github.com/pocka/figspec/issues/24
Shota Fuji
authored at
Shota Fuji
comitted at
fc0c6894Merge pull request #25 from yannbf/feat/add-link-figspect-react
Feat(@figspec/react): add link propShota Fuji
authored at
GitHub
comitted at
9330dbdeMerge pull request #26 from yannbf/fix/footer-position
fix: apply correct zindex and border to footer and sidebarShota Fuji
authored at
GitHub
comitted at
15584f99Merge pull request #23 from yannbf/fix/component-variants
fix: add check for component variant node typeShota Fuji
authored at
GitHub
comitted at
e24510cfMerge pull request #21 from yannbf/feature/figma-footer
Feat: add Figma metadata footerShota Fuji
authored at
GitHub
comitted at
bd44a995deps: Mark copy-to-clipboard as direct dependency
https://github.com/pocka/figspec/issues/19
Added "copy-to-clipboard" package to "dependencies" section. It's
added locally by @storybook/ui so builds passed.
Shota Fuji
authored at
Shota Fuji
comitted at
02758bb8feat: Support for MacOS Safari pinch gesture
This commit adds support for MacOS Safari's non-standard GestureEvent.
See more for GestureEvent at: https://developer.apple.com/documentation/webkitjs/gestureevent
NOTE: The gesture does not perform zoom-at-point due to lack of offset
point in the events
https://github.com/pocka/figspec/issues/2
close #2
Shota Fuji
authored at
Shota Fuji
comitted at
d12f56b2fix: "Fix" ugly error UI
https://github.com/pocka/figspec/issues/10
Previous error UI is not clearly different than normal views.
This commit "fixes" the UI and improve readability.
Added a new CSS variable: --figspec-viewer-error-color
close #10
Shota Fuji
authored at
Shota Fuji
comitted at
061f2204fix(components): Specify z-index on page selector
Prevent canvas contents overlapping control UI, which visible for
<figspec-file-viewer/>.
Shota Fuji
authored at
Shota Fuji
comitted at
669eb592fix(components): Disable canvas interaction on inspector
https://github.com/pocka/figspec/pull/12#issuecomment-754766352
Since event handlers listens at a root of the CustomElement, gestures
working even on the inspector panel. This commit prevents these gestures
from working on the inspector panel by adding `stopPropagation`.
The "space+drag" functionallity, on the other hand, can't be prevented
because it's registered via `onmouse~` but I don't think it's critical
for UX.
I also fixed some elements' sizing so they could scroll and be sized
properly.
Shota Fuji
authored at
Shota Fuji
comitted at
dfd433ccMerge pull request #12 from yannbf/feature/inspector-view
Feature/inspector viewShota Fuji
authored at
GitHub
comitted at
bdca799cMerge pull request #18 from pocka/fix/react-jsx-transform
Do not use new JSX transformShota Fuji
authored at
GitHub
comitted at
593c1f69chore: Explicitly specify typing files
Even though TypeScript catches typing files, npmjs.com cannot detect
whether the package has TypeScript typings.
Shota Fuji
authored at
Shota Fuji
comitted at
dfe5a51aMerge pull request #13 from pocka/feature/react-binding
React bindingsShota Fuji
authored at
GitHub
comitted at
3524be23Merge pull request #11 from pocka/feature/initial-zoom-level
Initial zoom levelShota Fuji
authored at
GitHub
comitted at
1f3fdd1fchore: Do not flag src/index.ts as pure
Without specifying the file in package.json#sideEffects, webpack used by
build-storybook marks the file as side-effect free and omits it!
Shota Fuji
authored at
Shota Fuji
comitted at
569c3f80Merge pull request #9 from yannbf/feature/add-drag
Feature: add drag functionality like figmaShota Fuji
authored at
GitHub
comitted at
d8991c59refactor: Use single customElement for preview
Use only <figspec-viewer> instead of with <figma-viewer-guide>.
This reduces maintenance costs and makes modifying the codebase more
easy.
I also changed the DOM structure to rendering guides and tooltips
inside one single <svg> container for simplicity (and for performance,
hopefully).
Shota Fuji
authored at
Shota Fuji
comitted at
2a57a999refactor: figma-viewer -> figspec-viewer
To match the package name. Also avoids conflict with future (possible)
official custom elements.
Shota Fuji
authored at
Shota Fuji
comitted at
f06f1246feature: add drag like figma
Figma provides drag functionality when holding space, so does other tools.
Functionality is added to match that.
Yann Braga
authored at
Yann Braga
comitted at
c53ff5femisc: Mark non-public properties as private
Almost every public accesible properties are caught by
web-component-analyzer and appears on Docs table. Some getters and
inherited public properties are not intended to be used by users.
Shota Fuji
authored at
Shota Fuji
comitted at
b6d4e733feat: Initial zoom level
https://github.com/pocka/figspec/issues/1
Sets initial zoom level based on element's size. This might not be same
as Figma's behavior, but it's convenient.
Shota Fuji
authored at
Shota Fuji
comitted at
4184ab6efeat(react): React bindings
You can use WebComponents (custom elements) in React, but the experience
is not great. No props binding (React uses setAttribute), Poor type
definition (JSX does great job though), Imperative event handling,
etc...
This bindings aim to solve these inconveniencies.
Shota Fuji
authored at
Shota Fuji
comitted at
af9a7942perf: Does not compute node related stuff each render
https://github.com/pocka/figspec/issues/7
Only performe flattening the node tree, determining outermost
bounding rect and construct distance-lines when related values have
updated. From what I saw, this change stabilizes an average FPS and
makes a memory usage more mild (less GC sweep).
Shota Fuji
authored at
Shota Fuji
comitted at
1f79281arefactor(components): Delegate viewer functionalitty into mixin
Shota Fuji
authored at
Shota Fuji
comitted at
cc281367refactor(components): Slim down figspec-viewer
In order to add file viewer feature, I needed to split non-nodes related
codes out from <figspec-viewer>. This commit does:
1. Make error UI as component (View function)
2. Move pan/scale related things out as a mixin
With a little more cleanup, I can add file viewer feature without a
bunch of duplicated code :)
Shota Fuji
authored at
Shota Fuji
comitted at
50c3e78bfeat: add figma footer
- Present a footer with metadata of the figma file such as
title, timestamp and a link to open on Figma
Yann Braga
authored at
Yann Braga
comitted at
d9025cc3fix: apply correct zindex and border to footer and sidebar
- The footer should be above the design, but below the sidebar
Yann Braga
authored at
Yann Braga
comitted at
3a4ddeb7feat: add link property
- Figspect will now present a footer with component meta in case link is passed
Yann Braga
authored at
Yann Braga
comitted at
b5180d5brefactor(react): Use @lit-labs/react
https://github.com/pocka/figspec/issues/34
The existing glue code was working okay. However, adding property or
attribute to the element is daunting and easy to misconfigure.
I replaced the code with new integration package provided by official
lit maintainers for maintanability reasons.
I kept type signatures to make sure this change does not break users'
type checking accidentally.
close #34
Shota Fuji
authored at
Shota Fuji
comitted at