@api-client/ui 0.5.38 → 0.5.40
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/build/src/md/list/internals/ListItem.d.ts +24 -15
- package/build/src/md/list/internals/ListItem.d.ts.map +1 -1
- package/build/src/md/list/internals/ListItem.js +85 -59
- package/build/src/md/list/internals/ListItem.js.map +1 -1
- package/build/src/md/list/internals/ListItem.styles.js +11 -11
- package/build/src/md/list/internals/ListItem.styles.js.map +1 -1
- package/build/src/md/select/internals/Option.d.ts +4 -14
- package/build/src/md/select/internals/Option.d.ts.map +1 -1
- package/build/src/md/select/internals/Option.js +13 -28
- package/build/src/md/select/internals/Option.js.map +1 -1
- package/build/src/md/select/internals/Select.d.ts +1 -1
- package/build/src/md/select/internals/Select.d.ts.map +1 -1
- package/build/src/md/select/internals/Select.js +15 -5
- package/build/src/md/select/internals/Select.js.map +1 -1
- package/build/tsconfig.tsbuildinfo +1 -0
- package/package.json +1 -1
- package/src/md/list/internals/ListItem.styles.ts +11 -11
- package/src/md/list/internals/ListItem.ts +68 -43
- package/src/md/select/internals/Option.ts +14 -26
- package/src/md/select/internals/Select.ts +15 -5
- package/.aiexclude +0 -3
- package/.cursor/rules/html-and-css-best-practices.mdc +0 -63
- package/.cursor/rules/lit-best-practices.mdc +0 -89
- package/.editorconfig +0 -29
- package/.github/CONTRIBUTING.md +0 -24
- package/.github/instructions/html-and-css-best-practices.instructions.md +0 -70
- package/.github/instructions/lit-best-practices.instructions.md +0 -90
- package/.github/release.yml +0 -14
- package/.github/stale.yml +0 -23
- package/.github/workflows/auto-release.yml +0 -182
- package/.github/workflows/release.yml +0 -82
- package/.prettierrc.js +0 -14
- package/.vscode/settings.json +0 -18
- package/RELEASE.md +0 -163
- package/RELEASE_SETUP.md +0 -235
- package/build/src/demo/DemoPage.d.ts +0 -81
- package/build/src/demo/DemoPage.d.ts.map +0 -1
- package/build/src/demo/DemoPage.js +0 -175
- package/build/src/demo/DemoPage.js.map +0 -1
- package/build/src/demo/DemoStyles.d.ts +0 -3
- package/build/src/demo/DemoStyles.d.ts.map +0 -1
- package/build/src/demo/DemoStyles.js +0 -60
- package/build/src/demo/DemoStyles.js.map +0 -1
- package/build/test/elements/navigation/Navigation.test.d.ts +0 -3
- package/build/test/elements/navigation/Navigation.test.d.ts.map +0 -1
- package/build/test/elements/navigation/Navigation.test.js +0 -113
- package/build/test/elements/navigation/Navigation.test.js.map +0 -1
- package/commitlint.config.cjs +0 -2
- package/demo/elements/authorization/AuthPlugin.js +0 -57
- package/demo/elements/authorization/AuthProxy.js +0 -215
- package/demo/elements/authorization/api-key.html +0 -27
- package/demo/elements/authorization/api-key.ts +0 -44
- package/demo/elements/authorization/basic.html +0 -27
- package/demo/elements/authorization/basic.ts +0 -43
- package/demo/elements/authorization/bearer.html +0 -27
- package/demo/elements/authorization/bearer.ts +0 -43
- package/demo/elements/authorization/env.js +0 -8
- package/demo/elements/authorization/index.html +0 -44
- package/demo/elements/authorization/ntlm.html +0 -27
- package/demo/elements/authorization/ntlm.ts +0 -43
- package/demo/elements/authorization/oauth-authorize.html +0 -75
- package/demo/elements/authorization/oauth-authorize.ts +0 -40
- package/demo/elements/authorization/oauth-error.html +0 -18
- package/demo/elements/authorization/oauth-error.ts +0 -10
- package/demo/elements/authorization/oauth-popup.html +0 -36
- package/demo/elements/authorization/oauth2.html +0 -27
- package/demo/elements/authorization/oauth2.ts +0 -100
- package/demo/elements/authorization/oidc.html +0 -27
- package/demo/elements/authorization/oidc.ts +0 -139
- package/demo/elements/authorization/private.crt +0 -31
- package/demo/elements/authorization/private.csr +0 -28
- package/demo/elements/authorization/private.key +0 -51
- package/demo/elements/authorization/private.pem +0 -31
- package/demo/elements/authorization/redirect.html +0 -20
- package/demo/elements/authorization/ssl-commands.sh +0 -30
- package/demo/elements/authorization/ssl.conf +0 -24
- package/demo/elements/autocomplete/index.html +0 -64
- package/demo/elements/autocomplete/index.ts +0 -171
- package/demo/elements/code-editor/CodeEditorDemo.ts +0 -173
- package/demo/elements/code-editor/index.html +0 -19
- package/demo/elements/context-menu/DemoIcons.ts +0 -21
- package/demo/elements/context-menu/basic.html +0 -25
- package/demo/elements/context-menu/basic.ts +0 -119
- package/demo/elements/context-menu/custom-data.html +0 -25
- package/demo/elements/context-menu/custom-data.ts +0 -62
- package/demo/elements/context-menu/demo.css +0 -28
- package/demo/elements/context-menu/enabled-state.html +0 -25
- package/demo/elements/context-menu/enabled-state.ts +0 -73
- package/demo/elements/context-menu/icons.html +0 -25
- package/demo/elements/context-menu/icons.ts +0 -64
- package/demo/elements/context-menu/index.html +0 -43
- package/demo/elements/context-menu/nested.html +0 -25
- package/demo/elements/context-menu/nestedt.ts +0 -152
- package/demo/elements/context-menu/no-execute.html +0 -25
- package/demo/elements/context-menu/no-execute.ts +0 -134
- package/demo/elements/context-menu/radio-menu.html +0 -25
- package/demo/elements/context-menu/radio-menu.ts +0 -83
- package/demo/elements/context-menu/separators.html +0 -25
- package/demo/elements/context-menu/separators.ts +0 -172
- package/demo/elements/currency/index.html +0 -91
- package/demo/elements/currency/index.ts +0 -352
- package/demo/elements/environment/environment-editor.html +0 -20
- package/demo/elements/environment/environment-editor.ts +0 -49
- package/demo/elements/environment/index.html +0 -33
- package/demo/elements/environment/server-editor.html +0 -20
- package/demo/elements/environment/server-editor.ts +0 -67
- package/demo/elements/environment/variables-editor.html +0 -20
- package/demo/elements/environment/variables-editor.ts +0 -94
- package/demo/elements/har/har-viewer.html +0 -20
- package/demo/elements/har/har-viewer.ts +0 -76
- package/demo/elements/har/har1.har +0 -3044
- package/demo/elements/har/har2.json +0 -439
- package/demo/elements/har/index.html +0 -26
- package/demo/elements/highlight/example.md +0 -27
- package/demo/elements/highlight/index.html +0 -31
- package/demo/elements/highlight/marked-highlight.html +0 -132
- package/demo/elements/highlight/marked-highlight.ts +0 -22
- package/demo/elements/highlight/prism-highlight.html +0 -62
- package/demo/elements/highlight/prism-highlight.ts +0 -17
- package/demo/elements/http/body-editor.html +0 -17
- package/demo/elements/http/body-editor.ts +0 -115
- package/demo/elements/http/headers.html +0 -17
- package/demo/elements/http/headers.ts +0 -59
- package/demo/elements/http/http-assertions.html +0 -20
- package/demo/elements/http/http-assertions.ts +0 -89
- package/demo/elements/http/http-flows.html +0 -23
- package/demo/elements/http/http-flows.ts +0 -89
- package/demo/elements/http/index.html +0 -45
- package/demo/elements/http/request-editor.html +0 -26
- package/demo/elements/http/request-editor.ts +0 -197
- package/demo/elements/http/request-log.html +0 -16
- package/demo/elements/http/request-log.ts +0 -136
- package/demo/elements/http/url-editing.html +0 -17
- package/demo/elements/http/url-editing.ts +0 -112
- package/demo/elements/icons/index.html +0 -81
- package/demo/elements/icons/index.ts +0 -52
- package/demo/elements/index.html +0 -72
- package/demo/elements/mention-textarea/index.html +0 -19
- package/demo/elements/mention-textarea/index.ts +0 -205
- package/demo/elements/navigation/navigation-item.html +0 -49
- package/demo/elements/navigation/navigation-item.ts +0 -131
- package/demo/elements/navigation/navigation.html +0 -20
- package/demo/elements/navigation/navigation.ts +0 -45
- package/demo/elements/project/index.html +0 -29
- package/demo/elements/project/project-run-report.html +0 -20
- package/demo/elements/project/project-run-report.ts +0 -132
- package/demo/elements/project/request-editor.html +0 -23
- package/demo/elements/project/request-editor.ts +0 -232
- package/demo/elements/user/user-avatar.html +0 -17
- package/demo/elements/user/user-avatar.ts +0 -60
- package/demo/env.js +0 -4
- package/demo/index.html +0 -34
- package/demo/layout/index.html +0 -94
- package/demo/layout/index.ts +0 -190
- package/demo/md/DemoStyles.ts +0 -61
- package/demo/md/UiDemoPage.ts +0 -6
- package/demo/md/buttons/button.html +0 -121
- package/demo/md/buttons/button.ts +0 -246
- package/demo/md/buttons/group.html +0 -36
- package/demo/md/buttons/group.ts +0 -171
- package/demo/md/checkbox/index.html +0 -39
- package/demo/md/checkbox/index.ts +0 -220
- package/demo/md/chip/chip.html +0 -70
- package/demo/md/chip/chip.ts +0 -219
- package/demo/md/chip/pawel6c9a.jpg +0 -0
- package/demo/md/collapse/CustomDetail.ts +0 -89
- package/demo/md/collapse/collapse.html +0 -21
- package/demo/md/collapse/collapse.ts +0 -78
- package/demo/md/date-picker/date-picker.ts +0 -336
- package/demo/md/date-picker/index.html +0 -171
- package/demo/md/dialog/confirm-dialog.html +0 -49
- package/demo/md/dialog/confirm-dialog.ts +0 -121
- package/demo/md/dialog/dialog.html +0 -25
- package/demo/md/dialog/dialog.ts +0 -468
- package/demo/md/dropdown-list/index.html +0 -31
- package/demo/md/dropdown-list/index.ts +0 -158
- package/demo/md/icon-button/index.html +0 -122
- package/demo/md/icon-button/index.ts +0 -132
- package/demo/md/index.html +0 -73
- package/demo/md/inputs/input.html +0 -73
- package/demo/md/inputs/input.ts +0 -278
- package/demo/md/inputs/radio.html +0 -39
- package/demo/md/inputs/radio.ts +0 -156
- package/demo/md/inputs/switch.html +0 -45
- package/demo/md/inputs/switch.ts +0 -144
- package/demo/md/list/list.html +0 -65
- package/demo/md/list/list.ts +0 -204
- package/demo/md/listbox/listbox.html +0 -31
- package/demo/md/listbox/listbox.ts +0 -27
- package/demo/md/menu/index.html +0 -19
- package/demo/md/menu/index.ts +0 -514
- package/demo/md/notification/snack.html +0 -21
- package/demo/md/notification/snack.ts +0 -70
- package/demo/md/progress/progress.html +0 -46
- package/demo/md/progress/progress.ts +0 -161
- package/demo/md/segmented-button/index.html +0 -21
- package/demo/md/segmented-button/index.ts +0 -55
- package/demo/md/select/index.html +0 -16
- package/demo/md/select/index.ts +0 -207
- package/demo/md/tabs/tabs.html +0 -40
- package/demo/md/tabs/tabs.ts +0 -214
- package/demo/oauth-popup.html +0 -36
- package/demo/page.css +0 -8
- package/demo/resources/calendar-month.png +0 -0
- package/demo/resources/favorite.png +0 -0
- package/demo/resources/fingerprint.png +0 -0
- package/demo/resources/home-work.png +0 -0
- package/demo/resources/mood.png +0 -0
- package/demo/resources/print.png +0 -0
- package/demo/resources/stars.png +0 -0
- package/demo/resources/theaters.png +0 -0
- package/demo/tsconfig.json +0 -4
- package/eslint.config.js +0 -97
- package/scripts/copy-assets.js +0 -21
- package/scripts/release.js +0 -66
- package/src/demo/DemoPage.ts +0 -169
- package/src/demo/DemoStyles.ts +0 -60
- package/test/README.md +0 -375
- package/test/contextual-menu/ContextMenu.test.ts +0 -760
- package/test/contextual-menu/ContextMenuElement.test.ts +0 -569
- package/test/core/activity.spec.ts +0 -413
- package/test/core/activity_manager.spec.ts +0 -544
- package/test/core/application.spec.ts +0 -218
- package/test/core/fragment.spec.ts +0 -565
- package/test/core/fragment_manager.spec.ts +0 -404
- package/test/core/live_data.spec.ts +0 -558
- package/test/core/renderer.spec.ts +0 -113
- package/test/dom-assertions.test.ts +0 -182
- package/test/elements/MonacoSetup.ts +0 -65
- package/test/elements/authorization/basic-method.test.ts +0 -177
- package/test/elements/authorization/bearer-method.test.ts +0 -143
- package/test/elements/authorization/ntlm-method.test.ts +0 -219
- package/test/elements/authorization/oauth2-client-credentials-method.test.ts +0 -334
- package/test/elements/authorization/oauth2-code-method.test.ts +0 -320
- package/test/elements/authorization/oauth2-custom-grant-method.test.ts +0 -255
- package/test/elements/authorization/oauth2-device-code-method.test.ts +0 -371
- package/test/elements/authorization/oauth2-implicit-method.test.ts +0 -407
- package/test/elements/authorization/oauth2-jwt-method.test.ts +0 -217
- package/test/elements/authorization/oauth2-password-method.test.ts +0 -275
- package/test/elements/authorization/openid-method.test.ts +0 -591
- package/test/elements/autocomplete/autocomplete-input.spec.ts +0 -646
- package/test/elements/code-editor/code-editor.accessibility.test.ts +0 -298
- package/test/elements/code-editor/code-editor.test.ts +0 -574
- package/test/elements/currency/CurrencyPicker.accessibility.test.ts +0 -328
- package/test/elements/currency/CurrencyPicker.core.test.ts +0 -318
- package/test/elements/currency/CurrencyPicker.integration.test.ts +0 -482
- package/test/elements/currency/CurrencyPicker.test.ts +0 -486
- package/test/elements/data-table/DataTable.browser.test.ts +0 -649
- package/test/elements/har/HarUtils.test.ts +0 -45
- package/test/elements/har/HarViewerElement.test.ts +0 -687
- package/test/elements/har/test-data/har1.har +0 -3044
- package/test/elements/highlight/MarkedHighlightElement.test.ts +0 -452
- package/test/elements/highlight/PrismHighlightElement.test.ts +0 -79
- package/test/elements/highlight/PrismHighlighter.test.ts +0 -94
- package/test/elements/highlight/remoteSanitization.md +0 -1
- package/test/elements/highlight/test.md +0 -3
- package/test/elements/highlight/test1.md +0 -3
- package/test/elements/highlight/test2.md +0 -1
- package/test/elements/http/BodyFormdataEditorElement.test.ts +0 -482
- package/test/elements/http/BodyMultipartEditorElement.test.ts +0 -658
- package/test/elements/http/BodyRawEditorElement.test.ts +0 -90
- package/test/elements/http/CertificateAdd.test.ts +0 -457
- package/test/elements/http/HttpAssertions.test.ts +0 -994
- package/test/elements/http/HttpFlows.test.ts +0 -502
- package/test/elements/http/UrlEncodeUtils.test.ts +0 -202
- package/test/elements/layout/SplitItem.test.ts +0 -440
- package/test/elements/layout/SplitLayoutManager.test.ts +0 -1501
- package/test/elements/layout/SplitPanel.test.ts +0 -1109
- package/test/elements/mention-textarea/MentionTextArea.basic.test.ts +0 -114
- package/test/elements/mention-textarea/MentionTextArea.test.ts +0 -613
- package/test/elements/navigation/Navigation.test.ts +0 -120
- package/test/env.ts +0 -15
- package/test/events/EventTypes.test.ts +0 -363
- package/test/events/EventsTestHelpers.ts +0 -16
- package/test/helpers/TestUtils.ts +0 -243
- package/test/helpers/UiMock.ts +0 -185
- package/test/lib/Dom.test.ts +0 -231
- package/test/md/button/UiButton.test.ts +0 -347
- package/test/md/button/UiIconButton.test.ts +0 -155
- package/test/md/chip/UiChip.test.ts +0 -219
- package/test/md/collapse/UiCollapse.test.ts +0 -250
- package/test/md/collapse/flex-layout.test.ts +0 -105
- package/test/md/date-time/DateTime.test.ts +0 -348
- package/test/md/dialog/UiConfirmDialog.test.ts +0 -131
- package/test/md/dialog/UiDialog.test.ts +0 -759
- package/test/md/menu/Menu.test.ts +0 -855
- package/test/md/menu/MenuIntegration.test.ts +0 -426
- package/test/md/menu/MenuItem.test.ts +0 -652
- package/test/md/menu/SubMenu.test.ts +0 -410
- package/test/md/progress/UiCircularProgressElement.test.ts +0 -481
- package/test/md/progress/UiProgressElement.test.ts +0 -117
- package/test/md/progress/UiRangeElement.test.ts +0 -156
- package/test/md/select/Select.test.ts +0 -925
- package/test/plugins/takeScreenshotPlugin.js +0 -35
- package/test/setup.test.ts +0 -217
- package/test/setup.ts +0 -117
- package/test/tsconfig.json +0 -7
- package/web-dev-server.config.js +0 -21
- package/web-test-runner.config.js +0 -90
package/RELEASE_SETUP.md
DELETED
|
@@ -1,235 +0,0 @@
|
|
|
1
|
-
# Automated Release System Setup
|
|
2
|
-
|
|
3
|
-
## 🎯 Overview
|
|
4
|
-
|
|
5
|
-
This project now has a **fully automated release system** that:
|
|
6
|
-
|
|
7
|
-
1. **Automatically detects release types** from commit messages
|
|
8
|
-
2. **Creates releases on every merge to main** (when there are changes)
|
|
9
|
-
3. **Generates changelogs** from conventional commits
|
|
10
|
-
4. **Publishes to npm** automatically
|
|
11
|
-
5. **Provides manual fallback** for special cases
|
|
12
|
-
|
|
13
|
-
## 🔄 How It Works
|
|
14
|
-
|
|
15
|
-
### Automated Flow
|
|
16
|
-
|
|
17
|
-
```plain
|
|
18
|
-
Push to main → Tests run → Analyze commits → Determine release type → Create release
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
1. **Trigger**: Any push to the `main` branch (usually PR merges)
|
|
22
|
-
2. **Testing**: Full test suite runs to ensure quality
|
|
23
|
-
3. **Analysis**: System examines commits since last release
|
|
24
|
-
4. **Decision**: Release type determined by commit messages:
|
|
25
|
-
- `major`: Breaking changes (`!:` or `BREAKING CHANGE:`)
|
|
26
|
-
- `minor`: New features (`feat:`)
|
|
27
|
-
- `patch`: Everything else (`fix:`, `docs:`, `chore:`, etc.)
|
|
28
|
-
5. **Release**: If changes exist, creates GitHub release + npm publish
|
|
29
|
-
|
|
30
|
-
### Manual Fallback
|
|
31
|
-
|
|
32
|
-
```plain
|
|
33
|
-
Create tag → Manual release workflow → Create release
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
For hotfixes or special releases, you can still use manual methods.
|
|
37
|
-
|
|
38
|
-
## 📁 Workflow Files
|
|
39
|
-
|
|
40
|
-
### `.github/workflows/auto-release.yml`
|
|
41
|
-
|
|
42
|
-
- **Purpose**: Main automated release workflow
|
|
43
|
-
- **Trigger**: Push to main branch
|
|
44
|
-
- **Jobs**:
|
|
45
|
-
- `test`: Run tests
|
|
46
|
-
- `determine-release`: Analyze commits and decide release type
|
|
47
|
-
- `release`: Create release and publish
|
|
48
|
-
|
|
49
|
-
### `.github/workflows/release.yml`
|
|
50
|
-
|
|
51
|
-
- **Purpose**: Manual release fallback
|
|
52
|
-
- **Trigger**: Push of version tags (`v*`)
|
|
53
|
-
- **Use case**: Manual releases, hotfixes
|
|
54
|
-
|
|
55
|
-
### `.github/workflows/test.yml`
|
|
56
|
-
|
|
57
|
-
- **Purpose**: Quality assurance
|
|
58
|
-
- **Trigger**: PRs and pushes to main
|
|
59
|
-
- **Jobs**: Run tests and linting
|
|
60
|
-
|
|
61
|
-
## 🎯 Release Type Detection
|
|
62
|
-
|
|
63
|
-
The system analyzes commit messages since the last release:
|
|
64
|
-
|
|
65
|
-
### Major Release (X.0.0)
|
|
66
|
-
|
|
67
|
-
```bash
|
|
68
|
-
git commit -m "feat!: remove deprecated API"
|
|
69
|
-
git commit -m "feat: new system
|
|
70
|
-
|
|
71
|
-
BREAKING CHANGE: Old methods no longer work"
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
### Minor Release (0.X.0)
|
|
75
|
-
|
|
76
|
-
```bash
|
|
77
|
-
git commit -m "feat: add OAuth2 support"
|
|
78
|
-
git commit -m "feat(auth): implement JWT tokens"
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
### Patch Release (0.0.X)
|
|
82
|
-
|
|
83
|
-
```bash
|
|
84
|
-
git commit -m "fix: resolve memory leak"
|
|
85
|
-
git commit -m "docs: update API docs"
|
|
86
|
-
git commit -m "chore: update dependencies"
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
## 🛠️ Configuration Details
|
|
90
|
-
|
|
91
|
-
### Commit Analysis Logic
|
|
92
|
-
|
|
93
|
-
```bash
|
|
94
|
-
# Check for breaking changes first
|
|
95
|
-
if echo "$COMMITS" | grep -q "BREAKING CHANGE\|!:"; then
|
|
96
|
-
RELEASE_TYPE="major"
|
|
97
|
-
# Then check for new features
|
|
98
|
-
elif echo "$COMMITS" | grep -q "^feat"; then
|
|
99
|
-
RELEASE_TYPE="minor"
|
|
100
|
-
# Default to patch
|
|
101
|
-
else
|
|
102
|
-
RELEASE_TYPE="patch"
|
|
103
|
-
fi
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
### Version Calculation
|
|
107
|
-
|
|
108
|
-
Uses the `@pawel-up/semver` package for proper semantic versioning:
|
|
109
|
-
|
|
110
|
-
```javascript
|
|
111
|
-
import SemVer from '@pawel-up/semver/classes/semver.js';
|
|
112
|
-
const ver = new SemVer(currentVersion);
|
|
113
|
-
ver.inc(releaseType);
|
|
114
|
-
return ver.format();
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
### Changelog Generation
|
|
118
|
-
|
|
119
|
-
Uses `conventional-changelog-cli` with the `conventionalcommits` preset:
|
|
120
|
-
|
|
121
|
-
```bash
|
|
122
|
-
npx conventional-changelog-cli@latest release --preset conventionalcommits --release-count 1
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
## 🔧 Setup Requirements
|
|
126
|
-
|
|
127
|
-
### GitHub Secrets
|
|
128
|
-
|
|
129
|
-
- `GITHUB_TOKEN`: Automatically provided
|
|
130
|
-
- `NPM_TOKEN`: Required for npm publishing
|
|
131
|
-
|
|
132
|
-
### Dependencies
|
|
133
|
-
|
|
134
|
-
- `conventional-changelog-cli`: For changelog generation
|
|
135
|
-
- `@pawel-up/semver`: For version calculation
|
|
136
|
-
- `@commitlint/config-conventional`: For commit validation
|
|
137
|
-
|
|
138
|
-
### Permissions
|
|
139
|
-
|
|
140
|
-
The workflows require these permissions:
|
|
141
|
-
|
|
142
|
-
- `contents: write` - Create releases and tags
|
|
143
|
-
- `issues: write` - Update issues
|
|
144
|
-
- `pull-requests: write` - Update PRs
|
|
145
|
-
|
|
146
|
-
## 🚀 Usage Examples
|
|
147
|
-
|
|
148
|
-
### Normal Development Flow
|
|
149
|
-
|
|
150
|
-
1. **Create feature branch**
|
|
151
|
-
|
|
152
|
-
```bash
|
|
153
|
-
git checkout -b feature/new-auth
|
|
154
|
-
```
|
|
155
|
-
|
|
156
|
-
2. **Make changes with proper commits**
|
|
157
|
-
|
|
158
|
-
```bash
|
|
159
|
-
git commit -m "feat: add OAuth2 authentication"
|
|
160
|
-
git commit -m "docs: update authentication docs"
|
|
161
|
-
```
|
|
162
|
-
|
|
163
|
-
3. **Create PR and merge to main**
|
|
164
|
-
- PR triggers test workflow
|
|
165
|
-
- Merge triggers auto-release workflow
|
|
166
|
-
- System creates minor release automatically
|
|
167
|
-
|
|
168
|
-
### Hotfix Flow
|
|
169
|
-
|
|
170
|
-
1. **Create hotfix branch**
|
|
171
|
-
|
|
172
|
-
```bash
|
|
173
|
-
git checkout -b hotfix/critical-bug
|
|
174
|
-
```
|
|
175
|
-
|
|
176
|
-
2. **Fix and commit**
|
|
177
|
-
|
|
178
|
-
```bash
|
|
179
|
-
git commit -m "fix: resolve critical memory leak"
|
|
180
|
-
```
|
|
181
|
-
|
|
182
|
-
3. **Merge to main**
|
|
183
|
-
- System creates patch release automatically
|
|
184
|
-
|
|
185
|
-
### Manual Release (if needed)
|
|
186
|
-
|
|
187
|
-
```bash
|
|
188
|
-
# For immediate release
|
|
189
|
-
npm run release:patch
|
|
190
|
-
|
|
191
|
-
# Or create tag manually
|
|
192
|
-
git tag v1.2.3
|
|
193
|
-
git push origin v1.2.3
|
|
194
|
-
```
|
|
195
|
-
|
|
196
|
-
## 🔍 Monitoring and Debugging
|
|
197
|
-
|
|
198
|
-
### Workflow Logs
|
|
199
|
-
|
|
200
|
-
Check the GitHub Actions tab to see:
|
|
201
|
-
|
|
202
|
-
- Which commits were analyzed
|
|
203
|
-
- What release type was determined
|
|
204
|
-
- Why a release was or wasn't created
|
|
205
|
-
|
|
206
|
-
### Common Issues
|
|
207
|
-
|
|
208
|
-
1. **No release created**: No new commits since last tag
|
|
209
|
-
2. **Wrong release type**: Check commit message format
|
|
210
|
-
3. **Tests failing**: Release won't proceed
|
|
211
|
-
4. **Permission errors**: Check GitHub token permissions
|
|
212
|
-
|
|
213
|
-
### Debugging Commands
|
|
214
|
-
|
|
215
|
-
```bash
|
|
216
|
-
# Check last tag
|
|
217
|
-
git describe --tags --abbrev=0
|
|
218
|
-
|
|
219
|
-
# See commits since last tag
|
|
220
|
-
git log --pretty=format:"%s" $(git describe --tags --abbrev=0)..HEAD
|
|
221
|
-
|
|
222
|
-
# Check conventional commit format
|
|
223
|
-
npx commitlint --edit .git/COMMIT_EDITMSG
|
|
224
|
-
```
|
|
225
|
-
|
|
226
|
-
## 🎉 Benefits
|
|
227
|
-
|
|
228
|
-
1. **Zero manual intervention** for regular releases
|
|
229
|
-
2. **Consistent release process** with proper semantic versioning
|
|
230
|
-
3. **Automatic changelog generation** from commit history
|
|
231
|
-
4. **Quality gates** with automated testing
|
|
232
|
-
5. **Flexible fallback** for special cases
|
|
233
|
-
6. **Proper audit trail** with conventional commits
|
|
234
|
-
|
|
235
|
-
This setup provides a modern, automated release system that follows industry best practices and reduces manual work while ensuring quality and consistency.
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { TemplateResult, CSSResult } from 'lit';
|
|
2
|
-
import '../md/icons/ui-icon.js';
|
|
3
|
-
import '../md/button/ui-button.js';
|
|
4
|
-
declare const Base: (new (...args: any[]) => import("../mixins/RenderableMixin.js").RenderableMixinInterface) & (new (...args: any[]) => import("../mixins/RouteMixin.js").RouteMixinInterface) & {
|
|
5
|
-
new (): EventTarget;
|
|
6
|
-
prototype: EventTarget;
|
|
7
|
-
};
|
|
8
|
-
/**
|
|
9
|
-
* A base class for demo pages in the API Client ecosystem.
|
|
10
|
-
*/
|
|
11
|
-
export declare abstract class DemoPage extends Base {
|
|
12
|
-
static get styles(): CSSResult[];
|
|
13
|
-
/**
|
|
14
|
-
* Component name rendered in the header section.
|
|
15
|
-
*/
|
|
16
|
-
accessor componentName: string;
|
|
17
|
-
/**
|
|
18
|
-
* Determines whether the initial render had run and the `firstRender()`
|
|
19
|
-
* function was called.
|
|
20
|
-
*/
|
|
21
|
-
accessor firstRendered: boolean;
|
|
22
|
-
/**
|
|
23
|
-
* Whether or not the dark theme is active
|
|
24
|
-
*/
|
|
25
|
-
accessor darkThemeActive: boolean;
|
|
26
|
-
/**
|
|
27
|
-
* For some demo pages, whether the user is authenticated in the store.
|
|
28
|
-
*/
|
|
29
|
-
authenticated: boolean;
|
|
30
|
-
constructor();
|
|
31
|
-
/**
|
|
32
|
-
* Initializes media queries and observers.
|
|
33
|
-
*/
|
|
34
|
-
initMediaQueries(): void;
|
|
35
|
-
protected handleMediaQuery(e: MediaQueryListEvent): void;
|
|
36
|
-
/**
|
|
37
|
-
* The callback is called when the `darkThemeActive` property change.
|
|
38
|
-
* Overwrite this function to change the theme of the demo page.
|
|
39
|
-
*
|
|
40
|
-
* Note, this is not called by the `darkThemeActive` setter. This is called during the
|
|
41
|
-
* initialization and then when the media query event is dispatched.
|
|
42
|
-
* Call this manually when changing this value in the child page.
|
|
43
|
-
*/
|
|
44
|
-
protected themeActiveCallback(): void;
|
|
45
|
-
protected activateTheme(type: 'light' | 'dark'): void;
|
|
46
|
-
/**
|
|
47
|
-
* A handler for the `change` event for an element that has `checked` and `name` properties.
|
|
48
|
-
* This can be used with `ui-switch`, `ui-checkbox`, and `checkbox` elements.
|
|
49
|
-
*
|
|
50
|
-
* The `name` should correspond to a variable name to be set. The set value is the value
|
|
51
|
-
* of `checked` property read from the event's target.
|
|
52
|
-
*/
|
|
53
|
-
protected _toggleBooleanOption(e: Event): void;
|
|
54
|
-
loadMonaco(): Promise<void>;
|
|
55
|
-
/**
|
|
56
|
-
* The page render function. Usually you don't need to use it.
|
|
57
|
-
* It renders the header template, main section, and the content.
|
|
58
|
-
*/
|
|
59
|
-
pageTemplate(): TemplateResult;
|
|
60
|
-
/**
|
|
61
|
-
* Call this on the top of the `render()` method to render demo navigation
|
|
62
|
-
* @returns HTML template for demo header
|
|
63
|
-
*/
|
|
64
|
-
headerTemplate(): TemplateResult;
|
|
65
|
-
navigationTemplate(): TemplateResult;
|
|
66
|
-
/**
|
|
67
|
-
* Abstract method. When not overriding `render()` method you can use
|
|
68
|
-
* this function to render content inside the standard API components layout.
|
|
69
|
-
*
|
|
70
|
-
* ```
|
|
71
|
-
* contentTemplate() {
|
|
72
|
-
* return html`<p>Demo content</p>`;
|
|
73
|
-
* }
|
|
74
|
-
* ```
|
|
75
|
-
*/
|
|
76
|
-
abstract contentTemplate(): TemplateResult;
|
|
77
|
-
handleAuthenticate(): void;
|
|
78
|
-
authenticateTemplate(): TemplateResult;
|
|
79
|
-
}
|
|
80
|
-
export {};
|
|
81
|
-
//# sourceMappingURL=DemoPage.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DemoPage.d.ts","sourceRoot":"","sources":["../../../src/demo/DemoPage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,cAAc,EAAE,SAAS,EAAE,MAAM,KAAK,CAAA;AAWrD,OAAO,wBAAwB,CAAA;AAC/B,OAAO,2BAA2B,CAAA;AAElC,QAAA,MAAM,IAAI;;;CAA2C,CAAA;AAErD;;GAEG;AACH,8BAAsB,QAAS,SAAQ,IAAI;IAEzC,MAAM,KAAK,MAAM,IAAI,SAAS,EAAE,CAE/B;IAED;;OAEG;IACS,QAAQ,CAAC,aAAa,SAAK;IAEvC;;;OAGG;IACH,SAAkB,aAAa,UAAQ;IAEvC;;OAEG;IACS,QAAQ,CAAC,eAAe,UAAQ;IAE5C;;OAEG;IACH,aAAa,UAAQ;;IAUrB;;OAEG;IACH,gBAAgB,IAAI,IAAI;IASxB,SAAS,CAAC,gBAAgB,CAAC,CAAC,EAAE,mBAAmB,GAAG,IAAI;IAKxD;;;;;;;OAOG;IACH,SAAS,CAAC,mBAAmB,IAAI,IAAI;IASrC,SAAS,CAAC,aAAa,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI;IAgBrD;;;;;;OAMG;IACH,SAAS,CAAC,oBAAoB,CAAC,CAAC,EAAE,KAAK,GAAG,IAAI;IAMxC,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAOjC;;;OAGG;IACM,YAAY,IAAI,cAAc;IAKvC;;;OAGG;IACH,cAAc,IAAI,cAAc;IAKhC,kBAAkB,IAAI,cAAc;IAIpC;;;;;;;;;OASG;IACH,QAAQ,CAAC,eAAe,IAAI,cAAc;IAE1C,kBAAkB,IAAI,IAAI;IAI1B,oBAAoB,IAAI,cAAc;CAMvC"}
|
|
@@ -1,175 +0,0 @@
|
|
|
1
|
-
import { __esDecorate, __runInitializers } from "tslib";
|
|
2
|
-
import { html } from 'lit';
|
|
3
|
-
import { RenderableMixin } from '../mixins/RenderableMixin.js';
|
|
4
|
-
import reactive from '../decorators/reactive.js';
|
|
5
|
-
import styles from './DemoStyles.js';
|
|
6
|
-
import { RouteMixin } from '../mixins/RouteMixin.js';
|
|
7
|
-
import * as MonacoLoader from '../monaco/loader.js';
|
|
8
|
-
import typography from '../styles/m3/typography.module.js';
|
|
9
|
-
import surface from '../styles/m3/surface.module.js';
|
|
10
|
-
import { adaptStatic } from '../decorators/styles.js';
|
|
11
|
-
import '../md/icons/ui-icon.js';
|
|
12
|
-
import '../md/button/ui-button.js';
|
|
13
|
-
const Base = RenderableMixin(RouteMixin(EventTarget));
|
|
14
|
-
/**
|
|
15
|
-
* A base class for demo pages in the API Client ecosystem.
|
|
16
|
-
*/
|
|
17
|
-
let DemoPage = (() => {
|
|
18
|
-
let _classSuper = Base;
|
|
19
|
-
let _staticExtraInitializers = [];
|
|
20
|
-
let _static_get_styles_decorators;
|
|
21
|
-
let _componentName_decorators;
|
|
22
|
-
let _componentName_initializers = [];
|
|
23
|
-
let _componentName_extraInitializers = [];
|
|
24
|
-
let _darkThemeActive_decorators;
|
|
25
|
-
let _darkThemeActive_initializers = [];
|
|
26
|
-
let _darkThemeActive_extraInitializers = [];
|
|
27
|
-
return class DemoPage extends _classSuper {
|
|
28
|
-
static {
|
|
29
|
-
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
30
|
-
_static_get_styles_decorators = [adaptStatic];
|
|
31
|
-
_componentName_decorators = [reactive()];
|
|
32
|
-
_darkThemeActive_decorators = [reactive()];
|
|
33
|
-
__esDecorate(this, null, _static_get_styles_decorators, { kind: "getter", name: "styles", static: true, private: false, access: { has: obj => "styles" in obj, get: obj => obj.styles }, metadata: _metadata }, null, _staticExtraInitializers);
|
|
34
|
-
__esDecorate(this, null, _componentName_decorators, { kind: "accessor", name: "componentName", static: false, private: false, access: { has: obj => "componentName" in obj, get: obj => obj.componentName, set: (obj, value) => { obj.componentName = value; } }, metadata: _metadata }, _componentName_initializers, _componentName_extraInitializers);
|
|
35
|
-
__esDecorate(this, null, _darkThemeActive_decorators, { kind: "accessor", name: "darkThemeActive", static: false, private: false, access: { has: obj => "darkThemeActive" in obj, get: obj => obj.darkThemeActive, set: (obj, value) => { obj.darkThemeActive = value; } }, metadata: _metadata }, _darkThemeActive_initializers, _darkThemeActive_extraInitializers);
|
|
36
|
-
if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
37
|
-
__runInitializers(this, _staticExtraInitializers);
|
|
38
|
-
}
|
|
39
|
-
static get styles() {
|
|
40
|
-
return [typography, styles, surface];
|
|
41
|
-
}
|
|
42
|
-
#componentName_accessor_storage = __runInitializers(this, _componentName_initializers, ''
|
|
43
|
-
/**
|
|
44
|
-
* Determines whether the initial render had run and the `firstRender()`
|
|
45
|
-
* function was called.
|
|
46
|
-
*/
|
|
47
|
-
);
|
|
48
|
-
/**
|
|
49
|
-
* Component name rendered in the header section.
|
|
50
|
-
*/
|
|
51
|
-
get componentName() { return this.#componentName_accessor_storage; }
|
|
52
|
-
set componentName(value) { this.#componentName_accessor_storage = value; }
|
|
53
|
-
#firstRendered_accessor_storage = (__runInitializers(this, _componentName_extraInitializers), false);
|
|
54
|
-
/**
|
|
55
|
-
* Determines whether the initial render had run and the `firstRender()`
|
|
56
|
-
* function was called.
|
|
57
|
-
*/
|
|
58
|
-
get firstRendered() { return this.#firstRendered_accessor_storage; }
|
|
59
|
-
set firstRendered(value) { this.#firstRendered_accessor_storage = value; }
|
|
60
|
-
#darkThemeActive_accessor_storage = __runInitializers(this, _darkThemeActive_initializers, false
|
|
61
|
-
/**
|
|
62
|
-
* For some demo pages, whether the user is authenticated in the store.
|
|
63
|
-
*/
|
|
64
|
-
);
|
|
65
|
-
/**
|
|
66
|
-
* Whether or not the dark theme is active
|
|
67
|
-
*/
|
|
68
|
-
get darkThemeActive() { return this.#darkThemeActive_accessor_storage; }
|
|
69
|
-
set darkThemeActive(value) { this.#darkThemeActive_accessor_storage = value; }
|
|
70
|
-
/**
|
|
71
|
-
* For some demo pages, whether the user is authenticated in the store.
|
|
72
|
-
*/
|
|
73
|
-
authenticated = (__runInitializers(this, _darkThemeActive_extraInitializers), false);
|
|
74
|
-
constructor() {
|
|
75
|
-
super();
|
|
76
|
-
this.handleMediaQuery = this.handleMediaQuery.bind(this);
|
|
77
|
-
this.initMediaQueries();
|
|
78
|
-
document.body.classList.add('demo');
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* Initializes media queries and observers.
|
|
82
|
-
*/
|
|
83
|
-
initMediaQueries() {
|
|
84
|
-
const matcher = window.matchMedia('(prefers-color-scheme: dark)');
|
|
85
|
-
if (matcher.matches) {
|
|
86
|
-
this.darkThemeActive = true;
|
|
87
|
-
}
|
|
88
|
-
this.themeActiveCallback();
|
|
89
|
-
matcher.addEventListener('change', this.handleMediaQuery);
|
|
90
|
-
}
|
|
91
|
-
handleMediaQuery(e) {
|
|
92
|
-
this.darkThemeActive = e.matches;
|
|
93
|
-
this.themeActiveCallback();
|
|
94
|
-
}
|
|
95
|
-
/**
|
|
96
|
-
* The callback is called when the `darkThemeActive` property change.
|
|
97
|
-
* Overwrite this function to change the theme of the demo page.
|
|
98
|
-
*
|
|
99
|
-
* Note, this is not called by the `darkThemeActive` setter. This is called during the
|
|
100
|
-
* initialization and then when the media query event is dispatched.
|
|
101
|
-
* Call this manually when changing this value in the child page.
|
|
102
|
-
*/
|
|
103
|
-
themeActiveCallback() {
|
|
104
|
-
const { darkThemeActive } = this;
|
|
105
|
-
if (darkThemeActive) {
|
|
106
|
-
this.activateTheme('dark');
|
|
107
|
-
}
|
|
108
|
-
else {
|
|
109
|
-
this.activateTheme('light');
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
activateTheme(type) {
|
|
113
|
-
const root = document.querySelector('html');
|
|
114
|
-
if (!root) {
|
|
115
|
-
return;
|
|
116
|
-
}
|
|
117
|
-
const { classList } = root;
|
|
118
|
-
// clear all themes
|
|
119
|
-
classList.forEach((value) => {
|
|
120
|
-
if (value.startsWith('theme-')) {
|
|
121
|
-
classList.remove(value);
|
|
122
|
-
}
|
|
123
|
-
});
|
|
124
|
-
const name = `theme-${type}`;
|
|
125
|
-
classList.add(name);
|
|
126
|
-
}
|
|
127
|
-
/**
|
|
128
|
-
* A handler for the `change` event for an element that has `checked` and `name` properties.
|
|
129
|
-
* This can be used with `ui-switch`, `ui-checkbox`, and `checkbox` elements.
|
|
130
|
-
*
|
|
131
|
-
* The `name` should correspond to a variable name to be set. The set value is the value
|
|
132
|
-
* of `checked` property read from the event's target.
|
|
133
|
-
*/
|
|
134
|
-
_toggleBooleanOption(e) {
|
|
135
|
-
const { name, checked } = e.target;
|
|
136
|
-
this[name] = checked;
|
|
137
|
-
}
|
|
138
|
-
async loadMonaco() {
|
|
139
|
-
const base = new URL('/node_modules/monaco-editor/', window.location.href).toString();
|
|
140
|
-
MonacoLoader.createEnvironment(base);
|
|
141
|
-
await MonacoLoader.loadMonaco(base);
|
|
142
|
-
await MonacoLoader.monacoReady();
|
|
143
|
-
}
|
|
144
|
-
/**
|
|
145
|
-
* The page render function. Usually you don't need to use it.
|
|
146
|
-
* It renders the header template, main section, and the content.
|
|
147
|
-
*/
|
|
148
|
-
pageTemplate() {
|
|
149
|
-
return html ` ${this.headerTemplate()} ${this.navigationTemplate()}
|
|
150
|
-
<main>${this.contentTemplate()}</main>`;
|
|
151
|
-
}
|
|
152
|
-
/**
|
|
153
|
-
* Call this on the top of the `render()` method to render demo navigation
|
|
154
|
-
* @returns HTML template for demo header
|
|
155
|
-
*/
|
|
156
|
-
headerTemplate() {
|
|
157
|
-
const { componentName } = this;
|
|
158
|
-
return html ` <header>${componentName ? html `<h1 class="api-title">${componentName}</h1>` : ''}</header>`;
|
|
159
|
-
}
|
|
160
|
-
navigationTemplate() {
|
|
161
|
-
return html ``;
|
|
162
|
-
}
|
|
163
|
-
handleAuthenticate() {
|
|
164
|
-
// ...
|
|
165
|
-
}
|
|
166
|
-
authenticateTemplate() {
|
|
167
|
-
return html `
|
|
168
|
-
<p>Store authorization required.</p>
|
|
169
|
-
<ui-button color="filled" @click="${this.handleAuthenticate}">Authenticate</ui-button>
|
|
170
|
-
`;
|
|
171
|
-
}
|
|
172
|
-
};
|
|
173
|
-
})();
|
|
174
|
-
export { DemoPage };
|
|
175
|
-
//# sourceMappingURL=DemoPage.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DemoPage.js","sourceRoot":"","sources":["../../../src/demo/DemoPage.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAA6B,MAAM,KAAK,CAAA;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAA;AAC9D,OAAO,QAAQ,MAAM,2BAA2B,CAAA;AAChD,O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derableMixin } from '../mixins/RenderableMixin.js'\nimport reactive from '../decorators/reactive.js'\nimport styles from './DemoStyles.js'\nimport { RouteMixin } from '../mixins/RouteMixin.js'\nimport * as MonacoLoader from '../monaco/loader.js'\nimport typography from '../styles/m3/typography.module.js'\nimport surface from '../styles/m3/surface.module.js'\nimport type CheckboxElement from '../md/checkbox/internals/CheckboxElement.js'\nimport { adaptStatic } from '../decorators/styles.js'\n\nimport '../md/icons/ui-icon.js'\nimport '../md/button/ui-button.js'\n\nconst Base = RenderableMixin(RouteMixin(EventTarget))\n\n/**\n * A base class for demo pages in the API Client ecosystem.\n */\nexport abstract class DemoPage extends Base {\n @adaptStatic\n static get styles(): CSSResult[] {\n return [typography, styles, surface]\n }\n\n /**\n * Component name rendered in the header section.\n */\n @reactive() accessor componentName = ''\n\n /**\n * Determines whether the initial render had run and the `firstRender()`\n * function was called.\n */\n override accessor firstRendered = false\n\n /**\n * Whether or not the dark theme is active\n */\n @reactive() accessor darkThemeActive = false\n\n /**\n * For some demo pages, whether the user is authenticated in the store.\n */\n authenticated = false\n\n constructor() {\n super()\n this.handleMediaQuery = this.handleMediaQuery.bind(this)\n this.initMediaQueries()\n\n document.body.classList.add('demo')\n }\n\n /**\n * Initializes media queries and observers.\n */\n initMediaQueries(): void {\n const matcher = window.matchMedia('(prefers-color-scheme: dark)')\n if (matcher.matches) {\n this.darkThemeActive = true\n }\n this.themeActiveCallback()\n matcher.addEventListener('change', this.handleMediaQuery)\n }\n\n protected handleMediaQuery(e: MediaQueryListEvent): void {\n this.darkThemeActive = e.matches\n this.themeActiveCallback()\n }\n\n /**\n * The callback is called when the `darkThemeActive` property change.\n * Overwrite this function to change the theme of the demo page.\n *\n * Note, this is not called by the `darkThemeActive` setter. This is called during the\n * initialization and then when the media query event is dispatched.\n * Call this manually when changing this value in the child page.\n */\n protected themeActiveCallback(): void {\n const { darkThemeActive } = this\n if (darkThemeActive) {\n this.activateTheme('dark')\n } else {\n this.activateTheme('light')\n }\n }\n\n protected activateTheme(type: 'light' | 'dark'): void {\n const root = document.querySelector('html')\n if (!root) {\n return\n }\n const { classList } = root\n // clear all themes\n classList.forEach((value) => {\n if (value.startsWith('theme-')) {\n classList.remove(value)\n }\n })\n const name = `theme-${type}`\n classList.add(name)\n }\n\n /**\n * A handler for the `change` event for an element that has `checked` and `name` properties.\n * This can be used with `ui-switch`, `ui-checkbox`, and `checkbox` elements.\n *\n * The `name` should correspond to a variable name to be set. The set value is the value\n * of `checked` property read from the event's target.\n */\n protected _toggleBooleanOption(e: Event): void {\n const { name, checked } = e.target as CheckboxElement\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ;(this as any)[name as string] = checked\n }\n\n async loadMonaco(): Promise<void> {\n const base = new URL('/node_modules/monaco-editor/', window.location.href).toString()\n MonacoLoader.createEnvironment(base)\n await MonacoLoader.loadMonaco(base)\n await MonacoLoader.monacoReady()\n }\n\n /**\n * The page render function. Usually you don't need to use it.\n * It renders the header template, main section, and the content.\n */\n override pageTemplate(): TemplateResult {\n return html` ${this.headerTemplate()} ${this.navigationTemplate()}\n <main>${this.contentTemplate()}</main>`\n }\n\n /**\n * Call this on the top of the `render()` method to render demo navigation\n * @returns HTML template for demo header\n */\n headerTemplate(): TemplateResult {\n const { componentName } = this\n return html` <header>${componentName ? html`<h1 class=\"api-title\">${componentName}</h1>` : ''}</header>`\n }\n\n navigationTemplate(): TemplateResult {\n return html``\n }\n\n /**\n * Abstract method. When not overriding `render()` method you can use\n * this function to render content inside the standard API components layout.\n *\n * ```\n * contentTemplate() {\n * return html`<p>Demo content</p>`;\n * }\n * ```\n */\n abstract contentTemplate(): TemplateResult\n\n handleAuthenticate(): void {\n // ...\n }\n\n authenticateTemplate(): TemplateResult {\n return html`\n <p>Store authorization required.</p>\n <ui-button color=\"filled\" @click=\"${this.handleAuthenticate}\">Authenticate</ui-button>\n `\n }\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DemoStyles.d.ts","sourceRoot":"","sources":["../../../src/demo/DemoStyles.ts"],"names":[],"mappings":";AAEA,wBAyDC"}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { css } from 'lit';
|
|
2
|
-
export default css `
|
|
3
|
-
:root {
|
|
4
|
-
--dot-size: 1px;
|
|
5
|
-
--dot-space: 7px;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
html,
|
|
9
|
-
body {
|
|
10
|
-
margin: 0;
|
|
11
|
-
font-family: 'Roboto', 'Noto', sans-serif;
|
|
12
|
-
background-color: var(--md-sys-color-surface);
|
|
13
|
-
color: var(--md-sys-color-on-surface);
|
|
14
|
-
background-image: radial-gradient(var(--md-sys-color-inverse-on-surface) 1px, transparent 0);
|
|
15
|
-
background-size: var(--dot-space) var(--dot-space);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.demo {
|
|
19
|
-
margin: 0;
|
|
20
|
-
padding: 0;
|
|
21
|
-
min-height: 100vh;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
header {
|
|
25
|
-
background-color: var(--md-sys-color-surface-variant);
|
|
26
|
-
color: var(--md-sys-color-on-surface-variant);
|
|
27
|
-
display: flex;
|
|
28
|
-
align-items: center;
|
|
29
|
-
|
|
30
|
-
max-width: 1440px;
|
|
31
|
-
margin: 20px 40px;
|
|
32
|
-
padding: 0 24px;
|
|
33
|
-
border-radius: 40px;
|
|
34
|
-
|
|
35
|
-
font-family: var(--md-sys-typescale-title-large-font);
|
|
36
|
-
font-weight: var(--md-sys-typescale-title-large-weight);
|
|
37
|
-
font-size: var(--md-sys-typescale-title-large-size);
|
|
38
|
-
letter-spacing: var(--md-sys-typescale-title-large-tracking);
|
|
39
|
-
line-height: var(--md-sys-typescale-title-large-height);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
#app {
|
|
43
|
-
height: 100%;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
main {
|
|
47
|
-
/* max-width: 900px;
|
|
48
|
-
margin: 40px auto; */
|
|
49
|
-
border-radius: 40px;
|
|
50
|
-
padding: 24px;
|
|
51
|
-
|
|
52
|
-
/* background-color: var(--md-sys-color-primary-container);
|
|
53
|
-
color: var(--md-sys-color-on-primary-container); */
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.demo-section {
|
|
57
|
-
margin: 60px 0;
|
|
58
|
-
}
|
|
59
|
-
`;
|
|
60
|
-
//# sourceMappingURL=DemoStyles.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DemoStyles.js","sourceRoot":"","sources":["../../../src/demo/DemoStyles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAEzB,eAAe,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyDjB,CAAA","sourcesContent":["import { css } from 'lit'\n\nexport default css`\n :root {\n --dot-size: 1px;\n --dot-space: 7px;\n }\n\n html,\n body {\n margin: 0;\n font-family: 'Roboto', 'Noto', sans-serif;\n background-color: var(--md-sys-color-surface);\n color: var(--md-sys-color-on-surface);\n background-image: radial-gradient(var(--md-sys-color-inverse-on-surface) 1px, transparent 0);\n background-size: var(--dot-space) var(--dot-space);\n }\n\n .demo {\n margin: 0;\n padding: 0;\n min-height: 100vh;\n }\n\n header {\n background-color: var(--md-sys-color-surface-variant);\n color: var(--md-sys-color-on-surface-variant);\n display: flex;\n align-items: center;\n\n max-width: 1440px;\n margin: 20px 40px;\n padding: 0 24px;\n border-radius: 40px;\n\n font-family: var(--md-sys-typescale-title-large-font);\n font-weight: var(--md-sys-typescale-title-large-weight);\n font-size: var(--md-sys-typescale-title-large-size);\n letter-spacing: var(--md-sys-typescale-title-large-tracking);\n line-height: var(--md-sys-typescale-title-large-height);\n }\n\n #app {\n height: 100%;\n }\n\n main {\n /* max-width: 900px;\n margin: 40px auto; */\n border-radius: 40px;\n padding: 24px;\n\n /* background-color: var(--md-sys-color-primary-container);\n color: var(--md-sys-color-on-primary-container); */\n }\n\n .demo-section {\n margin: 60px 0;\n }\n`\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Navigation.test.d.ts","sourceRoot":"","sources":["../../../../test/elements/navigation/Navigation.test.ts"],"names":[],"mappings":"AAEA,OAAO,mDAAmD,CAAA;AAC1D,OAAO,wDAAwD,CAAA"}
|