kmaterialize 2.3.3-1.0.30 → 2.3.3-1.0.31
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/components/editor/_editor.scss +151 -0
- package/components/editor/editor.ts +947 -0
- package/components/editor/editorSpec.js +390 -0
- package/components/editor/spreadsheet-view.ts +202 -0
- package/components/editor/spreadsheetEditorSpec.js +145 -0
- package/dist/css/materialize.colors.min.css +1 -1
- package/dist/css/materialize.css +766 -1
- package/dist/css/materialize.min.css +2 -2
- package/dist/js/materialize.cjs.js +1373 -4
- package/dist/js/materialize.d.ts +184 -3
- package/dist/js/materialize.js +1373 -4
- package/dist/js/materialize.min.js +3 -3
- package/dist/js/materialize.mjs +1373 -5
- package/package.json +17 -1
- package/sass/materialize.scss +2 -0
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
.editor:has(> .editor-workspace) {
|
|
2
|
+
--editor-height: 680px;
|
|
3
|
+
--editor-code-font: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
|
4
|
+
color: var(--md-sys-color-on-surface);
|
|
5
|
+
background: var(--md-sys-color-surface);
|
|
6
|
+
border: 1px solid var(--md-sys-color-outline-variant);
|
|
7
|
+
border-radius: 20px;
|
|
8
|
+
overflow: hidden;
|
|
9
|
+
min-width: 0;
|
|
10
|
+
}
|
|
11
|
+
.editor-workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); height: var(--editor-height); }
|
|
12
|
+
.editor-input-pane { display: grid; grid-template-rows: minmax(180px, 1.1fr) minmax(180px, 1fr); min-width: 0; min-height: 0; border-right: 1px solid var(--md-sys-color-outline-variant); }
|
|
13
|
+
.editor-source-panel, .editor-preview-pane { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
|
|
14
|
+
.editor-pane-header { display: flex; align-items: center; justify-content: space-between; flex: 0 0 auto; gap: 12px; min-height: 54px; padding: 12px 16px; border-bottom: 1px solid var(--md-sys-color-outline-variant); background: var(--md-sys-color-surface-variant); }
|
|
15
|
+
.editor .editor-pane-title { color: var(--md-sys-color-on-surface); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
|
|
16
|
+
.editor-language, .editor-status { color: var(--md-sys-color-on-surface-variant); font-size: 11px; }
|
|
17
|
+
.editor-code { position: relative; overflow: hidden; display: flex; flex: 1; min-height: 0; min-width: 0; background: var(--md-sys-color-surface); }
|
|
18
|
+
.editor-code:focus-within, .editor-code.is-drop-target { box-shadow: inset 0 0 0 2px var(--md-sys-color-primary); }
|
|
19
|
+
.editor .editor-lines { flex: 0 0 48px; margin: 0; padding: 16px 10px; overflow: hidden; text-align: right; color: var(--md-sys-color-outline); border-right: 1px solid var(--md-sys-color-outline-variant); user-select: none; font: 13px/24px var(--editor-code-font); }
|
|
20
|
+
.editor textarea.editor-source, .editor textarea.editor-source:focus {
|
|
21
|
+
display: block; flex: 1; min-width: 0; width: 100%; height: 100%; min-height: 0; margin: 0; padding: 16px;
|
|
22
|
+
border: 0; border-radius: 0; box-shadow: none; outline: none; resize: none; box-sizing: border-box;
|
|
23
|
+
background: transparent; color: var(--md-sys-color-on-surface); caret-color: var(--md-sys-color-primary);
|
|
24
|
+
font: 13px/24px var(--editor-code-font); letter-spacing: normal; tab-size: 4; white-space: pre; overflow: auto;
|
|
25
|
+
}
|
|
26
|
+
.editor-source::selection { background: var(--md-sys-color-primary-container); color: var(--md-sys-color-on-primary-container); }
|
|
27
|
+
.editor-tokens { display: flex; flex-direction: column; min-height: 0; min-width: 0; border-top: 1px solid var(--md-sys-color-outline-variant); }
|
|
28
|
+
.editor select.editor-source-select { width: auto; max-width: 70%; height: 30px; min-height: 0; margin: 0; padding: 0 24px 0 8px; border: 1px solid var(--md-sys-color-outline-variant); border-radius: 8px; background: var(--md-sys-color-surface); color: var(--md-sys-color-on-surface); font-size: 12px; }
|
|
29
|
+
.editor input.editor-token-search { width: calc(100% - 32px); flex: 0 0 34px; height: 34px; min-height: 0; margin: 12px 16px 0; padding: 0 10px; border: 1px solid var(--md-sys-color-outline-variant); border-radius: 8px; box-sizing: border-box; color: var(--md-sys-color-on-surface); background: var(--md-sys-color-surface); font-size: 12px; }
|
|
30
|
+
.editor-token-help { margin: 8px 16px; font-size: 11px; line-height: 1.5; color: var(--md-sys-color-on-surface-variant); }
|
|
31
|
+
.editor-token-tree { flex: 1; min-height: 0; padding: 0 16px 16px; overflow: auto; }
|
|
32
|
+
.editor-token-branch { margin: 4px 0; }
|
|
33
|
+
.editor-token-branch > .editor-token-branch, .editor-token-branch > .editor-token-row { margin-left: 16px; border-left: 1px solid var(--md-sys-color-outline-variant); padding-left: 12px; }
|
|
34
|
+
.editor-token-branch > .editor-array-item { padding-left: 28px; }
|
|
35
|
+
.editor-token-summary { cursor: pointer; padding: 6px 0; font: 12px/1.5 var(--editor-code-font); color: var(--md-sys-color-on-surface); }
|
|
36
|
+
.editor-token-type { margin-left: 10px; color: var(--md-sys-color-on-surface-variant); font: 11px/1.5 system-ui, sans-serif; }
|
|
37
|
+
.editor-token-row { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 3px 0; }
|
|
38
|
+
.editor-token { flex: none; max-width: 65%; overflow: hidden; text-overflow: ellipsis; cursor: grab; padding: 5px 10px; border: 1px solid color-mix(in srgb, var(--md-sys-color-primary) 30%, transparent); border-radius: 999px; background: var(--md-sys-color-secondary-container); color: var(--md-sys-color-on-secondary-container); font: 12px/1.4 var(--editor-code-font); }
|
|
39
|
+
.editor-token:hover { background: var(--md-sys-color-primary-container); color: var(--md-sys-color-on-primary-container); }
|
|
40
|
+
.editor-token:active { cursor: grabbing; }
|
|
41
|
+
.editor-token:disabled { opacity: .6; cursor: default; }
|
|
42
|
+
.editor-token:focus-visible, .editor-token-summary:focus-visible, .editor-source-select:focus-visible { outline: 2px solid var(--md-sys-color-primary); outline-offset: 2px; }
|
|
43
|
+
.editor-token-value { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--md-sys-color-on-surface-variant); font-size: 12px; }
|
|
44
|
+
.editor-empty { color: var(--md-sys-color-on-surface-variant); font-size: 13px; }
|
|
45
|
+
.editor-preview { display: block; flex: 1; width: 100%; min-height: 0; border: 0; background: white; }
|
|
46
|
+
.editor-error { flex: 0 0 auto; max-height: 140px; overflow: auto; margin: 0; padding: 12px 16px; white-space: pre-wrap; color: var(--md-sys-color-on-error-container); background: var(--md-sys-color-error-container); font: 12px/1.5 var(--editor-code-font); }
|
|
47
|
+
.editor-error[hidden] { display: none; }
|
|
48
|
+
@media (max-width: 700px) {
|
|
49
|
+
.editor-workspace { grid-template-columns: minmax(0, 1fr); height: auto; }
|
|
50
|
+
.editor-input-pane { height: var(--editor-height); border-right: 0; }
|
|
51
|
+
.editor-preview-pane { height: 440px; border-top: 1px solid var(--md-sys-color-outline-variant); }
|
|
52
|
+
.editor-language { display: none; }
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.editor-drop-caret { position: absolute; z-index: 1; width: 2px; border-radius: 1px; background: var(--md-sys-color-primary); box-shadow: 0 0 0 1px var(--md-sys-color-surface); pointer-events: none; }
|
|
56
|
+
.editor-drop-caret[hidden] { display: none; }
|
|
57
|
+
|
|
58
|
+
// A Prism mirror paints the text; the native textarea retains editing and selection.
|
|
59
|
+
.editor .editor-highlight {
|
|
60
|
+
position: absolute; top: 0; margin: 0; padding: 16px; box-sizing: border-box;
|
|
61
|
+
overflow: hidden; pointer-events: none; user-select: none; border: 0; border-radius: 0;
|
|
62
|
+
font: 13px/24px var(--editor-code-font); letter-spacing: normal; white-space: pre; tab-size: 4;
|
|
63
|
+
background: transparent; color: var(--md-sys-color-on-surface); text-shadow: none;
|
|
64
|
+
}
|
|
65
|
+
.editor .editor-highlight[hidden] { display: none; }
|
|
66
|
+
.editor .editor-highlight-code, .editor .editor-highlight-code .token {
|
|
67
|
+
font: inherit; letter-spacing: inherit; white-space: inherit; padding: 0; margin: 0;
|
|
68
|
+
background: transparent; border: 0; text-shadow: none; text-decoration: none;
|
|
69
|
+
}
|
|
70
|
+
.editor .editor-code.is-highlighted textarea.editor-source {
|
|
71
|
+
position: relative; color: transparent; -webkit-text-fill-color: transparent;
|
|
72
|
+
caret-color: var(--md-sys-color-primary);
|
|
73
|
+
}
|
|
74
|
+
.editor .editor-code.is-highlighted textarea.editor-source::selection {
|
|
75
|
+
color: transparent; background: color-mix(in srgb, var(--md-sys-color-primary) 24%, transparent);
|
|
76
|
+
}
|
|
77
|
+
.editor .editor-highlight-code .token.comment { color: var(--md-sys-color-outline); }
|
|
78
|
+
.editor .editor-highlight-code .token.punctuation { color: var(--md-sys-color-on-surface-variant); }
|
|
79
|
+
.editor .editor-highlight-code .token.tag,
|
|
80
|
+
.editor .editor-highlight-code .token.keyword,
|
|
81
|
+
.editor .editor-highlight-code .token.delimiter { color: var(--md-sys-color-primary); }
|
|
82
|
+
.editor .editor-highlight-code .token.attr-name,
|
|
83
|
+
.editor .editor-highlight-code .token.property,
|
|
84
|
+
.editor .editor-highlight-code .token.function { color: var(--md-sys-color-tertiary); }
|
|
85
|
+
.editor .editor-highlight-code .token.attr-value,
|
|
86
|
+
.editor .editor-highlight-code .token.string,
|
|
87
|
+
.editor .editor-highlight-code .token.number,
|
|
88
|
+
.editor .editor-highlight-code .token.boolean { color: var(--md-sys-color-secondary); }
|
|
89
|
+
.editor .editor-highlight-code .token.variable { color: var(--md-sys-color-on-primary-container); }
|
|
90
|
+
.editor .editor-token-type, .editor .editor-token-value { font-style: normal; }
|
|
91
|
+
.editor em.editor-token-type, .editor em.editor-token-value { font-style: italic; }
|
|
92
|
+
|
|
93
|
+
.editor .editor-token-heading { margin: 12px 0 6px; font: 700 11px/1.5 system-ui, sans-serif; text-transform: uppercase; letter-spacing: .08em; color: var(--md-sys-color-on-surface-variant); }
|
|
94
|
+
.editor .editor-helper { background: var(--md-sys-color-tertiary-container); color: var(--md-sys-color-on-tertiary-container); }
|
|
95
|
+
|
|
96
|
+
// Compact Tom Select controls; dropdowns are portaled outside the clipped workspace.
|
|
97
|
+
.editor .editor-pane-header > .ts-wrapper { flex: 0 1 260px; min-width: 0; max-width: 68%; margin: 0; font-size: 12px; }
|
|
98
|
+
.editor .editor-pane-header .ts-control {
|
|
99
|
+
min-height: 32px; padding: 5px 28px 5px 10px !important; flex-wrap: nowrap; align-items: center;
|
|
100
|
+
border: 1px solid var(--md-sys-color-outline-variant); border-radius: 8px; box-shadow: none;
|
|
101
|
+
background: var(--md-sys-color-surface) !important; color: var(--md-sys-color-on-surface);
|
|
102
|
+
}
|
|
103
|
+
.editor .editor-pane-header .ts-control > .item { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
104
|
+
.editor .editor-pane-header .ts-control > input {
|
|
105
|
+
width: auto !important; min-width: 0 !important; min-height: 0; height: auto; margin: 0 !important; padding: 0 !important;
|
|
106
|
+
font: inherit; line-height: 20px; border: 0 !important; box-shadow: none !important; color: inherit; background: transparent;
|
|
107
|
+
}
|
|
108
|
+
.editor .editor-pane-header .ts-wrapper.single .ts-control::after { right: 10px; border-top-color: var(--md-sys-color-on-surface); }
|
|
109
|
+
.editor .editor-pane-header .ts-wrapper.focus .ts-control { outline: 2px solid var(--md-sys-color-primary); outline-offset: 1px; }
|
|
110
|
+
.editor-select-dropdown {
|
|
111
|
+
z-index: 10000; margin-top: 4px; overflow: hidden; border: 1px solid var(--md-sys-color-outline-variant); border-radius: 10px;
|
|
112
|
+
background: var(--md-sys-color-surface); color: var(--md-sys-color-on-surface); font: 12px/1.5 system-ui, sans-serif;
|
|
113
|
+
.option, .no-results, .loading { padding: 10px 12px; color: inherit; }
|
|
114
|
+
.active { background: var(--md-sys-color-primary-container); color: var(--md-sys-color-on-primary-container); }
|
|
115
|
+
.selected { background: var(--md-sys-color-secondary-container); color: var(--md-sys-color-on-secondary-container); }
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.editor-code[hidden] { display: none; }
|
|
119
|
+
.editor-mapping { display: flex; flex: 1; flex-direction: column; min-height: 0; min-width: 0; }
|
|
120
|
+
.editor-mapping-scroll { flex: 1; min-height: 0; overflow: auto; }
|
|
121
|
+
.editor .editor-mapping-table { width: auto; min-width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
|
|
122
|
+
.editor .editor-mapping-table th, .editor .editor-mapping-table td {
|
|
123
|
+
position: relative; min-width: 190px; width: 190px; padding: 8px;
|
|
124
|
+
border-right: 1px solid var(--md-sys-color-outline-variant); border-bottom: 1px solid var(--md-sys-color-outline-variant);
|
|
125
|
+
border-radius: 0; vertical-align: top; background: var(--md-sys-color-surface);
|
|
126
|
+
}
|
|
127
|
+
.editor .editor-mapping-table th[scope='row'] {
|
|
128
|
+
position: sticky; left: 0; z-index: 1; min-width: 64px; width: 64px; padding: 18px 12px;
|
|
129
|
+
background: var(--md-sys-color-surface-variant); color: var(--md-sys-color-on-surface-variant); font-size: 11px; font-weight: 600;
|
|
130
|
+
}
|
|
131
|
+
.editor .editor-mapping-table input, .editor .editor-mapping-table textarea {
|
|
132
|
+
box-sizing: border-box; display: block; width: 100%; min-height: 36px; height: 36px; margin: 0; padding: 8px;
|
|
133
|
+
border: 1px solid transparent; border-radius: 6px; box-shadow: none; background: transparent; color: var(--md-sys-color-on-surface);
|
|
134
|
+
font: 12px/20px var(--editor-code-font);
|
|
135
|
+
}
|
|
136
|
+
.editor .editor-mapping-table input { padding-right: 24px; font: 600 12px/20px system-ui, sans-serif; }
|
|
137
|
+
.editor .editor-mapping-table textarea { resize: vertical; min-height: 100px; height: 100px; white-space: pre; tab-size: 4; }
|
|
138
|
+
.editor .editor-mapping-table input:focus, .editor .editor-mapping-table textarea:focus, .editor .editor-mapping-table td.is-drop-target textarea {
|
|
139
|
+
outline: none; border-color: var(--md-sys-color-primary); box-shadow: 0 0 0 1px var(--md-sys-color-primary);
|
|
140
|
+
}
|
|
141
|
+
.editor-column-remove { position: absolute; top: 13px; right: 11px; width: 24px; height: 24px; border: 0; border-radius: 50%; background: transparent; color: var(--md-sys-color-on-surface-variant); cursor: pointer; font-size: 18px; }
|
|
142
|
+
.editor-column-remove:disabled { opacity: .35; cursor: default; }
|
|
143
|
+
.editor-mapping-actions { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 8px 12px; border-top: 1px solid var(--md-sys-color-outline-variant); }
|
|
144
|
+
.editor-mapping-actions > span { font-size: 11px; color: var(--md-sys-color-on-surface-variant); }
|
|
145
|
+
.editor-sheet-preview { flex: 1; min-height: 0; min-width: 0; overflow: hidden; position: relative; background: white; }
|
|
146
|
+
.editor-sheet-grid { width: 100%; height: 100%; overflow: hidden; }
|
|
147
|
+
.editor-sheet-preview .jss_container { padding: 0; max-width: 100%; }
|
|
148
|
+
.editor-sheet-preview .jss_content { max-width: 100%; overscroll-behavior: contain; }
|
|
149
|
+
.editor-spreadsheet .editor-input-pane { grid-template-rows: minmax(230px, 1fr) minmax(200px, 1fr); }
|
|
150
|
+
// Generated results are read-only, but use the normal worksheet text color.
|
|
151
|
+
.editor-sheet-preview .jss_worksheet > tbody > tr > td.readonly { color: var(--jss_content_color, #000); }
|