sugar-high 0.8.4 → 0.9.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.
@@ -0,0 +1,9 @@
1
+ type LanguageConfig = {
2
+ keywords: Set<string>
3
+ onCommentStart(curr: string, next: string): 0 | 1 | 2
4
+ onCommentEnd(prev: string, curr: string): 0 | 1 | 2
5
+ }
6
+
7
+ export const css: LanguageConfig
8
+ export const rust: LanguageConfig
9
+ export const python: LanguageConfig
@@ -0,0 +1,3 @@
1
+ export * as css from './lang/css'
2
+ export * as rust from './lang/rust'
3
+ export * as python from './lang/python'
@@ -0,0 +1,14 @@
1
+ // @ts-check
2
+ export const keywords = new Set([
3
+ // css keywords like @media, @import, @keyframes, etc.
4
+ '@media', '@import', '@keyframes', '@font-face', '@supports', '@page', '@counter-style',
5
+ '@font-feature-values', '@viewport', '@counter-style', '@font-feature-values', '@document',
6
+ ])
7
+
8
+ export const onCommentStart = (currentChar, nextChar) => {
9
+ return '/*' === (currentChar + nextChar) ? 1 : 0
10
+ }
11
+
12
+ export const onCommentEnd = (prevChar, currChar) => {
13
+ return '*/' === (prevChar + currChar) ? 1 : 0
14
+ }
@@ -0,0 +1,14 @@
1
+ // @ts-check
2
+ export const keywords = new Set([
3
+ 'and', 'as', 'assert', 'async', 'await', 'break', 'class', 'continue', 'def', 'del', 'elif',
4
+ 'else', 'except', 'finally', 'for', 'from', 'global', 'if', 'import', 'in', 'is', 'lambda',
5
+ 'nonlocal', 'not', 'or', 'pass', 'raise', 'return', 'try', 'while', 'with', 'yield',
6
+ ])
7
+
8
+ export const onCommentStart = (currentChar, _nextChar) => {
9
+ return currentChar === '#' ? 1 : 0
10
+ }
11
+
12
+ export const onCommentEnd = (_prevChar, currChar) => {
13
+ return currChar === '\n' ? 1 : 0
14
+ }
@@ -0,0 +1,8 @@
1
+ // @ts-check
2
+ export const keywords = new Set([
3
+ 'as', 'break', 'const', 'continue', 'crate', 'else', 'enum', 'extern', 'false', 'fn', 'for',
4
+ 'if', 'impl', 'in', 'let', 'loop', 'match', 'mod', 'move', 'mut', 'pub', 'ref', 'return', 'self',
5
+ 'Self', 'static', 'struct', 'super', 'trait', 'true', 'type', 'unsafe', 'use', 'where', 'while',
6
+ 'async', 'await', 'dyn', 'abstract', 'become', 'box', 'do', 'final', 'macro', 'override',
7
+ 'priv', 'typeof', 'unsized', 'virtual', 'yield', 'try',
8
+ ])
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sugar-high",
3
- "version": "0.8.4",
3
+ "version": "0.9.0",
4
4
  "type": "module",
5
5
  "types": "./lib/index.d.ts",
6
6
  "main": "./lib/index.js",
@@ -17,7 +17,7 @@
17
17
  "devDependencies": {
18
18
  "@types/node": "22.10.7",
19
19
  "@types/react": "19.0.7",
20
- "codice": "^1.0.0-beta.0",
20
+ "codice": "^1.0.0",
21
21
  "next": "15.1.5",
22
22
  "react": "^19.0.0",
23
23
  "react-dom": "^19.0.0",