dev-inspector 1.1.1 → 1.2.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/README.md +12 -7
- package/lib/init.d.ts +9 -0
- package/lib/init.js +3 -2
- package/lib/ui/panel/behavior/setupPanelBehavior.d.ts +3 -0
- package/lib/ui/panel/behavior/setupPanelBehavior.js +3 -1
- package/lib/ui/panel/index.d.ts +2 -0
- package/lib/ui/panel/index.js +2 -2
- package/lib/ui/panel/shared/ensureStyle.js +2 -1
- package/lib/ui/panel/skin/applySkin.d.ts +2 -0
- package/lib/ui/panel/skin/applySkin.js +6 -0
- package/lib/ui/panel/skin/cartoonStyles.d.ts +14 -0
- package/lib/ui/panel/skin/cartoonStyles.js +172 -0
- package/lib/ui/panel/skin/index.d.ts +3 -0
- package/lib/ui/panel/skin/index.js +7 -0
- package/lib/ui/panel/skin/types.d.ts +4 -0
- package/lib/ui/panel/skin/types.js +2 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -22,6 +22,7 @@ In-page devtools-style logger panel for web apps. Capture **console** and **netw
|
|
|
22
22
|
- Search across console messages and network requests (URL, method, status, body)
|
|
23
23
|
- Auto-scroll lock with a "Latest" jump button that surfaces unread entries
|
|
24
24
|
- Light / dark theme with `localStorage` persistence (defaults to light)
|
|
25
|
+
- Optional cartoon skin (Arc-inspired sticker look) selectable at init
|
|
25
26
|
- Configurable panel title (used in the header and the floating toggle)
|
|
26
27
|
- Vite demo playground
|
|
27
28
|
|
|
@@ -44,22 +45,26 @@ initDevInspector({
|
|
|
44
45
|
title: "My App Inspector",
|
|
45
46
|
theme: "light",
|
|
46
47
|
persistTheme: true,
|
|
48
|
+
skin: "default",
|
|
47
49
|
},
|
|
48
50
|
});
|
|
49
51
|
```
|
|
50
52
|
|
|
51
53
|
### Panel options
|
|
52
54
|
|
|
53
|
-
| Option | Type
|
|
54
|
-
| ----------------- |
|
|
55
|
-
| `title` | `string`
|
|
56
|
-
| `initiallyOpen` | `boolean`
|
|
57
|
-
| `theme` | `"light" \| "dark"`
|
|
58
|
-
| `persistTheme` | `boolean`
|
|
59
|
-
| `themeStorageKey` | `string`
|
|
55
|
+
| Option | Type | Default | Description |
|
|
56
|
+
| ----------------- | ------------------------ | ----------------------- | ------------------------------------------------------------------------------------ |
|
|
57
|
+
| `title` | `string` | `"Dev Inspector"` | Label shown in the panel header **and** the floating toggle pill in the bottom-right |
|
|
58
|
+
| `initiallyOpen` | `boolean` | `true` | Open the panel on mount |
|
|
59
|
+
| `theme` | `"light" \| "dark"` | `"light"` | Initial theme. Overridden by a stored value when `persistTheme` is `true` |
|
|
60
|
+
| `persistTheme` | `boolean` | `true` | Persist the user's theme choice in `localStorage` |
|
|
61
|
+
| `themeStorageKey` | `string` | `"dev-inspector:theme"` | Key used by `localStorage` to remember the theme |
|
|
62
|
+
| `skin` | `"default" \| "cartoon"` | `"default"` | Visual skin. `"cartoon"` switches to an Arc-inspired sticker look (light + dark) |
|
|
60
63
|
|
|
61
64
|
The theme can also be toggled at runtime via the sun/moon button in the panel header. When `persistTheme` is `true`, the choice is stored under `themeStorageKey` and restored on the next load.
|
|
62
65
|
|
|
66
|
+
The **skin** is an init-time decision (not exposed to end users). The cartoon skin shares the same dark/light toggle behaviour — both palettes are themed.
|
|
67
|
+
|
|
63
68
|
## Important: Browser-only (SSR)
|
|
64
69
|
|
|
65
70
|
Dev Inspector’s UI (`createPanel()` and the default `initDevInspector()` flow) requires a **browser environment** (it needs `document`).
|
package/lib/init.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export type Theme = "light" | "dark";
|
|
2
|
+
export type Skin = "default" | "cartoon";
|
|
2
3
|
export type InitOptions = {
|
|
3
4
|
maxSize?: number;
|
|
4
5
|
panelOptions?: {
|
|
@@ -7,6 +8,14 @@ export type InitOptions = {
|
|
|
7
8
|
theme?: Theme;
|
|
8
9
|
persistTheme?: boolean;
|
|
9
10
|
themeStorageKey?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Visual skin for the inspector panel. Chosen at init time only —
|
|
13
|
+
* runtime users can still toggle dark/light, but the skin choice
|
|
14
|
+
* (e.g. cartoon branding) is a developer-side decision.
|
|
15
|
+
*
|
|
16
|
+
* @default "default"
|
|
17
|
+
*/
|
|
18
|
+
skin?: Skin;
|
|
10
19
|
};
|
|
11
20
|
networkOptions?: {
|
|
12
21
|
includeBodies?: boolean;
|
package/lib/init.js
CHANGED
|
@@ -12,7 +12,7 @@ function getGlobalBag() {
|
|
|
12
12
|
return globalThis;
|
|
13
13
|
}
|
|
14
14
|
function initDevInspector(options = {}) {
|
|
15
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
15
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
16
16
|
const key = getGlobalInstanceKey();
|
|
17
17
|
const bag = getGlobalBag();
|
|
18
18
|
const prev = bag[key];
|
|
@@ -20,7 +20,7 @@ function initDevInspector(options = {}) {
|
|
|
20
20
|
try {
|
|
21
21
|
prev.destroy();
|
|
22
22
|
}
|
|
23
|
-
catch (
|
|
23
|
+
catch (_p) {
|
|
24
24
|
void 0;
|
|
25
25
|
}
|
|
26
26
|
}
|
|
@@ -38,6 +38,7 @@ function initDevInspector(options = {}) {
|
|
|
38
38
|
theme: (_k = options.panelOptions) === null || _k === void 0 ? void 0 : _k.theme,
|
|
39
39
|
persistTheme: (_l = options.panelOptions) === null || _l === void 0 ? void 0 : _l.persistTheme,
|
|
40
40
|
themeStorageKey: (_m = options.panelOptions) === null || _m === void 0 ? void 0 : _m.themeStorageKey,
|
|
41
|
+
skin: (_o = options.panelOptions) === null || _o === void 0 ? void 0 : _o.skin,
|
|
41
42
|
});
|
|
42
43
|
const destroy = () => {
|
|
43
44
|
try {
|
|
@@ -2,7 +2,10 @@ import type { LogStorage } from "../../../storage/logStorage";
|
|
|
2
2
|
import type { PanelHandle } from "..";
|
|
3
3
|
import type { PanelDOM } from "../dom/types";
|
|
4
4
|
import type { PanelState } from "../state/types";
|
|
5
|
+
import { type Skin } from "../skin";
|
|
5
6
|
export declare function setupPanelBehavior(dom: PanelDOM, state: PanelState, storage: LogStorage, themeConfig: {
|
|
6
7
|
storageKey: string;
|
|
7
8
|
persist: boolean;
|
|
9
|
+
}, skinConfig: {
|
|
10
|
+
skin: Skin;
|
|
8
11
|
}): PanelHandle;
|
|
@@ -4,7 +4,8 @@ exports.setupPanelBehavior = setupPanelBehavior;
|
|
|
4
4
|
const bindings_1 = require("../bindings");
|
|
5
5
|
const resize_1 = require("../resize");
|
|
6
6
|
const theme_1 = require("../theme");
|
|
7
|
-
|
|
7
|
+
const skin_1 = require("../skin");
|
|
8
|
+
function setupPanelBehavior(dom, state, storage, themeConfig, skinConfig) {
|
|
8
9
|
const applyVisibility = () => {
|
|
9
10
|
if (state.open)
|
|
10
11
|
dom.panel.classList.remove("di-hidden");
|
|
@@ -32,6 +33,7 @@ function setupPanelBehavior(dom, state, storage, themeConfig) {
|
|
|
32
33
|
if (themeConfig.persist)
|
|
33
34
|
(0, theme_1.saveTheme)(themeConfig.storageKey, next);
|
|
34
35
|
};
|
|
36
|
+
(0, skin_1.applySkin)(dom.root, skinConfig.skin);
|
|
35
37
|
(0, theme_1.applyTheme)(dom.root, state.theme);
|
|
36
38
|
updateThemeButton();
|
|
37
39
|
const bindings = (0, bindings_1.bindStorageToPanelView)({
|
package/lib/ui/panel/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { LogStorage } from "../../storage/logStorage";
|
|
2
2
|
import { type Theme } from "./theme";
|
|
3
|
+
import type { Skin } from "./skin";
|
|
3
4
|
export type PanelOptions = {
|
|
4
5
|
storage: LogStorage;
|
|
5
6
|
title?: string;
|
|
@@ -8,6 +9,7 @@ export type PanelOptions = {
|
|
|
8
9
|
theme?: Theme;
|
|
9
10
|
persistTheme?: boolean;
|
|
10
11
|
themeStorageKey?: string;
|
|
12
|
+
skin?: Skin;
|
|
11
13
|
};
|
|
12
14
|
export type PanelHandle = {
|
|
13
15
|
open: () => void;
|
package/lib/ui/panel/index.js
CHANGED
|
@@ -8,7 +8,7 @@ const state_1 = require("./state");
|
|
|
8
8
|
const behavior_1 = require("./behavior");
|
|
9
9
|
const theme_1 = require("./theme");
|
|
10
10
|
function createPanel(options) {
|
|
11
|
-
var _a, _b, _c, _d;
|
|
11
|
+
var _a, _b, _c, _d, _e;
|
|
12
12
|
const doc = (0, ensureDocument_1.ensureDocument)();
|
|
13
13
|
(0, ensureStyle_1.ensureStyle)(doc);
|
|
14
14
|
const persistTheme = (_a = options.persistTheme) !== null && _a !== void 0 ? _a : true;
|
|
@@ -17,5 +17,5 @@ function createPanel(options) {
|
|
|
17
17
|
const initialTheme = (_c = stored !== null && stored !== void 0 ? stored : options.theme) !== null && _c !== void 0 ? _c : "light";
|
|
18
18
|
const dom = (0, dom_1.buildPanelDOM)(doc, options);
|
|
19
19
|
const state = (0, state_1.createPanelState)((_d = options.initiallyOpen) !== null && _d !== void 0 ? _d : false, initialTheme);
|
|
20
|
-
return (0, behavior_1.setupPanelBehavior)(dom, state, options.storage, { storageKey, persist: persistTheme });
|
|
20
|
+
return (0, behavior_1.setupPanelBehavior)(dom, state, options.storage, { storageKey, persist: persistTheme }, { skin: (_e = options.skin) !== null && _e !== void 0 ? _e : "default" });
|
|
21
21
|
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ensureStyle = ensureStyle;
|
|
4
4
|
const panelStyles_1 = require("../../panelStyles");
|
|
5
|
+
const skin_1 = require("../skin");
|
|
5
6
|
function ensureStyle(doc) {
|
|
6
7
|
const id = "dev-inspector-panel-style";
|
|
7
8
|
const existing = doc.getElementById(id);
|
|
@@ -9,6 +10,6 @@ function ensureStyle(doc) {
|
|
|
9
10
|
return;
|
|
10
11
|
const style = doc.createElement("style");
|
|
11
12
|
style.id = id;
|
|
12
|
-
style.textContent = panelStyles_1.PANEL_CSS
|
|
13
|
+
style.textContent = `${panelStyles_1.PANEL_CSS}\n${skin_1.CARTOON_CSS}`;
|
|
13
14
|
doc.head.append(style);
|
|
14
15
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cartoon skin — Arc-inspired sticker / comic look.
|
|
3
|
+
*
|
|
4
|
+
* Activated by `data-di-skin="cartoon"` on `.di-root`. Combined with the
|
|
5
|
+
* existing `data-di-theme` attribute so we ship two cartoon variants
|
|
6
|
+
* (light + dark) that swap palette but keep the chunky borders, hard
|
|
7
|
+
* offset shadows, and rounded sticker shapes.
|
|
8
|
+
*
|
|
9
|
+
* The strategy is to redeclare the public `--di-*` design tokens for
|
|
10
|
+
* cartoon mode (so every component picks up the new look automatically)
|
|
11
|
+
* and then layer a few targeted overrides on top of the chrome elements
|
|
12
|
+
* that need a slightly different shape (thicker borders, no blur shadow).
|
|
13
|
+
*/
|
|
14
|
+
export declare const CARTOON_CSS = "\n/* ---- Cartoon \u00B7 Light --------------------------------------------------- */\n.di-root[data-di-skin=\"cartoon\"][data-di-theme=\"light\"] {\n --di-radius-sm: 10px;\n --di-radius-md: 14px;\n --di-radius-lg: 18px;\n --di-radius-pill: 999px;\n\n --di-bg: #FFF1D2;\n --di-bg-elev: #FFE6A8;\n --di-bg-soft: #FFF8E1;\n --di-bg-hover: #FFD56F;\n --di-bg-row: #FFF1D2;\n --di-bg-row-alt: #FFEAB8;\n --di-overlay: rgba(26, 31, 58, 0.06);\n\n --di-border: #1A1F3A;\n --di-border-strong: #1A1F3A;\n --di-border-soft: #1A1F3A;\n\n --di-text: #1A1F3A;\n --di-text-muted: #4A4F6A;\n --di-text-faint: #6A6F8A;\n --di-text-on-accent: #FFF1D2;\n\n --di-accent: #2E36C8;\n --di-accent-hover: #1F26A8;\n --di-accent-soft: rgba(46, 54, 200, 0.14);\n\n --di-success: #1A8260;\n --di-success-bg: rgba(167, 255, 0, 0.22);\n --di-success-border: #1A1F3A;\n\n --di-warning: #B5530A;\n --di-warning-bg: rgba(255, 213, 111, 0.32);\n --di-warning-border: #1A1F3A;\n\n --di-error: #C8102E;\n --di-error-bg: rgba(255, 110, 130, 0.20);\n --di-error-border: #1A1F3A;\n\n --di-shadow: 4px 4px 0 #1A1F3A;\n --di-shadow-lg: 6px 6px 0 #1A1F3A;\n --di-ring: 0 0 0 3px rgba(46, 54, 200, 0.32);\n}\n\n/* ---- Cartoon \u00B7 Dark ---------------------------------------------------- */\n.di-root[data-di-skin=\"cartoon\"][data-di-theme=\"dark\"] {\n --di-radius-sm: 10px;\n --di-radius-md: 14px;\n --di-radius-lg: 18px;\n --di-radius-pill: 999px;\n\n --di-bg: #1A1D38;\n --di-bg-elev: #232752;\n --di-bg-soft: #2A2E5C;\n --di-bg-hover: #353A6E;\n --di-bg-row: #1A1D38;\n --di-bg-row-alt: #232752;\n --di-overlay: rgba(255, 238, 184, 0.06);\n\n --di-border: #FFEEB8;\n --di-border-strong: #FFEEB8;\n --di-border-soft: #FFEEB8;\n\n --di-text: #FFEEB8;\n --di-text-muted: #C8C8E0;\n --di-text-faint: #8A8DAA;\n --di-text-on-accent: #1A1D38;\n\n --di-accent: #A7FF00;\n --di-accent-hover: #C5FF45;\n --di-accent-soft: rgba(167, 255, 0, 0.18);\n\n --di-success: #A7FF00;\n --di-success-bg: rgba(167, 255, 0, 0.18);\n --di-success-border: #FFEEB8;\n\n --di-warning: #FFD56F;\n --di-warning-bg: rgba(255, 213, 111, 0.18);\n --di-warning-border: #FFEEB8;\n\n --di-error: #FF8FA3;\n --di-error-bg: rgba(255, 143, 163, 0.18);\n --di-error-border: #FFEEB8;\n\n --di-shadow: 4px 4px 0 #FFEEB8;\n --di-shadow-lg: 6px 6px 0 #FFEEB8;\n --di-ring: 0 0 0 3px rgba(167, 255, 0, 0.36);\n}\n\n/* ---- Cartoon \u00B7 shared chrome ------------------------------------------- */\n.di-root[data-di-skin=\"cartoon\"] .di-toggle,\n.di-root[data-di-skin=\"cartoon\"] .di-panel,\n.di-root[data-di-skin=\"cartoon\"] .di-tab,\n.di-root[data-di-skin=\"cartoon\"] .di-jumpBtn {\n border-width: 2px;\n border-style: solid;\n}\n\n.di-root[data-di-skin=\"cartoon\"] .di-toggle {\n font-weight: 700;\n letter-spacing: 0.01em;\n}\n\n.di-root[data-di-skin=\"cartoon\"] .di-toggle:hover,\n.di-root[data-di-skin=\"cartoon\"] .di-jumpBtn:hover {\n transform: translate(-1px, -1px);\n box-shadow: var(--di-shadow-lg);\n}\n\n.di-root[data-di-skin=\"cartoon\"] .di-toggle:active,\n.di-root[data-di-skin=\"cartoon\"] .di-jumpBtn:active {\n transform: translate(2px, 2px);\n box-shadow: 0 0 0 #1A1F3A;\n}\n\n.di-root[data-di-skin=\"cartoon\"][data-di-theme=\"dark\"] .di-toggle:active,\n.di-root[data-di-skin=\"cartoon\"][data-di-theme=\"dark\"] .di-jumpBtn:active {\n box-shadow: 0 0 0 #FFEEB8;\n}\n\n.di-root[data-di-skin=\"cartoon\"] .di-tabActive {\n font-weight: 700;\n}\n\n/* Search bar: tighter sticker-style chip instead of stretched outlined input. */\n.di-root[data-di-skin=\"cartoon\"] .di-searchRow {\n padding: 6px 12px 10px;\n}\n\n.di-root[data-di-skin=\"cartoon\"] .di-searchWrap {\n border: 2px solid var(--di-border);\n border-radius: var(--di-radius-pill);\n background: var(--di-bg-soft);\n box-shadow: 2px 2px 0 var(--di-border);\n transition: box-shadow 120ms ease, transform 120ms ease;\n}\n\n.di-root[data-di-skin=\"cartoon\"] .di-searchWrap:focus-within {\n box-shadow: 3px 3px 0 var(--di-accent);\n border-color: var(--di-border);\n transform: translate(-1px, -1px);\n}\n\n.di-root[data-di-skin=\"cartoon\"] .di-searchInput {\n font-weight: 600;\n padding: 6px 10px;\n}\n\n.di-root[data-di-skin=\"cartoon\"] .di-searchInput::placeholder {\n font-weight: 500;\n color: var(--di-text-muted);\n opacity: 0.7;\n}\n";
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CARTOON_CSS = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Cartoon skin — Arc-inspired sticker / comic look.
|
|
6
|
+
*
|
|
7
|
+
* Activated by `data-di-skin="cartoon"` on `.di-root`. Combined with the
|
|
8
|
+
* existing `data-di-theme` attribute so we ship two cartoon variants
|
|
9
|
+
* (light + dark) that swap palette but keep the chunky borders, hard
|
|
10
|
+
* offset shadows, and rounded sticker shapes.
|
|
11
|
+
*
|
|
12
|
+
* The strategy is to redeclare the public `--di-*` design tokens for
|
|
13
|
+
* cartoon mode (so every component picks up the new look automatically)
|
|
14
|
+
* and then layer a few targeted overrides on top of the chrome elements
|
|
15
|
+
* that need a slightly different shape (thicker borders, no blur shadow).
|
|
16
|
+
*/
|
|
17
|
+
exports.CARTOON_CSS = `
|
|
18
|
+
/* ---- Cartoon · Light --------------------------------------------------- */
|
|
19
|
+
.di-root[data-di-skin="cartoon"][data-di-theme="light"] {
|
|
20
|
+
--di-radius-sm: 10px;
|
|
21
|
+
--di-radius-md: 14px;
|
|
22
|
+
--di-radius-lg: 18px;
|
|
23
|
+
--di-radius-pill: 999px;
|
|
24
|
+
|
|
25
|
+
--di-bg: #FFF1D2;
|
|
26
|
+
--di-bg-elev: #FFE6A8;
|
|
27
|
+
--di-bg-soft: #FFF8E1;
|
|
28
|
+
--di-bg-hover: #FFD56F;
|
|
29
|
+
--di-bg-row: #FFF1D2;
|
|
30
|
+
--di-bg-row-alt: #FFEAB8;
|
|
31
|
+
--di-overlay: rgba(26, 31, 58, 0.06);
|
|
32
|
+
|
|
33
|
+
--di-border: #1A1F3A;
|
|
34
|
+
--di-border-strong: #1A1F3A;
|
|
35
|
+
--di-border-soft: #1A1F3A;
|
|
36
|
+
|
|
37
|
+
--di-text: #1A1F3A;
|
|
38
|
+
--di-text-muted: #4A4F6A;
|
|
39
|
+
--di-text-faint: #6A6F8A;
|
|
40
|
+
--di-text-on-accent: #FFF1D2;
|
|
41
|
+
|
|
42
|
+
--di-accent: #2E36C8;
|
|
43
|
+
--di-accent-hover: #1F26A8;
|
|
44
|
+
--di-accent-soft: rgba(46, 54, 200, 0.14);
|
|
45
|
+
|
|
46
|
+
--di-success: #1A8260;
|
|
47
|
+
--di-success-bg: rgba(167, 255, 0, 0.22);
|
|
48
|
+
--di-success-border: #1A1F3A;
|
|
49
|
+
|
|
50
|
+
--di-warning: #B5530A;
|
|
51
|
+
--di-warning-bg: rgba(255, 213, 111, 0.32);
|
|
52
|
+
--di-warning-border: #1A1F3A;
|
|
53
|
+
|
|
54
|
+
--di-error: #C8102E;
|
|
55
|
+
--di-error-bg: rgba(255, 110, 130, 0.20);
|
|
56
|
+
--di-error-border: #1A1F3A;
|
|
57
|
+
|
|
58
|
+
--di-shadow: 4px 4px 0 #1A1F3A;
|
|
59
|
+
--di-shadow-lg: 6px 6px 0 #1A1F3A;
|
|
60
|
+
--di-ring: 0 0 0 3px rgba(46, 54, 200, 0.32);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/* ---- Cartoon · Dark ---------------------------------------------------- */
|
|
64
|
+
.di-root[data-di-skin="cartoon"][data-di-theme="dark"] {
|
|
65
|
+
--di-radius-sm: 10px;
|
|
66
|
+
--di-radius-md: 14px;
|
|
67
|
+
--di-radius-lg: 18px;
|
|
68
|
+
--di-radius-pill: 999px;
|
|
69
|
+
|
|
70
|
+
--di-bg: #1A1D38;
|
|
71
|
+
--di-bg-elev: #232752;
|
|
72
|
+
--di-bg-soft: #2A2E5C;
|
|
73
|
+
--di-bg-hover: #353A6E;
|
|
74
|
+
--di-bg-row: #1A1D38;
|
|
75
|
+
--di-bg-row-alt: #232752;
|
|
76
|
+
--di-overlay: rgba(255, 238, 184, 0.06);
|
|
77
|
+
|
|
78
|
+
--di-border: #FFEEB8;
|
|
79
|
+
--di-border-strong: #FFEEB8;
|
|
80
|
+
--di-border-soft: #FFEEB8;
|
|
81
|
+
|
|
82
|
+
--di-text: #FFEEB8;
|
|
83
|
+
--di-text-muted: #C8C8E0;
|
|
84
|
+
--di-text-faint: #8A8DAA;
|
|
85
|
+
--di-text-on-accent: #1A1D38;
|
|
86
|
+
|
|
87
|
+
--di-accent: #A7FF00;
|
|
88
|
+
--di-accent-hover: #C5FF45;
|
|
89
|
+
--di-accent-soft: rgba(167, 255, 0, 0.18);
|
|
90
|
+
|
|
91
|
+
--di-success: #A7FF00;
|
|
92
|
+
--di-success-bg: rgba(167, 255, 0, 0.18);
|
|
93
|
+
--di-success-border: #FFEEB8;
|
|
94
|
+
|
|
95
|
+
--di-warning: #FFD56F;
|
|
96
|
+
--di-warning-bg: rgba(255, 213, 111, 0.18);
|
|
97
|
+
--di-warning-border: #FFEEB8;
|
|
98
|
+
|
|
99
|
+
--di-error: #FF8FA3;
|
|
100
|
+
--di-error-bg: rgba(255, 143, 163, 0.18);
|
|
101
|
+
--di-error-border: #FFEEB8;
|
|
102
|
+
|
|
103
|
+
--di-shadow: 4px 4px 0 #FFEEB8;
|
|
104
|
+
--di-shadow-lg: 6px 6px 0 #FFEEB8;
|
|
105
|
+
--di-ring: 0 0 0 3px rgba(167, 255, 0, 0.36);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/* ---- Cartoon · shared chrome ------------------------------------------- */
|
|
109
|
+
.di-root[data-di-skin="cartoon"] .di-toggle,
|
|
110
|
+
.di-root[data-di-skin="cartoon"] .di-panel,
|
|
111
|
+
.di-root[data-di-skin="cartoon"] .di-tab,
|
|
112
|
+
.di-root[data-di-skin="cartoon"] .di-jumpBtn {
|
|
113
|
+
border-width: 2px;
|
|
114
|
+
border-style: solid;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.di-root[data-di-skin="cartoon"] .di-toggle {
|
|
118
|
+
font-weight: 700;
|
|
119
|
+
letter-spacing: 0.01em;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.di-root[data-di-skin="cartoon"] .di-toggle:hover,
|
|
123
|
+
.di-root[data-di-skin="cartoon"] .di-jumpBtn:hover {
|
|
124
|
+
transform: translate(-1px, -1px);
|
|
125
|
+
box-shadow: var(--di-shadow-lg);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.di-root[data-di-skin="cartoon"] .di-toggle:active,
|
|
129
|
+
.di-root[data-di-skin="cartoon"] .di-jumpBtn:active {
|
|
130
|
+
transform: translate(2px, 2px);
|
|
131
|
+
box-shadow: 0 0 0 #1A1F3A;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.di-root[data-di-skin="cartoon"][data-di-theme="dark"] .di-toggle:active,
|
|
135
|
+
.di-root[data-di-skin="cartoon"][data-di-theme="dark"] .di-jumpBtn:active {
|
|
136
|
+
box-shadow: 0 0 0 #FFEEB8;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.di-root[data-di-skin="cartoon"] .di-tabActive {
|
|
140
|
+
font-weight: 700;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/* Search bar: tighter sticker-style chip instead of stretched outlined input. */
|
|
144
|
+
.di-root[data-di-skin="cartoon"] .di-searchRow {
|
|
145
|
+
padding: 6px 12px 10px;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.di-root[data-di-skin="cartoon"] .di-searchWrap {
|
|
149
|
+
border: 2px solid var(--di-border);
|
|
150
|
+
border-radius: var(--di-radius-pill);
|
|
151
|
+
background: var(--di-bg-soft);
|
|
152
|
+
box-shadow: 2px 2px 0 var(--di-border);
|
|
153
|
+
transition: box-shadow 120ms ease, transform 120ms ease;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.di-root[data-di-skin="cartoon"] .di-searchWrap:focus-within {
|
|
157
|
+
box-shadow: 3px 3px 0 var(--di-accent);
|
|
158
|
+
border-color: var(--di-border);
|
|
159
|
+
transform: translate(-1px, -1px);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.di-root[data-di-skin="cartoon"] .di-searchInput {
|
|
163
|
+
font-weight: 600;
|
|
164
|
+
padding: 6px 10px;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.di-root[data-di-skin="cartoon"] .di-searchInput::placeholder {
|
|
168
|
+
font-weight: 500;
|
|
169
|
+
color: var(--di-text-muted);
|
|
170
|
+
opacity: 0.7;
|
|
171
|
+
}
|
|
172
|
+
`;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CARTOON_CSS = exports.applySkin = void 0;
|
|
4
|
+
var applySkin_1 = require("./applySkin");
|
|
5
|
+
Object.defineProperty(exports, "applySkin", { enumerable: true, get: function () { return applySkin_1.applySkin; } });
|
|
6
|
+
var cartoonStyles_1 = require("./cartoonStyles");
|
|
7
|
+
Object.defineProperty(exports, "CARTOON_CSS", { enumerable: true, get: function () { return cartoonStyles_1.CARTOON_CSS; } });
|