@ethlete/cli 2.1.0-next.8 → 3.0.0-next.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (128) hide show
  1. package/CHANGELOG.md +93 -0
  2. package/README.md +22 -7
  3. package/design/define-call.ts +92 -0
  4. package/design/web/env.d.ts +11 -0
  5. package/design/web/frame.html +17 -0
  6. package/design/web/frame.ts +44 -0
  7. package/design/web/host.css +494 -0
  8. package/design/web/host.ts +445 -0
  9. package/design/web/index.html +11 -0
  10. package/package.json +13 -2
  11. package/src/index.d.ts +1 -0
  12. package/src/index.js +32 -4
  13. package/src/index.js.map +1 -1
  14. package/src/lib/api/clear.js +13 -3
  15. package/src/lib/api/clear.js.map +1 -1
  16. package/src/lib/api/compose.js +5 -1
  17. package/src/lib/api/compose.js.map +1 -1
  18. package/src/lib/api/git.d.ts +11 -4
  19. package/src/lib/api/git.js +35 -8
  20. package/src/lib/api/git.js.map +1 -1
  21. package/src/lib/api/load-definitions.js +10 -1
  22. package/src/lib/api/load-definitions.js.map +1 -1
  23. package/src/lib/api/ports.js +12 -3
  24. package/src/lib/api/ports.js.map +1 -1
  25. package/src/lib/api/run.js +8 -3
  26. package/src/lib/api/run.js.map +1 -1
  27. package/src/lib/api/setup.js +1 -1
  28. package/src/lib/api/setup.js.map +1 -1
  29. package/src/lib/api/state.js +7 -5
  30. package/src/lib/api/state.js.map +1 -1
  31. package/src/lib/auth/composer-auth.js +3 -2
  32. package/src/lib/auth/composer-auth.js.map +1 -1
  33. package/src/lib/auth/gitlab-token.js +1 -1
  34. package/src/lib/auth/gitlab-token.js.map +1 -1
  35. package/src/lib/config/diagnose.js +15 -9
  36. package/src/lib/config/diagnose.js.map +1 -1
  37. package/src/lib/config/local-config.d.ts +1 -1
  38. package/src/lib/design/calls-tsconfig.d.ts +6 -0
  39. package/src/lib/design/calls-tsconfig.js +37 -0
  40. package/src/lib/design/calls-tsconfig.js.map +1 -0
  41. package/src/lib/design/check.d.ts +11 -0
  42. package/src/lib/design/check.js +203 -0
  43. package/src/lib/design/check.js.map +1 -0
  44. package/src/lib/design/design-command.d.ts +10 -0
  45. package/src/lib/design/design-command.js +32 -0
  46. package/src/lib/design/design-command.js.map +1 -0
  47. package/src/lib/design/index.d.ts +5 -0
  48. package/src/lib/design/index.js +9 -0
  49. package/src/lib/design/index.js.map +1 -0
  50. package/src/lib/design/paths.d.ts +24 -0
  51. package/src/lib/design/paths.js +31 -0
  52. package/src/lib/design/paths.js.map +1 -0
  53. package/src/lib/design/serve.d.ts +7 -0
  54. package/src/lib/design/serve.js +144 -0
  55. package/src/lib/design/serve.js.map +1 -0
  56. package/src/lib/design/vite-paths.d.ts +7 -0
  57. package/src/lib/design/vite-paths.js +15 -0
  58. package/src/lib/design/vite-paths.js.map +1 -0
  59. package/src/lib/doctor/doctor-command.js +18 -4
  60. package/src/lib/doctor/doctor-command.js.map +1 -1
  61. package/src/lib/index.d.ts +1 -0
  62. package/src/lib/index.js +1 -0
  63. package/src/lib/index.js.map +1 -1
  64. package/src/lib/release.d.ts +38 -1
  65. package/src/lib/release.js +153 -28
  66. package/src/lib/release.js.map +1 -1
  67. package/src/lib/update/agent-rules-sync.d.ts +37 -0
  68. package/src/lib/update/agent-rules-sync.js +40 -0
  69. package/src/lib/update/agent-rules-sync.js.map +1 -0
  70. package/src/lib/update/agent-setup.d.ts +33 -0
  71. package/src/lib/update/agent-setup.js +124 -0
  72. package/src/lib/update/agent-setup.js.map +1 -0
  73. package/src/lib/update/ai.d.ts +37 -8
  74. package/src/lib/update/ai.js +193 -24
  75. package/src/lib/update/ai.js.map +1 -1
  76. package/src/lib/update/args.d.ts +2 -0
  77. package/src/lib/update/args.js +22 -2
  78. package/src/lib/update/args.js.map +1 -1
  79. package/src/lib/update/available-migrations.d.ts +10 -0
  80. package/src/lib/update/available-migrations.js +23 -0
  81. package/src/lib/update/available-migrations.js.map +1 -0
  82. package/src/lib/update/commits.d.ts +63 -0
  83. package/src/lib/update/commits.js +146 -0
  84. package/src/lib/update/commits.js.map +1 -0
  85. package/src/lib/update/gitignore.d.ts +8 -0
  86. package/src/lib/update/gitignore.js +22 -0
  87. package/src/lib/update/gitignore.js.map +1 -0
  88. package/src/lib/update/index.d.ts +6 -0
  89. package/src/lib/update/index.js +6 -0
  90. package/src/lib/update/index.js.map +1 -1
  91. package/src/lib/update/migration-manifest.d.ts +10 -0
  92. package/src/lib/update/migration-manifest.js +15 -3
  93. package/src/lib/update/migration-manifest.js.map +1 -1
  94. package/src/lib/update/migration-record.d.ts +24 -0
  95. package/src/lib/update/migration-record.js +48 -0
  96. package/src/lib/update/migration-record.js.map +1 -0
  97. package/src/lib/update/migrations-command.d.ts +14 -0
  98. package/src/lib/update/migrations-command.js +212 -0
  99. package/src/lib/update/migrations-command.js.map +1 -0
  100. package/src/lib/update/package-manager.d.ts +20 -1
  101. package/src/lib/update/package-manager.js +34 -15
  102. package/src/lib/update/package-manager.js.map +1 -1
  103. package/src/lib/update/packages.d.ts +28 -8
  104. package/src/lib/update/packages.js +117 -36
  105. package/src/lib/update/packages.js.map +1 -1
  106. package/src/lib/update/pending.d.ts +16 -0
  107. package/src/lib/update/pending.js +21 -5
  108. package/src/lib/update/pending.js.map +1 -1
  109. package/src/lib/update/plan.d.ts +33 -8
  110. package/src/lib/update/plan.js +76 -7
  111. package/src/lib/update/plan.js.map +1 -1
  112. package/src/lib/update/registry.d.ts +32 -4
  113. package/src/lib/update/registry.js +145 -8
  114. package/src/lib/update/registry.js.map +1 -1
  115. package/src/lib/update/run-migrations.d.ts +2 -0
  116. package/src/lib/update/run-migrations.js +20 -15
  117. package/src/lib/update/run-migrations.js.map +1 -1
  118. package/src/lib/update/scan.d.ts +14 -0
  119. package/src/lib/update/scan.js +57 -0
  120. package/src/lib/update/scan.js.map +1 -0
  121. package/src/lib/update/semver.js +2 -1
  122. package/src/lib/update/semver.js.map +1 -1
  123. package/src/lib/update/tasks.d.ts +18 -1
  124. package/src/lib/update/tasks.js +114 -43
  125. package/src/lib/update/tasks.js.map +1 -1
  126. package/src/lib/update/update-command.d.ts +7 -0
  127. package/src/lib/update/update-command.js +300 -73
  128. package/src/lib/update/update-command.js.map +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,98 @@
1
1
  # @ethlete/cli
2
2
 
3
+ ## 3.0.0-next.16
4
+
5
+ ### Major Changes
6
+
7
+ - Breaking: `release()` takes `{ args, root?, invocation? }` and resolves to an exit code instead of exiting. `et release` tags after the release commit and takes `--message` and `--help`; `et update` names the `.npmrc` whose token was refused.
8
+
9
+ ### Minor Changes
10
+
11
+ - New `et migrations` lists the recommended and optional migrations an app has not run, and `et migrations run <package>:<name>` runs one and records it in `.ethlete/migrations.json`.
12
+ - `et update` runs only `required` migrations and points at the recommended and optional ones it left.
13
+ - `et migrations` shows the number of affected files next to each migration whose manifest entry names a `scan` generator.
14
+ - Peer dependencies are ranges (`^22.1.0` for Angular, `^7.8.0` for RxJS, ...) instead of the workspace's exact versions. `et update` says when another dist tag holds a newer major, also when the repo is up to date.
15
+
16
+ ### Patch Changes
17
+
18
+ - `et release` and `et update` now reject values on boolean flags and empty `--tag=`/`--to=`, and version comparison ignores build metadata.
19
+ - `et update --from` rejects a version that is not one, such as `core@v5.0.0`, instead of running every migration of the package.
20
+ - The call title bar no longer covers the top of a drawing: the drawing starts below it, and it fades out while the drawing scrolls down and back in on scroll up.
21
+
22
+ ## 2.1.0-next.15
23
+
24
+ ### Minor Changes
25
+
26
+ - `et update --ai` ends an interactive agent session by itself once the agent writes the task's `.finished` file, then commits the task and starts the next one. `/exit` still works.
27
+
28
+ ## 2.1.0-next.14
29
+
30
+ ### Minor Changes
31
+
32
+ - `et update` commits each step by itself - the version bump, each codemod, the agent rules sync and each finished `--ai` task - and never a file that was dirty before the run; `--no-commit` turns this off.
33
+ - `et update --ai` without `updateAgentCommand` lists the agent CLIs on `PATH` and saves the one you pick, as an interactive session or a headless run.
34
+
35
+ ### Patch Changes
36
+
37
+ - The Claude Code choices in `et update --ai` start the agent in auto mode, so it can run its checks without asking.
38
+ - `et update --ai` tells you, for each task and in the agent's last message, to type `/exit` so the next task starts.
39
+
40
+ ## 2.1.0-next.13
41
+
42
+ ### Patch Changes
43
+
44
+ - `et update` hands the migrations to the newly installed `et` when the update moves `@ethlete/cli`, so steps a newer CLI added, such as the agent rules sync, run in that same update.
45
+ - `et update` follows the dist tag that holds the newest version of the installed prerelease line, so a package that changesets published to `latest`, such as `@ethlete/agent-rules`, no longer stays on the older `next` version.
46
+
47
+ ## 2.1.0-next.12
48
+
49
+ ### Patch Changes
50
+
51
+ - `et api clear` keeps a checkout git cannot read, and `et api up` and `setup` no longer fail on output over 1 MB.
52
+ - `et api clear` also keeps a checkout with stashes or detached-HEAD commits, `checkout` never reads a branch as a flag or path, `-h` shows help, and a port held on loopback or IPv6 counts as taken.
53
+ - `ethlete api` no longer leaves an `ethlete-api-*` directory in the temp folder after each podman run.
54
+ - GitLab token checks refuse redirects, `auth.json` is narrowed before the token is written, `release` matches its flags exactly, and `doctor` reports a broken legacy config file.
55
+ - `et design check` closes the browser when the page fails, and `et design serve` resolves calls on Windows.
56
+ - `et doctor` reports an `ethlete.apis.js` that throws while it loads instead of crashing.
57
+ - `release --force` stages only the files `changeset version` changed instead of running `git add .`, so unrelated uncommitted changes stay out of the "Release versions" commit.
58
+ - `et update` passes the agent prompt through environment variables, sends `.npmrc` registry tokens, keeps CRLF line endings, skips git-ignored manifests, and rejects migration names or instructions outside the package.
59
+ - `et update` prefers the lockfile over the calling `npx`, runs package managers on Windows, and points every run to `--continue` while an update is unfinished.
60
+
61
+ ## 2.1.0-next.11
62
+
63
+ ### Minor Changes
64
+
65
+ - `et update` runs `ethlete-agents sync` after the install when it moved `@ethlete/agent-rules` and the repo has an `ethlete-agents.config.json`, so the regenerated rules and skills match the tasks the update writes.
66
+
67
+ ### Patch Changes
68
+
69
+ - `et update --ai` stops before any change when `updateAgentCommand` is missing, hands the agent a real prompt, reports each task, and works on the tasks an earlier run left.
70
+ - `et update` gitignores its task list, so a later run no longer needs `--force`, and `--continue` keeps the `--from` versions and the codemods an earlier run applied.
71
+ - Fix `et update` for a real consumer: the `et` bin runs, `--continue` skips applied codemods, `--check` reports an unfinished run, lookups use the repo's registry, task links point at the right docs site, and failed syncs are reported.
72
+ - `yarn et update` on yarn 1 installs from the registry the repo's `.npmrc` or `.yarnrc` names, not the default registry yarn exports to scripts.
73
+ - `et update` drops deleted tasks from `tasks.md` even when nothing is pending, prints "none" for an empty dry-run migration list, and aligns the `--continue` plan.
74
+
75
+ ## 2.1.0-next.10
76
+
77
+ ### Patch Changes
78
+
79
+ - A design call now lists its drawings as `variants` in `variant-<key>.ts` files, and `et design check` takes `--variant`; the old `options` key and `--option` flag are gone.
80
+
81
+ ## 2.1.0-next.9
82
+
83
+ ### Minor Changes
84
+
85
+ - `et update` now writes the new range into every `package.json` in the repo, not only the root one, and refuses a dist tag that points at an older version than the repo is on.
86
+ - `et design [checkout]` serves the design page of any repository that keeps a `.ethlete/design`
87
+ folder, and `et design check` says why a call does not render.
88
+
89
+ ### Patch Changes
90
+
91
+ - `et release` now works with Changesets 3 and aborts when there are no pending changesets.
92
+ - `et design` now rules a drawing with its own Tailwind 4 pipeline, so a repository on Tailwind 3, or none at all, can hold design calls.
93
+ - `et design check --call` now reports `NO BROWSER` when neither the checkout nor the package
94
+ resolves `playwright`, instead of throwing the module loader's own error.
95
+
3
96
  ## 2.1.0-next.8
4
97
 
5
98
  ### Minor Changes
package/README.md CHANGED
@@ -5,7 +5,7 @@ Repo tooling - installs the `et` binary.
5
5
  ## Installation
6
6
 
7
7
  ```bash
8
- yarn add --dev @ethlete/cli
8
+ yarn add --dev @ethlete/cli@next
9
9
  ```
10
10
 
11
11
  ## `et release`
@@ -14,7 +14,9 @@ yarn add --dev @ethlete/cli
14
14
  yarn et release
15
15
  ```
16
16
 
17
- Turns pending changesets into a tagged, pushed release commit (version → tag → commit → push).
17
+ Turns pending changesets into a tagged, pushed release commit (version → commit → tag → push). A
18
+ failed commit stops the run before any tag exists. Pass `--message "chore(release): Release versions"`
19
+ when a commit-msg hook rejects the default `Release versions`; `et release --help` lists the flags.
18
20
 
19
21
  ## `et auth`
20
22
 
@@ -47,23 +49,36 @@ yarn et update --tag latest # leave the prerelease line
47
49
  yarn et update core --to 5.0.0-next.55 # an exact version for the package you name
48
50
  yarn et update --continue # finish a run that stopped
49
51
  yarn et update --ai # hand every agent-assisted task to an agent
52
+ yarn et update --no-commit # leave every change uncommitted
50
53
  ```
51
54
 
52
55
  The target follows the dist tag the installed version is on, so a repo on a `-next` prerelease stays
53
- on `next`. The working tree must be clean, because the codemods rewrite files; `--force` skips that
56
+ on `next`, and a repo on `latest` is told per package when a newer major waits on `next`. The working
57
+ tree must be clean, because the codemods rewrite files; `--force` skips that
54
58
  check.
55
59
 
56
60
  The install runs before the migrations are read, because the migrations of a version ship inside that
57
61
  version. A run that stops leaves `.ethlete/update/pending.json` behind, and `--continue` picks it up -
58
62
  starting over would skip every migration the stopped run had not reached.
59
63
 
64
+ When the update moved `@ethlete/agent-rules`, it runs `ethlete-agents sync` before the codemods, so the
65
+ rules and skills match the tasks it writes. `--continue` skips the codemods that already applied, and
66
+ every other run exits 1 and points to `--continue` while a stopped run is unfinished.
67
+
60
68
  Everything a codemod cannot decide is written to `.ethlete/update`: `tasks.md` for you, `tasks.json`
61
69
  for an agent, and one file per task holding the instructions the package ships. A task is `manual` (it
62
70
  needs a decision), `assisted` (written as a prompt for an agent) or `unsupported` (a codemod this repo
63
71
  has no Nx to run, with the command to run it by hand).
64
72
 
65
- `--ai` hands each assisted task to the command in `updateAgentCommand` in
66
- `ethlete.config.local.json`, one run per task. No agent is detected automatically.
73
+ `--ai` hands each open assisted task to the command in `updateAgentCommand` in
74
+ `ethlete.config.local.json` (for example `claude --permission-mode auto`), one run per task,
75
+ and reports each run. It also works on the tasks an earlier run left. When the key is missing, `--ai`
76
+ lists the agent CLIs on `PATH` and saves the command you pick.
77
+
78
+ Each step is committed by itself: the version bump with the lockfile, each codemod that changed files,
79
+ the agent rules sync, and each agent task that ends done. A commit takes only the paths its step
80
+ changed, and a step that touched a file you had changed before the run is left uncommitted.
81
+ `--no-commit` commits nothing.
67
82
 
68
83
  A package declares its migrations in `migrations.json` at its own root, pointed at from `package.json`
69
84
  with `"ethlete": { "migrations": "./migrations.json" }`. The full format is on the docs site.
@@ -174,5 +189,5 @@ fallback with a warning. Add `ethlete.config.local.json` to your `.gitignore`.
174
189
 
175
190
  Full command reference on the docs site:
176
191
 
177
- - [Overview & usage](https://ethlete-sdk-docs.web.app/cli/)
178
- - [Updating the SDK](https://ethlete-sdk-docs.web.app/cli/update)
192
+ - [Overview & usage](https://ethlete-sdk-docs-next.web.app/cli/)
193
+ - [Updating the SDK](https://ethlete-sdk-docs-next.web.app/cli/update)
@@ -0,0 +1,92 @@
1
+ /**
2
+ * A value inside a template. An array joins with nothing between, and `null`, `undefined` and
3
+ * `false` write nothing, so `${rows.map(row)}` and `${isOn && html`…`}` both read as they look.
4
+ */
5
+ const flatten = (value: unknown): string => {
6
+ if (Array.isArray(value)) return value.map(flatten).join('');
7
+ if (value === null || value === undefined || value === false) return '';
8
+
9
+ return String(value);
10
+ };
11
+
12
+ const join = (strings: TemplateStringsArray, values: unknown[]) =>
13
+ strings.reduce((out, part, index) => out + flatten(values[index - 1]) + part);
14
+
15
+ /**
16
+ * Marks a template literal as HTML, so Prettier formats it and an editor highlights it. It escapes
17
+ * nothing: a drawing writes its own markup, and nothing a call draws comes from outside the
18
+ * repository.
19
+ */
20
+ export const html = (strings: TemplateStringsArray, ...values: unknown[]) => join(strings, values);
21
+
22
+ /** Marks a template literal as CSS, for the same reason `html` does it for markup. */
23
+ export const css = (strings: TemplateStringsArray, ...values: unknown[]) => join(strings, values);
24
+
25
+ /**
26
+ * One drawn answer, as the frame renders it: the markup that goes in the frame root, and the CSS
27
+ * that styles it. A drawing runs no logic, so it is a value the module builds when the frame
28
+ * imports it, not a component the frame has to instantiate.
29
+ */
30
+ export type Drawing = {
31
+ body: string;
32
+ styles: string;
33
+ };
34
+
35
+ /** Types a drawing where it is written, so a mistake reads in its own file and not in `call.ts`. */
36
+ export const drawing = (drawn: Drawing): Drawing => drawn;
37
+
38
+ /**
39
+ * One drawn answer to a call. `load` resolves the module whose default export is the
40
+ * drawing that answers it, so a broken variant breaks its own frame only.
41
+ */
42
+ export type CallVariant = {
43
+ key: string;
44
+ name: string;
45
+ /** Left out by a view: a single drawing answers no question, so it argues nothing. */
46
+ claim?: string;
47
+ cost?: string;
48
+ /** Left out while the call is open. The user sets it, never the drawing. */
49
+ verdict?: 'chosen' | 'rejected';
50
+ /** The `key` of the round that drew it. Left out by a call that runs no rounds. */
51
+ round?: string;
52
+ load: () => Promise<{ default: Drawing }>;
53
+ };
54
+
55
+ /**
56
+ * One pass over a call: the variants drawn together, and what came out of them. A round
57
+ * whose variants all carry a verdict is settled, and the page folds it down to its winner.
58
+ */
59
+ export type CallRound = {
60
+ key: string;
61
+ /** What this pass asked, in a few words. */
62
+ title: string;
63
+ /** What it answered. Write it once the user has ruled, so the next round reads as a reply. */
64
+ note: string;
65
+ };
66
+
67
+ /**
68
+ * How a call is drawn. A wireframe shows the bare workflow with mocked values, and draws no
69
+ * logic and no interaction state. A design call draws the real thing.
70
+ */
71
+ export type CallMode = 'wireframe' | 'design';
72
+
73
+ /**
74
+ * One open question of an exploration, with every variant drawn at the same geometry.
75
+ * A call with one variant and no claim is a view: one reference picture, drawn full width.
76
+ */
77
+ export type Call = {
78
+ /** The feature this call belongs to, for example 'the hour strip'. Left out by a loose call. */
79
+ feature?: string;
80
+ eyebrow: string;
81
+ headline: string;
82
+ intro: string;
83
+ /** The width every variant frame gets, in px. The geometry the thing ships in. */
84
+ frameWidth: number;
85
+ /** Left out by a call that draws the real thing, which is what `design` means. */
86
+ mode?: CallMode;
87
+ /** Left out by a short call. With rounds, the intro says only what the call is about. */
88
+ rounds?: CallRound[];
89
+ variants: CallVariant[];
90
+ };
91
+
92
+ export const defineCall = (call: Call): Call => call;
@@ -0,0 +1,11 @@
1
+ declare module 'virtual:design-explore' {
2
+ import type { Call } from '@design-explore';
3
+
4
+ export const calls: Record<string, () => Promise<{ default: Call }>>;
5
+ export const defaultCall: string | null;
6
+ }
7
+
8
+ declare module 'virtual:design-explore/env' {
9
+ /** Loads the stylesheet the project draws under. A project the config names not draws bare. */
10
+ export const loadEnv: (project: string) => Promise<unknown>;
11
+ }
@@ -0,0 +1,17 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <!--head-->
6
+ <style>
7
+ html,
8
+ body {
9
+ margin: 0;
10
+ }
11
+ </style>
12
+ </head>
13
+ <body>
14
+ <div id="root"></div>
15
+ <script type="module" src="./frame.ts"></script>
16
+ </body>
17
+ </html>
@@ -0,0 +1,44 @@
1
+ import { calls } from 'virtual:design-explore';
2
+ import { loadEnv } from 'virtual:design-explore/env';
3
+
4
+ const params = new URLSearchParams(location.search);
5
+ const slug = params.get('call') ?? '';
6
+ const key = params.get('variant') ?? '';
7
+
8
+ await loadEnv(slug.split('/')[0] ?? '');
9
+
10
+ const root = document.querySelector('#root') as HTMLElement;
11
+
12
+ const fail = (message: string) => {
13
+ root.textContent = message;
14
+ root.setAttribute('style', 'padding:16px;font:14px monospace;color:#f0a0a0;background:#1a1414');
15
+ };
16
+
17
+ const call = calls[slug];
18
+ if (!call) fail(`design-explore: no call "${slug}"`);
19
+ else {
20
+ const variant = (await call()).default.variants.find((o) => o.key === key);
21
+ if (!variant) fail(`design-explore: call "${slug}" has no variant "${key}"`);
22
+ else {
23
+ const loaded = (await variant.load()).default;
24
+ const style = document.createElement('style');
25
+
26
+ style.textContent = loaded.styles;
27
+ document.head.append(style);
28
+ root.innerHTML = loaded.body;
29
+ }
30
+ }
31
+
32
+ const report = () => {
33
+ const height = Math.ceil(document.documentElement.getBoundingClientRect().height);
34
+ parent.postMessage({ type: 'design-explore:height', variant: key, height }, '*');
35
+ };
36
+
37
+ new ResizeObserver(report).observe(document.documentElement);
38
+ report();
39
+
40
+ addEventListener(
41
+ 'scroll',
42
+ () => parent.postMessage({ type: 'design-explore:scroll', variant: key, y: Math.round(scrollY) }, '*'),
43
+ { passive: true },
44
+ );