@launchdarkly/toolbar 2.1.2 → 2.1.3
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/cdn/toolbar.min.js +10 -10
- package/dist/core/styles/constants.d.ts +17 -2
- package/dist/core/styles/index.d.ts +1 -1
- package/dist/index.cjs +1 -1
- package/dist/js/96.js +1 -1
- package/dist/react.cjs +1 -1
- package/package.json +4 -4
|
@@ -16,14 +16,29 @@ export declare const TOOLBAR_CLASS_PREFIX = "ldtb_";
|
|
|
16
16
|
export declare const TOOLBAR_STYLE_MARKER = "/* LD_TOOLBAR_STYLES */";
|
|
17
17
|
/**
|
|
18
18
|
* CSS variable prefixes used by LaunchDarkly design systems.
|
|
19
|
-
*
|
|
19
|
+
* NOTE: This is used only for copying tokens INTO the Shadow DOM (not for interception).
|
|
20
|
+
* We intentionally do NOT intercept styles just because they contain --lp- tokens,
|
|
21
|
+
* as host applications may also use LaunchPad and their styles must not be affected.
|
|
20
22
|
*/
|
|
21
23
|
export declare const LAUNCHPAD_TOKEN_PREFIXES: readonly ["--lp-"];
|
|
22
24
|
/**
|
|
23
25
|
* Checks if CSS content belongs to the toolbar based on known markers.
|
|
24
26
|
* This is used for reliable style interception without false positives.
|
|
25
27
|
*
|
|
28
|
+
* IMPORTANT: This function intentionally does NOT check for --lp- tokens.
|
|
29
|
+
* Host applications that also use LaunchPad would have their styles incorrectly
|
|
30
|
+
* intercepted if we matched on --lp- prefix, breaking components like react-select.
|
|
31
|
+
*
|
|
26
32
|
* @param content - CSS content to check
|
|
27
|
-
* @returns true if the content is toolbar CSS
|
|
33
|
+
* @returns true if the content is toolbar CSS that should be MOVED to Shadow DOM
|
|
28
34
|
*/
|
|
29
35
|
export declare function isToolbarStyleContent(content: string): boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Checks if CSS content contains LaunchPad design tokens that the toolbar needs.
|
|
38
|
+
* These styles should be COPIED to Shadow DOM but NOT removed from document.head,
|
|
39
|
+
* because host applications may also use these tokens.
|
|
40
|
+
*
|
|
41
|
+
* @param content - CSS content to check
|
|
42
|
+
* @returns true if the content should be copied (but not moved) to Shadow DOM
|
|
43
|
+
*/
|
|
44
|
+
export declare function shouldCopyToShadowDom(content: string): boolean;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { TOOLBAR_CLASS_PREFIX, TOOLBAR_STYLE_MARKER, LAUNCHPAD_TOKEN_PREFIXES, isToolbarStyleContent, } from './constants';
|
|
1
|
+
export { TOOLBAR_CLASS_PREFIX, TOOLBAR_STYLE_MARKER, LAUNCHPAD_TOKEN_PREFIXES, isToolbarStyleContent, shouldCopyToShadowDom, } from './constants';
|
|
2
2
|
export { injectStylesIntoShadowRoot, createStyleInterceptor, cacheToolbarStyle, getCachedToolbarStyles, clearToolbarStyleCache, } from './shadowDomStyles';
|
package/dist/index.cjs
CHANGED
package/dist/js/96.js
CHANGED
package/dist/react.cjs
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"private": false,
|
|
3
3
|
"name": "@launchdarkly/toolbar",
|
|
4
|
-
"version": "2.1.
|
|
4
|
+
"version": "2.1.3",
|
|
5
5
|
"description": "A framework-agnostic developer toolbar for interacting with LaunchDarkly during development",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"launchdarkly",
|
|
@@ -108,14 +108,14 @@
|
|
|
108
108
|
"@codemirror/lint": "^6.9.3",
|
|
109
109
|
"@codemirror/state": "^6.5.4",
|
|
110
110
|
"@codemirror/view": "^6.39.11",
|
|
111
|
-
"@launchdarkly/observability": "^0.
|
|
112
|
-
"@launchdarkly/session-replay": "^0.
|
|
111
|
+
"@launchdarkly/observability": "^1.0.0",
|
|
112
|
+
"@launchdarkly/session-replay": "^1.0.0",
|
|
113
113
|
"@launchpad-ui/components": "^0.17.9",
|
|
114
114
|
"@launchpad-ui/tokens": "^0.15.1",
|
|
115
115
|
"@lezer/highlight": "1.2.1",
|
|
116
116
|
"@react-aria/focus": "^3.21.3",
|
|
117
117
|
"@react-stately/flags": "^3.1.2",
|
|
118
|
-
"@rsbuild/core": "^1.7.
|
|
118
|
+
"@rsbuild/core": "^1.7.3",
|
|
119
119
|
"@rsbuild/plugin-react": "^1.4.3",
|
|
120
120
|
"@rslib/core": "^0.19.3",
|
|
121
121
|
"@storybook/addon-docs": "^10.2.5",
|