diff --git a/.gitmodules b/.gitmodules index 5504d6d541..748e50f5b1 100644 --- a/.gitmodules +++ b/.gitmodules @@ -365,6 +365,9 @@ [submodule "vendor/grammars/blitzmax"] path = vendor/grammars/blitzmax url = https://github.com/textmate/blitzmax.tmbundle +[submodule "vendor/grammars/blueprint-grammar"] + path = vendor/grammars/blueprint-grammar + url = https://github.com/kaypes/blueprint-grammar.git [submodule "vendor/grammars/boogie-vscode"] path = vendor/grammars/boogie-vscode url = https://github.com/boogie-org/boogie-vscode diff --git a/grammars.yml b/grammars.yml index cedc4bc892..a15a5790af 100644 --- a/grammars.yml +++ b/grammars.yml @@ -298,6 +298,8 @@ vendor/grammars/bikeshed: - source.csswg vendor/grammars/blitzmax: - source.blitzmax +vendor/grammars/blueprint-grammar: +- source.blueprint vendor/grammars/boogie-vscode: - source.boogie vendor/grammars/bqn-vscode: diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 290a09dd34..79db7614f6 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -719,6 +719,16 @@ BlitzMax: tm_scope: source.blitzmax ace_mode: text language_id: 35 +Blueprint: + type: markup + color: "#3584E4" + extensions: + - ".blp" + aliases: + - blp + tm_scope: source.blueprint + ace_mode: text + language_id: 765545512 Bluespec: type: programming color: "#12223c" diff --git a/samples/Blueprint/counter_window.blp b/samples/Blueprint/counter_window.blp new file mode 100644 index 0000000000..01c89d8764 --- /dev/null +++ b/samples/Blueprint/counter_window.blp @@ -0,0 +1,57 @@ +using Gtk 4.0; +using Adw 1; + +template $CounterWindow : Adw.ApplicationWindow { + default-width: 400; + default-height: 400; + width-request: 300; + title: _("Counter Example"); + + Adw.ToolbarView { + + [top] + Adw.HeaderBar { + // Empty HeaderBar, just for window dragging + } + + Gtk.Box { + orientation: vertical; + halign: center; + valign: center; + spacing: 48; + + Gtk.Frame { + width-request: 220; + height-request: 180; + + Gtk.Label counter_label { + use-markup: true; + label: "0 ×"; + + halign: center; + valign: center; + } + } + + Gtk.Box { + orientation: horizontal; + halign: center; + spacing: 16; + + Gtk.Button decrement_button { + icon-name: "list-remove-symbolic"; + tooltip-text: _("Decrease"); + styles ["circular"] + clicked => $on_decrement_clicked(); + } + + Gtk.Button increment_button { + icon-name: "list-add-symbolic"; + tooltip-text: _("Increase"); + styles ["circular", "suggested-action"] + clicked => $on_increment_clicked(); + } + } + } + } +} \ No newline at end of file diff --git a/samples/Blueprint/sign_in.blp b/samples/Blueprint/sign_in.blp new file mode 100644 index 0000000000..69f75eb566 --- /dev/null +++ b/samples/Blueprint/sign_in.blp @@ -0,0 +1,53 @@ +using Gtk 4.0; +using Adw 1; + +template $Login : Adw.ApplicationWindow { + default-width: 450; + default-height: 550; + width-request: 360; + title: _("Tabella"); + + Adw.ToastOverlay toast_overlay { + + Adw.ToolbarView { + + [top] + Adw.HeaderBar { + // Empty HeaderBar, just for window dragging + } + + Adw.StatusPage { + title: _("Welcome Back"); + description: _("Sign in to your account"); + icon-name: "avatar-default-symbolic"; + + Adw.Clamp { + maximum-size: 320; + + Gtk.Box { + orientation: vertical; + spacing: 24; + + Adw.PreferencesGroup { + title: _("Credentials"); + + Adw.EntryRow username_entry { + title: _("Username"); + } + + Adw.PasswordEntryRow password_entry { + title: _("Password"); + } + } + + Gtk.Button login_button { + label: _("Sign In"); + styles ["suggested-action", "pill"] + clicked => $on_login_clicked(); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/vendor/README.md b/vendor/README.md index e7ffd0756d..44de308f78 100644 --- a/vendor/README.md +++ b/vendor/README.md @@ -69,6 +69,7 @@ This is a list of grammars that Linguist selects to provide syntax highlighting - **Blade:** [jawee/language-blade](https://github.com/jawee/language-blade) - **BlitzBasic:** [textmate/blitzmax.tmbundle](https://github.com/textmate/blitzmax.tmbundle) - **BlitzMax:** [textmate/blitzmax.tmbundle](https://github.com/textmate/blitzmax.tmbundle) +- **Blueprint:** [kaypes/blueprint-grammar](https://github.com/kaypes/blueprint-grammar) - **Bluespec:** [thotypous/sublime-bsv](https://github.com/thotypous/sublime-bsv) - **Bluespec BH:** [B-Lang-org/language-bh](https://github.com/B-Lang-org/language-bh) - **Boo:** [drslump/sublime-boo](https://github.com/drslump/sublime-boo) diff --git a/vendor/grammars/blueprint-grammar b/vendor/grammars/blueprint-grammar new file mode 160000 index 0000000000..e116f22bf8 --- /dev/null +++ b/vendor/grammars/blueprint-grammar @@ -0,0 +1 @@ +Subproject commit e116f22bf80a5f0289c0612500d96394a598634d diff --git a/vendor/licenses/git_submodule/blueprint-grammar.dep.yml b/vendor/licenses/git_submodule/blueprint-grammar.dep.yml new file mode 100644 index 0000000000..4b5f60693a --- /dev/null +++ b/vendor/licenses/git_submodule/blueprint-grammar.dep.yml @@ -0,0 +1,31 @@ +--- +name: blueprint-grammar +version: e116f22bf80a5f0289c0612500d96394a598634d +type: git_submodule +homepage: https://github.com/kaypes/blueprint-grammar.git +license: mit +licenses: +- sources: LICENSE + text: | + MIT License + + Copyright (c) 2026 Kayque Pereira + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. +notices: []