1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-07-03 10:43:16 +00:00
Commit Graph

872 Commits

Author SHA1 Message Date
jeremy@jermolene.com
9ac21f167f Simplify the plain JS store implementation
Removing indexers and title cache
2023-06-25 17:03:28 +01:00
jeremy@jermolene.com
9427cf7ac6 Additional method to retrieve all titles 2023-06-23 17:33:35 +01:00
jeremy@jermolene.com
8690936805 Cleanup and clarify 2023-06-23 16:58:46 +01:00
jeremy@jermolene.com
831fb3996d Tiddler sql function tests should show custom field 2023-06-23 14:52:14 +01:00
jeremy@jermolene.com
c43bc8f92a Start prototyping some tiddler operations in sql 2023-06-23 14:47:35 +01:00
jeremy@jermolene.com
449e2274e2 Test code to exercise the database 2023-06-23 12:40:59 +01:00
jeremy@jermolene.com
146a22b894 Make rawmarkup code dynamically load dependencies
empty.html with the plugin is now 4.1MB
2023-06-22 15:24:39 +01:00
jeremy@jermolene.com
0546a14201 Restructure the sqlite3 store as a separate plugin 2023-06-22 15:04:55 +01:00
jeremy@jermolene.com
544e079033 Proof of concept of instantiating sqlite3 without needing external dependencies
We get a reference to sqlite3 but we're not yet doing anything with it

Also note that this approach leads to duplication - there will be two copies of sqlite3.js and sqlite3.wasm in each generated HTML file. The plan is to dynamically retrieve those tiddlers from the store area rather than baking them into the raw markup area
2023-06-22 14:27:37 +01:00
jeremy@jermolene.com
1d0b9280d8 Incorporate @joshuafontany's plain JS wiki implementation
And make the demo storage areas switchable

@joshuafontany's implementation was in #7521
2023-06-22 09:36:25 +01:00
jeremy@jermolene.com
3561318515 Merge branch 'master' into demo-alternate-store 2023-06-22 09:17:55 +01:00
Jeremy Ruston
9b8db5dbb1
Update to Google Analytics 4 (#7554)
* Adopt Google Analytics 4 tag code

* Fix typo

* Temporarily add Google Analytics tracking to tw5.com

So that we can test everything is working with the Vercel preview

* Remove test configuration
2023-06-22 08:48:48 +01:00
jeremy@jermolene.com
a05302da10 Revert "Bidirectional text improvements (#4541)"
This reverts commit f90eb386ae.
2023-06-21 17:13:33 +01:00
jeremy@jermolene.com
d8124ee82d Menu bar plugin: Hide menu bar in static renderings
Fixes #7476
2023-06-17 08:58:50 +01:00
cdruan
b61c01d8b0
Update widget name policy (#7510) 2023-06-14 09:55:16 +01:00
Jeremy Ruston
f90eb386ae
Bidirectional text improvements (#4541)
* Add support for \dir pragma

* Add "dir" attribute to reveal, edit, edit-text and edit-codemirror widgets

* Add  $:/config/DefaultTextDirection hidden setting

* Revert accidentally commited test data

This reverts some of commit b83c1d160f.

* Remove Codemirror plugin from Prerelease

Makes it easier to test things

* Fix framed text editor directionality in Firefox

* Add direction attribute for edit body template

* Missed closing brace

* Add docs for \dir pragma

* Templates should set text direction from a variable, not a transclusion

* Updates to framed.js in the light of PRs that have been merged since this

* Restore whitespace trim

* Docs dates

* Fix typo

* Clarify docs
2023-06-13 16:36:07 +01:00
btheado
86d45f1c3d
Request permission to protect local storage from eviction (#7398)
* Request the browser to never evict the persistent storage

* Store browser storage persisted state in a tiddler

* Factor out some code into helper functions

* Display status of persistence request in the settings page
2023-06-13 10:50:00 +01:00
jeremy@jermolene.com
a12a9bd939 Fixes to browser storage plugin icon 2023-06-12 09:22:20 +01:00
GameDungeon
578e883bdc
Add Tabs To Settings (#7524)
* Move to Core

* List-Before

* Update core/ui/ControlPanel/Settings.tid

* Proper list-before
2023-06-11 10:28:52 +01:00
Tavin Cole
4e7a6ffc22
Add codemirror option to show trailing space (#7493)
* codemirror edit/trailingspace addon (default off)

* refactor as codemirror-trailingspace plugin

* copy cm-trailingspace styles from cm demo
2023-05-27 18:28:27 +02:00
btheado
74e0619782
Protect codemirror.css from wikitext parsing, otherwise 'CodeMirror' is considered a wikilink (#7500) 2023-05-27 18:22:31 +02:00
jeremy@jermolene.com
990909c310 Revert "Feat: destroy() method for widgets to do custom cleanup (#6699)"
This reverts commit 474b73bdbe.
2023-05-18 17:27:05 +01:00
jeremy@jermolene.com
7fdd8a5164 Merge branch 'master' into demo-alternate-store 2023-05-10 22:11:55 +01:00
jeremy@jermolene.com
3da0a9431c Introduce $:/tags/Global tag
And also $:/tags/Global/View and $:/tags/Global/View/Body
2023-05-09 15:46:54 +01:00
Mario Pietsch
18d7d3d8c0
Improve the wording for the core-plugin in the upgrader-editioin (#6878) 2023-05-07 17:47:13 +01:00
lin onetwo
474b73bdbe
Feat: destroy() method for widgets to do custom cleanup (#6699)
* feat: inform child widget to do some custom cleanup

* fix: type

* refactor: restore old removeChildDomNodes

* refactor: make destroy() a separate method

* refactor: make destroy call removeChildDomNodes

* refactor: call destroy instead of removeChildDomNodes in each core widgets

* fix: refreshSelf does not mean destroy

* refactor: use old var insteadof const

* docs: about subclass
2023-05-06 12:19:11 +01:00
Arlen22
2b95daf59b
Change evalSandboxed to use only one context for all modules (#4624)
* Run modules in one new context

* Fix polyfill running on require

* Add code to check for global assignments

* Allow globals in separate context

This lets the caller request a separate context which may be polluted.

* Jasmine needs to pollute the global

* Formatting

* Add polyfill and cleanup code

* Convert to ES5

* One bug fix

* Some formatting

* Remove console.log line!

* Cleanup

* revert css-escape-polyfill.js to hopefully remove it from the PR

* Remove JSDOC directives
2023-05-06 12:11:18 +01:00
Jeremy Ruston
2bfefe3880
Parameterise core icons (#7413)
* Parameterise all the icons

* Improve splash screen macro for rendering icons

* Add new example from @kookma
2023-05-06 12:08:46 +01:00
btheado
3ee5f10362
BrowserStoragePlugin: Do not save shadow tiddlers to local storage (#7365)
If a tiddler is only a shadow tiddler, then do not save it
to local storage. Otherwise when installing a plugin, each
individual tiddler will be expanded and saved individually.
In order to uninstall such a plugin, the plugin tiddler and
each tiddler needs to be deleted.

This can be prevented by including a run like `-[is[shadow]!is[tiddler]]`
in the save filter, but that has the side effect of preventing
overwritten shadow tiddlers from being deleted from local storage.
2023-05-06 11:41:22 +01:00
yaisog
2340d48844
Add additional searchModes to Dynannotate (#7260)
* Add searchModes: literal, some and words

* Add additional search modes

Description of selection tracker config tiddlers was also changed.

* Update simple.tid

* Improve View Template examples

Transcludes a sample tiddler for demonstration instead of the dynannotate view template code.
Adds an example for usage with $genesis to add state tiddler controlled per-tiddler highlights.

* Make search highlights not case sensitive

* Remove created and modified fields

* Add another example text (Searching in Tiddlywiki)

* Add dynannotate for vercel deployment

This should probably not be merged...

* Create LegacySelectionTracker.tid

* Create SelectionTracker.tid

* Revert putting the SelectionTracker config titles in code blocks

* Replace inline styles with CSS class

* Add class for view template examples

Class name is tc-dynannotate-example-frame.

* Remove some <br> line breaks.

* Remove first example transclusion and fix some tab spacing

* Add class to override control panel table layout

* Add class to settings table

* More tab shenanigans

Great Scott!

* Add explanatory comment to example macro

* Change defaults to match widget behavior

* Make previous macro comment more concise

* Change example to transclude CP tiddler

$:/core/ui/ControlPanel/TiddlerFields

* Delete unnecessary example tiddler
2023-05-06 11:30:21 +01:00
Mario Pietsch
416a2fae7a
Add syntax docs to railroad plugin (#7334) 2023-03-06 16:12:26 +00:00
jeremy@jermolene.com
3f478f5689 Naming tweak to #6047
@linonetwo I realised on review that we refer to boot.files as the "tiddler file info"
2023-03-05 17:40:04 +00:00
cdruan
f9604c40d3
Add wikiparser.js dependency (#7330) 2023-03-05 10:34:41 +00:00
jeremy@jermolene.com
fdec12f43b Initial commit
This is the very barebones beginnings of a demo implementation of an alternate tiddler store. It is not functional. If using the Vercel builds, open developer tools in the browser to see it failing due to the absence of basic wiki methods.

The plan is to build it up into the smallest possible plain JS wiki store implementation, sharing as much implementation as possible with the existing core implementation with as little code duplication as possible. It could then serve as the basis for future experiments with wiki stores based on SQLite (@linonetwo), or a custom append only database (@yaisog).
2023-03-04 21:08:00 +00:00
lin onetwo
d14e775b90
Allow deleteTiddler to not modify fs (#6047)
* feat: allow deleteTiddler to not modify fs

* refactor: add new function that merely delete file in cache, and let old func calls it

* fix: self is undefined
2023-03-03 21:56:40 +00:00
Saq Imtiaz
5bce35d90b
Fix: add twEditor attribute to paste events handled by codemirror (#7281) 2023-02-28 08:35:15 +00:00
cdruan
eb8f4d66b9
Markdown Plugin: Handle non-string attr values in tw_image() (#7284) 2023-02-24 15:41:29 +00:00
jeremy@jermolene.com
ef03a4a5df Markdown Plugin: Default to recognising TiddlyWiki-format links
Fixes #7275
2023-02-24 09:51:45 +00:00
jeremy@jermolene.com
81f5141166 Dynannotate: Don't crash when used in the fake DOM
Fixes #7258
2023-02-10 09:00:52 +00:00
jeremy@jermolene.com
524cee1489 XLSX plugin: Add support for numeric fields 2023-01-30 21:42:44 +00:00
jeremy@jermolene.com
93abe5e3a6 xlsx-utils plugin: Update to latest version of xlsx.js 2023-01-30 09:43:18 +00:00
jeremy@jermolene.com
c0bca18cab Dynannotate: Fix searchCaseSensitive default in docs
Fixes #7245
2023-01-29 16:43:01 +00:00
jeremy@jermolene.com
6404d5652e Minor tweaks for fe2c677ac4 2023-01-27 20:49:34 +00:00
fkmiec
fe2c677ac4
Docs for #7169 - update readme tiddlers for TiddlyWebAdaptor and BrowserStorage plugins (#7240)
* Update readme to reflect optional use of browser storage with tiddlyweb sync adapter

* Fix typos in readme
2023-01-27 20:39:13 +00:00
cdruan
51cbf83c23
Fix data-tiddler field duplications in server snapshots (#7130) 2023-01-19 17:47:49 +00:00
fkmiec
005dfdadf0
Automatic sync of tiddler changes in browser storage when sync connection is re-established (#7169)
* Add automatic sync of tiddler changes in browswer-storage on restoration of server connection in tiddlywebadaptor

* Fix issue with new tiddlers not being synced.

* Fix issue with new tiddlers not being synced.

* Added logging

* Modified browser-storage plugin. Refactored into utility class.

* Modified browser-storage plugin. Refactored into utility class.

* Fix: browser storage config tiddler created on load only if not already exists

* Fix: Removed extra indent in util.js
2023-01-17 22:12:18 +00:00
jeremy@jermolene.com
c39ef398bf Share plugin: decode the URI component before checking for the leading hash sign
Should compensate for the mangling we get from Discourse – see https://talk.tiddlywiki.org/t/revived-share-plugin/5887
2023-01-15 18:55:36 +00:00
cdruan
0c328a1696
Revamp markdown plugin (#6528)
* Rename markdown to markdown-legacy

* Change how default renderWikiTextPragma value is displayed

To prevent out-of-sync, dynamically display the default value of
renderWikiTextPragma from the shadow tiddler instead of hard coding
the text in the "usage.tid".

* Repackage remarkable-based markdown plugin as markdown-legacy

- Rename plugin title to $:/plugins/tiddlywiki/markdown-legacy

- Add support for "text/markdown" MIME type and set that as the default
  when creating new markdown tiddlers

* Create new markdown plugin

* add support to text/markdown MIME type

* remove linkify and linkNewWindow config options

- linkify feature should be controlled by "extlink" TW parser rule;
  enabling markdown's linkify option will interfere with parsing

- remove the possibility to open external links in the same tab/window
  to match TW's behavior

* Ignore latex-parser wikirule in rednerWikiTextPragma

* Prevent camel-case link text from generating a link

* Update editions/markdowndemo

* Produce better parse tree

* Improve markdown/tiddlywiki integration

- widget block should not interrupt paragraph
- ignore tw-syntax links inside markdown-syntax links
- remove repeated renderWikiTextPragma parsing
- more efficient findNextMatch when examining tw rules

* Update user docs

* Replace includes() with indexOf() for legacy browsers
2023-01-14 09:49:04 +00:00
btheado
b5134951e5
Allow attribute override in innerwiki widget (#7176) 2023-01-13 10:48:51 +00:00
btheado
6e10918a28
Fixes share plugin stale url and prevents wikification of generated json (#7207)
* Use tv-action-refresh-policy to ensure generated share url is up-to-date

* Use 'text/raw' output to prevent generated json from being wikified
2023-01-12 23:36:21 +00:00