@scalar/blocks 0.1.12 → 0.1.15
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 +14 -0
- package/dist/code-example/helpers/format-language.d.ts.map +1 -1
- package/dist/code-example/helpers/format-language.js +2 -0
- package/dist/code-example/helpers/format-language.js.map +1 -1
- package/dist/constants.js +1 -1
- package/dist/style.css +9 -12
- package/package.json +9 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @scalar/blocks
|
|
2
2
|
|
|
3
|
+
## 0.1.15
|
|
4
|
+
|
|
5
|
+
## 0.1.14
|
|
6
|
+
|
|
7
|
+
### Patch Changes
|
|
8
|
+
|
|
9
|
+
- [#9941](https://github.com/scalar/scalar/pull/9941): Republish every package through npm trusted publishing. No functional changes.
|
|
10
|
+
|
|
11
|
+
## 0.1.13
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [#9872](https://github.com/scalar/scalar/pull/9872): Bump shared runtime dependencies: `js-base64` (`^3.7.8` -> `^3.9.2`) and `type-fest` (`^5.3.1` -> `^5.8.0`).
|
|
16
|
+
|
|
3
17
|
## 0.1.12
|
|
4
18
|
|
|
5
19
|
## 0.1.11
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format-language.d.ts","sourceRoot":"","sources":["../../../src/code-example/helpers/format-language.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"format-language.d.ts","sourceRoot":"","sources":["../../../src/code-example/helpers/format-language.ts"],"names":[],"mappings":"AA2DA;;;;;GAKG;AACH,eAAO,MAAM,cAAc,GAAI,OAAO,MAAM,KAAG,MAAM,GAAG,SAMvD,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format-language.js","names":[],"sources":["../../../src/code-example/helpers/format-language.ts"],"sourcesContent":["import { capitalize } from '@scalar/helpers/string/capitalize'\n\n/**\n * Display names for the most common languages found in custom code samples.\n *\n * Custom samples (`x-scalar-examples`, `x-readme`, `x-stainless-*`, …) carry a\n * free-form `lang` string that we otherwise show verbatim in the picker. This\n * map gives the common ones a properly cased label (e.g. `typescript` →\n * `TypeScript`). Anything not listed falls back to a simple capitalization.\n */\nconst LANGUAGE_LABELS: Record<string, string> = {\n c: 'C',\n clojure: 'Clojure',\n cpp: 'C++',\n 'c++': 'C++',\n csharp: 'C#',\n 'c#': 'C#',\n css: 'CSS',\n curl: 'cURL',\n dart: 'Dart',\n fsharp: 'F#',\n 'f#': 'F#',\n go: 'Go',\n golang: 'Go',\n graphql: 'GraphQL',\n html: 'HTML',\n http: 'HTTP',\n java: 'Java',\n javascript: 'JavaScript',\n js: 'JavaScript',\n json: 'JSON',\n kotlin: 'Kotlin',\n node: 'Node.js',\n nodejs: 'Node.js',\n objc: 'Objective-C',\n 'objective-c': 'Objective-C',\n ocaml: 'OCaml',\n php: 'PHP',\n powershell: 'PowerShell',\n py: 'Python',\n python: 'Python',\n r: 'R',\n ruby: 'Ruby',\n rust: 'Rust',\n scala: 'Scala',\n sh: 'Shell',\n shell: 'Shell',\n bash: 'Shell',\n sql: 'SQL',\n swift: 'Swift',\n ts: 'TypeScript',\n typescript: 'TypeScript',\n xml: 'XML',\n yaml: 'YAML',\n yml: 'YAML',\n}\n\n/**\n * Turn a free-form language identifier into a display label for the code sample picker.\n *\n * @param lang - The language identifier from a custom code sample (e.g. `typescript`)\n * @returns A properly cased label (e.g. `TypeScript`), or `undefined` when no language is given\n */\nexport const formatLanguage = (lang?: string): string | undefined => {\n if (!lang) {\n return undefined\n }\n\n return LANGUAGE_LABELS[lang.toLowerCase()] ?? capitalize(lang)\n}\n"],"mappings":";;AAUA,IAAM,IAA0C;CAC9C,GAAG;CACH,SAAS;CACT,KAAK;CACL,OAAO;CACP,QAAQ;CACR,MAAM;CACN,KAAK;CACL,MAAM;CACN,MAAM;CACN,QAAQ;CACR,MAAM;CACN,IAAI;CACJ,QAAQ;CACR,SAAS;CACT,MAAM;CACN,MAAM;CACN,MAAM;CACN,YAAY;CACZ,IAAI;CACJ,MAAM;CACN,QAAQ;CACR,MAAM;CACN,QAAQ;CACR,MAAM;CACN,eAAe;CACf,OAAO;CACP,KAAK;CACL,YAAY;CACZ,IAAI;CACJ,QAAQ;CACR,GAAG;CACH,MAAM;CACN,MAAM;CACN,OAAO;CACP,IAAI;CACJ,OAAO;CACP,MAAM;CACN,KAAK;CACL,OAAO;CACP,IAAI;CACJ,YAAY;CACZ,KAAK;CACL,MAAM;CACN,KAAK;AACP,GAQa,KAAkB,MAAsC;CAC9D,OAIL,OAAO,EAAgB,EAAK,YAAY,MAAM,EAAW,CAAI;AAC/D"}
|
|
1
|
+
{"version":3,"file":"format-language.js","names":[],"sources":["../../../src/code-example/helpers/format-language.ts"],"sourcesContent":["import { capitalize } from '@scalar/helpers/string/capitalize'\n\n/**\n * Display names for the most common languages found in custom code samples.\n *\n * Custom samples (`x-scalar-examples`, `x-readme`, `x-stainless-*`, …) carry a\n * free-form `lang` string that we otherwise show verbatim in the picker. This\n * map gives the common ones a properly cased label (e.g. `typescript` →\n * `TypeScript`). Anything not listed falls back to a simple capitalization.\n */\nconst LANGUAGE_LABELS: Record<string, string> = {\n c: 'C',\n clojure: 'Clojure',\n cpp: 'C++',\n 'c++': 'C++',\n csharp: 'C#',\n 'c#': 'C#',\n css: 'CSS',\n curl: 'cURL',\n dart: 'Dart',\n fsharp: 'F#',\n 'f#': 'F#',\n go: 'Go',\n golang: 'Go',\n graphql: 'GraphQL',\n html: 'HTML',\n http: 'HTTP',\n java: 'Java',\n javascript: 'JavaScript',\n js: 'JavaScript',\n json: 'JSON',\n jl: 'Julia',\n julia: 'Julia',\n kotlin: 'Kotlin',\n node: 'Node.js',\n nodejs: 'Node.js',\n objc: 'Objective-C',\n 'objective-c': 'Objective-C',\n ocaml: 'OCaml',\n php: 'PHP',\n powershell: 'PowerShell',\n py: 'Python',\n python: 'Python',\n r: 'R',\n ruby: 'Ruby',\n rust: 'Rust',\n scala: 'Scala',\n sh: 'Shell',\n shell: 'Shell',\n bash: 'Shell',\n sql: 'SQL',\n swift: 'Swift',\n ts: 'TypeScript',\n typescript: 'TypeScript',\n xml: 'XML',\n yaml: 'YAML',\n yml: 'YAML',\n}\n\n/**\n * Turn a free-form language identifier into a display label for the code sample picker.\n *\n * @param lang - The language identifier from a custom code sample (e.g. `typescript`)\n * @returns A properly cased label (e.g. `TypeScript`), or `undefined` when no language is given\n */\nexport const formatLanguage = (lang?: string): string | undefined => {\n if (!lang) {\n return undefined\n }\n\n return LANGUAGE_LABELS[lang.toLowerCase()] ?? capitalize(lang)\n}\n"],"mappings":";;AAUA,IAAM,IAA0C;CAC9C,GAAG;CACH,SAAS;CACT,KAAK;CACL,OAAO;CACP,QAAQ;CACR,MAAM;CACN,KAAK;CACL,MAAM;CACN,MAAM;CACN,QAAQ;CACR,MAAM;CACN,IAAI;CACJ,QAAQ;CACR,SAAS;CACT,MAAM;CACN,MAAM;CACN,MAAM;CACN,YAAY;CACZ,IAAI;CACJ,MAAM;CACN,IAAI;CACJ,OAAO;CACP,QAAQ;CACR,MAAM;CACN,QAAQ;CACR,MAAM;CACN,eAAe;CACf,OAAO;CACP,KAAK;CACL,YAAY;CACZ,IAAI;CACJ,QAAQ;CACR,GAAG;CACH,MAAM;CACN,MAAM;CACN,OAAO;CACP,IAAI;CACJ,OAAO;CACP,MAAM;CACN,KAAK;CACL,OAAO;CACP,IAAI;CACJ,YAAY;CACZ,KAAK;CACL,MAAM;CACN,KAAK;AACP,GAQa,KAAkB,MAAsC;CAC9D,OAIL,OAAO,EAAgB,EAAK,YAAY,MAAM,EAAW,CAAI;AAC/D"}
|
package/dist/constants.js
CHANGED
package/dist/style.css
CHANGED
|
@@ -488,6 +488,7 @@
|
|
|
488
488
|
}
|
|
489
489
|
|
|
490
490
|
:where(.scalar-app) input:-webkit-autofill {
|
|
491
|
+
-webkit-text-fill-color: var(--scalar-color-1);
|
|
491
492
|
-webkit-background-clip: text !important;
|
|
492
493
|
background-clip: text !important;
|
|
493
494
|
}
|
|
@@ -1901,6 +1902,10 @@
|
|
|
1901
1902
|
pointer-events: none;
|
|
1902
1903
|
}
|
|
1903
1904
|
|
|
1905
|
+
.scalar-app .collapse {
|
|
1906
|
+
visibility: collapse;
|
|
1907
|
+
}
|
|
1908
|
+
|
|
1904
1909
|
.scalar-app .invisible {
|
|
1905
1910
|
visibility: hidden;
|
|
1906
1911
|
}
|
|
@@ -2619,10 +2624,6 @@
|
|
|
2619
2624
|
min-width: 128px;
|
|
2620
2625
|
}
|
|
2621
2626
|
|
|
2622
|
-
.scalar-app .min-w-min {
|
|
2623
|
-
min-width: min-content;
|
|
2624
|
-
}
|
|
2625
|
-
|
|
2626
2627
|
.scalar-app .flex-1 {
|
|
2627
2628
|
flex: 1;
|
|
2628
2629
|
}
|
|
@@ -3311,6 +3312,10 @@
|
|
|
3311
3312
|
padding-right: 12px;
|
|
3312
3313
|
}
|
|
3313
3314
|
|
|
3315
|
+
.scalar-app .pr-6 {
|
|
3316
|
+
padding-right: 24px;
|
|
3317
|
+
}
|
|
3318
|
+
|
|
3314
3319
|
.scalar-app .pr-\[100\%\] {
|
|
3315
3320
|
padding-right: 100%;
|
|
3316
3321
|
}
|
|
@@ -3742,10 +3747,6 @@
|
|
|
3742
3747
|
min-width: 20px;
|
|
3743
3748
|
}
|
|
3744
3749
|
|
|
3745
|
-
:is(.scalar-app .\*\:flex-1 > *) {
|
|
3746
|
-
flex: 1;
|
|
3747
|
-
}
|
|
3748
|
-
|
|
3749
3750
|
:is(.scalar-app .\*\:items-center > *) {
|
|
3750
3751
|
align-items: center;
|
|
3751
3752
|
}
|
|
@@ -3754,10 +3755,6 @@
|
|
|
3754
3755
|
justify-content: center;
|
|
3755
3756
|
}
|
|
3756
3757
|
|
|
3757
|
-
:is(.scalar-app .\*\:gap-1 > *) {
|
|
3758
|
-
gap: 4px;
|
|
3759
|
-
}
|
|
3760
|
-
|
|
3761
3758
|
:is(.scalar-app .\*\:rounded > *) {
|
|
3762
3759
|
border-radius: var(--scalar-radius-md);
|
|
3763
3760
|
}
|
package/package.json
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"blocks",
|
|
18
18
|
"docs"
|
|
19
19
|
],
|
|
20
|
-
"version": "0.1.
|
|
20
|
+
"version": "0.1.15",
|
|
21
21
|
"engines": {
|
|
22
22
|
"node": ">=22"
|
|
23
23
|
},
|
|
@@ -38,15 +38,15 @@
|
|
|
38
38
|
],
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@types/har-format": "^1.2.16",
|
|
41
|
-
"js-base64": "^3.
|
|
41
|
+
"js-base64": "^3.9.2",
|
|
42
42
|
"vue": "^3.5.40",
|
|
43
|
-
"@scalar/components": "0.
|
|
44
|
-
"@scalar/
|
|
45
|
-
"@scalar/
|
|
46
|
-
"@scalar/themes": "0.17.
|
|
47
|
-
"@scalar/
|
|
48
|
-
"@scalar/
|
|
49
|
-
"@scalar/workspace-store": "0.
|
|
43
|
+
"@scalar/components": "0.29.0",
|
|
44
|
+
"@scalar/helpers": "0.11.2",
|
|
45
|
+
"@scalar/icons": "0.7.6",
|
|
46
|
+
"@scalar/themes": "0.17.4",
|
|
47
|
+
"@scalar/types": "0.18.3",
|
|
48
|
+
"@scalar/snippetz": "0.9.29",
|
|
49
|
+
"@scalar/workspace-store": "0.59.0"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@tailwindcss/cli": "^4.3.3",
|