diff --git a/core/icon.tid b/core/icon.tid index fb8262d61..70187c55f 100644 --- a/core/icon.tid +++ b/core/icon.tid @@ -1,3 +1,8 @@ title: $:/core/icon +tags: $:/tags/Image -{{$:/core/images/globe}} + + + + + \ No newline at end of file diff --git a/core/images/plugin-generic-language.tid b/core/images/plugin-generic-language.tid new file mode 100644 index 000000000..1c5aa3ce5 --- /dev/null +++ b/core/images/plugin-generic-language.tid @@ -0,0 +1,8 @@ +title: $:/core/images/plugin-generic-language +tags: $:/tags/Image + + + + + + \ No newline at end of file diff --git a/core/images/plugin-generic-plugin.tid b/core/images/plugin-generic-plugin.tid new file mode 100644 index 000000000..6f56da7a3 --- /dev/null +++ b/core/images/plugin-generic-plugin.tid @@ -0,0 +1,8 @@ +title: $:/core/images/plugin-generic-plugin +tags: $:/tags/Image + + + + + + \ No newline at end of file diff --git a/core/images/plugin-generic-theme.tid b/core/images/plugin-generic-theme.tid new file mode 100644 index 000000000..bfc667c79 --- /dev/null +++ b/core/images/plugin-generic-theme.tid @@ -0,0 +1,8 @@ +title: $:/core/images/plugin-generic-theme +tags: $:/tags/Image + + + + + + \ No newline at end of file diff --git a/core/modules/parsers/wikiparser/rules/wikilink.js b/core/modules/parsers/wikiparser/rules/wikilink.js index 152b4e193..f4b543896 100644 --- a/core/modules/parsers/wikiparser/rules/wikilink.js +++ b/core/modules/parsers/wikiparser/rules/wikilink.js @@ -24,10 +24,10 @@ exports.name = "wikilink"; exports.types = {inline: true}; var textPrimitives = { - upperLetter: "[A-Z\u00c0-\u00de\u0150\u0170]", - lowerLetter: "[a-z0-9_\\-\u00df-\u00ff\u0151\u0171]", - anyLetter: "[A-Za-z0-9_\\-\u00c0-\u00de\u00df-\u00ff\u0150\u0170\u0151\u0171]", - anyLetterStrict: "[A-Za-z0-9\u00c0-\u00de\u00df-\u00ff\u0150\u0170\u0151\u0171]" + upperLetter: "[A-Z\u00c0-\u00d6\u00d8-\u00de\u0150\u0170]", + lowerLetter: "[a-z0-9\u00df-\u00f6\u00f8-\u00ff\u0151\u0171]", + anyLetter: "[A-Za-z0-9\u00c0-\u00d6\u00d8-\u00de\u00df-\u00f6\u00f8-\u00ff\u0150\u0170\u0151\u0171]", + blockPrefixLetters: "[A-Za-z0-9\-_\u00c0-\u00d6\u00d8-\u00de\u00df-\u00f6\u00f8-\u00ff\u0150\u0170\u0151\u0171]" }; textPrimitives.unWikiLink = "~"; @@ -54,9 +54,9 @@ exports.parse = function() { if(linkText.substr(0,1) === textPrimitives.unWikiLink) { return [{type: "text", text: linkText.substr(1)}]; } - // If the link has been preceded with a letter then don't treat it as a link + // If the link has been preceded with a blocked letter then don't treat it as a link if(this.match.index > 0) { - var preRegExp = new RegExp(textPrimitives.anyLetterStrict,"mg"); + var preRegExp = new RegExp(textPrimitives.blockPrefixLetters,"mg"); preRegExp.lastIndex = this.match.index-1; var preMatch = preRegExp.exec(this.parser.source); if(preMatch && preMatch.index === this.match.index-1) { diff --git a/core/modules/widgets/link.js b/core/modules/widgets/link.js index 111896219..b5cd89fd8 100755 --- a/core/modules/widgets/link.js +++ b/core/modules/widgets/link.js @@ -56,7 +56,11 @@ LinkWidget.prototype.renderLink = function(parent,nextSibling) { // Create our element var domNode = this.document.createElement("a"); // Assign classes - var classes = ["tw-tiddlylink"]; + var classes = []; + if(this.linkClasses) { + classes.push(this.linkClasses); + } + classes.push("tw-tiddlylink"); if(this.isShadow) { classes.push("tw-tiddlylink-shadow"); } @@ -182,6 +186,8 @@ LinkWidget.prototype.execute = function() { // Get the link title and aria label this.tooltip = this.getAttribute("tooltip"); this["aria-label"] = this.getAttribute("aria-label"); + // Get the link classes + this.linkClasses = this.getAttribute("class"); // Determine the link characteristics this.isMissing = !this.wiki.tiddlerExists(this.to); this.isShadow = this.wiki.isShadowTiddler(this.to); diff --git a/core/ui/ControlPanel/Plugins.tid b/core/ui/ControlPanel/Plugins.tid index ece3ba717..654c34502 100644 --- a/core/ui/ControlPanel/Plugins.tid +++ b/core/ui/ControlPanel/Plugins.tid @@ -14,23 +14,10 @@ $(currentTiddler)$/icon \end \define plugin-table(type) <$set name="qualified-state" value=<>> - - - - - - - <$list filter="[!has[draft.of]plugin-type[$type$]sort[description]]"> <$set name="popup-state" value=<>> - - - - - - - - - -
-  - -<> - -<> -
+<$link to={{!!title}} class="tw-plugin-info"> +
<$reveal type="nomatch" state=<> text="yes"> <$button class="btn-invisible btn-dropdown" set=<> setTo="yes"> {{$:/core/images/right-arrow}} @@ -41,34 +28,38 @@ $(currentTiddler)$/icon {{$:/core/images/down-arrow}} -
-<$link to={{!!title}}> -<$transclude tiddler=<> subtiddler=<>/> -''<$view field="description"><$view field="title"/>''
+ +
+<$transclude tiddler=<> subtiddler=<>> +<$transclude tiddler="$:/core/images/plugin-generic-$type$"/> + +
+
+
+''<$view field="description"><$view field="title"/>'' +
+
<$view field="title"/> - -
+ +
<$view field="version"/> -
+ + + <$reveal type="match" text="yes" state=<>> <$reveal type="nomatch" text="" state="!!list"> +
<$macrocall $name="tabs" state=<> tabsList={{!!list}} default="readme" template="$:/core/ui/PluginInfo"/> +
<$reveal type="match" text="" state="!!list"> -<$transclude tiddler="$:/core/ui/TiddlerInfo/Advanced/PluginInfo"/> +
+No information provided +
-
\end diff --git a/editions/test/tiddlers/tests/test-wikitext.js b/editions/test/tiddlers/tests/test-wikitext.js index 223f3306e..271688cee 100644 --- a/editions/test/tiddlers/tests/test-wikitext.js +++ b/editions/test/tiddlers/tests/test-wikitext.js @@ -45,6 +45,16 @@ describe("WikiText tests", function() { it("should support attributes specified as macro invocations", function() { expect(wiki.renderTiddler("text/html","TiddlerFour")).toBe("

This is a link

"); }); + it("should identify wikiwords to automatically link", function() { + expect(wiki.renderText("text/html","text/vnd-tiddlywiki","No wikilinks here").indexOf("=5.0.0", "source": "http://tiddlywiki.com/MyPlugin", - "plugin-type": "plugin" + "plugin-type": "plugin", + "list": "readme license history" } ``` @@ -85,7 +87,7 @@ The wiki object keeps track of all of the currently loaded plugins. If a request In the browser, any constituent tiddlers that are JavaScript modules (ie shadow tiddlers of content type `application/javascript` and possessing the field `module-type`) are executed during startup processing. -! Standard Tiddlers for Plugins +! Information Tiddlers for Plugins Plugin authors are encouraged to provide special information and documentation tiddlers that TiddlyWiki can include as plugin information tabs in the [[control panel|$:/ControlPanel]]. diff --git a/plugins/tiddlywiki/browser-sniff/readme.tid b/plugins/tiddlywiki/browser-sniff/readme.tid index cdcd03de3..474b935ff 100644 --- a/plugins/tiddlywiki/browser-sniff/readme.tid +++ b/plugins/tiddlywiki/browser-sniff/readme.tid @@ -7,7 +7,7 @@ This plugin adds a number of `$:/info/` tiddlers containing information about th |!Title |!Description | |[[$:/info/browser/is/android]] |Running on Android? ("yes" or "no") | |[[$:/info/browser/is/bada]] |Running on Bada? ("yes" or "no") | -|[[$:/info/browser/is/blackberry]] |Running on Blackberry? ("yes" or "no") | +|[[$:/info/browser/is/blackberry]] |Running on ~BlackBerry? ("yes" or "no") | |[[$:/info/browser/is/chrome]] |Running on Chrome? ("yes" or "no") | |[[$:/info/browser/is/firefox]] |Running on Firefox? ("yes" or "no") | |[[$:/info/browser/is/firefoxos]] |Running on Firefox OS? ("yes" or "no") | @@ -17,14 +17,14 @@ This plugin adds a number of `$:/info/` tiddlers containing information about th |[[$:/info/browser/is/iphone]] |Running on iPhone? ("yes" or "no") | |[[$:/info/browser/is/ipod]] |Running on iPod? ("yes" or "no") | |[[$:/info/browser/is/opera]] |Running on Opera? ("yes" or "no") | -|[[$:/info/browser/is/phantomjs]] |Running on PhantomJS? ("yes" or "no") | +|[[$:/info/browser/is/phantomjs]] |Running on ~PhantomJS? ("yes" or "no") | |[[$:/info/browser/is/safari]] |Running on Safari? ("yes" or "no") | |[[$:/info/browser/is/sailfish]] |Running on Sailfish? ("yes" or "no") | |[[$:/info/browser/is/seamonkey]] |Running on Sea Monkey? ("yes" or "no") | |[[$:/info/browser/is/silk]] |Running on Amazon's Silk? ("yes" or "no") | |[[$:/info/browser/is/tizen]] |Running on Tizen? ("yes" or "no") | -|[[$:/info/browser/is/webkit]] |Running on WebKit? ("yes" or "no") | -|[[$:/info/browser/is/webos]] |Running on WebOS? ("yes" or "no") | +|[[$:/info/browser/is/webkit]] |Running on ~WebKit? ("yes" or "no") | +|[[$:/info/browser/is/webos]] |Running on ~WebOS? ("yes" or "no") | |[[$:/info/browser/is/windowsphone]] |Running on Windows Phone? ("yes" or "no") | |[[$:/info/browser/name]] |Platform name (see below) | |[[$:/info/browser/version]] |Browser version | @@ -34,19 +34,19 @@ The browser information is obtained with [[Bowser, a browser detector library fr * ''"Amazon Silk"'' * ''"Android"'' * ''"Bada"'' -* ''"BlackBerry"'' +* ''"~BlackBerry"'' * ''"Chrome"'' * ''"Firefox"'' * ''"Internet Explorer"'' * ''"iOS"'' * ''"Opera"'' -* ''"PhantomJS"'' +* ''"~PhantomJS"'' * ''"Safari"'' * ''"Sailfish"'' -* ''"SeaMonkey"'' -* ''"TiddlyDesktop"'' +* ''"~SeaMonkey"'' +* ''"~TiddlyDesktop"'' * ''"Tizen"'' -* ''"WebOS"'' +* ''"~WebOS"'' * ''"Windows Phone"'' Note that Bowser returns "iPhone", "iPad" and "iPod" as distinct values for the name of the current browser. TiddlyWiki converts all three distinct values into "iOS" before copying to [[$:/info/browser/name]]. diff --git a/plugins/tiddlywiki/cecily/plugin.info b/plugins/tiddlywiki/cecily/plugin.info index 1463a4a58..d60579389 100644 --- a/plugins/tiddlywiki/cecily/plugin.info +++ b/plugins/tiddlywiki/cecily/plugin.info @@ -2,5 +2,6 @@ "title": "$:/plugins/tiddlywiki/cecily", "description": "Zoomable User Interface for TiddlyWiki", "author": "JeremyRuston", - "core-version": ">=5.0.0" + "core-version": ">=5.0.0", + "list": "readme" } diff --git a/plugins/tiddlywiki/cecily/readme.tid b/plugins/tiddlywiki/cecily/readme.tid new file mode 100644 index 000000000..c12e6b314 --- /dev/null +++ b/plugins/tiddlywiki/cecily/readme.tid @@ -0,0 +1,7 @@ +title: $:/plugins/tiddlywiki/cecily/readme + +This plugin provides a new story visualisation that displays individual tiddlers as resizable tiles on an infinite canvas. + +Cecily is based on an earlier plugin for TiddlyWiki Classic: http://jermolene.com/cecily + +Cecily is currently in the early stages of development with little functionality yet implemented. diff --git a/core/images/storyview-cecily.tid b/plugins/tiddlywiki/cecily/storyview-cecily.tid similarity index 100% rename from core/images/storyview-cecily.tid rename to plugins/tiddlywiki/cecily/storyview-cecily.tid diff --git a/themes/tiddlywiki/snowwhite/base.tid b/themes/tiddlywiki/snowwhite/base.tid index 30f5d66d3..5a93f2b3e 100644 --- a/themes/tiddlywiki/snowwhite/base.tid +++ b/themes/tiddlywiki/snowwhite/base.tid @@ -100,3 +100,7 @@ canvas.tw-edit-bitmapeditor { .tw-message-box img { <> } + +.tw-plugin-info { + <> +} diff --git a/themes/tiddlywiki/vanilla/base.tid b/themes/tiddlywiki/vanilla/base.tid index 2bf84c75d..69c190736 100644 --- a/themes/tiddlywiki/vanilla/base.tid +++ b/themes/tiddlywiki/vanilla/base.tid @@ -1238,6 +1238,23 @@ canvas.tw-edit-bitmapeditor { width: 100%; } +.tw-plugin-info { + display: block; + border: 1px solid <>; + margin: 1em 0 1em 0; + padding: 8px; +} + +.tw-plugin-info-chunk { + display: inline-block; + vertical-align: middle; +} + +.tw-plugin-info img, .tw-plugin-info svg { + width: 3em; + height: 3em; +} + /* ** Message boxes */