@synerise/ds-code-snippet 2.0.10 → 2.1.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/CHANGELOG.md +19 -0
- package/CLAUDE.md +2 -2
- package/dist/CodeTypes/InlineCode/InlineCode.styles.js +1 -1
- package/dist/CodeTypes/MultiCode/MultiCode.styles.js +2 -2
- package/dist/CodeTypes/SingleCode/SingleCode.styles.js +3 -3
- package/dist/Highlight/Highlight.styles.js +1 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,25 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [2.1.0](https://github.com/Synerise/synerise-design/compare/@synerise/ds-code-snippet@2.0.11...@synerise/ds-code-snippet@2.1.0) (2026-10-29)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* integrate Token Studio design tokens across the design system ([aabb447](https://github.com/Synerise/synerise-design/commit/aabb447edfb2d0c85e3de1f07e809ef84083453b))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [2.0.11](https://github.com/Synerise/synerise-design/compare/@synerise/ds-code-snippet@2.0.10...@synerise/ds-code-snippet@2.0.11) (2026-10-28)
|
|
18
|
+
|
|
19
|
+
**Note:** Version bump only for package @synerise/ds-code-snippet
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
## [2.0.10](https://github.com/Synerise/synerise-design/compare/@synerise/ds-code-snippet@2.0.9...@synerise/ds-code-snippet@2.0.10) (2026-10-26)
|
|
7
26
|
|
|
8
27
|
|
package/CLAUDE.md
CHANGED
|
@@ -104,9 +104,9 @@ import { FontSize } from '@synerise/ds-code-snippet';
|
|
|
104
104
|
## Styling
|
|
105
105
|
|
|
106
106
|
- Styles split across `InlineCode.styles.ts`, `SingleCode.styles.ts`, `MultiCode.styles.ts`, `Highlight.styles.ts`.
|
|
107
|
-
-
|
|
107
|
+
- Colours come from the `--ds-code-snippet-*` module tokens (e.g. `var(--ds-code-snippet-surface-bg)`, `--ds-code-snippet-syntax-*` for highlighting).
|
|
108
108
|
- Font loaded via `src/style/index.less` — imports IBM Plex Mono WOFF files. The Less file is compiled separately (`build:css` script) and must be imported as a side effect: `import './style/index.less'` (already done in `CodeSnippet.tsx`).
|
|
109
|
-
- Inline variant
|
|
109
|
+
- Inline variant code text uses `--ds-code-snippet-inlinecode-text` on `--ds-code-snippet-inlinecode-bg`.
|
|
110
110
|
|
|
111
111
|
## Key dependencies
|
|
112
112
|
|
|
@@ -2,7 +2,7 @@ import styled from "styled-components";
|
|
|
2
2
|
const InlineCodeWrapper = /* @__PURE__ */ styled.code.withConfig({
|
|
3
3
|
displayName: "InlineCodestyles__InlineCodeWrapper",
|
|
4
4
|
componentId: "sc-2t3lx8-0"
|
|
5
|
-
})(["&{font-size:12px;font-family:'IBM Plex Mono Regular',monospace;display:inline-block;padding:0 4px;margin-right:4px;border-radius:3px;color
|
|
5
|
+
})(["&{font-size:12px;font-family:'IBM Plex Mono Regular',monospace;display:inline-block;padding:0 4px;margin-right:4px;border-radius:3px;color:var(--ds-code-snippet-inlinecode-text);background-color:var(--ds-code-snippet-inlinecode-bg);}"]);
|
|
6
6
|
export {
|
|
7
7
|
InlineCodeWrapper
|
|
8
8
|
};
|
|
@@ -9,7 +9,7 @@ const ContentIconWrapper = /* @__PURE__ */ styled.div.withConfig({
|
|
|
9
9
|
const CodeSnippetWrapperMulti = /* @__PURE__ */ styled(CodeSnippetWrapperSingle).withConfig({
|
|
10
10
|
displayName: "MultiCodestyles__CodeSnippetWrapperMulti",
|
|
11
11
|
componentId: "sc-1u5vxm9-1"
|
|
12
|
-
})(["&{min-width:250px;pre::before{background-color:
|
|
12
|
+
})(["&{min-width:250px;pre::before{background-color:var(--ds-code-snippet-surface-bg);content:'';display:block;position:absolute;top:0;bottom:0;right:0;width:28px;z-index:10;}.content-animation{position:relative;}", ";}"], (props) => !!props.isButtonVisible && `
|
|
13
13
|
padding-bottom:7px;
|
|
14
14
|
.content-animation::after{
|
|
15
15
|
content:'';
|
|
@@ -19,7 +19,7 @@ const CodeSnippetWrapperMulti = /* @__PURE__ */ styled(CodeSnippetWrapperSingle)
|
|
|
19
19
|
left:0;
|
|
20
20
|
right:0;
|
|
21
21
|
height:${LINE_HEIGHT_DEFAULT}px;
|
|
22
|
-
background-color
|
|
22
|
+
background-color:var(--ds-code-snippet-surface-bg);
|
|
23
23
|
z-index:10;
|
|
24
24
|
}
|
|
25
25
|
`);
|
|
@@ -11,18 +11,18 @@ const ContentIconWrapper = /* @__PURE__ */ styled.div.withConfig({
|
|
|
11
11
|
const StyledCopyIcon = /* @__PURE__ */ styled(CopyIcon).withConfig({
|
|
12
12
|
displayName: "SingleCodestyles__StyledCopyIcon",
|
|
13
13
|
componentId: "sc-1l78lb-1"
|
|
14
|
-
})(["&&{cursor:pointer;background-color:
|
|
14
|
+
})(["&&{cursor:pointer;background-color:var(--ds-code-snippet-copy-bg);color:var(--ds-code-snippet-copy-icon);}&:hover{color:var(--ds-code-snippet-copy-iconhover);}"]);
|
|
15
15
|
const CodeSnippetWrapperSingle = /* @__PURE__ */ styled.div.withConfig({
|
|
16
16
|
displayName: "SingleCodestyles__CodeSnippetWrapperSingle",
|
|
17
17
|
componentId: "sc-1l78lb-2"
|
|
18
|
-
})(["&{height:100%;background-color:
|
|
18
|
+
})(["&{height:100%;background-color:var(--ds-code-snippet-surface-bg);border-radius:3px;padding:12px 8px 0 12px;.content-animation{position:relative;}", ";}"], (props) => !!props.fontSize && `
|
|
19
19
|
padding-top: ${props.fontSize === FontSize.SMALL ? "4px" : "12px"};
|
|
20
20
|
padding-bottom: ${props.fontSize === FontSize.SMALL ? "4px" : "12px"};
|
|
21
21
|
`);
|
|
22
22
|
const BlockCodeWrapperSingle = /* @__PURE__ */ styled.code.withConfig({
|
|
23
23
|
displayName: "SingleCodestyles__BlockCodeWrapperSingle",
|
|
24
24
|
componentId: "sc-1l78lb-3"
|
|
25
|
-
})(["&{display:block;font-family:'IBM Plex Mono Regular',monospace;font-size:", ";line-height:", "px;color:
|
|
25
|
+
})(["&{display:block;font-family:'IBM Plex Mono Regular',monospace;font-size:", ";line-height:", "px;color:var(--ds-code-snippet-surface-text);", ";}"], (props) => `${props.fontSize || FONT_SIZE_DEFAULT}px`, LINE_HEIGHT_DEFAULT, (props) => !!props.fontSize && `
|
|
26
26
|
padding-right: 4px;
|
|
27
27
|
line-height:24px;
|
|
28
28
|
`);
|
|
@@ -2,7 +2,7 @@ import styled from "styled-components";
|
|
|
2
2
|
const Highlight = /* @__PURE__ */ styled.div.withConfig({
|
|
3
3
|
displayName: "Highlightstyles__Highlight",
|
|
4
4
|
componentId: "sc-5c5o8n-0"
|
|
5
|
-
})([".hljs{color:
|
|
5
|
+
})([".hljs{color:var(--ds-code-snippet-syntax-base);}.hljs-attr,.hljs-template-tag{color:var(--ds-code-snippet-syntax-keyword);}.hljs-comment,.hljs-doctag,.hljs-quote{color:var(--ds-code-snippet-syntax-comment);}.hljs-params{color:var(--ds-code-snippet-syntax-params);}.hljs-regexp{color:var(--ds-code-snippet-syntax-regexp);}.hljs-tag,.hljs-selector-id,.hljs-number,.hljs-literal{color:var(--ds-code-snippet-syntax-literal);}.hljs-meta,.hljs-meta .hljs-keyword{color:var(--ds-code-snippet-syntax-keyword);}.hljs-operator,.hljs-punctuation{}.hljs-selector-class,.hljs-code,.hljs-formula,.hljs-variable,.hljs-template-variable,.hljs-selector-attr,.hljs-selector-pseudo,.hljs-link,.hljs-keyword{color:var(--ds-code-snippet-syntax-keyword);}.hljs-built_in,.hljs-title,.hljs-deletion{color:var(--ds-code-snippet-syntax-builtin);}.hljs-type,.hljs-section,.hljs-function,.hljs-name,.hljs-property,.hljs-attribute{color:var(--ds-code-snippet-syntax-type);}.hljs-meta .hljs-string,.hljs-string,.hljs-subst,.hljs-symbol,.hljs-bullet,.hljs-addition{color:var(--ds-code-snippet-syntax-string);}.hljs-selector-tag{color:var(--ds-code-snippet-syntax-selectortag);}.hljs-emphasis{font-style:italic;}.hljs-strong{font-weight:bold;}"]);
|
|
6
6
|
export {
|
|
7
7
|
Highlight
|
|
8
8
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-code-snippet",
|
|
3
|
-
"version": "2.0
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"description": "CodeSnippet UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "Synerise/synerise-design",
|
|
@@ -43,10 +43,10 @@
|
|
|
43
43
|
],
|
|
44
44
|
"types": "dist/index.d.ts",
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@synerise/ds-button": "^2.
|
|
47
|
-
"@synerise/ds-copy-icon": "^2.0
|
|
48
|
-
"@synerise/ds-icon": "^2.
|
|
49
|
-
"@synerise/ds-scrollbar": "^2.0
|
|
46
|
+
"@synerise/ds-button": "^2.2.0",
|
|
47
|
+
"@synerise/ds-copy-icon": "^2.1.0",
|
|
48
|
+
"@synerise/ds-icon": "^2.3.0",
|
|
49
|
+
"@synerise/ds-scrollbar": "^2.1.0",
|
|
50
50
|
"highlight.js": "^10.7.2",
|
|
51
51
|
"react-animate-height": "^2.0.23"
|
|
52
52
|
},
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"react": ">=16.9.0 <= 18.3.1",
|
|
60
60
|
"styled-components": "^5.3.3"
|
|
61
61
|
},
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "5c3d61e30289486d14c7d6becb682e2d4a08ce41"
|
|
63
63
|
}
|