kotaindah55
bbdd8523aa
feat: add Writable type utility
2025-04-13 11:59:01 +02:00
kotaindah55
c2b47a6df0
refactor: add CodeMirror attribution for its internal API
2025-04-13 11:58:36 +02:00
kotaindah55
f46c104879
refactor: rename "cm-extension" to "cm-extensions"
2025-04-13 11:57:44 +02:00
kotaindah55
87788eb6d5
perf: only do reparsing when the tree was completed
...
Additionally, A logic was added to only reparse when needed.
2025-04-13 11:56:19 +02:00
kotaindah55
ac2ba4d794
fix: remove address parts where their parent has been changed
...
We should use `splice` instead of reassigning them due to possibility of having different address length on different line.
2025-04-13 11:33:43 +02:00
kotaindah55
535f3654e8
fix: repair postprocessor not parse note embeds, heading, etc
...
Also add support to parse exported note by Export Image plugin.
2025-04-08 16:07:57 +02:00
kotaindah55
d49255af42
feat: set higher precedence to the postprocessor
2025-04-08 16:03:53 +02:00
kotaindah55
54c0ec3c45
fix: mistake of advancing line via Text.line() instead of TextCursor.next()
...
This leads RangeError when parser skips the blank line.
2025-04-07 03:28:33 +02:00
kotaindah55
77620ebe89
refactor(TextCursor): translate Text's "address" after address change loop has been finished
2025-04-07 03:24:59 +02:00
kotaindah55
18b9e0f8f3
refactor: reorganize source codes
...
Most of the codes were organized, with the addition of replacing spaces with tabs, removing unused functions and snippets, etc.
2025-04-06 23:00:24 +02:00
kotaindah55
4f5e62bc0a
feat: use TagManager instance to manage all custom tags
2025-04-06 22:56:49 +02:00
kotaindah55
af3c3c05da
perf: empty containerEl on tab hide instead on display beginning
...
Thus, it ensure there is no persist and remain unused element in the background.
2025-03-20 20:54:16 +02:00
kotaindah55
a648055356
refactor: rename TokensCatcher to TokensBuffer
2025-03-20 16:45:43 +02:00
kotaindah55
92830cafab
fix(parser): error when encounter math syntax in a blockquote
...
This happen when getShifterStart() was trying to get math open inside a blockquote. Normally, getOpen() method in the ShifterNodeConfigs will recursively look for any of shifter node behind, using node.prevSibling prop to catch it. It doesn't result null value, except for the mentioned case above. So, we need to track the parent firstly, in this case it's a blockquote node, then get the previous sibling (it's blockquote too) and pick its last child (which is another math node).
2025-03-20 16:37:53 +02:00
kotaindah55
23e0d87546
revert: use wrap() back as it providing detectWord option
2025-03-17 23:30:32 +02:00
kotaindah55
75ec4828cd
refactor: rename toggleDelim() to toggleInlineDelim
2025-03-17 23:29:32 +02:00
kotaindah55
0c9a316cca
refactor: add detectWord parameter to the wrap()
...
The value should be true when tidier formatting was switched on.
2025-03-17 23:28:42 +02:00
kotaindah55
cbff48de5a
fix: non-tidier format acts like the tidier one
...
This was fixed by not using wrap() to wrap with delimiters.
2025-03-17 23:17:58 +02:00
kotaindah55
dd3ab6eb7a
refactor: reorganize folders and files
2025-03-17 11:14:27 +02:00
kotaindah55
841ab04b78
refactor: add some types as helper to the core functionality
2025-03-17 11:12:52 +02:00
kotaindah55
c2bb8a67d2
feat: register formatting commands and context menu
2025-03-17 11:09:01 +02:00
kotaindah55
33e80fe525
feat: add settings to customize predefined tags for the custom span and fenced div
2025-03-17 11:06:37 +02:00
kotaindah55
f54b8b831b
feat: use TagMenu to cover all tag-based formatting
...
Additionally, ColorMenu has to be removed, and use Formatter directly rather than caching some token informations to the menu.
2025-03-17 10:41:52 +02:00
kotaindah55
cf701cad4d
perf: ColorButton no longer held token ranges information
...
All of this can be done with Formatter instance through menu item onClick event.
2025-03-17 10:38:26 +02:00
kotaindah55
a33f9f83e1
refactor: remove restartObserver redundants
...
Call observe() inside restartObserver() rather than replicating it inside.
2025-03-17 10:36:08 +02:00
kotaindah55
a6c44bd794
feat: pick certain tokens from the maps based on their format type
2025-03-17 10:34:12 +02:00
kotaindah55
7937dbaabb
fix: iteration no longer missed some regions
...
Use for loop directly and remove the cache mechanism, it seems to be redundant.
2025-03-17 10:32:19 +02:00
kotaindah55
47bf42e0fe
perf: add identity checking, avoiding decoration facet recomputation
2025-03-17 10:28:21 +02:00
kotaindah55
076ed7d952
refactor: check core activity using ActivityRecorder
...
Key-paired activity checking. So, checking only is done once in the same activity. The keys and the activity states will be reseted once the view or the activity have been updated.
2025-03-17 10:26:53 +02:00
kotaindah55
9518006ff1
refactor: menuInvoker annotation be no longer needed
...
Tag menu will only be invoked through click event on the color button, command, or Formatter instance.
2025-03-17 10:15:33 +02:00
kotaindah55
a7bc51fed2
refactor: menuInvoker annotation be no longer needed
...
Tag menu will only be invoked through click event on the color button, command, or Formatter instance.
2025-03-17 10:13:37 +02:00
kotaindah55
e2587b2be5
feat: use a formatter as formatting helper
...
Has an ability to format in a tidier way (configurable in settings).
2025-03-15 04:37:55 +02:00
kotaindah55
1cf540693f
fix: add missing argument
2025-03-07 14:06:16 +02:00
kotaindah55
76a343c1ac
feat: invoke tag menu (i.e. color menu and class menu) when provided related annotation
2025-03-07 14:03:20 +02:00
kotaindah55
428dc4bd6a
style: add doc comment to the decoSetField
2025-03-07 14:01:05 +02:00
kotaindah55
3c27c28167
fix: color menu not showing when the cursor was placed in the end of line
2025-03-07 13:59:47 +02:00
kotaindah55
6b3e92aa04
refactor: add moveCursorAfterTag and itemIndexCache parameters
2025-03-07 13:58:25 +02:00
kotaindah55
dae146607f
feat: move the cursor right after the tag when set to true
2025-03-07 13:56:22 +02:00
kotaindah55
bb47d81e7a
feat: cache last selected item when provided
2025-03-07 13:53:54 +02:00
kotaindah55
eca8b359f2
feat: cache last selected item when provided
2025-03-07 13:52:09 +02:00
kotaindah55
a6afbe08b4
refactor: add selectedRegion iterator method to SelectionObserver
2025-03-07 13:47:04 +02:00
kotaindah55
6198df80fe
style: shorten "Customize" into "Custom"
2025-03-07 13:44:52 +02:00
kotaindah55
a96ceabb9d
style: fix typo on "behaviour"
2025-03-07 13:43:27 +02:00
kotaindah55
c56777cf42
fix: enable auto-sort in Decoration.set avoiding not-in-order omitted delim set
...
This happens when a token was nested within another token. So, the closing delimiter of the nested within is ahead of both delimiters of the nested one (That closing should be the last in order).
2025-03-07 02:15:55 +02:00
kotaindah55
53a1b1f593
refactor: set menu instance appart from the button widget
...
It will be intended to be applied not only to the color button in the upcoming release.
2025-03-06 17:00:44 +02:00
kotaindah55
1bc541720a
refactor: set parser and observer state to false when the view update was invoked
...
It is due to view update may be invoked twice with the same state, enhancing efficiency.
2025-03-06 16:56:55 +02:00
kotaindah55
e690d60d80
refactor: rename "BuilderPlugin" to "EditorPlugin"
2025-03-06 16:53:21 +02:00
kotaindah55
f3cbac5226
fix: fenced div opening was displayed while it should be hidden
...
Mistake happens when taking docChanged as a parameter. It wasn't always notify there is currently parsing activity.
2025-03-06 16:51:46 +02:00
kotaindah55
f4851c55e7
style: use "configs" instead of "configArr"
2025-03-05 21:31:33 +02:00
kotaindah55
b672ca57a1
style: use "configs" instead of "configArr"
2025-03-05 21:29:56 +02:00