@ytspar/devbar 1.0.0-canary.c37df82 → 1.0.0-canary.cdf7fa2
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/dist/GlobalDevBar.d.ts +89 -2
- package/dist/GlobalDevBar.js +1090 -102
- package/dist/accessibility.d.ts +84 -0
- package/dist/accessibility.js +155 -0
- package/dist/constants.d.ts +91 -0
- package/dist/constants.js +102 -12
- package/dist/debug.d.ts +39 -0
- package/dist/debug.js +92 -0
- package/dist/index.d.ts +11 -5
- package/dist/index.js +19 -7
- package/dist/lazy/index.d.ts +6 -0
- package/dist/lazy/index.js +6 -0
- package/dist/lazy/lazyHtml2Canvas.d.ts +29 -0
- package/dist/lazy/lazyHtml2Canvas.js +37 -0
- package/dist/network.d.ts +92 -0
- package/dist/network.js +176 -0
- package/dist/outline.js +43 -10
- package/dist/presets.d.ts +57 -0
- package/dist/presets.js +133 -0
- package/dist/schema.js +4 -3
- package/dist/settings.d.ts +150 -0
- package/dist/settings.js +292 -0
- package/dist/storage.d.ts +83 -0
- package/dist/storage.js +182 -0
- package/dist/types.d.ts +26 -1
- package/dist/ui/index.d.ts +2 -2
- package/dist/ui/index.js +2 -2
- package/dist/ui/modals.js +5 -3
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js +1 -1
- package/package.json +1 -1
package/dist/types.d.ts
CHANGED
|
@@ -5,7 +5,28 @@
|
|
|
5
5
|
*
|
|
6
6
|
* NOTE: We import from the types sub-path to avoid pulling in Node.js-only modules.
|
|
7
7
|
*/
|
|
8
|
-
export type { ConsoleLog,
|
|
8
|
+
export type { ConsoleLog, OutlineNode, PageSchema, SweetlinkCommand, } from '@ytspar/sweetlink/types';
|
|
9
|
+
/**
|
|
10
|
+
* Theme mode for DevBar display
|
|
11
|
+
*/
|
|
12
|
+
export type ThemeMode = 'dark' | 'light' | 'system';
|
|
13
|
+
/**
|
|
14
|
+
* Debug configuration for DevBar
|
|
15
|
+
* When true, all debug options are enabled.
|
|
16
|
+
* When an object, specific options can be toggled.
|
|
17
|
+
*/
|
|
18
|
+
export interface DebugConfig {
|
|
19
|
+
/** Enable debug logging. Default: false */
|
|
20
|
+
enabled: boolean;
|
|
21
|
+
/** Log lifecycle events (init, destroy). Default: true when enabled */
|
|
22
|
+
logLifecycle?: boolean;
|
|
23
|
+
/** Log state changes (collapse, modals). Default: true when enabled */
|
|
24
|
+
logStateChanges?: boolean;
|
|
25
|
+
/** Log WebSocket events (connect, disconnect, messages). Default: true when enabled */
|
|
26
|
+
logWebSocket?: boolean;
|
|
27
|
+
/** Log performance measurements (FCP, LCP, CLS, INP). Default: true when enabled */
|
|
28
|
+
logPerformance?: boolean;
|
|
29
|
+
}
|
|
9
30
|
/**
|
|
10
31
|
* Options for configuring the GlobalDevBar
|
|
11
32
|
*/
|
|
@@ -19,6 +40,8 @@ export interface GlobalDevBarOptions {
|
|
|
19
40
|
breakpoint?: boolean;
|
|
20
41
|
fcp?: boolean;
|
|
21
42
|
lcp?: boolean;
|
|
43
|
+
cls?: boolean;
|
|
44
|
+
inp?: boolean;
|
|
22
45
|
pageSize?: boolean;
|
|
23
46
|
};
|
|
24
47
|
/** Whether to show the screenshot button. Default: true */
|
|
@@ -36,6 +59,8 @@ export interface GlobalDevBarOptions {
|
|
|
36
59
|
/** Custom min-width (CSS value). Optional */
|
|
37
60
|
minWidth?: string;
|
|
38
61
|
};
|
|
62
|
+
/** Enable debug logging. Pass true for all options, or an object for specific options. */
|
|
63
|
+
debug?: boolean | DebugConfig;
|
|
39
64
|
}
|
|
40
65
|
/**
|
|
41
66
|
* Custom control that can be registered by host applications
|
package/dist/ui/index.d.ts
CHANGED
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Re-exports all UI utilities.
|
|
5
5
|
*/
|
|
6
|
+
export { createStyledButton, getButtonStyles } from './buttons.js';
|
|
6
7
|
export { createSvgIcon } from './icons.js';
|
|
7
|
-
export {
|
|
8
|
-
export { createModalOverlay, createModalBox, createModalHeader, createModalContent, createEmptyMessage, createInfoBox, type ModalConfig } from './modals.js';
|
|
8
|
+
export { createEmptyMessage, createInfoBox, createModalBox, createModalContent, createModalHeader, createModalOverlay, type ModalConfig, } from './modals.js';
|
package/dist/ui/index.js
CHANGED
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Re-exports all UI utilities.
|
|
5
5
|
*/
|
|
6
|
+
export { createStyledButton, getButtonStyles } from './buttons.js';
|
|
6
7
|
export { createSvgIcon } from './icons.js';
|
|
7
|
-
export {
|
|
8
|
-
export { createModalOverlay, createModalBox, createModalHeader, createModalContent, createEmptyMessage, createInfoBox } from './modals.js';
|
|
8
|
+
export { createEmptyMessage, createInfoBox, createModalBox, createModalContent, createModalHeader, createModalOverlay, } from './modals.js';
|
package/dist/ui/modals.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Modal creation utilities for the DevBar UI.
|
|
5
5
|
*/
|
|
6
|
-
import {
|
|
6
|
+
import { MODAL_BOX_BASE_STYLES, MODAL_OVERLAY_STYLES } from '../constants.js';
|
|
7
7
|
import { createStyledButton } from './buttons.js';
|
|
8
8
|
/**
|
|
9
9
|
* Create modal overlay with click-outside-to-close behavior
|
|
@@ -60,7 +60,9 @@ export function createModalHeader(config) {
|
|
|
60
60
|
try {
|
|
61
61
|
await onCopyMd();
|
|
62
62
|
copyBtn.textContent = 'Copied!';
|
|
63
|
-
setTimeout(() => {
|
|
63
|
+
setTimeout(() => {
|
|
64
|
+
copyBtn.textContent = 'Copy MD';
|
|
65
|
+
}, 1500);
|
|
64
66
|
}
|
|
65
67
|
catch {
|
|
66
68
|
console.error('[GlobalDevBar] Failed to copy to clipboard');
|
|
@@ -138,7 +140,7 @@ export function createInfoBox(color, title, content) {
|
|
|
138
140
|
box.appendChild(textEl);
|
|
139
141
|
}
|
|
140
142
|
else {
|
|
141
|
-
content.forEach(el => box.appendChild(el));
|
|
143
|
+
content.forEach((el) => box.appendChild(el));
|
|
142
144
|
}
|
|
143
145
|
return box;
|
|
144
146
|
}
|
package/dist/utils.d.ts
CHANGED
|
@@ -8,4 +8,4 @@
|
|
|
8
8
|
* that would break browser/test environments.
|
|
9
9
|
*/
|
|
10
10
|
export { formatArg, formatArgs } from '@ytspar/sweetlink/browser/consoleCapture';
|
|
11
|
-
export { canvasToDataUrl,
|
|
11
|
+
export { canvasToDataUrl, copyCanvasToClipboard, delay, prepareForCapture, } from '@ytspar/sweetlink/browser/screenshotUtils';
|
package/dist/utils.js
CHANGED
|
@@ -10,4 +10,4 @@
|
|
|
10
10
|
// Re-export console formatting utilities from sweetlink's browser module
|
|
11
11
|
export { formatArg, formatArgs } from '@ytspar/sweetlink/browser/consoleCapture';
|
|
12
12
|
// Re-export screenshot utilities from sweetlink's browser module
|
|
13
|
-
export { canvasToDataUrl,
|
|
13
|
+
export { canvasToDataUrl, copyCanvasToClipboard, delay, prepareForCapture, } from '@ytspar/sweetlink/browser/screenshotUtils';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ytspar/devbar",
|
|
3
|
-
"version": "1.0.0-canary.
|
|
3
|
+
"version": "1.0.0-canary.cdf7fa2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"private": false,
|
|
6
6
|
"description": "Development toolbar and utilities with Sweetlink integration - pure vanilla JS, no framework dependencies",
|