Commit Graph

207 Commits

Author SHA1 Message Date
Felix Roos 105db2a4ca fix: tonal import in autocomplete + add tonal to codemirror package dependencies 2025-10-18 08:49:31 +02:00
Matthew Pocock 7080490c68 Merge handlers and cache regexes in autocomplete
- Merged scalePreColonHandler and scaleAfterColonHandler into single scaleHandler
- Merged modePreColonHandler and modeAfterColonHandler into single modeHandler
- Cached all regex patterns as constants above their respective handler functions
- Eliminated regex compilation overhead on every keystroke/navigation event
- Improved code maintainability by reducing duplication between similar handlers
- Preserved exact same functionality while improving performance

Each handler now follows a consistent pattern of checking after-colon context
first (more specific) then pre-colon context, with all regex patterns
pre-compiled for better performance during intensive autocomplete sessions.
2025-09-18 21:52:40 +01:00
Matthew Pocock edb6c0db2e Reordered handlers to be a bit more organised. 2025-09-16 14:45:22 +01:00
Matthew Pocock 6ebe84e096 Added completion for chord. 2025-09-15 21:34:15 +01:00
Matthew Pocock cb011c8bb0 Add autocomplete for mode function
- Added modePreColonHandler for autocomplete of mode values (below, above, duck, root)
- Added modeAfterColonHandler for pitch name completion after colon in mode:anchor syntax
- Follows same pattern as sound/bank/scale handlers for complex expressions
- Supports expressions like '<above [below root]>' with proper fragment matching
- Uses regex pattern (?:[\s\[\{\()<])([\w:]*)$ to handle delimited expressions
2025-09-15 18:44:30 +01:00
drdozer c8875b29c1 Improve autocompletion behavior
- Refactored handlers to use consistent early return pattern for better readability
- Added blocking behavior for unquoted contexts (sound(, scale(, bank()) to guide users toward correct syntax instead of showing irrelevant fallback completions
- Fixed soundHandler to show all sounds when fragment is empty (e.g., sound(""))
- Simplified bankHandler by removing complex quote handling logic in favor of consistent blocking pattern
- Made scale handler regex patterns consistent (removed leading dots)
- All handlers now follow same structure: block unquoted contexts, provide completions for quoted contexts
2025-09-15 14:27:59 +01:00
drdozer 978616833a Merged autocomplete.mjs conflict. 2025-09-15 13:01:16 +01:00
Felix Roos 2d2b238da9 fix: use template element for string to html 2025-09-14 01:03:14 +02:00
froos f0839e02eb Merge pull request 'Feature: Synonyms in autocomplete and reference' (#1535) from glossing/strudel:glossing/synonyms-in-autocomplete into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1535
2025-09-14 00:49:16 +02:00
Aria 709b654ed3 Add synonyms to autocomplete 2025-09-13 16:21:09 -05:00
drdozer cd659ac2a1 feat: sound autocomplete matches anywhere in name using includes() 2025-09-13 21:36:24 +01:00
drdozer ed182d4b3f Updated the codemirror packages to be able to access additional imports. 2025-09-13 21:36:24 +01:00
drdozer 90614612e2 feat: add E# and B# to pitchNames for complete enharmonic coverage 2025-09-13 21:36:24 +01:00
drdozer 0b67473bd3 refactor: modularize autocomplete context handlers using strategy array 2025-09-13 21:36:24 +01:00
drdozer d87ce960d2 feat: implement context-aware autocomplete
Adds context-sensitive autocompletion for:
- Sound names in s("...") and sound("...") after the opening quote or after whitespace/bracket
- Bank names in bank("...") with quote handling and live filtering
- Scale types in .scale("...") after the colon, inserting colon-form for multi-word names
- Pitch names (C, C#, Db, etc.) for scale keys on explicit completion (Ctrl+Space) before the colon
- Blocks fallback completions in scale context before colon to avoid function list cross-talk
2025-09-13 21:36:24 +01:00
Felix Roos 5e2e6411e5 Publish
- @strudel/codemirror@1.2.5
 - @strudel/repl@1.2.6
2025-09-11 08:26:20 +02:00
froos 0fac16e769 Merge pull request 'add basicSetup for keybindings' (#1462) from Dsm0/strudel:codemirror-keymap-fix into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1462
2025-09-11 00:27:20 +02:00
Felix Roos d0ce82e3cd Publish
- @strudel/codemirror@1.2.4
 - @strudel/core@1.2.4
 - @strudel/csound@1.2.5
 - @strudel/draw@1.2.4
 - @strudel/gamepad@1.2.4
 - @strudel/hydra@1.2.4
 - @strudel/midi@1.2.5
 - @strudel/mini@1.2.4
 - @strudel/mondo@1.1.2
 - @strudel/motion@1.2.4
 - @strudel/mqtt@1.2.4
 - @strudel/osc@1.2.4
 - @strudel/repl@1.2.5
 - @strudel/sampler@0.2.3
 - @strudel/serial@1.2.4
 - @strudel/soundfonts@1.2.5
 - superdough@1.2.5
 - @strudel/tonal@1.2.4
 - @strudel/transpiler@1.2.4
 - @strudel/web@1.2.5
 - @strudel/webaudio@1.2.5
 - @strudel/xen@1.2.4
2025-09-10 23:08:16 +02:00
Aria c199b51645 Update autocomplete name to be the label and update ref to use main name as a synonym 2025-09-02 16:29:01 -05:00
Aria 439a7dc5e6 Include synonyms in autocomplete 2025-09-02 16:05:40 -05:00
Aria a5886bb9d4 Use white-space instead; fix scrolling; don't close autocomplete tooltips on click 2025-08-26 14:14:00 -05:00
Aria 877bc95a58 Switch to more specific class and fix p->div 2025-08-26 12:54:39 -05:00
Felix Roos 215ab87809 fix: prettier 2025-08-21 09:41:21 +02:00
froos 6f75a0a62b Merge pull request 'fix: repl autocomplete not rendering correctly' (#1480) from robase/strudel:fix-repl-autocomplete-styles into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1480
2025-08-20 12:31:36 +02:00
Jade (Rose) Rowland f17a4d045f Publish
- @strudel/codemirror@1.2.3
 - @strudel/core@1.2.3
 - @strudel/csound@1.2.4
 - @strudel/draw@1.2.3
 - @strudel/embed@1.1.1
 - @strudel/gamepad@1.2.3
 - @strudel/hydra@1.2.3
 - @strudel/midi@1.2.4
 - @strudel/mini@1.2.3
 - mondolang@1.1.1
 - @strudel/mondo@1.1.1
 - @strudel/motion@1.2.3
 - @strudel/mqtt@1.2.3
 - @strudel/osc@1.2.3
 - @strudel/reference@1.2.1
 - @strudel/repl@1.2.4
 - @strudel/serial@1.2.3
 - @strudel/soundfonts@1.2.4
 - superdough@1.2.4
 - @strudel/tonal@1.2.3
 - @strudel/transpiler@1.2.3
 - @strudel/web@1.2.4
 - @strudel/webaudio@1.2.4
 - @strudel/xen@1.2.3
2025-08-18 11:46:29 -04:00
robase 3292f88810 fix: repl autocomplete not rendering correctly 2025-08-07 09:25:01 +02:00
Dsm0 5448fc6077 removed duplication and unnecessary keymappings in codemirror config 2025-07-16 15:17:34 -07:00
Dsm0 06fafbd8eb Ensure no default extensions conflict with extensions in defaultSettings 2025-07-16 15:03:55 -07:00
Dsm0 10156f0067 add basicSetup for keybindings 2025-07-15 19:13:24 -07:00
froos 4a3d5ca44f Merge pull request 'fixed keybinding presedence issue' (#1456) from Dsm0/strudel:keyboard_binding_presedence_fix into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1456
2025-07-11 11:10:23 +02:00
Dsm0 eb4f1f69f6 pnpm codeformat 2025-07-10 17:28:56 -07:00
Dsm0 e7e321fe03 added multicursor support on ctrl/cmd + click 2025-07-10 15:03:22 -07:00
Dsm0 bf3de368f0 added codemirror as an option + removed fallback on defaults 2025-07-10 12:11:10 -07:00
Dsm0 d645cc6fe5 fixed keybinding presedence issue 2025-07-09 13:28:22 -07:00
Dsm0 8defdc424c added tab-indent setting 2025-07-08 17:57:24 -07:00
froos 67bfedb317 Merge branch 'main' into uzu 2025-06-19 10:21:04 +02:00
Jade (Rose) Rowland 7e6876c282 comment 2025-06-18 20:44:09 -04:00
Felix Roos 28cd7c1681 Merge branch 'main' into uzu 2025-06-18 21:26:51 +02:00
Jade (Rose) Rowland 011139eff8 arch2 2025-06-18 20:12:36 +02:00
Jade (Rose) Rowland 184cb746f3 arch 2025-06-18 19:55:30 +02:00
alex dcac254790 missing double quotes 2025-06-13 08:17:55 +01:00
Alex McLean 5fdea7fd80 github > strudel 2025-06-12 14:36:45 +01:00
Felix Roos b312ff63a9 Publish
- @strudel/codemirror@1.2.2
 - @strudel/core@1.2.2
 - @strudel/csound@1.2.3
 - @strudel/draw@1.2.2
 - @strudel/gamepad@1.2.2
 - @strudel/hydra@1.2.2
 - @strudel/midi@1.2.3
 - @strudel/mini@1.2.2
 - @strudel/motion@1.2.2
 - @strudel/mqtt@1.2.2
 - @strudel/osc@1.2.2
 - @strudel/repl@1.2.3
 - @strudel/serial@1.2.2
 - @strudel/soundfonts@1.2.3
 - superdough@1.2.3
 - @strudel/tonal@1.2.2
 - @strudel/transpiler@1.2.2
 - @strudel/web@1.2.3
 - @strudel/webaudio@1.2.3
 - @strudel/xen@1.2.2
2025-05-29 23:58:35 +02:00
Felix Roos 9bd7b66228 Publish
- @strudel/codemirror@1.2.1
 - @strudel/core@1.2.1
 - @strudel/csound@1.2.2
 - @strudel/draw@1.2.1
 - @strudel/gamepad@1.2.1
 - @strudel/hydra@1.2.1
 - @strudel/midi@1.2.2
 - @strudel/mini@1.2.1
 - @strudel/motion@1.2.1
 - @strudel/mqtt@1.2.1
 - @strudel/osc@1.2.1
 - @strudel/repl@1.2.2
 - @strudel/serial@1.2.1
 - @strudel/soundfonts@1.2.2
 - superdough@1.2.2
 - @strudel/tonal@1.2.1
 - @strudel/transpiler@1.2.1
 - @strudel/web@1.2.2
 - @strudel/webaudio@1.2.2
 - @strudel/xen@1.2.1
2025-05-24 11:30:02 +02:00
Nachito 5c3501caa4 fix: typo on docs causing problems with autocompletion. (#1350)
* fix: scramble and shuffle comments

* fix: comments on themes,docs, tests and more
2025-05-18 20:43:04 +01:00
Felix Roos 30fd4c5dec Merge branch 'main' into uzu 2025-05-02 08:16:52 +02:00
Felix Roos 177f5c1431 Publish
- @strudel/codemirror@1.2.0
 - @strudel/core@1.2.0
 - @strudel/csound@1.2.0
 - @strudel/draw@1.2.0
 - @strudel/gamepad@1.2.0
 - hs2js@0.2.0
 - @strudel/hydra@1.2.0
 - @strudel/midi@1.2.0
 - @strudel/mini@1.2.0
 - @strudel/motion@1.2.0
 - @strudel/mqtt@1.2.0
 - @strudel/osc@1.2.0
 - @strudel/reference@1.2.0
 - @strudel/repl@1.2.0
 - @strudel/sampler@0.2.0
 - @strudel/serial@1.2.0
 - @strudel/soundfonts@1.2.0
 - superdough@1.2.0
 - @strudel/tidal@0.2.0
 - @strudel/tonal@1.2.0
 - @strudel/transpiler@1.2.0
 - @strudel/web@1.2.0
 - @strudel/webaudio@1.2.0
 - @strudel/xen@1.2.0
2025-05-01 12:39:24 +02:00
Felix Roos 2da03ab46f Merge remote-tracking branch 'origin/main' into uzu 2025-05-01 11:15:24 +02:00
Jade (Rose) Rowland c852b5fab0 fix lint 2025-04-19 16:21:11 -04:00
Jade (Rose) Rowland bd08b74ebc fixed strudel bool 2025-04-19 16:10:38 -04:00