@tenphi/cookbook 0.30.1 → 0.31.0
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/docs/architecture.md +5 -1
- package/docs/component-styles.md +10 -4
- package/docs/fonts-and-typography.md +7 -6
- package/docs/migration.md +19 -0
- package/package.json +3 -3
package/docs/architecture.md
CHANGED
|
@@ -97,7 +97,11 @@ continue to compose. CodeGroup collects its code and syntax bridges itself,
|
|
|
97
97
|
including when rendered outside MarkdownContent.
|
|
98
98
|
|
|
99
99
|
Optional browser behavior remains in `src/client/` and imports no styling
|
|
100
|
-
modules.
|
|
100
|
+
modules. Every Cookbook-owned custom element, including passive wrappers, uses
|
|
101
|
+
the `cookbook-*` prefix. UniAria behaviors follow the same convention through
|
|
102
|
+
`defineElement(definition, { prefix: "cookbook" })` in `client/elements.ts`;
|
|
103
|
+
importing the vendor’s automatically registered `uni-*` entries is unsupported.
|
|
104
|
+
Custom elements attach behavior to the server-rendered markup.
|
|
101
105
|
The ownership checks verify every public style name and sub-element, while
|
|
102
106
|
consumer and browser tests exercise theme overrides and component replacements.
|
|
103
107
|
|
package/docs/component-styles.md
CHANGED
|
@@ -108,9 +108,9 @@ it stays complete when a surface changes.
|
|
|
108
108
|
* `HeaderLinks`: `Desktop`, `DesktopLink`, `Link`, `HoverLink`, `PrimaryLink`, `HoverPrimaryLink`, `Trigger`, `HoverTrigger`, `Panel`, `OpenPanel`, `PanelNavigation`, `PanelLink`, `FirstPanelLink`, `Close`, `HoverClose`
|
|
109
109
|
* `SearchButton`: `PendingShortcut`, `Label`, `Shortcut`, `NativeIcon`, `Icon`
|
|
110
110
|
* `Button`: None
|
|
111
|
-
* `Sidebar`: `Backdrop`, `OpenBackdrop`, `MobileHeading`, `HomeLink`, `HomeLogo`, `HomeLabel`, `Close`, `HoverClose`, `CloseIcon`, `CurrentLink`, `Content`, `Tree`, `List`, `Item`, `TopLevelSpacing`, `GroupSpacing`, `NestedItem`, `SectionHeading`, `Control`, `Summary`, `GroupLabel`, `GroupLabelText`, `Link`, `LinkLabel`, `InteractiveControl`, `SummaryMarker`, `Caret`, `ExpandedCaret`, `LinkedSummary`, `GroupLink`, `LinkedSectionHeading`, `SectionLink`, `Badge`, `TopLevelLink`
|
|
111
|
+
* `Sidebar`: `Backdrop`, `OpenBackdrop`, `MobileHeader`, `MobileHeading`, `HomeLink`, `HomeLogo`, `HomeLabel`, `Close`, `HoverClose`, `CloseIcon`, `CurrentLink`, `Content`, `Tree`, `MobileFooter`, `List`, `Item`, `TopLevelSpacing`, `GroupSpacing`, `NestedItem`, `SectionHeading`, `Control`, `Summary`, `GroupLabel`, `GroupLabelText`, `Link`, `LinkLabel`, `InteractiveControl`, `SummaryMarker`, `Caret`, `ExpandedCaret`, `LinkedSummary`, `GroupLink`, `LinkedSectionHeading`, `SectionLink`, `Badge`, `TopLevelLink`
|
|
112
112
|
* `MobileMenuToggle`: `Icon`, `Section`, `Page`
|
|
113
|
-
* `MobileNavigationTabs`: `Trigger`, `Marker`, `Caret`, `ExpandedCaret`, `Label`, `List`, `Item`, `Link`, `HoverLink`, `CurrentLink`
|
|
113
|
+
* `MobileNavigationTabs`: `HoverTrigger`, `TriggerLabel`, `Panel`, `OpenPanel`, `PanelTitle`, `Options`, `Checkmark`, `SelectedCheckmark`, `Trigger`, `Marker`, `Caret`, `ExpandedCaret`, `Label`, `List`, `Item`, `Link`, `HoverLink`, `CurrentLink`
|
|
114
114
|
* `MobileMenuFooter`: `Social`
|
|
115
115
|
* `TopNavigation`: `Scrollbar`, `Link`, `HoverLink`, `CurrentLink`, `ActiveIndicator`
|
|
116
116
|
* `TableOfContentsLayout`: `Content`
|
|
@@ -469,8 +469,14 @@ Customize the outer bar with `theme.styles.HeaderFrame`, its contents with
|
|
|
469
469
|
|
|
470
470
|
Below 50rem, page navigation moves into a header row and opens a left drawer.
|
|
471
471
|
`MobileMenuToggle.Section` and `Page` style its breadcrumb labels. The drawer
|
|
472
|
-
|
|
473
|
-
|
|
472
|
+
keeps the logo, title, close button, and `MobileNavigationTabs` Select in a static
|
|
473
|
+
`Sidebar.MobileHeader`, with social links and language selection in a static
|
|
474
|
+
`Sidebar.MobileFooter`. Borders separate both sections from the independently
|
|
475
|
+
scrolling active navigation tree (`Sidebar.Tree`). The section Select uses the
|
|
476
|
+
same popover control as language and version selection. Its `Label`, `List`,
|
|
477
|
+
`Item`, `Link`, `HoverLink`, and `CurrentLink` customization names remain available
|
|
478
|
+
on the Select anatomy; `Marker` is retained as a compatibility hook.
|
|
479
|
+
The drawer slides in and out over the root
|
|
474
480
|
`$sidebar-transition` duration (default `120ms`) and
|
|
475
481
|
disables motion when the reader prefers reduced motion. Its mobile shadow uses
|
|
476
482
|
the Glaze `shadow`-typed `#shadow` token. Customize the movement and shadow through
|
|
@@ -107,12 +107,13 @@ The base [typography presets](./upstream/tasty/docs/styles.md#preset) are
|
|
|
107
107
|
|
|
108
108
|
Specialized roles preserve the component sizes while sharing their base typography:
|
|
109
109
|
|
|
110
|
-
| Preset
|
|
111
|
-
|
|
|
112
|
-
| `hero-title`
|
|
113
|
-
| `hero-tagline`
|
|
114
|
-
| `prose`
|
|
115
|
-
| `inline-code`
|
|
110
|
+
| Preset | Used for | Base typography |
|
|
111
|
+
| --------------- | ------------------------- | ---------------------------------------------------------- |
|
|
112
|
+
| `hero-title` | Hero heading | `h1`, with a larger responsive size |
|
|
113
|
+
| `hero-tagline` | Hero description | `body`, with a responsive size and 1.55 line height |
|
|
114
|
+
| `prose` | Markdown content | `body`, at 1.025rem |
|
|
115
|
+
| `inline-code` | Code within prose | `code`, at 0.875em |
|
|
116
|
+
| `control-label` | Selector section headings | `small`, at 0.75rem with uppercase text and wider tracking |
|
|
116
117
|
|
|
117
118
|
Customize these through `theme.presets` as well. Changes to the base font family,
|
|
118
119
|
weight, tracking, and other shared fields continue to flow into the derived roles.
|
package/docs/migration.md
CHANGED
|
@@ -41,6 +41,25 @@ upgrade the site's Cookbook runtime or package-manager dependencies. Commit the
|
|
|
41
41
|
documentation lock separately when intentionally updating imported content.
|
|
42
42
|
Local Markdown needs no lock update.
|
|
43
43
|
|
|
44
|
+
## Upcoming custom-element naming
|
|
45
|
+
|
|
46
|
+
All Cookbook-owned custom elements now use the `cookbook-*` prefix, including
|
|
47
|
+
UniAria behaviors and the search wrapper. Built-in components update their markup
|
|
48
|
+
and behavior together. If your own components or browser scripts refer to these
|
|
49
|
+
tags, update them:
|
|
50
|
+
|
|
51
|
+
| Previous tag | New tag |
|
|
52
|
+
| ------------- | ------------------ |
|
|
53
|
+
| `cb-popover` | `cookbook-popover` |
|
|
54
|
+
| `cb-dialog` | `cookbook-dialog` |
|
|
55
|
+
| `site-search` | `cookbook-search` |
|
|
56
|
+
|
|
57
|
+
Update tag selectors, `customElements.get()` and `whenDefined()` calls, and
|
|
58
|
+
`HTMLElementTagNameMap` references as applicable. Component override names,
|
|
59
|
+
`theme.styles` names and sub-elements, `data-uni` part markers, CSS classes,
|
|
60
|
+
DOM IDs, and stored reader preferences keep their existing names. Custom
|
|
61
|
+
elements authored by your site can continue using your own prefix.
|
|
62
|
+
|
|
44
63
|
## Upcoming Tasty upgrade
|
|
45
64
|
|
|
46
65
|
Cookbook now uses Tasty 3.14 and the Tasty ESLint plugin 1.12. Built-in themes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tenphi/cookbook",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.31.0",
|
|
4
4
|
"description": "Repository-native static documentation for Astro",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
@@ -68,8 +68,8 @@
|
|
|
68
68
|
"author": "Andrey Yamanov",
|
|
69
69
|
"license": "MIT",
|
|
70
70
|
"dependencies": {
|
|
71
|
-
"@tenphi/docs": "0.
|
|
72
|
-
"@tenphi/renderer": "0.
|
|
71
|
+
"@tenphi/docs": "0.31.0",
|
|
72
|
+
"@tenphi/renderer": "0.31.0"
|
|
73
73
|
},
|
|
74
74
|
"peerDependencies": {
|
|
75
75
|
"astro": "^7.3.2"
|