retold-content-system 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +107 -0
  3. package/build-codejar-bundle.js +29 -0
  4. package/build-codemirror-bundle.js +29 -0
  5. package/codejar-entry.js +10 -0
  6. package/codemirror-entry.js +16 -0
  7. package/content/Dogs.txt.md +2 -0
  8. package/content/README.md +35 -0
  9. package/content/_sidebar.md +3 -0
  10. package/content/_topbar.md +1 -0
  11. package/content/cover.md +12 -0
  12. package/content/getting-started.md +73 -0
  13. package/css/content-system.css +42 -0
  14. package/css/github.css +118 -0
  15. package/docs/.nojekyll +0 -0
  16. package/docs/README.md +24 -0
  17. package/docs/_sidebar.md +16 -0
  18. package/docs/_topbar.md +6 -0
  19. package/docs/cli.md +119 -0
  20. package/docs/cover.md +16 -0
  21. package/docs/css/docuserve.css +73 -0
  22. package/docs/editor-guide.md +137 -0
  23. package/docs/getting-started.md +73 -0
  24. package/docs/index.html +39 -0
  25. package/docs/keyboard-shortcuts.md +40 -0
  26. package/docs/retold-catalog.json +81 -0
  27. package/docs/retold-keyword-index.json +19 -0
  28. package/docs/topics.md +83 -0
  29. package/html/codejar-bundle.js +16 -0
  30. package/html/codemirror-bundle.js +29982 -0
  31. package/html/edit.html +25 -0
  32. package/html/index.html +25 -0
  33. package/html/preview.html +19 -0
  34. package/package.json +70 -0
  35. package/server.js +43 -0
  36. package/source/Pict-Application-ContentEditor-Configuration.json +15 -0
  37. package/source/Pict-Application-ContentEditor.js +1361 -0
  38. package/source/Pict-Application-ContentReader-Configuration.json +15 -0
  39. package/source/Pict-Application-ContentReader.js +91 -0
  40. package/source/Pict-ContentSystem-Bundle.js +21 -0
  41. package/source/cli/ContentSystem-CLI-Program.js +15 -0
  42. package/source/cli/ContentSystem-CLI-Run.js +3 -0
  43. package/source/cli/ContentSystem-Server-Setup.js +405 -0
  44. package/source/cli/commands/ContentSystem-Command-Serve.js +104 -0
  45. package/source/providers/Pict-Provider-ContentEditor.js +198 -0
  46. package/source/views/PictView-Editor-CodeEditor.js +271 -0
  47. package/source/views/PictView-Editor-Layout.js +1194 -0
  48. package/source/views/PictView-Editor-MarkdownEditor.js +115 -0
  49. package/source/views/PictView-Editor-MarkdownReference.js +801 -0
  50. package/source/views/PictView-Editor-SettingsPanel.js +563 -0
  51. package/source/views/PictView-Editor-TopBar.js +366 -0
  52. package/source/views/PictView-Editor-Topics.js +1025 -0
package/html/edit.html ADDED
@@ -0,0 +1,25 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1">
6
+ <title>Content Editor</title>
7
+ <link href="css/content-system.css" rel="stylesheet">
8
+ <link href="css/github.css" rel="stylesheet">
9
+ <!-- PICT Dynamic View CSS Container -->
10
+ <style id="PICT-CSS"></style>
11
+ <!-- CodeMirror bundle (sets window.CodeMirrorModules) -->
12
+ <script src="./codemirror-bundle.js" type="text/javascript"></script>
13
+ <!-- CodeJar + highlight.js bundle (sets window.CodeJarModules) -->
14
+ <script src="./codejar-bundle.js" type="text/javascript"></script>
15
+ <!-- Pict framework -->
16
+ <script src="./js/pict.min.js" type="text/javascript"></script>
17
+ <script type="text/javascript">
18
+ Pict.safeOnDocumentReady(function () { Pict.safeLoadPictApplication(PictContentEditor, 2); });
19
+ </script>
20
+ </head>
21
+ <body>
22
+ <div id="ContentEditor-Application-Container"></div>
23
+ <script src="./retold-content-system.min.js" type="text/javascript"></script>
24
+ </body>
25
+ </html>
@@ -0,0 +1,25 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1">
6
+ <title>Content Editor</title>
7
+ <link href="css/content-system.css" rel="stylesheet">
8
+ <link href="css/github.css" rel="stylesheet">
9
+ <!-- PICT Dynamic View CSS Container -->
10
+ <style id="PICT-CSS"></style>
11
+ <!-- CodeMirror bundle (sets window.CodeMirrorModules) -->
12
+ <script src="./codemirror-bundle.js" type="text/javascript"></script>
13
+ <!-- CodeJar + highlight.js bundle (sets window.CodeJarModules) -->
14
+ <script src="./codejar-bundle.js" type="text/javascript"></script>
15
+ <!-- Pict framework -->
16
+ <script src="./js/pict.min.js" type="text/javascript"></script>
17
+ <script type="text/javascript">
18
+ Pict.safeOnDocumentReady(function () { Pict.safeLoadPictApplication(PictContentEditor, 2); });
19
+ </script>
20
+ </head>
21
+ <body>
22
+ <div id="ContentEditor-Application-Container"></div>
23
+ <script src="./retold-content-system.min.js" type="text/javascript"></script>
24
+ </body>
25
+ </html>
@@ -0,0 +1,19 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1">
6
+ <title>Content System</title>
7
+ <link href="css/content-system.css" rel="stylesheet">
8
+ <!-- PICT Dynamic View CSS Container -->
9
+ <style id="PICT-CSS"></style>
10
+ <script src="./js/pict.min.js" type="text/javascript"></script>
11
+ <script type="text/javascript">
12
+ Pict.safeOnDocumentReady(function () { Pict.safeLoadPictApplication(PictContentReader, 2); });
13
+ </script>
14
+ </head>
15
+ <body>
16
+ <div id="Docuserve-Application-Container"></div>
17
+ <script src="./retold-content-system.min.js" type="text/javascript"></script>
18
+ </body>
19
+ </html>
package/package.json ADDED
@@ -0,0 +1,70 @@
1
+ {
2
+ "name": "retold-content-system",
3
+ "version": "1.0.0",
4
+ "description": "Retold Content System - Markdown content viewer and editor",
5
+ "main": "source/Pict-ContentSystem-Bundle.js",
6
+ "bin": {
7
+ "retold-content-system": "source/cli/ContentSystem-CLI-Run.js",
8
+ "rcs": "source/cli/ContentSystem-CLI-Run.js"
9
+ },
10
+ "scripts": {
11
+ "start": "node server.js",
12
+ "build": "npx quack build && npx quack copy",
13
+ "build-codemirror": "node build-codemirror-bundle.js",
14
+ "build-codejar": "node build-codejar-bundle.js",
15
+ "build-all": "npm run build-codemirror && npm run build-codejar && npm run build",
16
+ "test": "echo \"Error: no test specified\" && exit 0"
17
+ },
18
+ "author": "steven velozo <steven@velozo.com>",
19
+ "license": "MIT",
20
+ "dependencies": {
21
+ "fable": "^3.1.58",
22
+ "orator": "^6.0.2",
23
+ "orator-serviceserver-restify": "^2.0.7",
24
+ "pict": "^1.0.350",
25
+ "pict-application": "^1.0.32",
26
+ "pict-docuserve": "^0.0.27",
27
+ "pict-provider": "^1.0.10",
28
+ "pict-section-code": "^1.0.0",
29
+ "pict-section-content": "^0.0.6",
30
+ "pict-section-filebrowser": "^0.0.1",
31
+ "pict-section-markdowneditor": "^1.0.0",
32
+ "pict-service-commandlineutility": "^1.0.18",
33
+ "pict-view": "^1.0.66"
34
+ },
35
+ "devDependencies": {
36
+ "@codemirror/lang-markdown": "^6.5.0",
37
+ "@codemirror/state": "^6.5.4",
38
+ "@codemirror/view": "^6.39.15",
39
+ "codejar": "^4.3.0",
40
+ "codemirror": "^6.0.2",
41
+ "esbuild": "^0.27.3",
42
+ "highlight.js": "^11.11.1",
43
+ "quackage": "^1.0.56"
44
+ },
45
+ "copyFilesSettings": {
46
+ "whenFileExists": "overwrite"
47
+ },
48
+ "copyFiles": [
49
+ {
50
+ "from": "./html/*",
51
+ "to": "./dist/"
52
+ },
53
+ {
54
+ "from": "./css/**",
55
+ "to": "./dist/css/"
56
+ },
57
+ {
58
+ "from": "./node_modules/pict/dist/pict.min.js",
59
+ "to": "./dist/js/"
60
+ },
61
+ {
62
+ "from": "./node_modules/pict/dist/pict.min.js.map",
63
+ "to": "./dist/js/"
64
+ },
65
+ {
66
+ "from": "./node_modules/highlight.js/styles/github.css",
67
+ "to": "./dist/css/"
68
+ }
69
+ ]
70
+ }
package/server.js ADDED
@@ -0,0 +1,43 @@
1
+ /**
2
+ * Retold Content System -- Standalone Server Entry Point
3
+ *
4
+ * This is the simple entry point for running the content system server
5
+ * with default paths relative to this project directory.
6
+ *
7
+ * For CLI usage from arbitrary directories, use the `retold-content-system` command instead.
8
+ *
9
+ * Usage:
10
+ * npm run build-all (build client bundles first)
11
+ * npm start (start this server)
12
+ * Open http://localhost:8086 (reader mode)
13
+ * Open http://localhost:8086/edit.html (editor mode)
14
+ */
15
+
16
+ const libPath = require('path');
17
+ const libSetupServer = require('./source/cli/ContentSystem-Server-Setup.js');
18
+
19
+ let tmpPort = parseInt(process.env.PORT, 10) || 8086;
20
+
21
+ libSetupServer(
22
+ {
23
+ ContentPath: libPath.join(__dirname, 'content'),
24
+ UploadPath: libPath.join(__dirname, 'uploads'),
25
+ DistPath: libPath.join(__dirname, 'dist'),
26
+ Port: tmpPort
27
+ },
28
+ function (pError, pServerInfo)
29
+ {
30
+ if (pError)
31
+ {
32
+ console.error('Failed to start server:', pError.message);
33
+ process.exit(1);
34
+ }
35
+ pServerInfo.Fable.log.info('==========================================================');
36
+ pServerInfo.Fable.log.info(` Retold Content System running on http://localhost:${pServerInfo.Port}`);
37
+ pServerInfo.Fable.log.info('==========================================================');
38
+ pServerInfo.Fable.log.info(` Content path: ${libPath.join(__dirname, 'content')}`);
39
+ pServerInfo.Fable.log.info(` Upload path: ${libPath.join(__dirname, 'uploads')}`);
40
+ pServerInfo.Fable.log.info(` Reader: http://localhost:${pServerInfo.Port}/`);
41
+ pServerInfo.Fable.log.info(` Editor: http://localhost:${pServerInfo.Port}/edit.html`);
42
+ pServerInfo.Fable.log.info('==========================================================');
43
+ });
@@ -0,0 +1,15 @@
1
+ {
2
+ "Name": "Retold Content Editor",
3
+ "Hash": "ContentEditor",
4
+
5
+ "MainViewportViewIdentifier": "ContentEditor-Layout",
6
+
7
+ "AutoSolveAfterInitialize": true,
8
+ "AutoRenderMainViewportViewAfterInitialize": false,
9
+ "AutoRenderViewsAfterInitialize": false,
10
+
11
+ "pict_configuration":
12
+ {
13
+ "Product": "ContentEditor-Pict-Application"
14
+ }
15
+ }