@synerise/ds-code-snippet 2.0.11 → 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 CHANGED
@@ -3,6 +3,17 @@
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
+
6
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)
7
18
 
8
19
  **Note:** Version bump only for package @synerise/ds-code-snippet
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
- - Uses `@synerise/ds-core` theme palette tokens (e.g. `props.theme.palette['grey-100']`).
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 uses a hardcoded `#e31a5d` for the code text colour (not a token).
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:#e31a5d;background-color:", ";}"], (props) => props.theme.palette[`pink-100`]);
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:", ";content:'';display:block;position:absolute;top:0;bottom:0;right:0;width:28px;z-index:10;}.content-animation{position:relative;}", ";}"], (props) => props.theme.palette["grey-100"], (props) => !!props.isButtonVisible && `
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:${props.theme.palette["grey-100"]};
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:", ";color:", ";}&:hover{color:", ";}"], (props) => props.theme.palette["grey-100"], (props) => props.theme.palette["grey-400"], (props) => props.theme.palette["blue-600"]);
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:", ";border-radius:3px;padding:12px 8px 0 12px;.content-animation{position:relative;}", ";}"], (props) => props.theme.palette["grey-100"], (props) => !!props.fontSize && `
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:", ";", ";}"], (props) => `${props.fontSize || FONT_SIZE_DEFAULT}px`, LINE_HEIGHT_DEFAULT, (props) => props.theme.palette[`grey-600`], (props) => !!props.fontSize && `
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:", ";}.hljs-attr,.hljs-template-tag{color:", ";}.hljs-comment,.hljs-doctag,.hljs-quote{color:", ";}.hljs-params{color:", ";}.hljs-regexp{color:", ";}.hljs-tag,.hljs-selector-id,.hljs-number,.hljs-literal{color:", ";}.hljs-meta,.hljs-meta .hljs-keyword{color:", ";}.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:", ";}.hljs-built_in,.hljs-title,.hljs-deletion{color:", ";}.hljs-type,.hljs-section,.hljs-function,.hljs-name,.hljs-property,.hljs-attribute{color:", ";}.hljs-meta .hljs-string,.hljs-string,.hljs-subst,.hljs-symbol,.hljs-bullet,.hljs-addition{color:", ";}.hljs-selector-tag{color:", ";}.hljs-emphasis{font-style:italic;}.hljs-strong{font-weight:bold;}"], (props) => props.theme.palette["grey-700"], (props) => props.theme.palette["blue-600"], (props) => props.theme.palette["cyan-600"], (props) => props.theme.palette["grey-600"], (props) => props.theme.palette["violet-600"], (props) => props.theme.palette["red-600"], (props) => props.theme.palette["blue-600"], (props) => props.theme.palette["blue-600"], (props) => props.theme.palette["orange-600"], (props) => props.theme.palette["yellow-600"], (props) => props.theme.palette["green-600"], (props) => props.theme.palette["purple-600"]);
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.11",
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.1.6",
47
- "@synerise/ds-copy-icon": "^2.0.11",
48
- "@synerise/ds-icon": "^2.2.3",
49
- "@synerise/ds-scrollbar": "^2.0.9",
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": "c356039703d8826bbbdb6dadcb18bb008fea8bc5"
62
+ "gitHead": "5c3d61e30289486d14c7d6becb682e2d4a08ce41"
63
63
  }