@yuneta/gobj-ui 6.0.0 → 6.1.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/index.js CHANGED
@@ -79,6 +79,7 @@ export { register_c_yui_treedb_topics } from "./src/c_yui_treedb_topics.js";
79
79
  export { register_c_yui_treedb_topic_with_form } from "./src/c_yui_treedb_topic_with_form.js";
80
80
  export { register_c_yui_treedb_graph } from "./src/c_yui_treedb_graph.js";
81
81
  export { register_c_yui_treedb_schema } from "./src/c_yui_treedb_schema.js";
82
+ export { register_c_yui_schema_editor } from "./src/c_yui_schema_editor.js";
82
83
  export { register_c_g6_nodes_tree } from "./src/c_g6_nodes_tree.js";
83
84
 
84
85
  /*
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yuneta/gobj-ui",
3
- "version": "6.0.0",
3
+ "version": "6.1.0",
4
4
  "type": "module",
5
5
  "main": "dist/gobj-ui.cjs.js",
6
6
  "module": "dist/gobj-ui.es.js",
@@ -0,0 +1,133 @@
1
+ /***********************************************************************
2
+ * c_yui_schema_editor.css
3
+ *
4
+ * What the schema editor needs that Bulma does not give: a drag
5
+ * affordance on a row, the line that says where a dropped row
6
+ * lands, and a flag grid that stays readable at 360px.
7
+ *
8
+ * No transitions anywhere, deliberately: a row that slides into
9
+ * place hides the fact that a write is what moved it.
10
+ *
11
+ * Copyright (c) 2026, ArtGins.
12
+ * All Rights Reserved.
13
+ ***********************************************************************/
14
+
15
+ .C_YUI_SCHEMA_EDITOR .SCHEMA_TOOLBAR {
16
+ border-bottom: 1px solid var(--bulma-border, rgba(128, 128, 128, .3));
17
+ flex: 0 0 auto;
18
+ }
19
+
20
+ .C_YUI_SCHEMA_EDITOR .SCHEMA_CRUMBS {
21
+ overflow: hidden;
22
+ text-overflow: ellipsis;
23
+ white-space: nowrap;
24
+ }
25
+
26
+ .C_YUI_SCHEMA_EDITOR .SCHEMA_CRUMB_SEP {
27
+ margin: 0 .3rem;
28
+ opacity: .5;
29
+ }
30
+
31
+ /* The rows are the working surface: a drag handle that looks
32
+ * draggable, and a cursor that says the row itself opens. */
33
+ .C_YUI_SCHEMA_EDITOR .SCHEMA_COL_ROW {
34
+ cursor: default;
35
+ }
36
+
37
+ .C_YUI_SCHEMA_EDITOR .SCHEMA_COL_HANDLE {
38
+ cursor: grab;
39
+ width: 1.6rem;
40
+ text-align: center;
41
+ }
42
+
43
+ .C_YUI_SCHEMA_EDITOR .SCHEMA_COL_ROW.SCHEMA_COL_DRAGGING {
44
+ opacity: .45;
45
+ }
46
+
47
+ /* Where the row would land. A line and not a gap: a gap reflows the
48
+ * table under the pointer, which moves the target while it is aimed at. */
49
+ .C_YUI_SCHEMA_EDITOR .SCHEMA_COL_ROW.SCHEMA_COL_DROP_BEFORE > td {
50
+ box-shadow: inset 0 2px 0 0 var(--bulma-link, #485fc7);
51
+ }
52
+
53
+ .C_YUI_SCHEMA_EDITOR .SCHEMA_COL_ROW.SCHEMA_COL_DROP_AFTER > td {
54
+ box-shadow: inset 0 -2px 0 0 var(--bulma-link, #485fc7);
55
+ }
56
+
57
+ .C_YUI_SCHEMA_EDITOR .SCHEMA_TOPIC_ROW {
58
+ cursor: pointer;
59
+ }
60
+
61
+ .C_YUI_SCHEMA_EDITOR .SCHEMA_COL_FLAGS .tags {
62
+ margin-bottom: 0;
63
+ }
64
+
65
+ .C_YUI_SCHEMA_EDITOR .SCHEMA_COL_FLAGS .tag {
66
+ margin-bottom: 0;
67
+ }
68
+
69
+ /* The treedb cards reuse the shell's grid, so a schema card and a nav
70
+ * card are the same object to the eye. */
71
+ .C_YUI_SCHEMA_EDITOR .yui-nav-card {
72
+ cursor: pointer;
73
+ }
74
+
75
+ /* The flag grid: as many columns as fit, never fewer than one. */
76
+ .SCHEMA_FLAGS .SCHEMA_FLAG_LIST {
77
+ display: grid;
78
+ grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
79
+ gap: .1rem .5rem;
80
+ }
81
+
82
+ .SCHEMA_FLAGS .SCHEMA_FLAG {
83
+ display: flex;
84
+ align-items: center;
85
+ min-width: 0;
86
+ }
87
+
88
+ .SCHEMA_FLAGS .SCHEMA_FLAG_NAME {
89
+ overflow: hidden;
90
+ text-overflow: ellipsis;
91
+ white-space: nowrap;
92
+ font-family: var(--bulma-family-code, monospace);
93
+ }
94
+
95
+ /* Meaningless on the chosen type, and still editable: a flag already
96
+ * set has to stay reachable or the next save drops it. */
97
+ .SCHEMA_FLAGS .SCHEMA_FLAG_DIM .SCHEMA_FLAG_NAME {
98
+ opacity: .55;
99
+ }
100
+
101
+ .SCHEMA_EXPORT_TEXT,
102
+ .SCHEMA_IMPORT_TEXT {
103
+ white-space: pre;
104
+ overflow-wrap: normal;
105
+ overflow-x: auto;
106
+ }
107
+
108
+ .SCHEMA_IMPORT_LINES {
109
+ list-style: none;
110
+ margin: 0;
111
+ padding: 0;
112
+ }
113
+
114
+ .SCHEMA_IMPORT_LINE {
115
+ padding: .1rem 0;
116
+ }
117
+
118
+ /* No animation anywhere in this view. */
119
+ .C_YUI_SCHEMA_EDITOR *,
120
+ .SCHEMA_COL_FORM_DIALOG *,
121
+ .SCHEMA_TOPIC_FORM_DIALOG *,
122
+ .SCHEMA_IMPORT_DIALOG *,
123
+ .SCHEMA_EXPORT_DIALOG *,
124
+ .SCHEMA_REPORT_DIALOG * {
125
+ transition: none !important;
126
+ animation: none !important;
127
+ }
128
+
129
+ /* A write is in flight: the screen stays up and stops answering. */
130
+ .C_YUI_SCHEMA_EDITOR .SCHEMA_BODY.SCHEMA_BUSY {
131
+ pointer-events: none;
132
+ opacity: .6;
133
+ }