Skip to content

Commit abffc8c

Browse files
New version
1 parent 8a4e90e commit abffc8c

13 files changed

+31
-15
lines changed

.changeset/perfect-buttons-do.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

lib/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# @code-hike/lighter
22

3+
## 1.0.3
4+
5+
### Patch Changes
6+
7+
- be24a91: add Polar grammar
8+
39
## 1.0.2
410

511
### Patch Changes

lib/dist/browser.esm.mjs

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

lib/dist/grammar/kusto.mjs

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

lib/dist/grammar/polar.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
var e="Polar",n="polar",t=[{include:"#comment"},{include:"#rule"},{include:"#rule-type"},{include:"#inline-query"},{include:"#resource-block"},{include:"#test-block"},{include:"#fixture"}],a={boolean:{match:"\\b(true|false)\\b",name:"constant.language.boolean"},comment:{match:"#.*",name:"comment.line.number-sign"},fixture:{patterns:[{match:"\\bfixture\\b",name:"keyword.control"},{begin:"\\btest\\b",beginCaptures:{0:{name:"keyword.control"}},end:"\\bfixture\\b",endCaptures:{0:{name:"keyword.control"}}}]},"inline-query":{begin:"\\?=",beginCaptures:{0:{name:"keyword.control"}},end:";",name:"meta.inline-query",patterns:[{include:"#term"}]},keyword:{patterns:[{match:"\\b(cut|or|debug|print|in|forall|if|and|of|not|matches|type|on|global)\\b",name:"constant.character"}]},number:{patterns:[{match:"\\b[+-]?\\d+(?:(\\.)\\d+(?:e[+-]?\\d+)?|(?:e[+-]?\\d+))\\b",name:"constant.numeric.float"},{match:"\\b(\\+|-)[\\d]+\\b",name:"constant.numeric.integer"},{match:"\\b[\\d]+\\b",name:"constant.numeric.natural"}]},"object-literal":{begin:"([a-zA-Z_]\\w*(?:::\\w+)*)\\s*\\{",beginCaptures:{1:{name:"entity.name.type.resource"}},end:"\\}",name:"constant.other.object-literal",patterns:[{include:"#string"},{include:"#number"},{include:"#boolean"}]},operator:{captures:{1:{name:"keyword.control"}},match:"(\\+|-|\\*|\\/|<|>|=|!)"},"resource-block":{begin:"(?<resourceType>[a-zA-Z_]\\w*(?:::\\w+)*){0}((?:(resource|actor)\\s+(\\g<resourceType>)(?:\\s+(extends)\\s+(\\g<resourceType>(?:\\s*,\\s*\\g<resourceType>)*)\\s*,?\\s*)?)|(global))\\s*{",beginCaptures:{3:{comment:"actor|resource",name:"keyword.control"},4:{comment:"declared resource type",name:"entity.name.type"},5:{comment:"extends",name:"keyword.control"},6:{comment:"list of extended resources",patterns:[{match:"([a-zA-Z_]\\w*(?:::\\w+)*)",name:"entity.name.type"}]},7:{comment:"global",name:"keyword.control"}},end:"\\}",name:"meta.resource-block",patterns:[{match:";",name:"punctuation.separator.sequence.declarations"},{begin:"\\{",end:"\\}",name:"meta.relation-declaration",patterns:[{include:"#specializer"},{include:"#comment"},{match:",",name:"punctuation.separator.sequence.dict"}]},{include:"#term"}]},rule:{name:"meta.rule",patterns:[{include:"#rule-functor"},{begin:"\\bif\\b",beginCaptures:{0:{name:"keyword.control.if"}},end:";",patterns:[{include:"#term"}]},{match:";"}]},"rule-functor":{begin:"([a-zA-Z_]\\w*(?:::\\w+)*)\\s*\\(",beginCaptures:{1:{name:"support.function.rule"}},end:"\\)",patterns:[{include:"#specializer"},{match:",",name:"punctuation.separator.sequence.list"},{include:"#term"}]},"rule-type":{begin:"\\btype\\b",beginCaptures:{0:{name:"keyword.other.type-decl"}},end:";",name:"meta.rule-type",patterns:[{include:"#rule-functor"}]},specializer:{captures:{1:{name:"entity.name.type.resource"}},match:"[a-zA-Z_]\\w*(?:::\\w+)*\\s*:\\s*([a-zA-Z_]\\w*(?:::\\w+)*)"},string:{begin:'"',end:'"',name:"string.quoted.double",patterns:[{match:"\\\\.",name:"constant.character.escape"}]},term:{patterns:[{include:"#comment"},{include:"#string"},{include:"#number"},{include:"#keyword"},{include:"#operator"},{include:"#boolean"},{include:"#object-literal"},{begin:"\\[",end:"\\]",name:"meta.bracket.list",patterns:[{include:"#term"},{match:",",name:"punctuation.separator.sequence.list"}]},{begin:"\\{",end:"\\}",name:"meta.bracket.dict",patterns:[{include:"#term"},{match:",",name:"punctuation.separator.sequence.dict"}]},{begin:"\\(",end:"\\)",name:"meta.parens",patterns:[{include:"#term"}]}]},"test-block":{begin:'(test)\\s+("[^"]*")\\s*\\{',beginCaptures:{1:{name:"keyword.control"},2:{name:"string.quoted.double"}},end:"\\}",name:"meta.test-block",patterns:[{begin:"(setup)\\s*\\{",beginCaptures:{1:{name:"keyword.control"}},end:"\\}",name:"meta.test-setup",patterns:[{include:"#rule"},{include:"#comment"},{include:"#fixture"}]},{include:"#rule"},{match:"\\b(assert|assert_not)\\b",name:"keyword.other"},{include:"#comment"}]}},r="source.polar",c={displayName:e,name:n,patterns:t,repository:a,scopeName:r};export{c as default,e as displayName,n as name,t as patterns,a as repository,r as scopeName};

lib/dist/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ declare class UnknownThemeError extends Error {
4141
declare const LANG_NAMES: string[];
4242
type NamesTuple = typeof LANG_NAMES;
4343
type LanguageAlias = NamesTuple[number];
44-
type LanguageName = "abap" | "actionscript-3" | "ada" | "angular-html" | "angular-ts" | "apache" | "apex" | "apl" | "applescript" | "ara" | "asciidoc" | "asm" | "astro" | "awk" | "ballerina" | "bat" | "beancount" | "berry" | "bibtex" | "bicep" | "blade" | "bsl" | "c" | "cadence" | "cairo" | "clarity" | "clojure" | "cmake" | "cobol" | "codeowners" | "codeql" | "coffee" | "common-lisp" | "coq" | "cpp" | "crystal" | "csharp" | "css" | "csv" | "cue" | "cypher" | "d" | "dart" | "dax" | "desktop" | "diff" | "docker" | "dotenv" | "dream-maker" | "edge" | "elixir" | "elm" | "emacs-lisp" | "erb" | "erlang" | "fennel" | "fish" | "fluent" | "fortran-fixed-form" | "fortran-free-form" | "fsharp" | "gdresource" | "gdscript" | "gdshader" | "genie" | "gherkin" | "git-commit" | "git-rebase" | "gleam" | "glimmer-js" | "glimmer-ts" | "glsl" | "gnuplot" | "go" | "graphql" | "groovy" | "hack" | "haml" | "handlebars" | "haskell" | "haxe" | "hcl" | "hjson" | "hlsl" | "html" | "html-derivative" | "http" | "hxml" | "hy" | "imba" | "ini" | "java" | "javascript" | "jinja" | "jison" | "json" | "json5" | "jsonc" | "jsonl" | "jsonnet" | "jssm" | "jsx" | "julia" | "kotlin" | "kusto" | "latex" | "lean" | "less" | "liquid" | "log" | "logo" | "lua" | "luau" | "make" | "markdown" | "marko" | "matlab" | "mdc" | "mdx" | "mermaid" | "mipsasm" | "mojo" | "move" | "narrat" | "nextflow" | "nginx" | "nim" | "nix" | "nushell" | "objective-c" | "objective-cpp" | "ocaml" | "pascal" | "perl" | "php" | "plsql" | "po" | "postcss" | "powerquery" | "powershell" | "prisma" | "prolog" | "proto" | "pug" | "puppet" | "purescript" | "python" | "qml" | "qmldir" | "qss" | "r" | "racket" | "raku" | "razor" | "reg" | "regexp" | "rel" | "riscv" | "rst" | "ruby" | "rust" | "sas" | "sass" | "scala" | "scheme" | "scss" | "sdbl" | "shaderlab" | "shellscript" | "shellsession" | "smalltalk" | "solidity" | "soy" | "sparql" | "splunk" | "sql" | "ssh-config" | "stata" | "stylus" | "svelte" | "swift" | "system-verilog" | "systemd" | "talonscript" | "tasl" | "tcl" | "templ" | "terraform" | "tex" | "toml" | "ts-tags" | "tsv" | "tsx" | "turtle" | "twig" | "txt" | "typescript" | "typespec" | "typst" | "v" | "vala" | "vb" | "verilog" | "vhdl" | "viml" | "vue" | "vue-html" | "vyper" | "wasm" | "wenyan" | "wgsl" | "wikitext" | "wolfram" | "xml" | "xsl" | "yaml" | "zenscript" | "zig";
44+
type LanguageName = "abap" | "actionscript-3" | "ada" | "angular-html" | "angular-ts" | "apache" | "apex" | "apl" | "applescript" | "ara" | "asciidoc" | "asm" | "astro" | "awk" | "ballerina" | "bat" | "beancount" | "berry" | "bibtex" | "bicep" | "blade" | "bsl" | "c" | "cadence" | "cairo" | "clarity" | "clojure" | "cmake" | "cobol" | "codeowners" | "codeql" | "coffee" | "common-lisp" | "coq" | "cpp" | "crystal" | "csharp" | "css" | "csv" | "cue" | "cypher" | "d" | "dart" | "dax" | "desktop" | "diff" | "docker" | "dotenv" | "dream-maker" | "edge" | "elixir" | "elm" | "emacs-lisp" | "erb" | "erlang" | "fennel" | "fish" | "fluent" | "fortran-fixed-form" | "fortran-free-form" | "fsharp" | "gdresource" | "gdscript" | "gdshader" | "genie" | "gherkin" | "git-commit" | "git-rebase" | "gleam" | "glimmer-js" | "glimmer-ts" | "glsl" | "gnuplot" | "go" | "graphql" | "groovy" | "hack" | "haml" | "handlebars" | "haskell" | "haxe" | "hcl" | "hjson" | "hlsl" | "html" | "html-derivative" | "http" | "hxml" | "hy" | "imba" | "ini" | "java" | "javascript" | "jinja" | "jison" | "json" | "json5" | "jsonc" | "jsonl" | "jsonnet" | "jssm" | "jsx" | "julia" | "kotlin" | "kusto" | "latex" | "lean" | "less" | "liquid" | "log" | "logo" | "lua" | "luau" | "make" | "markdown" | "marko" | "matlab" | "mdc" | "mdx" | "mermaid" | "mipsasm" | "mojo" | "move" | "narrat" | "nextflow" | "nginx" | "nim" | "nix" | "nushell" | "objective-c" | "objective-cpp" | "ocaml" | "pascal" | "perl" | "php" | "plsql" | "po" | "polar" | "postcss" | "powerquery" | "powershell" | "prisma" | "prolog" | "proto" | "pug" | "puppet" | "purescript" | "python" | "qml" | "qmldir" | "qss" | "r" | "racket" | "raku" | "razor" | "reg" | "regexp" | "rel" | "riscv" | "rst" | "ruby" | "rust" | "sas" | "sass" | "scala" | "scheme" | "scss" | "sdbl" | "shaderlab" | "shellscript" | "shellsession" | "smalltalk" | "solidity" | "soy" | "sparql" | "splunk" | "sql" | "ssh-config" | "stata" | "stylus" | "svelte" | "swift" | "system-verilog" | "systemd" | "talonscript" | "tasl" | "tcl" | "templ" | "terraform" | "tex" | "toml" | "ts-tags" | "tsv" | "tsx" | "turtle" | "twig" | "txt" | "typescript" | "typespec" | "typst" | "v" | "vala" | "vb" | "verilog" | "vhdl" | "viml" | "vue" | "vue-html" | "vyper" | "wasm" | "wenyan" | "wgsl" | "wikitext" | "wolfram" | "xml" | "xsl" | "yaml" | "zenscript" | "zig";
4545

4646
type Annotation = {
4747
name: string;

lib/dist/index.esm.mjs

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

lib/dist/worker.esm.mjs

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

lib/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@code-hike/lighter",
33
"type": "module",
4-
"version": "1.0.2",
4+
"version": "1.0.3",
55
"description": "Code Hike's syntax highlighter",
66
"license": "MIT",
77
"exports": {

test/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# lighter-test
22

3+
## 0.1.51
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [be24a91]
8+
- @code-hike/lighter@1.0.3
9+
310
## 0.1.50
411

512
### Patch Changes

test/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
"name": "lighter-test",
33
"private": true,
44
"type": "module",
5-
"version": "0.1.50",
5+
"version": "0.1.51",
66
"dependencies": {
7-
"@code-hike/lighter": "1.0.2"
7+
"@code-hike/lighter": "1.0.3"
88
}
99
}

web/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# lighter-web
22

3+
## 0.1.51
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [be24a91]
8+
- @code-hike/lighter@1.0.3
9+
310
## 0.1.50
411

512
### Patch Changes

web/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
22
"private": "true",
3-
"version": "0.1.50",
3+
"version": "0.1.51",
44
"name": "lighter-web",
55
"scripts": {
66
"dev": "next dev",
77
"build": "next build",
88
"start": "next start"
99
},
1010
"dependencies": {
11-
"@code-hike/lighter": "1.0.2",
11+
"@code-hike/lighter": "1.0.3",
1212
"next": "13.4.10",
1313
"react": "^18.2.0",
1414
"react-dom": "^18.2.0"

0 commit comments

Comments
 (0)