@walkeros/explorer 4.7.2 → 4.8.0-next-1791496487198

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,80 @@
1
1
  # @walkeros/explorer
2
2
 
3
+ ## 4.8.0-next-1791496487198
4
+
5
+ ### Minor Changes
6
+
7
+ - bf6221f: Explorer now ships the walkerOS design system. Import
8
+ `@walkeros/explorer/design/tokens.css` for colour, type, spacing, radius and
9
+ layer tokens (dark by default, light under `data-theme="light"`), the opt-in
10
+ `design/base.css`, the Tailwind v4 bridge `design/tailwind.css`, and typed
11
+ colour and font constants from `@walkeros/explorer/design`. A
12
+ `walkeros-design-check` command lints consuming code. Existing exports are
13
+ unchanged.
14
+ - aa4bb8b: Add `Playground`: a tagged component, its event, an editable mapping
15
+ and the resulting gtag call side by side, on one real flow (`startFlow`, the
16
+ browser source scoped to a shadow root, and the gtag destination with a
17
+ stubbed `gtag`). `@walkeros/web-destination-gtag` is now a runtime dependency.
18
+
19
+ ### Patch Changes
20
+
21
+ - 7132619: `@walkeros/explorer/design/components` gains `BrowserFrame`, a
22
+ browser window on the site theme around any page: an address field with the
23
+ URL, an optional reload button, a slot for the caller's actions and an
24
+ optional bookmarks row that marks the current page. It is sized by its caller
25
+ and styled by `@walkeros/explorer/styles.css`. `Icon` gains `lock`, `reload`
26
+ and `bookmark`.
27
+ - d5cbc9c: New `@walkeros/explorer/design/components` export with `Button`,
28
+ `InlineCode` and `EventLegend`, styled by `@walkeros/explorer/styles.css`.
29
+ `Button` forwards tagging attributes to its element and accepts a router link
30
+ component.
31
+ - d5cbc9c: `@walkeros/explorer/design/components` gains the building blocks of
32
+ the walkerOS home page: `Icon`, `InstallCommand`, `Card`, `Eyebrow`, `Stat`,
33
+ `Text`, `TextLink`, `CheckList`, `SectionHeading`, `ProblemCard`,
34
+ `FeatureItem`, `FaqItem`, `PlanCard`, `CaseCard`, `HighlightCard`, `Section`,
35
+ `CardGrid`, `Split`, `Cluster`, `Hero`, and the three home page demos
36
+ (`HeroTaggingViz`, `ArticleTeaserTracking`, `DestinationMappingViz`). Every
37
+ design component forwards tagging attributes to its root.
38
+ - 01d86a5: Explorer components now read the walkerOS design tokens: import
39
+ `@walkeros/explorer/design/tokens.css` beside `styles.css`. The old theme
40
+ variables (`--bg-box`, `--color-text` and the rest) are removed. Code panels
41
+ are dark in both page themes. Removed exports: `lighthouseTheme`,
42
+ `registerLighthouseTheme`, `palenightTheme`, `registerPalenightTheme`, type
43
+ `ExplorerTheme`, and `registerAllThemes`, replaced by `registerTheme`.
44
+ `ELB_THEME_DARK` is now exported.
45
+ - d5cbc9c: `@walkeros/explorer/design/tokens.css` now declares every type style
46
+ as CSS variables: `--type-<style>-size`, `-line-height`, `-weight`, `-family`
47
+ and, when the style sets one, `-tracking`. Components can take sizes and
48
+ weights from the design system instead of fixed values.
49
+ - 7132619: The `PromotionPlayground` and `LiveCode` mapping examples show events
50
+ and results again, and every failure says so in the box it concerns. `Preview`
51
+ takes a `collector` instead of `elb` and captures the page's events through
52
+ it; its document carries the design tokens, base rules and design atom styles,
53
+ so the demo product card is built from `Card`, `PhotoPlaceholder`, `Text` and
54
+ `Button`. The Playground drops its separate Code box and the `labelCode` prop:
55
+ the Preview's HTML, CSS and JS tabs edit the page. New props: `placeholder`
56
+ and `error` on `CodeBox`, `error` on `Box`, `boxWidth` on `Grid` for one row
57
+ of fixed-width boxes.
58
+ - 7132619: New `ViewSource` component: wrap a tagged element, hover it and
59
+ toggle to its live HTML with the `data-elb` attributes, edited in place. Back
60
+ in Visual the element renders your edit and walkerOS picks up the new tags; a
61
+ Reset icon restores the original. New `ToggleButton`: one button that names
62
+ the option a click switches to, at a fixed width.
63
+ - a4b03ba: The five event colours (globals, context, entity, property, action)
64
+ now have a light-theme value that reads as text on light backgrounds. Their
65
+ constants in `@walkeros/explorer/design` are now `{ dark, light }` objects,
66
+ like every other themed colour; read `.dark` where the colour sits on a dark
67
+ ground.
68
+ - Updated dependencies [7132619]
69
+ - Updated dependencies [5593d7b]
70
+ - Updated dependencies [421233d]
71
+ - Updated dependencies [5593d7b]
72
+ - @walkeros/core@4.8.0-next-1791496487198
73
+ - @walkeros/web-destination-gtag@4.8.0-next-1791496487198
74
+ - @walkeros/collector@4.8.0-next-1791496487198
75
+ - @walkeros/web-core@4.8.0-next-1791496487198
76
+ - @walkeros/web-source-browser@4.8.0-next-1791496487198
77
+
3
78
  ## 4.7.2
4
79
 
5
80
  ### Patch Changes
package/README.md CHANGED
@@ -21,21 +21,50 @@ npm install @walkeros/explorer
21
21
 
22
22
  ## Quick start
23
23
 
24
- Import a component and the stylesheet:
24
+ Import the design tokens once per page, then explorer's styles and a component:
25
25
 
26
26
  ```tsx
27
- import { MappingDemo } from '@walkeros/explorer';
27
+ import '@walkeros/explorer/design/tokens.css';
28
28
  import '@walkeros/explorer/styles.css';
29
+ import { CodeBox } from '@walkeros/explorer';
29
30
 
30
- <MappingDemo
31
- input='{"name": "example"}'
32
- config='{"transform": "uppercase"}'
33
- fn={async (input, config) => transform(input, config)}
34
- />;
31
+ <CodeBox code={'{ "name": "page view" }'} language="json" label="Event" />;
35
32
  ```
36
33
 
37
- Switch themes via the `data-theme` attribute on a parent element (`light` or
38
- `dark`).
34
+ In a Tailwind v4 build, import `@walkeros/explorer/design/tailwind.css` after
35
+ `@import "tailwindcss"` instead of `tokens.css`: it brings the tokens, a utility
36
+ for every design colour and type style, `max-w-*` widths in px and `transition`
37
+ utilities on the design motion. `@walkeros/explorer/design/base.css` adds
38
+ optional page-wide base rules (font, colours, focus ring, selection).
39
+
40
+ ## Themes
41
+
42
+ Set `data-theme="dark"` (the default) or `data-theme="light"` on the page root.
43
+ Code surfaces (`CodeBox`, `CodeView`, `Code`, the preview) stay dark in both
44
+ themes. Monaco uses one code theme; `Code` and `CodeBox` register it themselves.
45
+ A Monaco editor of your own registers it with:
46
+
47
+ ```ts
48
+ import { registerTheme, ELB_THEME_DARK } from '@walkeros/explorer';
49
+
50
+ registerTheme(monaco);
51
+ monaco.editor.setTheme(ELB_THEME_DARK);
52
+ ```
53
+
54
+ ## Design system
55
+
56
+ Explorer ships the walkerOS design system:
57
+
58
+ | Import | What |
59
+ | ---------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
60
+ | `@walkeros/explorer/design/tokens.css` | The design tokens as CSS custom properties |
61
+ | `@walkeros/explorer/design/tailwind.css` | The tokens as a Tailwind v4 theme |
62
+ | `@walkeros/explorer/design/base.css` | Optional base rules for a whole page |
63
+ | `@walkeros/explorer/design` | The token values as constants (colours, fonts, type styles, motion), for code that cannot read CSS variables |
64
+ | `@walkeros/explorer/design/components` | React building blocks of walkerOS pages (`Button`, `InlineCode`, `EventLegend` and more), with no Monaco or walkerOS runtime |
65
+
66
+ The `walkeros-design-check` command checks a package's own styles against the
67
+ design system.
39
68
 
40
69
  ## Documentation
41
70
 
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env node
2
+ // Committed so npm links the bin at install time, before the first build. The
3
+ // checker itself is built into dist/design, beside the design CSS it reads.
4
+ import { existsSync } from 'node:fs';
5
+
6
+ const checker = new URL('../dist/design/check.mjs', import.meta.url);
7
+
8
+ if (existsSync(checker)) {
9
+ await import(checker.href);
10
+ } else {
11
+ process.stderr.write(
12
+ 'walkeros-design-check: dist/design/check.mjs is missing, run `npm run build` in apps/explorer\n',
13
+ );
14
+ process.exitCode = 2;
15
+ }
@@ -0,0 +1,54 @@
1
+ /*
2
+ * walkerOS base rules. Opt-in and global: import once per page after
3
+ * tokens.css. Explorer's own reset stays scoped to .elb-explorer.
4
+ */
5
+ @layer base {
6
+ /*
7
+ * tokens.css sets --motion to 0ms for reduced motion; this guard also stops
8
+ * animations, transitions with their own durations and smooth scrolling.
9
+ */
10
+ @media (prefers-reduced-motion: reduce) {
11
+ *,
12
+ *::before,
13
+ *::after {
14
+ animation-duration: 0.01ms !important;
15
+ animation-iteration-count: 1 !important;
16
+ transition-duration: 0.01ms !important;
17
+ scroll-behavior: auto !important;
18
+ }
19
+ }
20
+
21
+ :root,
22
+ :host,
23
+ [data-theme='dark'] {
24
+ color-scheme: dark;
25
+ }
26
+
27
+ [data-theme='light'] {
28
+ color-scheme: light;
29
+ }
30
+
31
+ /* Islands recompute these from their own theme's tokens. */
32
+ html,
33
+ :host,
34
+ [data-theme] {
35
+ font-family: var(--font-sans);
36
+ color: var(--fg);
37
+ scrollbar-color: var(--border-strong) transparent;
38
+ }
39
+
40
+ /* Only the page paints a ground; a background on :host would cover the customer page. */
41
+ html {
42
+ background-color: var(--bg);
43
+ }
44
+
45
+ :focus-visible {
46
+ outline: 2px solid var(--focus);
47
+ outline-offset: 3px;
48
+ }
49
+
50
+ ::selection {
51
+ background-color: var(--primary);
52
+ color: var(--on-primary);
53
+ }
54
+ }