@seqera/docusaurus-theme-seqera 1.0.6-next.32 → 1.0.6-next.33

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.
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,24 @@
1
+ (function (Prism) {
2
+ Prism.languages.nextflow = Prism.languages.extend('groovy', {
3
+ 'keyword': /\b(?:as|assert|boolean|byte|catch|char|def|double|else|enum|float|if|in|instanceof|int|long|new|return|short|throw|try|void|process|workflow|input|output|exec|shell|script|stub|include|from)\b/,
4
+ 'string': {
5
+ pattern: /"""(?:[^\\]|\\[\s\S])*?"""|'''(?:[^\\]|\\[\s\S])*?'''|'(?:\\.|[^\\'\r\n])*'|"(?:\\.|[^\\"\r\n])*"/,
6
+ greedy: true
7
+ },
8
+ 'operator': {
9
+ pattern: /(^|[^.])(?:~|==?~?|\?[.:]?|\*(?:[.=]|\*=?)?|\.[@&]|\.\.<|\.\.(?!\.)|-[-=>]?|\+[+=]?|!=?|<(?:<=?|=>?)?|>(?:>>?=?|=)?|&[&=]?|\|[|=]?|\/=?|\^=?|%=?)/,
10
+ lookbehind: true
11
+ },
12
+ 'punctuation': /\.+|[{}[\];(),:$]/
13
+ });
14
+
15
+ // Add support for Nextflow-specific directives
16
+ Prism.languages.insertBefore('nextflow', 'keyword', {
17
+ 'directive': {
18
+ pattern: /(?:^|\n)\s*(?:process|workflow|exec|shell|script|stub|container|conda|module|include|from|publishDir|input|output):/,
19
+ lookbehind: true,
20
+ alias: 'keyword'
21
+ }
22
+ });
23
+
24
+ }(Prism));
@@ -203,10 +203,10 @@ main prose styles
203
203
 
204
204
  /* Code blocks */
205
205
  pre {
206
- margin-top: 0;
207
- margin-bottom: 0;
206
+ margin-top: 1.5rem;
207
+ margin-bottom: 1.5rem;
208
208
  padding: 1rem;
209
- border-radius: 0;
209
+ border-radius: 0.5rem;
210
210
  overflow-x: auto;
211
211
  background-color: var(--prism-background-color);
212
212
  box-shadow: none;
@@ -5,10 +5,5 @@
5
5
  color: var(--prism-color);
6
6
  margin-bottom: var(--ifm-leading);
7
7
  box-shadow: var(--ifm-global-shadow-lw);
8
- border-radius: 0;
9
- border: 1px solid var(--color-gray-300);
10
- }
11
-
12
- [data-theme='dark'] .codeBlockContainer {
13
- border-color: var(--ifm-color-emphasis-200);
8
+ border-radius: var(--ifm-code-border-radius);
14
9
  }
@@ -15,12 +15,12 @@
15
15
  /* rtl:ignore */
16
16
  float: left;
17
17
  min-width: 100%;
18
- padding: 0.5rem var(--ifm-pre-padding);
18
+ padding: var(--ifm-pre-padding);
19
19
  }
20
20
 
21
21
  .codeBlockLinesWithNumbering {
22
22
  display: table;
23
- padding: 0.5rem 0;
23
+ padding: var(--ifm-pre-padding) 0;
24
24
  }
25
25
 
26
26
  @media print {
@@ -17,8 +17,19 @@ export default function prismIncludeLanguages(PrismObject) {
17
17
  // eslint-disable-next-line global-require
18
18
  require('prismjs/components/prism-markup-templating.js');
19
19
  }
20
- // eslint-disable-next-line global-require, import/no-dynamic-require
21
- require(`prismjs/components/prism-${lang}`);
20
+ // Load custom languages from the local languages directory
21
+ if (lang === 'nextflow') {
22
+ // Nextflow requires Groovy as a dependency
23
+ if (!additionalLanguages.includes('groovy')) {
24
+ // eslint-disable-next-line global-require
25
+ require('prismjs/components/prism-groovy');
26
+ }
27
+ // eslint-disable-next-line global-require
28
+ require('../languages/prism-nextflow.js');
29
+ } else {
30
+ // Fall back to standard PrismJS components
31
+ require(`prismjs/components/prism-${lang}`);
32
+ }
22
33
  });
23
34
  // Clean up and eventually restore former globalThis.Prism object (if any)
24
35
  delete globalThis.Prism;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seqera/docusaurus-theme-seqera",
3
- "version": "1.0.6-next.32",
3
+ "version": "1.0.6-next.33",
4
4
  "description": "Seqera docs theme for Docusaurus",
5
5
  "author": "Seqera docs team <education@seqera.io>",
6
6
  "license": "Apache-2.0",
@@ -0,0 +1,24 @@
1
+ (function (Prism) {
2
+ Prism.languages.nextflow = Prism.languages.extend('groovy', {
3
+ 'keyword': /\b(?:as|assert|boolean|byte|catch|char|def|double|else|enum|float|if|in|instanceof|int|long|new|return|short|throw|try|void|process|workflow|input|output|exec|shell|script|stub|include|from)\b/,
4
+ 'string': {
5
+ pattern: /"""(?:[^\\]|\\[\s\S])*?"""|'''(?:[^\\]|\\[\s\S])*?'''|'(?:\\.|[^\\'\r\n])*'|"(?:\\.|[^\\"\r\n])*"/,
6
+ greedy: true
7
+ },
8
+ 'operator': {
9
+ pattern: /(^|[^.])(?:~|==?~?|\?[.:]?|\*(?:[.=]|\*=?)?|\.[@&]|\.\.<|\.\.(?!\.)|-[-=>]?|\+[+=]?|!=?|<(?:<=?|=>?)?|>(?:>>?=?|=)?|&[&=]?|\|[|=]?|\/=?|\^=?|%=?)/,
10
+ lookbehind: true
11
+ },
12
+ 'punctuation': /\.+|[{}[\];(),:$]/
13
+ });
14
+
15
+ // Add support for Nextflow-specific directives
16
+ Prism.languages.insertBefore('nextflow', 'keyword', {
17
+ 'directive': {
18
+ pattern: /(?:^|\n)\s*(?:process|workflow|exec|shell|script|stub|container|conda|module|include|from|publishDir|input|output):/,
19
+ lookbehind: true,
20
+ alias: 'keyword'
21
+ }
22
+ });
23
+
24
+ }(Prism));
@@ -203,10 +203,10 @@ main prose styles
203
203
 
204
204
  /* Code blocks */
205
205
  pre {
206
- margin-top: 0;
207
- margin-bottom: 0;
206
+ margin-top: 1.5rem;
207
+ margin-bottom: 1.5rem;
208
208
  padding: 1rem;
209
- border-radius: 0;
209
+ border-radius: 0.5rem;
210
210
  overflow-x: auto;
211
211
  background-color: var(--prism-background-color);
212
212
  box-shadow: none;
@@ -5,10 +5,5 @@
5
5
  color: var(--prism-color);
6
6
  margin-bottom: var(--ifm-leading);
7
7
  box-shadow: var(--ifm-global-shadow-lw);
8
- border-radius: 0;
9
- border: 1px solid var(--color-gray-300);
10
- }
11
-
12
- [data-theme='dark'] .codeBlockContainer {
13
- border-color: var(--ifm-color-emphasis-200);
8
+ border-radius: var(--ifm-code-border-radius);
14
9
  }
@@ -15,12 +15,12 @@
15
15
  /* rtl:ignore */
16
16
  float: left;
17
17
  min-width: 100%;
18
- padding: 0.5rem var(--ifm-pre-padding);
18
+ padding: var(--ifm-pre-padding);
19
19
  }
20
20
 
21
21
  .codeBlockLinesWithNumbering {
22
22
  display: table;
23
- padding: 0.5rem 0;
23
+ padding: var(--ifm-pre-padding) 0;
24
24
  }
25
25
 
26
26
  @media print {
@@ -27,8 +27,20 @@ export default function prismIncludeLanguages(
27
27
  // eslint-disable-next-line global-require
28
28
  require('prismjs/components/prism-markup-templating.js');
29
29
  }
30
- // eslint-disable-next-line global-require, import/no-dynamic-require
31
- require(`prismjs/components/prism-${lang}`);
30
+
31
+ // Load custom languages from the local languages directory
32
+ if (lang === 'nextflow') {
33
+ // Nextflow requires Groovy as a dependency
34
+ if (!additionalLanguages.includes('groovy')) {
35
+ // eslint-disable-next-line global-require
36
+ require('prismjs/components/prism-groovy');
37
+ }
38
+ // eslint-disable-next-line global-require
39
+ require('../languages/prism-nextflow.js');
40
+ } else {
41
+ // Fall back to standard PrismJS components
42
+ require(`prismjs/components/prism-${lang}`);
43
+ }
32
44
  });
33
45
 
34
46
  // Clean up and eventually restore former globalThis.Prism object (if any)