Commit Graph
715 Commits
Author SHA1 Message Date
Oleg Isonen 385ac6983b use zod as peer and dev deps 2022-11-18 14:26:26 +01:00
Oleg Isonen bda114b4e3 move tree utils again back to project
someone merged them back into app after they were moved to project
2022-11-18 14:01:19 +01:00
Oleg Isonen 33160e6632 move css-data to a package 2022-11-17 21:12:39 +01:00
Oleg Isonen 7d74fb51ef emove stitches from sdk 2022-11-17 03:39:37 +01:00
Oleg Isonen 80a30a2b20 render fonts using css engine 2022-11-17 03:13:03 +01:00
Oleg Isonen b2be37487d reuse the namespace for id 2022-11-16 21:35:15 +01:00
Oleg Isonen 66fa251fda use dynamicLinks from remix-utils to handle link tags and ssr generated css 2022-11-15 21:56:09 +01:00
Oleg Isonen 657b5186ae fix linter and tests 2022-11-15 16:24:29 +01:00
Oleg Isonen c66082ca89 remove breakpoints argument from createElements tree and wrapper component 2022-11-15 14:29:48 +01:00
Oleg Isonen dcc4de4beb more linter 2022-11-15 10:59:34 +01:00
Oleg Isonen 95a5e54292 remove unused stuff 2022-11-15 10:58:13 +01:00
Oleg Isonen 6d0940bf6f compile css from a route /s/css 2022-11-14 21:18:51 +01:00
Oleg Isonen e38d4f53cb Merge branch 'main' into css-engine 2022-11-13 21:42:38 +01:00
Oleg Isonen 2a0e920725 working version 2022-11-13 20:05:06 +01:00
Oleg Isonen e1986382e6 working version of the engine 2022-11-12 17:24:05 +01:00
Bogdan Chadkin c62d132098 Add more options to text editor (#442)
Ref https://github.com/webstudio-is/webstudio-designer/issues/400

- added superscript
- added subscript
- added clear formatting, used same trick as with span
- refactored interop to cover more options with less code
- convert newlines to linebreaks instead of paragraphs when convert
instances to lexical tree
2022-11-11 23:13:04 +03:00
Oleg Isonen 1a623b7e9d simplify css preview logic 2022-11-11 20:40:12 +01:00
Oleg Isonen bd341cd74c simplify usePreviewCss 2022-11-11 20:30:34 +01:00
Oleg Isonen a30b7ad5be set values over css vars 2022-11-11 16:48:53 +01:00
Roman Pominov ebeb78ad6c Fix a bug where outline does not update for inline elements (#438)
Fixes #433
2022-11-10 17:49:16 +03:00
Bogdan Chadkin 83aaba5f46 Allow span fragment in text editor (#426)
Ref https://github.com/webstudio-is/webstudio-designer/issues/400

- added span component to sdk
- added span support to text editor toolbar

Lexical has a great utility $patchStyleText which does exaactly what we
need, split selection into stylable element. Though there is a catch. It
requires to apply some styles. We do styling lazily and with clases so
it doesn't fit to trigger split. To workaroud it I instead patch with
css custom property which does not affect styling and considered a
trigger for lexical.

<img width="248" alt="image"
src="https://user-images.githubusercontent.com/5635476/201028529-0e5ec32e-a00a-43b0-899c-671f0edcad5b.png">
2022-11-10 17:15:47 +03:00
istarkov fbf8babd62 Update stories, fix bug 2022-11-09 06:08:02 +00:00
istarkov 5d1452928d Image component 2022-11-09 06:07:48 +00:00
Bogdan Chadkin 15972f8925 Allow text editor styles nesting (#423)
Ref https://github.com/webstudio-is/webstudio-designer/issues/289

Added support for styles inside links and styles inside each other.
Updates can have children updates and ids in updates become optional.

For now code is repetitive in some cases. Will be more general
eventually.

Though still we getting some complexity because lexical represents
italic and bold as single node when intersected.


<img width="413" alt="image"
src="https://user-images.githubusercontent.com/5635476/200588378-058d1042-a628-4f99-9c63-e18b9ecd5a8c.png">
2022-11-09 01:57:49 +03:00
Oleg Isonen 43453e07d6 Merge branch 'main' into 252-fonts-manager-and-fonts-selector 2022-11-07 16:14:57 +01:00
Oleg Isonen 45111b2bac Merge branch 'main' into andarist/fix-server-entries 2022-11-06 10:02:51 +01:00
Mateusz Burzyński 0a0499a821 Add sideEffects: false to packages and revert some of the changes 2022-11-05 22:17:23 +01:00
Bogdan Chadkin 0621c61354 Hydrate text editor instances
isNew and createInstance flags makes state management more complex.
Instead tree of instances updates should be idempotent.
This will let us do more straightforward mapping from lexical nodes
to designer tree.
2022-11-05 21:07:13 +03:00
Oleg Isonen f733eff20b fix reduction of the fontFamily list, needed a way to get value wtihout fallbacks 2022-11-05 18:33:14 +01:00
Oleg Isonen f56e8826b3 Merge branch 'main' into 252-fonts-manager-and-fonts-selector 2022-11-05 15:09:38 +01:00
Mateusz Burzyński bbcee5b276 Merge branch 'main' into andarist/fix-server-entries 2022-11-05 09:01:26 +01:00
Oleg Isonen fe0d3669c4 wip showing only font weights that are available
needs to understand inherited font-family as well
2022-11-04 20:15:04 +01:00
Mateusz Burzyński 67f63bdb0d Fixed detect-font.d.ts lookup 2022-11-04 19:03:51 +01:00
Oleg Isonen 2fdb44b4b0 detect font family 2022-11-04 18:02:17 +01:00
istarkov 93e9563745 Fix defaultValue to work with storybook 2022-11-04 10:21:42 +00:00
Mateusz Burzyński 1b84fd65ef Generate actual /server entries in packages 2022-11-04 09:21:48 +01:00
Oleg Isonen 6534993060 Merge branch 'main' into 252-fonts-manager-and-fonts-selector 2022-11-02 09:27:21 +01:00
Oleg Isonen ac6596ba0e Merge pull request #373 from webstudio-is/andarist/tweak-stitches-types
Tweak the Stitches module
2022-11-02 09:21:42 +01:00
Mateusz Burzyński a2a64dd33a Tweak the Stitches module 2022-11-02 09:01:49 +01:00
Oleg Isonen 86147482a4 Merge branch 'main' into 252-fonts-manager-and-fonts-selector 2022-11-01 23:17:06 +01:00
Oleg Isonen 0a8c3d8f36 delete font-face from canvas when font was deleted 2022-11-01 18:54:50 +01:00
Sultan 600eae2d08 Merge branch 'main' into fix-css-value-input 2022-10-30 16:22:33 +03:00
Sultan 24ccb57674 code review, refactor unit-less logic, error state for props that do not support units 2022-10-25 20:36:25 +03:00
Roman Pominov b0e1f09ea7 Merge branch 'main' into fix_third_party_cookies 2022-10-25 16:21:35 +04:00
Roman Pominov 6408aece04 suppressHydrationWarning 2022-10-25 16:10:01 +04:00
Roman Pominov 90b2113600 add warning in getItem 2022-10-25 16:05:15 +04:00
Andras Bacsai 77722e7be2 version++ 2022-10-25 11:35:06 +02:00
Roman Pominov a8f5792b93 embeded -> sandbox 2022-10-25 13:18:20 +04:00
Roman Pominov c1f4bfa270 apply polyfill only in Canvas 2022-10-25 13:05:46 +04:00
Roman Pominov 63d825e900 Revert "apply polyfill only in iframe"
This reverts commit a05abd6031.
2022-10-25 13:02:34 +04:00