@harvard-lts/mirador-eda-plugin 0.1.2 → 0.1.4

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 (38) hide show
  1. package/dist/es/index.js +23 -34
  2. package/package.json +5 -4
  3. package/.github/pull_request_template.md +0 -31
  4. package/.github/workflows/publish-package.yml +0 -34
  5. package/.nvmrc +0 -1
  6. package/.parcelrc +0 -9
  7. package/.travis.yml +0 -16
  8. package/CONTRIBUTING.md +0 -20
  9. package/__mocks__/fileMock.js +0 -1
  10. package/babel.config.json +0 -11
  11. package/demo/data/manifest-3037.json +0 -524
  12. package/demo/data/manifest-5f3b.json +0 -315
  13. package/demo/data/manifest-609.json +0 -500
  14. package/demo/data/ms_am_1118_3_142_0001.jpg +0 -0
  15. package/demo/data/ms_am_1118_3_142_0002.jpg +0 -0
  16. package/demo/data/ms_am_1118_3_142_0003.jpg +0 -0
  17. package/demo/demoEntry.js +0 -21
  18. package/demo/index.html +0 -23
  19. package/jest.config.js +0 -23
  20. package/nwb.config.js +0 -20
  21. package/rollup.config.mjs +0 -12
  22. package/setupTests.js +0 -1
  23. package/src/index.js +0 -15
  24. package/src/plugins/EdaSideBarButtonsWrapper.js +0 -51
  25. package/src/plugins/EdaTranscriptionButton.js +0 -19
  26. package/src/plugins/EdaTranscriptionPanel.js +0 -245
  27. package/src/plugins/__tests__/EdaSideBarButtonsWrapper.spec.js +0 -183
  28. package/src/plugins/__tests__/EdaTranscriptionButton.spec.js +0 -17
  29. package/src/plugins/__tests__/EdaTranscriptionPanel.spec.js +0 -188
  30. package/src/plugins/__tests__/edaManifest.spec.js +0 -110
  31. package/src/plugins/__tests__/nonEdaManifest.spec.js +0 -64
  32. package/src/plugins/__tests__/transcriptionUtils.spec.js +0 -430
  33. package/src/plugins/testFixtures/combinedEditionsTranscriptions.js +0 -62
  34. package/src/plugins/testFixtures/franklinVariorum1998Transcription.js +0 -85
  35. package/src/plugins/testFixtures/johnsonPoems1955Transcription.js +0 -88
  36. package/src/plugins/transcriptionUtils.js +0 -114
  37. package/src/plugins/utils/suppressWarnings.js +0 -41
  38. package/webpack.config.cjs +0 -56
@@ -1,430 +0,0 @@
1
- /**
2
- * @jest-environment jsdom
3
- */
4
- import { getEdaTranscription } from "../transcriptionUtils"
5
- import {
6
- transcriptionF3B,
7
- transcriptionF9A,
8
- differentEditionTranscription
9
- } from "../testFixtures/combinedEditionsTranscriptions"
10
-
11
- describe("in transcriptionUtils", () => {
12
- describe("the getEdaTranscription function should return an empty array when", () => {
13
- it("state is empty", () => {
14
- const emptyState = {}
15
- expect(getEdaTranscription(emptyState)).toEqual([])
16
- })
17
-
18
- it("there are no windows in state", () => {
19
- const stateWithoutWindows = {
20
- windows: {}
21
- }
22
- expect(getEdaTranscription(stateWithoutWindows)).toEqual([])
23
- })
24
-
25
- it("the manifest is missing", () => {
26
- const stateWithoutManifest = {
27
- windows: {
28
- "window-1": {
29
- manifestId: "manifest-1",
30
- canvasId: "canvas-1"
31
- }
32
- },
33
- manifests: {}
34
- }
35
- expect(getEdaTranscription(stateWithoutManifest)).toEqual([])
36
- })
37
-
38
- it("the manifest has no json", () => {
39
- const stateWithManifestNoJson = {
40
- windows: {
41
- "window-1": {
42
- manifestId: "manifest-1",
43
- canvasId: "canvas-1"
44
- }
45
- },
46
- manifests: {
47
- "manifest-1": { foo: "bar" }
48
- }
49
- }
50
- expect(getEdaTranscription(stateWithManifestNoJson)).toEqual([])
51
- })
52
-
53
- it("the canvas is not found", () => {
54
- const stateWithMissingCanvas = {
55
- windows: {
56
- "window-1": {
57
- manifestId: "manifest-1",
58
- canvasId: "canvas-1"
59
- }
60
- },
61
- manifests: {
62
- "manifest-1": {
63
- json: {
64
- items: [
65
- { id: "different-canvas" }
66
- ]
67
- }
68
- }
69
- }
70
- }
71
- expect(getEdaTranscription(stateWithMissingCanvas)).toEqual([])
72
- })
73
-
74
- it("the canvas exists but has no annotations", () => {
75
- const stateWithCanvasNoAnnotations = {
76
- windows: {
77
- "window-1": {
78
- manifestId: "manifest-1",
79
- canvasId: "canvas-1"
80
- }
81
- },
82
- manifests: {
83
- "manifest-1": {
84
- json: {
85
- items: [
86
- { id: "canvas-1" }
87
- ]
88
- }
89
- }
90
- }
91
- }
92
- expect(getEdaTranscription(stateWithCanvasNoAnnotations)).toEqual([])
93
- })
94
-
95
- it("the annotations exist but don't contain a work-body class", () => {
96
- const stateWithNonWorkBodyAnnotations = {
97
- windows: {
98
- "window-1": {
99
- manifestId: "manifest-1",
100
- canvasId: "canvas-1"
101
- }
102
- },
103
- manifests: {
104
- "manifest-1": {
105
- json: {
106
- items: [
107
- {
108
- id: "canvas-1",
109
- annotations: [
110
- {
111
- items: [
112
- {
113
- body: {
114
- format: "text/html",
115
- value: "<div>Not a work-body class</div>"
116
- }
117
- }
118
- ]
119
- }
120
- ]
121
- }
122
- ]
123
- }
124
- }
125
- }
126
- }
127
- expect(getEdaTranscription(stateWithNonWorkBodyAnnotations)).toEqual([])
128
- })
129
-
130
- it("annotations exist but don't contain data-exhibit=\"emily-dickinson-archive\"", () => {
131
- const stateWithNonArchiveAnnotations = {
132
- windows: {
133
- "window-1": {
134
- manifestId: "manifest-1",
135
- canvasId: "canvas-1"
136
- }
137
- },
138
- manifests: {
139
- "manifest-1": {
140
- json: {
141
- items: [
142
- {
143
- id: "canvas-1",
144
- annotations: [
145
- {
146
- items: [
147
- {
148
- body: {
149
- format: "text/html",
150
- value: '<div class="work-body">Missing Emily Dickinson Archive attribute</div>'
151
- }
152
- },
153
- {
154
- body: {
155
- format: "text/html",
156
- value: '<div class="work-body" data-exhibit="some-other-archive">Wrong archive attribute</div>'
157
- }
158
- }
159
- ]
160
- }
161
- ]
162
- }
163
- ]
164
- }
165
- }
166
- }
167
- }
168
- expect(getEdaTranscription(stateWithNonArchiveAnnotations)).toEqual([])
169
- })
170
-
171
- it("there is a non-EDA manifest", () => {
172
- const harvardManifest = {
173
- "@context": "http://iiif.io/api/presentation/2/context.json",
174
- "@id": "https://iiif.lib.harvard.edu/manifests/ids:488815",
175
- "@type": "sc:Manifest",
176
- "label": "Harvard University, Harvard College Library Harvard-Yenching Library, W171744_1",
177
- "sequences": [
178
- {
179
- "canvases": [
180
- {
181
- "@id": "https://iiif.lib.harvard.edu/manifests/ids:488815/canvas/canvas-488815.json",
182
- "images": [
183
- {
184
- "@id": "https://iiif.lib.harvard.edu/manifests/ids:488815/annotation/anno-488815.json",
185
- "@type": "oa:Annotation"
186
- }
187
- ]
188
- }
189
- ]
190
- }
191
- ]
192
- }
193
-
194
- const stateWithHarvardManifest = {
195
- windows: {
196
- "window-1": {
197
- manifestId: "harvard-manifest",
198
- canvasId: "https://iiif.lib.harvard.edu/manifests/ids:488815/canvas/canvas-488815.json"
199
- }
200
- },
201
- manifests: {
202
- "harvard-manifest": {
203
- json: harvardManifest
204
- }
205
- }
206
- }
207
-
208
- // Harvard manifest doesn't have EDA transcriptions
209
- expect(getEdaTranscription(stateWithHarvardManifest)).toEqual([])
210
- })
211
- })
212
-
213
- describe("the getEdaTranscription function should extract transcriptions", () => {
214
- it("that have a work-body class and emily-dickinson-archive attribute", () => {
215
- const workBodyHtml1 = '<div class="work-body" data-exhibit="emily-dickinson-archive" data-edition="Edition 1">Transcription 1</div>'
216
- const workBodyHtml2 = '<div class="work-body" data-exhibit="emily-dickinson-archive" data-edition="Edition 2">Transcription 2</div>'
217
-
218
- const stateWithTranscriptions = {
219
- windows: {
220
- "window-1": {
221
- manifestId: "manifest-1",
222
- canvasId: "canvas-1"
223
- }
224
- },
225
- manifests: {
226
- "manifest-1": {
227
- json: {
228
- items: [
229
- {
230
- id: "canvas-1",
231
- annotations: [
232
- {
233
- items: [
234
- {
235
- body: {
236
- format: "text/html",
237
- value: workBodyHtml1
238
- }
239
- },
240
- {
241
- body: {
242
- format: "text/html",
243
- value: workBodyHtml2
244
- }
245
- },
246
- {
247
- // This should be skipped (not text/html)
248
- body: {
249
- format: "text/plain",
250
- value: '<div class="work-body">Ignored</div>'
251
- }
252
- }
253
- ]
254
- }
255
- ]
256
- }
257
- ]
258
- }
259
- }
260
- }
261
- }
262
-
263
- const result = getEdaTranscription(stateWithTranscriptions, "window-1")
264
- expect(result).toHaveLength(2) // One for each edition
265
- expect(result.some(html => html.includes('Edition 1'))).toBe(true)
266
- expect(result.some(html => html.includes('Edition 2'))).toBe(true)
267
- })
268
-
269
- it("from multiple annotation pages", () => {
270
- const workBodyHtml1 = '<div class="work-body" data-exhibit="emily-dickinson-archive" data-edition="Edition 1">Transcription 1</div>'
271
- const workBodyHtml2 = '<div class="work-body" data-exhibit="emily-dickinson-archive" data-edition="Edition 2">Transcription 2</div>'
272
-
273
- const stateWithMultipleAnnotationPages = {
274
- windows: {
275
- "window-1": {
276
- manifestId: "manifest-1",
277
- canvasId: "canvas-1"
278
- }
279
- },
280
- manifests: {
281
- "manifest-1": {
282
- json: {
283
- items: [
284
- {
285
- id: "canvas-1",
286
- annotations: [
287
- {
288
- items: [
289
- {
290
- body: {
291
- format: "text/html",
292
- value: workBodyHtml1
293
- }
294
- }
295
- ]
296
- },
297
- {
298
- items: [
299
- {
300
- body: {
301
- format: "text/html",
302
- value: workBodyHtml2
303
- }
304
- }
305
- ]
306
- }
307
- ]
308
- }
309
- ]
310
- }
311
- }
312
- }
313
- }
314
-
315
- const result = getEdaTranscription(stateWithMultipleAnnotationPages, "window-1")
316
- expect(result).toHaveLength(2) // One for each edition
317
- expect(result.some(html => html.includes('Edition 1'))).toBe(true)
318
- expect(result.some(html => html.includes('Edition 2'))).toBe(true)
319
- })
320
- })
321
-
322
- describe("the getEdaTranscription function should handle", () => {
323
- it("missing annotation items array safely", () => {
324
- const stateWithMissingItems = {
325
- windows: {
326
- "window-1": {
327
- manifestId: "manifest-1",
328
- canvasId: "canvas-1"
329
- }
330
- },
331
- manifests: {
332
- "manifest-1": {
333
- json: {
334
- items: [
335
- {
336
- id: "canvas-1",
337
- annotations: [
338
- {
339
- // No items array
340
- },
341
- {
342
- items: [
343
- {
344
- // No body
345
- }
346
- ]
347
- }
348
- ]
349
- }
350
- ]
351
- }
352
- }
353
- }
354
- }
355
-
356
- // Should not throw errors with optional chaining
357
- expect(() => getEdaTranscription(stateWithMissingItems)).not.toThrow()
358
- expect(getEdaTranscription(stateWithMissingItems)).toEqual([])
359
- })
360
- })
361
-
362
- describe("the getEdaTranscription function should", () => {
363
- const createMockState = (transcriptions) => ({
364
- windows: {
365
- "window-1": {
366
- manifestId: "manifest-1",
367
- canvasId: "canvas-1"
368
- }
369
- },
370
- manifests: {
371
- "manifest-1": {
372
- json: {
373
- items: [{
374
- id: "canvas-1",
375
- annotations: [{
376
- items: transcriptions.map(transcription => ({
377
- body: {
378
- format: "text/html",
379
- value: transcription
380
- }
381
- }))
382
- }]
383
- }]
384
- }
385
- }
386
- }
387
- })
388
-
389
- it("combines transcriptions from the same edition while preserving titles", () => {
390
- const state = createMockState([transcriptionF3B, transcriptionF9A])
391
- const result = getEdaTranscription(state, "window-1")
392
-
393
- // Should return one combined transcription
394
- expect(result).toHaveLength(1)
395
-
396
- const normalizedResult = result[0].replace(/\s+/g, " ").trim()
397
-
398
- // The combined transcription should contain both titles
399
- expect(normalizedResult).toContain("F3B - On this wondrous sea")
400
- expect(normalizedResult).toContain("F9A - Oh if remembering were forgetting")
401
-
402
- // Should preserve the edition information
403
- expect(normalizedResult).toContain('data-edition="Franklin Variorum 1998"')
404
-
405
- // Should contain content from both poems (checking for unique phrases)
406
- expect(normalizedResult).toMatch(/wondrous sea.*sailing silently/)
407
- expect(normalizedResult).toMatch(/Oh.*if remembering were forgetting/)
408
- })
409
-
410
- it("keeps transcriptions from different editions separate", () => {
411
- const state = createMockState([transcriptionF3B, differentEditionTranscription])
412
- const result = getEdaTranscription(state, "window-1")
413
-
414
- // Should return two separate transcriptions
415
- expect(result).toHaveLength(2)
416
-
417
- // Should preserve different edition information
418
- expect(result.find(t => t.includes("Franklin Variorum 1998"))).toBeTruthy()
419
- expect(result.find(t => t.includes("Poems 1896"))).toBeTruthy()
420
- })
421
-
422
- it("maintains original transcription when only one exists", () => {
423
- const state = createMockState([transcriptionF3B])
424
- const result = getEdaTranscription(state, "window-1")
425
-
426
- expect(result).toHaveLength(1)
427
- expect(result[0]).toBe(transcriptionF3B)
428
- })
429
- })
430
- })
@@ -1,62 +0,0 @@
1
- /**
2
- * Test fixtures containing multiple Emily Dickinson transcriptions used for testing
3
- * the transcription combination functionality.
4
- *
5
- * Includes:
6
- * - F3B "On this wondrous sea" (Franklin Variorum 1998)
7
- * - F9A "Oh if remembering were forgetting" (Franklin Variorum 1998)
8
- * - A different edition transcription for testing separation
9
- *
10
- * Structure of each transcription:
11
- * - Root div with work-body class and edition metadata
12
- * - H3 header with poem title
13
- * - Multiple stanza paragraphs
14
- * - Each line wrapped in span with line number
15
- * - <br class="emily author"> for line breaks
16
- */
17
-
18
- export const transcriptionF3B = `<div class="work-body" data-exhibit="emily-dickinson-archive" data-edition="Franklin Variorum 1998">
19
- <h3>F3B - On this wondrous sea </h3>
20
-
21
- <p class="stanza linebreak-emily" data-number="0">
22
- <span class="line" data-line="1">On this wondrous sea - sailing silently -<br class="emily author"/></span>
23
- <span class="line" data-line="2">Ho! Pilot! Ho! <br class="emily author"/></span>
24
- <span class="line" data-line="3">Knowest thou the shore <br class="emily author"/></span>
25
- <span class="line" data-line="4">Where no breakers roar - <br class="emily author"/></span>
26
- <span class="line" data-line="5">Where the storm is o'er?<br class="emily author"/></span>
27
- </p>
28
-
29
- <p class="stanza linebreak-emily" data-number="1">
30
- <span class="line" data-line="6">In the silent West <br class="emily author"/></span>
31
- <span class="line" data-line="7">Many - the sails at rest - <br class="emily author"/></span>
32
- <span class="line" data-line="8">The anchors fast. <br class="emily author"/></span>
33
- <span class="line" data-line="9">Thither I pilot thee - <br class="emily author"/></span>
34
- <span class="line" data-line="10">Land! Ho! Eternity!<br class="emily author"/></span>
35
- <span class="line" data-line="11">Ashore at last! <br class="emily author"/></span>
36
- </p>
37
- </div>`
38
-
39
- export const transcriptionF9A = `<div class="work-body" data-exhibit="emily-dickinson-archive" data-edition="Franklin Variorum 1998">
40
- <h3>F9A - Oh if remembering were forgetting </h3>
41
-
42
- <p class="stanza linebreak-emily" data-number="0">
43
- <span class="line" data-line="1"><em>Oh</em> if remembering were forgetting -<br class="emily author"/></span>
44
- <span class="line" data-line="2">Then I remember not! <br class="emily author"/></span>
45
- <span class="line" data-line="3">And if forgetting - recollecting - <br class="emily author"/></span>
46
- <span class="line" data-line="4">How near I had forgot!<span class="page-break"></span><br class="emily author"/></span>
47
- <span class="line" data-line="5">And if to miss - were merry -<br class="emily author"/></span>
48
- <span class="line" data-line="6">And to mourn were gay, <br class="emily author"/></span>
49
- <span class="line" data-line="7">How very blithe the maiden <br class="emily author"/></span>
50
- <span class="line" data-line="8">Who gathered these today! <br class="emily author"/></span>
51
- </p>
52
- </div>`
53
-
54
- export const differentEditionTranscription = `<div class="work-body" data-exhibit="emily-dickinson-archive" data-edition="Poems 1896">
55
- <h3>P96-165 - ETERNITY</h3>
56
-
57
- <p class="stanza linebreak-emily" data-number="0">
58
- <span class="line" data-line="1">On this wondrous sea,<br class="emily author"/></span>
59
- <span class="line" data-line="2">Sailing silently,<br class="emily author"/></span>
60
- <span class="line" data-line="3">Ho! pilot, ho!<br class="emily author"/></span>
61
- </p>
62
- </div>`
@@ -1,85 +0,0 @@
1
- /**
2
- * Test fixture representing a transcription from the Franklin Variorum 1998 edition.
3
- * Contains Emily Dickinson's poem "F431A - If I may have it when it's dead"
4
- * with editorial markup including line breaks, alternate readings, and page breaks.
5
- *
6
- * Structure:
7
- * - Root div with work-body class and edition metadata
8
- * - H3 header with poem title
9
- * - Multiple stanza paragraphs
10
- * - Each line wrapped in span with line number
11
- * - Editorial marks:
12
- * - <br class="emily"> for original line breaks
13
- * - <br class="emily author"> for editorial breaks
14
- * - <ins class="alternate"> for variant readings
15
- * - <span class="page-break"> for page transitions
16
- */
17
-
18
- const franklinVariorum1998 = `
19
- <div class="work-body" data-exhibit="emily-dickinson-archive" data-edition="Franklin Variorum 1998">
20
- <h3>F431A - If I may have it when it's dead </h3>
21
-
22
- <p class="stanza linebreak-emily" data-number="0">
23
- <span class="line" data-line="1">If I may have it, when it's<br class="emily"> dead,<br class="emily author"/></span>
24
- <span class="line" data-line="2">I'll be contented - so - <br class="emily author"/></span>
25
- <span class="line" data-line="3">If just as soon as Breath<br class="emily"> is out <br class="emily author"/></span>
26
- <span class="line" data-line="4">It shall belong to me - <br class="emily author"/></span>
27
- </p>
28
-
29
- <p class="stanza linebreak-emily" data-number="1">
30
- <span class="line" data-line="5">Until they lock it in the<br class="emily"> Grave,<br class="emily author"/></span>
31
- <span class="line" data-line="6">'Tis <ins class="alternate">Wealth I cannot weigh. • Right [I cannot weigh.]</ins>
32
- Bliss I cannot weigh - <br class="emily author"/></span>
33
- <span class="line" data-line="7">For tho' they lock Thee in<br class="emily"> the Grave, <br class="emily author"/></span>
34
- <span class="line" data-line="8">Myself - can <ins class="alternate">hold</ins>
35
- own the key - <br class="emily author"/></span>
36
- </p>
37
-
38
- <p class="stanza linebreak-emily" data-number="2">
39
- <span class="line" data-line="9">Think of it Lover! I and Thee <br class="emily author"/></span>
40
- <span class="line" data-line="10">Permitted - face to face to be -<br class="emily author"/></span>
41
- <span class="line" data-line="11">After a Life - a Death -<br class="emily"> we'll say - <br class="emily author"/></span>
42
- <span class="line" data-line="12">For Death was That - <br class="emily author"/></span>
43
- <span class="line" data-line="13">And This - is Thee -<span class="page-break"></span>
44
- <br class="emily author"/></span>
45
- </p>
46
-
47
- <p class="stanza linebreak-emily" data-number="3">
48
- <span class="line" data-line="14">I'll tell Thee All - how <ins class="alternate">Blank -</ins>
49
- Bald<br class="emily"> it grew - <br class="emily author"/></span>
50
- <span class="line" data-line="15">How Midnight felt, at first -<br class="emily"> to me -<br class="emily author"/></span>
51
- <span class="line" data-line="16">How all the Clocks stopped<br class="emily"> in the World - <br class="emily author"/></span>
52
- <span class="line" data-line="17">And Sunshine pinched me -<br class="emily"> 'Twas so cold - <br class="emily author"/></span>
53
- </p>
54
-
55
- <p class="stanza linebreak-emily" data-number="4">
56
- <span class="line" data-line="18">Then how the Grief got sleepy -<br class="emily"> some - <br class="emily author"/></span>
57
- <span class="line" data-line="19">As if my soul were deaf and<br class="emily"> dumb - <br class="emily author"/></span>
58
- <span class="line" data-line="20">Just making signs - <ins class="alternate">it seemed</ins>
59
- across -<br class="emily"> to Thee -<br class="emily author"/></span>
60
- <span class="line" data-line="21">That this way - thou could'st<br class="emily"> <ins class="alternate">speak to -</ins>
61
- notice me - <br class="emily author"/></span>
62
- </p>
63
-
64
- <p class="stanza linebreak-emily" data-number="5">
65
- <span class="line" data-line="22">I'll tell you how I tried to keep <br class="emily author"/></span>
66
- <span class="line" data-line="23">A smile, to show you, when<br class="emily"> this Deep<span class="page-break"></span>
67
- <br class="emily author"/></span>
68
- <span class="line" data-line="24">All Waded - We look back<br class="emily"> for Play, <br class="emily author"/></span>
69
- <span class="line" data-line="25">At those Old Times - in Calvary.<br class="emily author"/></span>
70
- </p>
71
-
72
- <p class="stanza linebreak-emily" data-number="6">
73
- <span class="line" data-line="26">Forgive me, if the Grave <ins class="alternate">seem</ins>
74
- come<br class="emily"> slow - <br class="emily author"/></span>
75
- <span class="line" data-line="27">For <ins class="alternate">eagerness -</ins>
76
- Coveting to look at Thee - <br class="emily author"/></span>
77
- <span class="line" data-line="28">Forgive me, if to <ins class="alternate">touch • greet</ins>
78
- stroke<br class="emily"> thy frost <br class="emily author"/></span>
79
- <span class="line" data-line="29"> <ins class="alternate">[Out]fables -</ins>
80
- Outvisions Paradise! <br class="emily author"/></span>
81
- </p>
82
- </div>
83
- `
84
-
85
- export default franklinVariorum1998
@@ -1,88 +0,0 @@
1
- /**
2
- * Test fixture representing a transcription from the Johnson Poems 1955 edition.
3
- * Contains Emily Dickinson's poem "J577 - If I may have it, when it's dead"
4
- * with editorial markup including revision annotations and line breaks.
5
- *
6
- * Structure:
7
- * - Root div with work-body class and edition metadata
8
- * - H3 header with poem title
9
- * - Multiple stanza paragraphs
10
- * - Each line wrapped in span with line number
11
- * - Editorial marks:
12
- * - <br class="emily author"> for line breaks
13
- * - <ruby class="revision"> for variant readings
14
- * - Empty stanzas at end for formatting
15
- */
16
-
17
- const johnsonPoems1955 = `<div class="work-body" data-exhibit="emily-dickinson-archive" data-edition="Johnson Poems 1955">
18
- <h3>J577 - If I may have it, when it's dead</h3>
19
-
20
- <p class="stanza linebreak-emily" data-number="0">
21
- <span class="line" data-line="1">If I may have it, when it's dead,<br class="emily author"/></span>
22
- <span class="line" data-line="2">I'll be contented -- <ruby class="revision"><rt>now --</rt></ruby>so --<br class="emily author"/></span>
23
- <span class="line" data-line="3">If just as soon as Breath is out<br class="emily author"/></span>
24
- <span class="line" data-line="4">It shall belong to me --<br class="emily author"/></span>
25
- </p>
26
-
27
- <p class="stanza linebreak-emily" data-number="1">
28
- <span class="line" data-line="5">Until they lock it in the Grave,<br class="emily author"/></span>
29
- <span class="line" data-line="6">'Tis <ruby class="revision"><rt>Wealth I cannot weigh</rt></ruby>
30
- Bliss I cannot weigh --<br class="emily author"/></span>
31
- <span class="line" data-line="7">For tho' they lock Thee in the Grave,<br class="emily author"/></span>
32
- <span class="line" data-line="8">Myself -- can <ruby class="revision"> <rt>hold</rt></ruby>
33
- own the key --<br class="emily author"/></span>
34
- </p>
35
-
36
- <p class="stanza linebreak-emily" data-number="2">
37
- <span class="line" data-line="9">Think of it Lover! I and Thee<br class="emily author"/></span>
38
- <span class="line" data-line="10">Permitted -- face to face to be --<br class="emily author"/></span>
39
- <span class="line" data-line="11">After a Life -- a Death -- We'll say --<br class="emily author"/></span>
40
- <span class="line" data-line="12">For Death was That<br class="emily author"/></span>
41
- <span class="line" data-line="13">And This -- is Thee --<br class="emily author"/></span>
42
- </p>
43
-
44
- <p class="stanza linebreak-emily" data-number="3">
45
- <span class="line" data-line="14">I'll tell Thee All -- how <ruby class="revision"> <rt>Blank --</rt></ruby>Bald it grew --<br class="emily author"/></span>
46
- <span class="line" data-line="15">How Midnight felt, at first -- to me --<br class="emily author"/></span>
47
- <span class="line" data-line="16">How all the Clocks stopped in the World --<br class="emily author"/></span>
48
- <span class="line" data-line="17">And Sunshine pinched me -- 'Twas so cold --<br class="emily author"/></span>
49
- </p>
50
-
51
- <p class="stanza linebreak-emily" data-number="4">
52
- <span class="line" data-line="18">Then how the Grief got sleepy -- some --<br class="emily author"/></span>
53
- <span class="line" data-line="19">As if my Soul were deaf and dumb --<br class="emily author"/></span>
54
- <span class="line" data-line="20">Just making signs -- <ruby class="revision"> <rt>it seemed</rt></ruby>across -- to Thee --<br class="emily author"/></span>
55
- <span class="line" data-line="21">That this way -- thou could'st <ruby class="revision"> <rt>speak to --</rt></ruby>notice me --<br class="emily author"/></span>
56
- </p>
57
-
58
- <p class="stanza linebreak-emily" data-number="5">
59
- <span class="line" data-line="22">I'll tell you how I tried to keep<br class="emily author"/></span>
60
- <span class="line" data-line="23">A smile, to show you, when this Deep<br class="emily author"/></span>
61
- <span class="line" data-line="24">All Waded -- We look back for Play,<br class="emily author"/></span>
62
- <span class="line" data-line="25">At those Old Times -- in Calvary.<br class="emily author"/></span>
63
- </p>
64
-
65
- <p class="stanza linebreak-emily" data-number="6">
66
- <span class="line" data-line="26">Forgive me, if the Grave come slow --<br class="emily author"/></span>
67
- <span class="line" data-line="27">For Coveting to look at Thee --<br class="emily author"/></span>
68
- <span class="line" data-line="28">Forgive me, if to stroke thy frost<br class="emily author"/></span>
69
- <span class="line" data-line="29">Outvisions Paradise!<br class="emily author"/></span>
70
- </p>
71
-
72
- <p class="stanza linebreak-emily" data-number="7">
73
- </p>
74
-
75
- <p class="stanza linebreak-emily" data-number="8">
76
- </p>
77
-
78
- <p class="stanza linebreak-emily" data-number="9">
79
- </p>
80
-
81
- <p class="stanza linebreak-emily" data-number="10">
82
- </p>
83
-
84
- <p class="stanza linebreak-emily" data-number="11">
85
- </p>
86
- </div>
87
- `
88
- export default johnsonPoems1955