4113 Commits
Author SHA1 Message Date
Ivan Starkov 3fa4afa269 ci: Semantic pull request titles (#2339)
## Description


![image](https://github.com/webstudio-is/webstudio/assets/5077042/153ccdcf-d459-49f0-b880-4f85ea23b030)

## Steps for reproduction

Change title of this PR to be non semantic see comment.

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
doff
2023-09-19 18:25:06 +03:00
Ivan Starkov fffc332076 [Misc] Npm Libraries Update 0.100.0 (#2338)
## Description

Npm Libraries Update 0.100.0

## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
0.100.0
2023-09-19 15:14:10 +03:00
Ivan Starkov c3e3db09a6 [Refactor] Replace Node eval Hack with Dynamic Import (#2337)
## Description

Use dynamic import instead of `node --eval`
`pathToFileURL` is used in import to support windows

## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2023-09-19 14:49:14 +03:00
Oleg Isonen 20572ead86 Preview on canvas when style panel select value is highlighted (#2328)
https://github.com/webstudio-is/webstudio/issues/2324



https://github.com/webstudio-is/webstudio/assets/52824/7489689f-92bb-4cd5-888b-748bcae2369c



## Description

With this PR all select controls get a preivew when user hovers with the
mouse or uses arrow keys.
We use select control in:
- position
- blend mode
- font-weight
- background size
- many others

In many cases preview won't be visible because cursor doesn't change
unless you actually have mouse over that element

## Steps for reproduction

1. hover over position value
2. when mouse out preview should be gone
3. arrow keys do the same
4. if value wasn't applied and select box closed - preview should reset

## Code Review

- [ ] hi @TrySound , I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2023-09-18 21:36:36 +02:00
Ivan Starkov e558a3b481 [Test] Add CI CLI Tests for Windows, Linux, and macOS (#2332)
## Description

The idea is to execute link, sync, build in the existing fixture on
linux, mac, windows and then check with
`git diff` about any changes. If changes exists then something has
broken.

## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2023-09-18 17:46:01 +03:00
Ivan Starkov 262328694d Fix Dashboard Failure Due to Tooltip (#2331)
## Description

Now works

<img width="524" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/7e5acfb3-3f3d-497f-86ee-b86a5aa47af0">

## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2023-09-18 14:55:49 +03:00
Ivan Starkov b538b74ef2 Enable CLI Usage in CI Environment (#2321)
## Description

- Allow overriding default templates with custom external or internal
ones.
- Ensure exact dependencies, e.g., workspace:* instead of workspace:^,
to address beta release issues.
- Enable passing buildId, authToken, and origin via flags during sync.
- Rename "host" to "origin" in the CLI.

Most code is custom template.

- [x] - Tested at SaaS

## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2023-09-18 14:54:14 +03:00
Bogdan Chadkin c62b1a2b20 Add form fixture (#2329)
Forms have special behavior so here added fixture to test what is
generated for them.

Found default forms would fail on submit.
2023-09-18 11:45:25 +04:00
Bogdan Chadkin 2b52c53cbf Generate stories with new jsx component generator (#2322)
Here added "sdk-cli" package with "generate-stories" command which looks
for metas and generate stories from each one with template. This give us
more insight how component would look like on published sites.

Also removed old stories and added custom id support into embed template
to make stories ids stable.

Can be tested in local storybook
2023-09-17 17:59:54 +04:00
Bogdan Chadkin 72c6b286ac Fix remix watcher (#2327)
Need to use slightly different glob for watching packages. `**` means
anything between slashes and `**.js` in the end looks like `**/.js`
2023-09-17 16:50:17 +04:00
Oleg Isonen 622b77b9b4 Fix font item cursor (#2326)
## Description

Currently it was showing text cursor in font manager font item

## Steps for reproduction

1. open font manager
2. hover font item
3. cursor should be default, not text

## Code Review

- [ ] hi @TrySound , I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2023-09-17 12:23:12 +02:00
GoharAkramandBogdan Chadkin 84df46f465 Update README.md (#2320)
Changes that I made:
1. Updated "workspace project" to "Cloud"
2. Edited for typos
3. Added vercel main link
4. Added line in second last section saying that we will have more
deployment targets in future.

## Description

1. What is this PR about (link the issue and add a short description)

## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory

---------

Co-authored-by: Bogdan Chadkin <trysound@yandex.ru>
2023-09-17 14:28:43 +05:00
Bogdan Chadkin 1c7df48925 Pregenerate forms properties (#2323)
Here decoupled actions from props data in runtime by generating prepared
forms data. It will let us get rid of props after migrating to jsx
generator.
2023-09-17 12:15:56 +04:00
markxtang 49f8358bae Update figma-design-tokens.json (#2272)
Added color tokens for "link" and "link-visited"

## Description

1. What is this PR about (link the issue and add a short description)

## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2023-09-16 17:43:30 +02:00
Bogdan Chadkin 706a590c2b Use new data sources in jsx component generator (#2318)
Here reused new data sources generator to produce
hurman readable page components and leverage builtin React.useState
instead of nanostores.
2023-09-16 14:31:13 +04:00
Bogdan Chadkin 75f72eeccf Drop legacy data sources from builder (#2319)
Here removed all left usages of previous data sources implementation and
removed no longer used expression utilities.
2023-09-16 14:17:10 +04:00
Bogdan Chadkin 8f00d5af2e Generate human readable data sources and actions (#2312)
Scope utility give us a way to generate more readable data sources and
actions. Here variables, expressions and actions are output into the
same map.

In the future same utility can be used to produce framework specific
stores like React.useState.

See fixtures for example.
2023-09-14 20:13:36 +04:00
Ivan Starkov 98c2226a8e Use eval to parse shared consts during prebuild, add windows support (#2315)
## Description

Read constants.mjs during prebuild step and use that constants. (need
for saas and other templates)

Fixes windows version of cli. Now everything works on windows platform
too.
Changes:
using `execa` instead of `exec`
using `import { fileURLToPath } from "node:url";` instead of
url.pathname
do not using `join` for import generation


<img width="975" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/761cd741-d609-48ef-a54a-027fe3f0d49f">
<img width="975" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/52c9f2d7-4389-4bb6-8fa7-5329a4b6d9c8">
<img width="972" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/cb5d2c1d-34d9-412d-942e-c78276c9dd6c">


## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2023-09-14 10:15:57 +03:00
Bogdan Chadkin f15ea30ae1 Add jsx component generator (#2291)
Here added jsx component generator. It allows us to have less tree
traversing and more clear output for debugging.

For now data sources are managed the old way with stores. In the future
we can switch to react `useState`.

In the future will be integrated into stories generator and cli
2023-09-14 00:02:58 +04:00
Bogdan Chadkin 0784f0465d Replace sharp with image-size (#2303)
Sharp is image processing library. Though we use it only to detect
format and size of images. Proocessing is done on build step or on
request by vercel or cloudflare.

Here I replaced sharp with smaller and simpler alternative designed
specifically for format and size detection. Potentially this library can
be used for uploading in worker.

https://github.com/image-size/image-size

```diff
du -ckd1 node_modules
- 680068
+ 659988
Packages
- 1983
+ 1962
```
2023-09-13 19:09:11 +04:00
Ivan Starkov 7343a7fc57 Remove templates and build:templates (#2308)
## Description

Merge after release

## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2023-09-13 17:29:37 +03:00
Ivan Starkov 015bc46732 Add beta publish (#2311)
## Description

Publish npm to `xxx` tag every time you add Label `publish:xxx` to your
PR
To republish remove label and add again.


<img width="387" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/45defb60-b710-4966-a171-7f5389cdea50">

If we would need to republish on every commit since published we would
need to use `contains(github.event.pull_request.labels.*.name,
'publish:')` check


## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2023-09-13 16:36:51 +03:00
Oleg Isonen 1f2570ab72 Add video to the readme (#2313)
Add video to the readme
2023-09-13 13:15:28 +02:00
Ivan Starkov 145f1c0b69 NPM Update 0.99.0 (#2310)
## Description

packages update

## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2023-09-13 09:08:36 +03:00
Ivan Starkov d21c93d79b Fix image loader warning in cli (#2309)
## Description

Remove warning


![image](https://github.com/webstudio-is/webstudio/assets/5077042/f0994436-c2a3-4dc7-8e96-600d1aa74928)

## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2023-09-12 20:04:06 +03:00
Jaya Krishna Namburu 1c3e085ad8 Fix folder name prompt in the cli init flow (#2306)
## Description

Removed a default `folderName` prompt that is not needed. We need to
check for folder name only when the config is missing.

## Code Review

- [ ] hi @kof, I need you to do
 - detailed review (read every line)

- [ ] hi @istarkov , I need you to do
 - detailed review (read every line)
2023-09-12 17:32:54 +02:00
Oleg Isonen c5493c557d Add a link to CLI docs in the export dialog (#2305)
## Description

Added a link to the CLI docs
<img width="361" alt="Screenshot 2023-09-12 at 16 49 15"
src="https://github.com/webstudio-is/webstudio/assets/52824/1d12e25f-a523-46e4-9887-54c274216ec5">
2023-09-12 17:24:13 +02:00
Bogdan Chadkin f67b0bd9b0 Expose form state change with action (#2295)
Internal data sources updates complicate code generation Here changed
forms too expose onStateChange action instead of implicit data source
update.

Added migration to add the action to every existing form. Tested locally
both new and migrated forms.
2023-09-12 17:33:50 +04:00
Bogdan Chadkin 36f7714df8 Release 0.98 (#2304) 2023-09-12 15:29:54 +04:00
Oleg Isonen 1d48b5ba61 Improved CLI wording based on user testing (#2300) 2023-09-12 12:39:16 +02:00
Bogdan Chadkin 3bc2adf616 Limit images formats to upload (#2302)
Cloudflare supports only jpeg, png, gif, webp and svg as input. We
should forbid any other format.
2023-09-12 14:35:34 +04:00
Ivan Starkov d41534552c Add raw image upload support to the cli (#2301)
## Description

Using format=raw at the prebuild

## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2023-09-12 13:24:37 +03:00
Ivan Starkov 7835607f4e Add vercelignore to templates (#2299)
## Description

This avoid uploading builds/caches etc onto vercel

## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2023-09-12 07:59:35 +03:00
Ivan Starkov a46367357c 0.97.0 release (#2298)
## Description

0.97.0 release

## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2023-09-11 21:21:55 +03:00
Ivan Starkov 53c97d8d18 Vercel image optimisation support (#2297)
## Description

CLI support of vercel image optimisation


## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2023-09-11 21:03:02 +03:00
Ivan Starkov 4b1ed5fc73 Make route-templates typeable (#2296)
## Description

Now route-templates is normal ts file. And can be typechecked

## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2023-09-11 18:53:11 +03:00
Bogdan Chadkin 4c7cb84629 Release 0.96 (#2293) 0.96.0 2023-09-09 21:14:37 +04:00
Bogdan Chadkin 7d37d4ad9a Bundle cli packages (#2292)
Here changed build command to bundle all cli packages so we would not
need to resolve .js extensions in es modules. This will fix ubuntu,
windows and node 20 usages.
2023-09-09 20:42:34 +04:00
Jaya Krishna Namburu 0de3bca350 Escape special characters in route names in cli projects (#2288) 2023-09-09 16:03:11 +05:30
Bogdan Chadkin 88dd24ff7d Move pubsub from sdk to builder (#2280)
Pubsub is only used for builder/canvas communication while sdk is
responsible for rendering sites.
Here moved pubsub to builder. Now we can drop nanoevents from cli
dependencies.
2023-09-08 20:56:46 +04:00
Jaya Krishna Namburu ddff32b7ab Throw error message if the project config is missing in the users env when using cli (#2289)
…when using cli

## Description

Adds a error message when the project config like, `host` and `token`
are missing from the root.

## Code Review

- [ ] hi @TrySound , I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
2023-09-08 16:56:32 +02:00
Bogdan Chadkin 7d7c56e73a Fix radix imports generation (#2287)
Used wrong import name.
Added accordion fixture to see issues in the future
2023-09-08 17:53:02 +04:00
Ivan Starkov f0c866aa99 Fixes dev mode (#2286)
## Description

Do not run dev inside `./fixtures` folder

## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2023-09-08 15:01:53 +03:00
Ivan Starkov 576382bd8d Fix local install of cli binaries (#2285)
## Description

Fixes local installation of cli 
The issue was that at `pnpm install` 
`./lib/bin.js` wasn't exists.

Solution is to create it and forward all calls to `./lib/bin`


## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2023-09-08 15:01:44 +03:00
Bogdan Chadkin 813919baa1 Release 0.95 (#2284) 2023-09-08 14:46:36 +04:00
Bogdan Chadkin 9272b4eadf Simplify generated remix overrides (#2283)
Here replaced Object.assign logic with overriding components at build
time. This will simplify migration to jsx generator and let bundler load
less components.

Changed fixture to include link from remix overrides.

<img width="487" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5635476/8ba87f70-9edd-4b92-bf28-8457eea3b5c9">
2023-09-08 14:37:25 +04:00
Oleg Isonen f6460ae0bf Rename CLI to webstudio-cli (#2282)
As per discussion renaming it to be usable consistently with less typing
using npx webstudio-cli as well as pnpm webstudio-cli
2023-09-08 12:24:06 +02:00
Oleg Isonen 35e58f39d6 Fix bugs link (#2278)
## Description

After renaming the link was pointing to the wrong repo
2023-09-08 12:14:21 +02:00
Bogdan Chadkin 3000c90367 Trick remix checks and avoid useless warnings (#2281)
Remix do a few things wrong. Here it checks for dependencies to be
present using commonjs only utility which fails to resolve. esm only
packages.

Here I tricked it to resolve "require" export condition. Though it is
dangerous as may give impression our packages has commonjs support.
2023-09-08 12:19:55 +04:00
Ivan Starkov 4753c2ac46 Fix shared link name is not editable (#2279)
## Description

Shared link name is not editable because every input change closes
popover with the input.

Here is the fix and the explanation.

This is already fixed in rc radix versions and will be in the next
stable release

https://github.com/radix-ui/primitives/blob/28bebf2c6992d056244845c898abeff45dec2871/packages/react/focus-scope/src/FocusScope.tsx#L115

Without this PR the issue looks:

Editing input 
<img width="353" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/b6ba547c-4286-45f2-b351-9122780cb482">
cause this button 
<img width="216" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/4d6a26c3-3336-4995-b0b4-c38200e34e07">
to switch onto `pending` state
<img width="211" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/f214d9a9-3454-4b1b-8603-48224fa370d1">
what cause handleMutations to move focus onto parent popover 
Child popover lost focus and closes.


## Steps for reproduction

Click Share, Edit link name, see it works

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2023-09-08 10:13:09 +03:00