@docmd/live 0.4.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.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 docmd (docmd.io)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,24 @@
1
+ # @docmd/live
2
+
3
+ The browser-based engine that powers the **docmd Live Editor**.
4
+
5
+ This package bundles the core parser, UI, and themes into a standalone JavaScript bundle that can render documentation client-side without a Node.js server.
6
+
7
+ ## Links
8
+ - **Live Demo:** [live.docmd.io](https://live.docmd.io)
9
+ - **Main Project:** [github.com/docmd-io/docmd](https://github.com/docmd-io/docmd)
10
+
11
+ ## Usage (CLI)
12
+ You can run the editor locally:
13
+
14
+ ```bash
15
+ docmd live
16
+ ```
17
+
18
+ ## Usage (Programmatic)
19
+ To embed the editor engine in your own tools:
20
+
21
+ ```javascript
22
+ import { buildLive } from '@docmd/core';
23
+ await buildLive();
24
+ ```
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ const { start } = require('../index.js');
3
+ start();
@@ -0,0 +1,86 @@
1
+ /* Source file from the docmd project — https://github.com/docmd-io/docmd */
2
+
3
+ pre code.hljs {
4
+ display: block;
5
+ overflow-x: auto;
6
+ padding: 1em
7
+ }
8
+
9
+ code.hljs {
10
+ padding: 3px 5px
11
+ }
12
+
13
+ .hljs {
14
+ color: #abb2bf;
15
+ background: #282c34
16
+ }
17
+
18
+ .hljs-comment,
19
+ .hljs-quote {
20
+ color: #5c6370;
21
+ font-style: italic
22
+ }
23
+
24
+ .hljs-doctag,
25
+ .hljs-formula,
26
+ .hljs-keyword {
27
+ color: #c678dd
28
+ }
29
+
30
+ .hljs-deletion,
31
+ .hljs-name,
32
+ .hljs-section,
33
+ .hljs-selector-tag,
34
+ .hljs-subst {
35
+ color: #e06c75
36
+ }
37
+
38
+ .hljs-literal {
39
+ color: #56b6c2
40
+ }
41
+
42
+ .hljs-addition,
43
+ .hljs-attribute,
44
+ .hljs-meta .hljs-string,
45
+ .hljs-regexp,
46
+ .hljs-string {
47
+ color: #98c379
48
+ }
49
+
50
+ .hljs-attr,
51
+ .hljs-number,
52
+ .hljs-selector-attr,
53
+ .hljs-selector-class,
54
+ .hljs-selector-pseudo,
55
+ .hljs-template-variable,
56
+ .hljs-type,
57
+ .hljs-variable {
58
+ color: #d19a66
59
+ }
60
+
61
+ .hljs-bullet,
62
+ .hljs-link,
63
+ .hljs-meta,
64
+ .hljs-selector-id,
65
+ .hljs-symbol,
66
+ .hljs-title {
67
+ color: #61aeee
68
+ }
69
+
70
+ .hljs-built_in,
71
+ .hljs-class .hljs-title,
72
+ .hljs-title.class_ {
73
+ color: #e6c07b
74
+ }
75
+
76
+ .hljs-emphasis {
77
+ font-style: italic
78
+ }
79
+
80
+ .hljs-strong {
81
+ font-weight: 700
82
+ }
83
+
84
+ .hljs-link {
85
+ text-decoration: underline
86
+ }
@@ -0,0 +1,86 @@
1
+ /* Source file from the docmd project — https://github.com/docmd-io/docmd */
2
+
3
+ pre code.hljs {
4
+ display: block;
5
+ overflow-x: auto;
6
+ padding: 1em
7
+ }
8
+
9
+ code.hljs {
10
+ padding: 3px 5px
11
+ }
12
+
13
+ .hljs {
14
+ color: #383a42;
15
+ background: #fafafa
16
+ }
17
+
18
+ .hljs-comment,
19
+ .hljs-quote {
20
+ color: #a0a1a7;
21
+ font-style: italic
22
+ }
23
+
24
+ .hljs-doctag,
25
+ .hljs-formula,
26
+ .hljs-keyword {
27
+ color: #a626a4
28
+ }
29
+
30
+ .hljs-deletion,
31
+ .hljs-name,
32
+ .hljs-section,
33
+ .hljs-selector-tag,
34
+ .hljs-subst {
35
+ color: #e45649
36
+ }
37
+
38
+ .hljs-literal {
39
+ color: #0184bb
40
+ }
41
+
42
+ .hljs-addition,
43
+ .hljs-attribute,
44
+ .hljs-meta .hljs-string,
45
+ .hljs-regexp,
46
+ .hljs-string {
47
+ color: #50a14f
48
+ }
49
+
50
+ .hljs-attr,
51
+ .hljs-number,
52
+ .hljs-selector-attr,
53
+ .hljs-selector-class,
54
+ .hljs-selector-pseudo,
55
+ .hljs-template-variable,
56
+ .hljs-type,
57
+ .hljs-variable {
58
+ color: #986801
59
+ }
60
+
61
+ .hljs-bullet,
62
+ .hljs-link,
63
+ .hljs-meta,
64
+ .hljs-selector-id,
65
+ .hljs-symbol,
66
+ .hljs-title {
67
+ color: #4078f2
68
+ }
69
+
70
+ .hljs-built_in,
71
+ .hljs-class .hljs-title,
72
+ .hljs-title.class_ {
73
+ color: #c18401
74
+ }
75
+
76
+ .hljs-emphasis {
77
+ font-style: italic
78
+ }
79
+
80
+ .hljs-strong {
81
+ font-weight: 700
82
+ }
83
+
84
+ .hljs-link {
85
+ text-decoration: underline
86
+ }
@@ -0,0 +1,33 @@
1
+ /*
2
+ * Styles specific to the Live Editor Preview Iframe
3
+ */
4
+
5
+ /* Always hide TOC and Footer Actions in preview to save space */
6
+ .toc-sidebar,
7
+ .page-footer-actions {
8
+ display: none !important;
9
+ }
10
+
11
+ /* Ensure the main content takes full width since TOC is gone */
12
+ .content-layout {
13
+ display: block !important;
14
+ }
15
+
16
+ /* Hide Sidebar specifically on mobile in the preview */
17
+ /* (In Split View on mobile, space is very limited) */
18
+ @media (max-width: 768px) {
19
+ .sidebar {
20
+ display: none !important;
21
+ }
22
+
23
+ .main-content-wrapper {
24
+ margin-left: 0 !important;
25
+ }
26
+ }
27
+
28
+ /* Adjust header to look better without sidebar on mobile */
29
+ @media (max-width: 768px) {
30
+ .sidebar-toggle-button {
31
+ display: none !important;
32
+ }
33
+ }