quasar-ui-danx 0.4.95 → 0.5.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 (55) hide show
  1. package/dist/danx.es.js +25284 -23176
  2. package/dist/danx.es.js.map +1 -1
  3. package/dist/danx.umd.js +133 -120
  4. package/dist/danx.umd.js.map +1 -1
  5. package/dist/style.css +1 -1
  6. package/package.json +4 -2
  7. package/scripts/publish.sh +76 -0
  8. package/src/components/Utility/Buttons/ActionButton.vue +11 -3
  9. package/src/components/Utility/Code/CodeViewer.vue +219 -0
  10. package/src/components/Utility/Code/CodeViewerCollapsed.vue +34 -0
  11. package/src/components/Utility/Code/CodeViewerFooter.vue +53 -0
  12. package/src/components/Utility/Code/LanguageBadge.vue +122 -0
  13. package/src/components/Utility/Code/MarkdownContent.vue +405 -0
  14. package/src/components/Utility/Code/index.ts +5 -0
  15. package/src/components/Utility/Dialogs/FullscreenCarouselDialog.vue +134 -38
  16. package/src/components/Utility/Files/CarouselHeader.vue +24 -0
  17. package/src/components/Utility/Files/FileMetadataDialog.vue +69 -0
  18. package/src/components/Utility/Files/FilePreview.vue +118 -166
  19. package/src/components/Utility/Files/index.ts +1 -0
  20. package/src/components/Utility/index.ts +1 -0
  21. package/src/composables/index.ts +5 -0
  22. package/src/composables/useCodeFormat.ts +199 -0
  23. package/src/composables/useCodeViewerCollapse.ts +125 -0
  24. package/src/composables/useCodeViewerEditor.ts +420 -0
  25. package/src/composables/useFilePreview.ts +119 -0
  26. package/src/composables/useTranscodeLoader.ts +68 -0
  27. package/src/helpers/formats/highlightSyntax.ts +327 -0
  28. package/src/helpers/formats/index.ts +3 -1
  29. package/src/helpers/formats/markdown/escapeHtml.ts +15 -0
  30. package/src/helpers/formats/markdown/escapeSequences.ts +60 -0
  31. package/src/helpers/formats/markdown/index.ts +85 -0
  32. package/src/helpers/formats/markdown/parseInline.ts +124 -0
  33. package/src/helpers/formats/markdown/render/index.ts +92 -0
  34. package/src/helpers/formats/markdown/render/renderFootnotes.ts +30 -0
  35. package/src/helpers/formats/markdown/render/renderList.ts +69 -0
  36. package/src/helpers/formats/markdown/render/renderTable.ts +38 -0
  37. package/src/helpers/formats/markdown/state.ts +58 -0
  38. package/src/helpers/formats/markdown/tokenize/extractDefinitions.ts +39 -0
  39. package/src/helpers/formats/markdown/tokenize/index.ts +139 -0
  40. package/src/helpers/formats/markdown/tokenize/parseBlockquote.ts +34 -0
  41. package/src/helpers/formats/markdown/tokenize/parseCodeBlock.ts +85 -0
  42. package/src/helpers/formats/markdown/tokenize/parseDefinitionList.ts +88 -0
  43. package/src/helpers/formats/markdown/tokenize/parseHeading.ts +65 -0
  44. package/src/helpers/formats/markdown/tokenize/parseHorizontalRule.ts +22 -0
  45. package/src/helpers/formats/markdown/tokenize/parseList.ts +119 -0
  46. package/src/helpers/formats/markdown/tokenize/parseParagraph.ts +59 -0
  47. package/src/helpers/formats/markdown/tokenize/parseTable.ts +70 -0
  48. package/src/helpers/formats/markdown/tokenize/parseTaskList.ts +47 -0
  49. package/src/helpers/formats/markdown/tokenize/utils.ts +25 -0
  50. package/src/helpers/formats/markdown/types.ts +63 -0
  51. package/src/styles/danx.scss +4 -0
  52. package/src/styles/themes/danx/code.scss +158 -0
  53. package/src/styles/themes/danx/index.scss +2 -0
  54. package/src/styles/themes/danx/markdown.scss +241 -0
  55. package/src/styles/themes/danx/scrollbar.scss +125 -0
@@ -0,0 +1,241 @@
1
+ // Markdown Content Theme
2
+ // Styles for rendered markdown content
3
+
4
+ .dx-markdown-content {
5
+ // Base styling
6
+ line-height: 1.6;
7
+ color: inherit;
8
+
9
+ // Headings
10
+ h1, h2, h3, h4, h5, h6 {
11
+ margin-top: 1.5em;
12
+ margin-bottom: 0.5em;
13
+ font-weight: 600;
14
+ line-height: 1.25;
15
+
16
+ &:first-child {
17
+ margin-top: 0;
18
+ }
19
+ }
20
+
21
+ h1 { font-size: 2em; }
22
+ h2 { font-size: 1.5em; }
23
+ h3 { font-size: 1.25em; }
24
+ h4 { font-size: 1em; }
25
+ h5 { font-size: 0.875em; }
26
+ h6 { font-size: 0.85em; }
27
+
28
+ // Paragraphs
29
+ p {
30
+ margin: 1em 0;
31
+
32
+ &:first-child { margin-top: 0; }
33
+ &:last-child { margin-bottom: 0; }
34
+ }
35
+
36
+ // Inline code
37
+ code {
38
+ background: rgba(255, 255, 255, 0.1);
39
+ padding: 0.2em 0.4em;
40
+ border-radius: 3px;
41
+ font-size: 0.9em;
42
+ font-family: 'Fira Code', 'Monaco', monospace;
43
+ }
44
+
45
+ // Code blocks
46
+ pre {
47
+ background: rgba(0, 0, 0, 0.3);
48
+ padding: 1em;
49
+ border-radius: 6px;
50
+ overflow-x: auto;
51
+ margin: 1em 0;
52
+
53
+ code {
54
+ background: transparent;
55
+ padding: 0;
56
+ font-size: 0.875em;
57
+ }
58
+ }
59
+
60
+ // Blockquotes
61
+ blockquote {
62
+ border-left: 4px solid rgba(255, 255, 255, 0.3);
63
+ margin: 1em 0;
64
+ padding: 0.5em 1em;
65
+ color: rgba(255, 255, 255, 0.7);
66
+
67
+ p:first-child { margin-top: 0; }
68
+ p:last-child { margin-bottom: 0; }
69
+ }
70
+
71
+ // Lists
72
+ ul, ol {
73
+ margin: 1em 0;
74
+ padding-left: 2em;
75
+ }
76
+
77
+ li {
78
+ margin: 0.25em 0;
79
+ }
80
+
81
+ ul {
82
+ list-style-type: disc;
83
+
84
+ ul {
85
+ list-style-type: circle;
86
+
87
+ ul {
88
+ list-style-type: square;
89
+ }
90
+ }
91
+ }
92
+
93
+ ol {
94
+ list-style-type: decimal;
95
+ }
96
+
97
+ // Task lists
98
+ .task-list {
99
+ list-style: none;
100
+ padding-left: 0;
101
+
102
+ .task-list-item {
103
+ display: flex;
104
+ align-items: flex-start;
105
+ gap: 0.5em;
106
+ margin: 0.25em 0;
107
+
108
+ input[type="checkbox"] {
109
+ margin-top: 0.3em;
110
+ cursor: default;
111
+ }
112
+ }
113
+ }
114
+
115
+ // Links
116
+ a {
117
+ color: #60a5fa; // blue-400
118
+ text-decoration: none;
119
+
120
+ &:hover {
121
+ text-decoration: underline;
122
+ }
123
+ }
124
+
125
+ // Images
126
+ img {
127
+ max-width: 100%;
128
+ height: auto;
129
+ }
130
+
131
+ // Horizontal rules
132
+ hr {
133
+ border: none;
134
+ border-top: 1px solid rgba(255, 255, 255, 0.2);
135
+ margin: 2em 0;
136
+ }
137
+
138
+ // Bold and italic
139
+ strong { font-weight: 600; }
140
+ em { font-style: italic; }
141
+
142
+ // Strikethrough
143
+ del {
144
+ text-decoration: line-through;
145
+ opacity: 0.7;
146
+ }
147
+
148
+ // Highlight
149
+ mark {
150
+ background: rgba(250, 204, 21, 0.4); // yellow-400 with opacity
151
+ padding: 0.1em 0.2em;
152
+ border-radius: 2px;
153
+ }
154
+
155
+ // Subscript/Superscript
156
+ sub, sup {
157
+ font-size: 0.75em;
158
+ }
159
+
160
+ sub {
161
+ vertical-align: sub;
162
+ }
163
+
164
+ sup {
165
+ vertical-align: super;
166
+ }
167
+
168
+ // Tables
169
+ table {
170
+ border-collapse: collapse;
171
+ width: 100%;
172
+ margin: 1em 0;
173
+
174
+ th, td {
175
+ border: 1px solid rgba(255, 255, 255, 0.2);
176
+ padding: 0.5em 1em;
177
+ text-align: left;
178
+ }
179
+
180
+ th {
181
+ background: rgba(255, 255, 255, 0.1);
182
+ font-weight: 600;
183
+ }
184
+
185
+ tr:nth-child(even) {
186
+ background: rgba(255, 255, 255, 0.05);
187
+ }
188
+ }
189
+
190
+ // Definition lists
191
+ dl {
192
+ margin: 1em 0;
193
+ }
194
+
195
+ dt {
196
+ font-weight: 600;
197
+ margin-top: 1em;
198
+
199
+ &:first-child {
200
+ margin-top: 0;
201
+ }
202
+ }
203
+
204
+ dd {
205
+ margin-left: 2em;
206
+ margin-top: 0.25em;
207
+ }
208
+
209
+ // Footnotes
210
+ .footnote-ref {
211
+ font-size: 0.75em;
212
+ vertical-align: super;
213
+ line-height: 0;
214
+
215
+ a {
216
+ text-decoration: none;
217
+ }
218
+ }
219
+
220
+ .footnotes {
221
+ margin-top: 2em;
222
+ font-size: 0.875em;
223
+
224
+ hr {
225
+ margin-bottom: 1em;
226
+ }
227
+
228
+ .footnote-list {
229
+ padding-left: 1.5em;
230
+ }
231
+
232
+ .footnote-item {
233
+ margin: 0.5em 0;
234
+ }
235
+
236
+ .footnote-backref {
237
+ margin-left: 0.5em;
238
+ text-decoration: none;
239
+ }
240
+ }
241
+ }
@@ -0,0 +1,125 @@
1
+ // Custom Scrollbar Styles
2
+ // Thin, overlay scrollbar that fades based on hover state
3
+ // Usage: Apply .dx-scrollbar class to any scrollable container
4
+
5
+ // Scrollbar dimensions
6
+ $scrollbar-width: 4px;
7
+ $scrollbar-width-hover: 8px;
8
+ $scrollbar-track-color: transparent;
9
+ $scrollbar-thumb-color: rgba(255, 255, 255, 0.2);
10
+ $scrollbar-thumb-hover-color: rgba(255, 255, 255, 0.9);
11
+ $scrollbar-transition: all 0.3s ease;
12
+
13
+ // Mixin for scrollbar styles (reusable)
14
+ @mixin dx-scrollbar-base {
15
+ // Firefox
16
+ scrollbar-width: thin;
17
+ scrollbar-color: transparent transparent;
18
+ transition: scrollbar-color 0.3s ease;
19
+
20
+ // Webkit (Chrome, Safari, Edge)
21
+ &::-webkit-scrollbar {
22
+ width: $scrollbar-width;
23
+ height: $scrollbar-width;
24
+ transition: $scrollbar-transition;
25
+ }
26
+
27
+ &::-webkit-scrollbar-track {
28
+ background: $scrollbar-track-color;
29
+ }
30
+
31
+ &::-webkit-scrollbar-thumb {
32
+ background: transparent;
33
+ border-radius: $scrollbar-width-hover;
34
+ transition: $scrollbar-transition;
35
+ }
36
+
37
+ &::-webkit-scrollbar-corner {
38
+ background: transparent;
39
+ }
40
+ }
41
+
42
+ // Main scrollbar class (light - for dark backgrounds)
43
+ .dx-scrollbar {
44
+ @include dx-scrollbar-base;
45
+
46
+ // Container hovered or focused - show scrollbar at 0.2 opacity
47
+ &:hover,
48
+ &:focus,
49
+ &:focus-within {
50
+ scrollbar-color: $scrollbar-thumb-color transparent;
51
+
52
+ &::-webkit-scrollbar-thumb {
53
+ background: $scrollbar-thumb-color;
54
+ }
55
+ }
56
+
57
+ // Scrollbar directly hovered - full opacity and wider
58
+ &:hover::-webkit-scrollbar,
59
+ &:focus::-webkit-scrollbar,
60
+ &:focus-within::-webkit-scrollbar {
61
+ width: $scrollbar-width;
62
+ height: $scrollbar-width;
63
+ }
64
+
65
+ &:hover::-webkit-scrollbar-thumb:hover {
66
+ background: $scrollbar-thumb-hover-color;
67
+ width: $scrollbar-width-hover;
68
+ }
69
+
70
+ // Make scrollbar wider on hover
71
+ &::-webkit-scrollbar:hover {
72
+ width: $scrollbar-width-hover;
73
+ height: $scrollbar-width-hover;
74
+ }
75
+
76
+ // Active/dragging state
77
+ &::-webkit-scrollbar-thumb:active {
78
+ background: $scrollbar-thumb-hover-color;
79
+ }
80
+ }
81
+
82
+ // Dark variant (for light backgrounds)
83
+ .dx-scrollbar-dark {
84
+ @include dx-scrollbar-base;
85
+
86
+ &:hover,
87
+ &:focus,
88
+ &:focus-within {
89
+ scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
90
+
91
+ &::-webkit-scrollbar-thumb {
92
+ background: rgba(0, 0, 0, 0.2);
93
+ }
94
+ }
95
+
96
+ &:hover::-webkit-scrollbar,
97
+ &:focus::-webkit-scrollbar,
98
+ &:focus-within::-webkit-scrollbar {
99
+ width: $scrollbar-width;
100
+ height: $scrollbar-width;
101
+ }
102
+
103
+ &:hover::-webkit-scrollbar-thumb:hover {
104
+ background: rgba(0, 0, 0, 0.7);
105
+ }
106
+
107
+ &::-webkit-scrollbar:hover {
108
+ width: $scrollbar-width-hover;
109
+ height: $scrollbar-width-hover;
110
+ }
111
+
112
+ &::-webkit-scrollbar-thumb:active {
113
+ background: rgba(0, 0, 0, 0.7);
114
+ }
115
+ }
116
+
117
+ // Utility to hide scrollbar completely but keep scrolling
118
+ .dx-scrollbar-hidden {
119
+ scrollbar-width: none;
120
+ -ms-overflow-style: none;
121
+
122
+ &::-webkit-scrollbar {
123
+ display: none;
124
+ }
125
+ }