@cu-mkp/editioncrafter 1.3.0-beta.1 → 1.3.0-beta.3

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 (44) hide show
  1. package/README.md +7 -0
  2. package/dist/editioncrafter.js +34747 -31554
  3. package/dist/es/src/EditionCrafter/component/DiploMatic.js +19 -17
  4. package/dist/es/src/EditionCrafter/component/DocumentView.js +13 -9
  5. package/dist/es/src/EditionCrafter/component/EmptyPaneView.js +22 -0
  6. package/dist/es/src/EditionCrafter/component/ImageView.js +61 -40
  7. package/dist/es/src/EditionCrafter/component/Navigation.js +1 -0
  8. package/dist/es/src/EditionCrafter/component/SplitPaneView.js +10 -9
  9. package/dist/es/src/EditionCrafter/component/TagToolbar.jsx +14 -4
  10. package/dist/es/src/EditionCrafter/context/TagFilter.jsx +22 -11
  11. package/dist/es/src/EditionCrafter/context/TagFilterContext.js +2 -1
  12. package/dist/es/src/EditionCrafter/index.jsx +31 -0
  13. package/dist/es/src/EditionCrafter/model/Folio.js +27 -1
  14. package/dist/es/src/EditionCrafter/saga/RouteListenerSaga.js +22 -7
  15. package/dist/es/src/EditionCrafter/scss/_imageView.scss +1 -1
  16. package/dist/es/src/RecordList/component/PhraseListTable.jsx +108 -0
  17. package/dist/es/src/RecordList/component/Record.jsx +38 -2
  18. package/dist/es/src/RecordList/component/RecordListView.jsx +1 -1
  19. package/dist/es/src/RecordList/component/Sidebar.jsx +1 -1
  20. package/dist/es/src/RecordList/component/SidebarTagList.jsx +1 -1
  21. package/dist/es/src/RecordList/index.jsx +10 -5
  22. package/dist/es/src/RecordList/styles/base.css +2 -17
  23. package/dist/es/src/RecordList/styles/record.css +92 -4
  24. package/dist/es/src/TagExplore/assets/InsertLeft.jsx +18 -0
  25. package/dist/es/src/TagExplore/assets/InsertRight.jsx +18 -0
  26. package/dist/es/src/TagExplore/assets/Left.jsx +17 -0
  27. package/dist/es/src/TagExplore/assets/Right.jsx +17 -0
  28. package/dist/es/src/TagExplore/assets/insert_left.svg +12 -0
  29. package/dist/es/src/TagExplore/assets/insert_right.svg +12 -0
  30. package/dist/es/src/TagExplore/assets/left.svg +11 -0
  31. package/dist/es/src/TagExplore/assets/right.svg +11 -0
  32. package/dist/es/src/TagExplore/components/DocumentDetail.jsx +224 -0
  33. package/dist/es/src/TagExplore/components/NarrowSidebar.jsx +35 -0
  34. package/dist/es/src/TagExplore/components/SurfaceBrowser.jsx +176 -0
  35. package/dist/es/src/TagExplore/components/TagExploreSidebar.jsx +55 -0
  36. package/dist/es/src/TagExplore/components/TagFilters.jsx +106 -0
  37. package/dist/es/src/TagExplore/index.jsx +109 -0
  38. package/dist/es/src/TagExplore/styles/base.css +192 -0
  39. package/dist/es/src/{RecordList/component → common/components}/Pill.jsx +2 -0
  40. package/dist/es/src/common/components/Pill.style.css +16 -0
  41. package/dist/es/src/index.jsx +3 -27
  42. package/package.json +2 -28
  43. /package/dist/es/src/{RecordList/component → common/components}/Loading.jsx +0 -0
  44. /package/dist/es/src/{RecordList → common}/lib/sql.js +0 -0
@@ -0,0 +1,192 @@
1
+ .tag-explore {
2
+ display: grid;
3
+ max-height: 100vh;
4
+ grid-template-columns: 50px 1fr;
5
+ }
6
+
7
+ .tag-explore-sidebar {
8
+ position: relative;
9
+ z-index: 999;
10
+ height: 100%;
11
+ max-height: 100dvh;
12
+ }
13
+
14
+ .tag-explore .narrow-sidebar {
15
+ height: 100vh;
16
+ width: 48px;
17
+ }
18
+
19
+ .tag-explore-sidebar {
20
+ overflow-y: none;
21
+ height: 100%;
22
+ background-color: black;
23
+ }
24
+
25
+ .tag-explore .tag-filters {
26
+ overflow-y: auto;
27
+ position: absolute;
28
+ top: 48px;
29
+ left: 0;
30
+ background-color: #242629;
31
+ z-index: 10000;
32
+ padding: 12px 0 12px 12px;
33
+ width: 100%;
34
+ height: 100%;
35
+ max-height: 100dvh;
36
+ }
37
+
38
+ .tag-explore .tag-filter-button {
39
+ background-color: #242629;
40
+ padding: 12px;
41
+ color: white;
42
+ border: 1px solid white;
43
+ border-radius: 6px;
44
+ margin: 6px auto 12px auto;
45
+ cursor: pointer;
46
+ }
47
+
48
+ .tag-explore .tag-filter-button:hover {
49
+ background-color: white;
50
+ color: black;
51
+ }
52
+
53
+ .tag-explore .tag-filters ul {
54
+ display: flex;
55
+ flex-direction: column;
56
+ }
57
+
58
+ .tag-explore .surface-browser-close {
59
+ position: absolute;
60
+ top: 0;
61
+ right: -24px;
62
+ background-color: #242629;
63
+ }
64
+
65
+ .tag-explore .tag-filters .tag-list, .tag-explore-sidebar {
66
+ display: flex;
67
+ gap: 4px;
68
+ flex-wrap: wrap;
69
+ }
70
+
71
+ .surface-thumbnail-caption {
72
+ text-align: center;
73
+ }
74
+
75
+ .surface-thumbnail-overlay {
76
+ position: absolute;
77
+ width: 100%;
78
+ height: 100%;
79
+ inset: 0;
80
+ background-color: #2426297d;
81
+ opacity: 0%;
82
+ display: flex;
83
+ justify-content: center;
84
+ align-items: center;
85
+ gap: 12px;
86
+ }
87
+
88
+ .surface-thumbnail-overlay-selected {
89
+ position: absolute;
90
+ width: 100%;
91
+ height: 100%;
92
+ inset: 0;
93
+ display: flex;
94
+ justify-content: flex-end;
95
+ align-items: flex-end;
96
+ }
97
+
98
+ .surface-thumbnail-overlay-selected.left {
99
+ border: 2px solid #008F81;
100
+ }
101
+
102
+ .surface-thumbnail-overlay-selected.right {
103
+ border: 2px solid #A31621;
104
+ }
105
+
106
+ .surface-thumbnail-overlay-selected > div {
107
+ color: white;
108
+ display: flex;
109
+ flex-direction: row;
110
+ justify-content: space-around;
111
+ gap: 6px;
112
+ align-items: center;
113
+ padding: 6px;
114
+ border-top-left-radius: 6px;
115
+ font-size: small;
116
+ }
117
+
118
+ .surface-thumbnail-overlay-selected.left > div {
119
+ background-color: #008F81;
120
+ }
121
+
122
+ .surface-thumbnail-overlay-selected.right > div {
123
+ background-color: #A31621;
124
+ }
125
+
126
+ .surface-thumbnail-overlay .surface-thumbnail-overlay-content {
127
+ opacity: 100%;
128
+ display: flex;
129
+ flex-direction: row;
130
+ gap: 12px;
131
+ justify-content: center;
132
+ align-items: center;
133
+ border-radius: 12px;
134
+ padding: 8px;
135
+ background-color: #242629;
136
+ }
137
+
138
+ .surface-thumbnail-overlay:hover {
139
+ opacity: 100%;
140
+ }
141
+
142
+ .surface-thumbnail-overlay a {
143
+ cursor: pointer;
144
+ }
145
+
146
+ .surface-thumbnail-figure {
147
+ padding: 0;
148
+ margin: 16px;
149
+ position: relative;
150
+ }
151
+
152
+ .tag-explore .surface-browser {
153
+ position: absolute;
154
+ top: 0;
155
+ left: 48px;
156
+ height: 100vh;
157
+ min-width: 300px;
158
+ display: flex;
159
+ flex-direction: column;
160
+ background-color: #242629;
161
+ color: white;
162
+ padding: 12px;
163
+ }
164
+
165
+ .tag-explore .surface-browser-document-details {
166
+ overflow-y: auto;
167
+ position: relative;
168
+ }
169
+
170
+ .tag-explore .accordion-summary {
171
+ flex-direction: row-reverse;
172
+ background-color: #242629
173
+ }
174
+
175
+ .tag-explore .accordion-summary div {
176
+ display: flex;
177
+ flex-direction: row;
178
+ justify-content: space-between;
179
+ }
180
+
181
+ /* .tag-explore .accordion-summary .MuiAccordionSummary-expandIcon {
182
+ padding-left: 0;
183
+ } */
184
+
185
+ .tag-explore .accordion-summary .MuiAccordionSummary-content {
186
+ padding-left: 12px;
187
+ gap: 12px;
188
+ }
189
+
190
+ .tag-explore .accordion-detail {
191
+ background-color: #242629;
192
+ }
@@ -1,3 +1,5 @@
1
+ import './Pill.style.css'
2
+
1
3
  function Pill(props) {
2
4
  return (
3
5
  <button className={props.isActive ? 'active pill' : 'pill'} onClick={props.onClick} type="button">
@@ -0,0 +1,16 @@
1
+ .pill {
2
+ appearance: none;
3
+ display: flex;
4
+ height: 32px;
5
+ padding: 4px 12px;
6
+ justify-content: center;
7
+ align-items: center;
8
+ gap: 4px;
9
+ border-radius: 50px;
10
+ border: 1px solid #CEDAE7;
11
+ background: #CEDAE7;
12
+ color: #0A0A0A;
13
+ font-family: Inter;
14
+ font-size: 14px;
15
+ font-weight: 500;
16
+ }
@@ -1,32 +1,8 @@
1
- import { createTheme, ThemeProvider } from '@material-ui/core/styles'
2
- import React from 'react'
3
- import DiploMatic from './EditionCrafter/component/DiploMatic'
4
- import { createReduxStore } from './EditionCrafter/model/ReduxStore'
1
+ import EditionCrafter from './EditionCrafter'
5
2
  import _RecordList from './RecordList'
6
- import './EditionCrafter/scss/editioncrafter.scss'
7
-
8
- /**
9
- * Default instantiation
10
- */
11
- function EditionCrafter(props) {
12
- const theme = createTheme({
13
- palette: {
14
- primary: {
15
- main: '#792421',
16
- },
17
- secondary: {
18
- main: '#EBE3DD',
19
- },
20
- },
21
- })
22
-
23
- return (
24
- <ThemeProvider theme={theme}>
25
- <DiploMatic config={props} store={createReduxStore(props)} />
26
- </ThemeProvider>
27
- )
28
- }
3
+ import _TagExplore from './TagExplore'
29
4
 
30
5
  export { _RecordList as RecordList }
6
+ export { _TagExplore as TagExplore }
31
7
 
32
8
  export default EditionCrafter
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cu-mkp/editioncrafter",
3
3
  "type": "module",
4
- "version": "1.3.0-beta.1",
4
+ "version": "1.3.0-beta.3",
5
5
  "private": false,
6
6
  "description": "A simple digital critical edition publication tool",
7
7
  "license": "MIT",
@@ -47,46 +47,20 @@
47
47
  "redux": "^4.2.1",
48
48
  "redux-saga": "^1.2.2",
49
49
  "remark-gfm": "^3.0.1",
50
- "sql.js": "^1.12.0"
50
+ "sql.js": "^1.13.0"
51
51
  },
52
52
  "devDependencies": {
53
53
  "@antfu/eslint-config": "^3.8.0",
54
- "@chromatic-com/storybook": "^3.2.2",
55
54
  "@eslint-react/eslint-plugin": "^1.15.2",
56
- "@storybook/addon-essentials": "^8.4.3",
57
- "@storybook/addon-interactions": "^8.4.3",
58
- "@storybook/addon-links": "^8.4.3",
59
- "@storybook/blocks": "^8.4.3",
60
55
  "@storybook/builder-vite": "^8.4.3",
61
- "@storybook/react": "^8.4.3",
62
56
  "@storybook/react-vite": "^8.4.3",
63
- "@storybook/test": "^8.4.3",
64
57
  "@vitejs/plugin-react": "^4.3.3",
65
- "bundlewatch": "^0.3.3",
66
- "chalk": "^4.1.0",
67
- "codecov": "^3.7.0",
68
- "core-js": "^3.21.1",
69
- "css-loader": "^6.7.3",
70
- "enzyme": "^3.11.0",
71
58
  "eslint": "^9.14.0",
72
59
  "eslint-plugin-astro": "^1.3.0",
73
60
  "eslint-plugin-react-hooks": "^5.0.0",
74
- "eslint-plugin-react-refresh": "^0.4.14",
75
- "glob": "^7.1.4",
76
- "http-server": "^14.1.0",
77
- "jsdom": "^19.0.0",
78
61
  "react": "^17.0.2",
79
62
  "react-dom": "^17.0.2",
80
- "react-refresh": "^0.14.0",
81
- "redux-mock-store": "^1.5.1",
82
- "redux-saga-test-plan": "^4.0.6",
83
- "resolve-url-loader": "^5.0.0",
84
- "sass": "^1.61.0",
85
- "sass-loader": "^13.2.2",
86
63
  "storybook": "^8.4.2",
87
- "style-loader": "^3.3.2",
88
- "unfetch": "^4.1.0",
89
- "url-polyfill": "^1.1.7",
90
64
  "vite": "^5.4.11",
91
65
  "vite-plugin-css-injected-by-js": "^3.5.2"
92
66
  },
File without changes