dante2-editor 0.2.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (144) hide show
  1. checksums.yaml +4 -4
  2. data/.babelrc +20 -0
  3. data/.eslint +13 -0
  4. data/.gitignore +15 -0
  5. data/README.md +5 -1
  6. data/dante2.gemspec +2 -4
  7. data/{app → demo}/assets/index.html +2 -2
  8. data/{app → demo}/assets/license.html +1 -1
  9. data/{app → demo}/assets/options.html +1 -5
  10. data/{app → demo}/assets/store.json +0 -0
  11. data/demo/data/poc.js +9 -0
  12. data/demo/demo.js +9 -0
  13. data/demo/initialize.js +7 -0
  14. data/{app → demo}/styles/layout/layout.scss +0 -0
  15. data/{app → demo}/styles/layout/normalize.css +0 -0
  16. data/{app → demo}/styles/layout/scaffold.scss +0 -0
  17. data/{app → demo}/styles/layout/tooltips.scss +0 -0
  18. data/dist/Dante2.js +2995 -0
  19. data/dist/Dante2.min.js +3 -0
  20. data/dist/Dante2.min.js.map +1 -0
  21. data/dist/DanteStyles.css +2 -0
  22. data/dist/DanteStyles.css.map +1 -0
  23. data/dist/DanteStyles.js +102 -0
  24. data/dist/DanteStyles.min.js +2 -0
  25. data/dist/DanteStyles.min.js.map +1 -0
  26. data/dist/dante-vendors.js +48316 -0
  27. data/dist/dante-vendors.min.js +29 -0
  28. data/dist/dante-vendors.min.js.map +1 -0
  29. data/{app/styles/fonts/dante → dist/fonts}/dante.eot +0 -0
  30. data/{app/styles/fonts/dante → dist/fonts}/dante.svg +0 -0
  31. data/{app/styles/fonts/dante → dist/fonts}/dante.ttf +0 -0
  32. data/{app/styles/fonts/dante → dist/fonts}/dante.woff +0 -0
  33. data/{app/styles/fonts/dante → dist/fonts}/fontello.eot +0 -0
  34. data/{app/styles/fonts/dante → dist/fonts}/fontello.svg +0 -0
  35. data/{app/styles/fonts/dante → dist/fonts}/fontello.ttf +0 -0
  36. data/{app/styles/fonts/dante → dist/fonts}/fontello.woff +0 -0
  37. data/docs/app.css +430 -1
  38. data/docs/app.css.map +1 -1
  39. data/docs/app.js +62 -2
  40. data/docs/app.js.map +1 -1
  41. data/docs/dante-vendors.js +49513 -22
  42. data/docs/dante-vendors.js.map +1 -1
  43. data/docs/dante.css +1602 -1
  44. data/docs/dante.css.map +1 -1
  45. data/docs/dante.js +3310 -3
  46. data/docs/dante.js.map +1 -1
  47. data/docs/doc.html +3 -7
  48. data/docs/index.html +4 -4
  49. data/docs/license.html +3 -3
  50. data/docs/options.html +53 -0
  51. data/package.json +47 -17
  52. data/rb_lib/dante2-editor/rails.rb +15 -0
  53. data/{lib → rb_lib}/dante2-editor/version.rb +1 -1
  54. data/{lib → rb_lib}/dante2-editor.rb +0 -0
  55. data/src/components/blocks/embed.js +126 -0
  56. data/src/components/blocks/image.js +377 -0
  57. data/src/components/blocks/placeholder.js +68 -0
  58. data/src/components/blocks/video.js +80 -0
  59. data/src/components/dante.js +291 -0
  60. data/src/components/dante_editor.js +928 -0
  61. data/src/components/debug.js +104 -0
  62. data/src/components/decorators/link.js +64 -0
  63. data/src/components/popovers/addButton.js +318 -0
  64. data/src/components/popovers/image.js +188 -0
  65. data/src/components/popovers/link.js +107 -0
  66. data/src/components/popovers/toolTip.js +402 -0
  67. data/{app/utils/logger.coffee → src/components/wrapper.js} +0 -0
  68. data/{app → src}/images/dante/media-loading-placeholder.png +0 -0
  69. data/{app → src}/images/site/dante-demo.png +0 -0
  70. data/{app → src}/images/site/dante-editor-logo.png +0 -0
  71. data/{app → src}/images/site/github-logo.png +0 -0
  72. data/src/index.js +9 -0
  73. data/{app → src}/model/index.js +0 -0
  74. data/src/style.js +3 -0
  75. data/{app → src}/styles/dante/_animations.scss +0 -0
  76. data/{app → src}/styles/dante/_caption.scss +0 -0
  77. data/{app → src}/styles/dante/_debug.scss +0 -0
  78. data/{app → src}/styles/dante/_fonts.scss +0 -0
  79. data/{app → src}/styles/dante/_graf.scss +0 -0
  80. data/{app → src}/styles/dante/_icons.scss +0 -0
  81. data/{app → src}/styles/dante/_media.scss +0 -0
  82. data/{app → src}/styles/dante/_menu.scss +0 -0
  83. data/{app → src}/styles/dante/_needsorder.scss +0 -0
  84. data/{app → src}/styles/dante/_popover.scss +0 -0
  85. data/{app → src}/styles/dante/_post.scss +0 -0
  86. data/{app → src}/styles/dante/_scaffold.scss +0 -0
  87. data/{app → src}/styles/dante/_tooltip.scss +0 -0
  88. data/{app → src}/styles/dante/_utilities.scss +0 -0
  89. data/{app → src}/styles/dante/_variables.scss +0 -0
  90. data/{app → src}/styles/dante/blame.scss +0 -0
  91. data/{app → src}/styles/dante.scss +0 -0
  92. data/{app → src}/styles/draft.css +0 -0
  93. data/src/styles/fonts/dante/dante.eot +0 -0
  94. data/src/styles/fonts/dante/dante.svg +18 -0
  95. data/src/styles/fonts/dante/dante.ttf +0 -0
  96. data/src/styles/fonts/dante/dante.woff +0 -0
  97. data/src/styles/fonts/dante/fontello.eot +0 -0
  98. data/src/styles/fonts/dante/fontello.svg +36 -0
  99. data/src/styles/fonts/dante/fontello.ttf +0 -0
  100. data/src/styles/fonts/dante/fontello.woff +0 -0
  101. data/src/utils/find_entities.js +17 -0
  102. data/src/utils/html2content.js +127 -0
  103. data/src/utils/save_content.js +80 -0
  104. data/{app → src}/utils/selection.js +0 -0
  105. data/tools/.eslintrc +9 -0
  106. data/tools/amd/README.md +7 -0
  107. data/tools/amd/bower.json +19 -0
  108. data/tools/amd/build.js +36 -0
  109. data/tools/build-cli.js +46 -0
  110. data/tools/build.js +30 -0
  111. data/tools/buildBabel.js +32 -0
  112. data/tools/constants.js +10 -0
  113. data/tools/dist/build.js +13 -0
  114. data/tools/docs/build.js +12 -0
  115. data/tools/es/build.js +27 -0
  116. data/tools/exec.js +50 -0
  117. data/tools/fs-utils.js +35 -0
  118. data/tools/lib/build.js +14 -0
  119. data/tools/promisify.js +14 -0
  120. data/webpack/base.config.js +89 -0
  121. data/webpack/docs.config.js +147 -0
  122. data/webpack/webpack.config.js +78 -0
  123. data/webpack.config-doc.js +5 -0
  124. data/webpack.config.js +3 -147
  125. data/yarn.lock +973 -718
  126. metadata +108 -64
  127. data/app/components/App.cjsx +0 -1083
  128. data/app/components/blocks/embed.cjsx +0 -109
  129. data/app/components/blocks/image.cjsx +0 -316
  130. data/app/components/blocks/placeholder.cjsx +0 -60
  131. data/app/components/blocks/video.cjsx +0 -75
  132. data/app/components/debug.cjsx +0 -96
  133. data/app/components/decorators/link.cjsx +0 -61
  134. data/app/components/popovers/addButton.cjsx +0 -247
  135. data/app/components/popovers/image.cjsx +0 -160
  136. data/app/components/popovers/link.cjsx +0 -87
  137. data/app/components/popovers/toolTip.cjsx +0 -326
  138. data/app/data/poc.js +0 -15
  139. data/app/demo.js +0 -7
  140. data/app/initialize.js +0 -4
  141. data/app/utils/find_entities.coffee +0 -20
  142. data/app/utils/html2content.coffee +0 -120
  143. data/app/utils/save_content.coffee +0 -63
  144. data/lib/dante2-editor/rails.rb +0 -16
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
data/docs/app.css CHANGED
@@ -1,2 +1,431 @@
1
- #header{display:block;z-index:500;width:100%;font-size:14px;color:rgba(0,0,0,.3);font-family:jaf-bernino-sans,Lucida Grande,Lucida Sans Unicode,Lucida Sans,Geneva,Verdana,sans-serif;letter-spacing:-.02em;font-weight:400;font-style:normal;box-sizing:border-box;-webkit-transition:background-color .2s,color .2s;transition:background-color .2s,color .2s;position:fixed;top:0;height:65px;background:hsla(0,0%,100%,.97);box-shadow:0 0 1px rgba(0,0,0,.15)}.menu-buttons{float:right}.menu-button{display:block;float:left;padding:25px;text-transform:uppercase;color:#0bc392;font-weight:500}article{margin-top:140px}.logo{display:inline-block}.logo img{margin:22px 14px 22px 20px}.logo span{vertical-align:top;border-left:1px solid rgba(0,0,0,.15);padding:5px 14px;margin:20px 0;display:inline-block}.github{float:right;line-height:0;margin-top:19px;margin-right:20px}/*! normalize.css v2.0.1 | MIT License | git.io/normalize */article,aside,details,figcaption,figure,footer,header,hgroup,nav,section,summary{display:block}audio,canvas,video{display:inline-block}audio:not([controls]){display:none;height:0}[hidden]{display:none}html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}a:focus{outline:thin dotted}a:active,a:hover{outline:0}h1{font-size:2em}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}mark{background:#ff0;color:#000}code,kbd,pre,samp{font-family:monospace,serif;font-size:1em}pre{white-space:pre;white-space:pre-wrap;word-wrap:break-word}q{quotes:"\201C" "\201D" "\2018" "\2019"}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:0}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}button,input,select,textarea{font-family:inherit;font-size:100%;margin:0}button,input{line-height:normal}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],input[disabled]{cursor:default}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=search]{-webkit-appearance:textfield;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}textarea{overflow:auto;vertical-align:top}table{border-collapse:collapse;border-spacing:0}*,:after,:before{box-sizing:border-box}
1
+ #header {
2
+ display: block;
3
+ z-index: 500;
4
+ width: 100%;
5
+ font-size: 14px;
6
+ color: rgba(0, 0, 0, 0.3);
7
+ font-family: "jaf-bernino-sans","Lucida Grande","Lucida Sans Unicode","Lucida Sans",Geneva,Verdana,sans-serif;
8
+ letter-spacing: -0.02em;
9
+ font-weight: 400;
10
+ font-style: normal;
11
+ box-sizing: border-box;
12
+ -webkit-transition: 200ms background-color,200ms color;
13
+ transition: 200ms background-color,200ms color;
14
+ position: fixed;
15
+ top: 0;
16
+ height: 65px;
17
+ background: rgba(255, 255, 255, 0.97);
18
+ box-shadow: 0 0 1px rgba(0, 0, 0, 0.15); }
19
+
20
+ .menu-buttons {
21
+ float: right; }
22
+
23
+ .menu-button {
24
+ display: block;
25
+ float: left;
26
+ padding: 25px;
27
+ text-transform: uppercase;
28
+ color: #0bc392;
29
+ font-weight: 500; }
30
+
31
+ article {
32
+ margin-top: 140px; }
33
+
34
+ .logo {
35
+ display: inline-block; }
36
+
37
+ .logo img {
38
+ margin: 22px 14px 22px 20px; }
39
+
40
+ .logo span {
41
+ vertical-align: top;
42
+ border-left: 1px solid rgba(0, 0, 0, 0.15);
43
+ padding: 5px 14px;
44
+ margin: 20px 0;
45
+ display: inline-block; }
46
+
47
+ .github {
48
+ float: right;
49
+ line-height: 0;
50
+ margin-top: 19px;
51
+ margin-right: 20px; }
52
+ /*! normalize.css v2.0.1 | MIT License | git.io/normalize */
53
+
54
+ /* ==========================================================================
55
+ HTML5 display definitions
56
+ ========================================================================== */
57
+
58
+ /*
59
+ * Corrects `block` display not defined in IE 8/9.
60
+ */
61
+
62
+ article,
63
+ aside,
64
+ details,
65
+ figcaption,
66
+ figure,
67
+ footer,
68
+ header,
69
+ hgroup,
70
+ nav,
71
+ section,
72
+ summary {
73
+ display: block;
74
+ }
75
+
76
+ /*
77
+ * Corrects `inline-block` display not defined in IE 8/9.
78
+ */
79
+
80
+ audio,
81
+ canvas,
82
+ video {
83
+ display: inline-block;
84
+ }
85
+
86
+ /*
87
+ * Prevents modern browsers from displaying `audio` without controls.
88
+ * Remove excess height in iOS 5 devices.
89
+ */
90
+
91
+ audio:not([controls]) {
92
+ display: none;
93
+ height: 0;
94
+ }
95
+
96
+ /*
97
+ * Addresses styling for `hidden` attribute not present in IE 8/9.
98
+ */
99
+
100
+ [hidden] {
101
+ display: none;
102
+ }
103
+
104
+ /* ==========================================================================
105
+ Base
106
+ ========================================================================== */
107
+
108
+ /*
109
+ * 1. Sets default font family to sans-serif.
110
+ * 2. Prevents iOS text size adjust after orientation change, without disabling
111
+ * user zoom.
112
+ */
113
+
114
+ html {
115
+ font-family: sans-serif; /* 1 */
116
+ -webkit-text-size-adjust: 100%; /* 2 */
117
+ -ms-text-size-adjust: 100%; /* 2 */
118
+ }
119
+
120
+ /*
121
+ * Removes default margin.
122
+ */
123
+
124
+ body {
125
+ margin: 0;
126
+ }
127
+
128
+ /* ==========================================================================
129
+ Links
130
+ ========================================================================== */
131
+
132
+ /*
133
+ * Addresses `outline` inconsistency between Chrome and other browsers.
134
+ */
135
+
136
+ a:focus {
137
+ outline: thin dotted;
138
+ }
139
+
140
+ /*
141
+ * Improves readability when focused and also mouse hovered in all browsers.
142
+ */
143
+
144
+ a:active,
145
+ a:hover {
146
+ outline: 0;
147
+ }
148
+
149
+ /* ==========================================================================
150
+ Typography
151
+ ========================================================================== */
152
+
153
+ /*
154
+ * Addresses `h1` font sizes within `section` and `article` in Firefox 4+,
155
+ * Safari 5, and Chrome.
156
+ */
157
+
158
+ h1 {
159
+ font-size: 2em;
160
+ }
161
+
162
+ /*
163
+ * Addresses styling not present in IE 8/9, Safari 5, and Chrome.
164
+ */
165
+
166
+ abbr[title] {
167
+ border-bottom: 1px dotted;
168
+ }
169
+
170
+ /*
171
+ * Addresses style set to `bolder` in Firefox 4+, Safari 5, and Chrome.
172
+ */
173
+
174
+ b,
175
+ strong {
176
+ font-weight: bold;
177
+ }
178
+
179
+ /*
180
+ * Addresses styling not present in Safari 5 and Chrome.
181
+ */
182
+
183
+ dfn {
184
+ font-style: italic;
185
+ }
186
+
187
+ /*
188
+ * Addresses styling not present in IE 8/9.
189
+ */
190
+
191
+ mark {
192
+ background: #ff0;
193
+ color: #000;
194
+ }
195
+
196
+
197
+ /*
198
+ * Corrects font family set oddly in Safari 5 and Chrome.
199
+ */
200
+
201
+ code,
202
+ kbd,
203
+ pre,
204
+ samp {
205
+ font-family: monospace, serif;
206
+ font-size: 1em;
207
+ }
208
+
209
+ /*
210
+ * Improves readability of pre-formatted text in all browsers.
211
+ */
212
+
213
+ pre {
214
+ white-space: pre;
215
+ white-space: pre-wrap;
216
+ word-wrap: break-word;
217
+ }
218
+
219
+ /*
220
+ * Sets consistent quote types.
221
+ */
222
+
223
+ q {
224
+ quotes: "\201C" "\201D" "\2018" "\2019";
225
+ }
226
+
227
+ /*
228
+ * Addresses inconsistent and variable font size in all browsers.
229
+ */
230
+
231
+ small {
232
+ font-size: 80%;
233
+ }
234
+
235
+ /*
236
+ * Prevents `sub` and `sup` affecting `line-height` in all browsers.
237
+ */
238
+
239
+ sub,
240
+ sup {
241
+ font-size: 75%;
242
+ line-height: 0;
243
+ position: relative;
244
+ vertical-align: baseline;
245
+ }
246
+
247
+ sup {
248
+ top: -0.5em;
249
+ }
250
+
251
+ sub {
252
+ bottom: -0.25em;
253
+ }
254
+
255
+ /* ==========================================================================
256
+ Embedded content
257
+ ========================================================================== */
258
+
259
+ /*
260
+ * Removes border when inside `a` element in IE 8/9.
261
+ */
262
+
263
+ img {
264
+ border: 0;
265
+ }
266
+
267
+ /*
268
+ * Corrects overflow displayed oddly in IE 9.
269
+ */
270
+
271
+ svg:not(:root) {
272
+ overflow: hidden;
273
+ }
274
+
275
+ /* ==========================================================================
276
+ Figures
277
+ ========================================================================== */
278
+
279
+ /*
280
+ * Addresses margin not present in IE 8/9 and Safari 5.
281
+ */
282
+
283
+ figure {
284
+ margin: 0;
285
+ }
286
+
287
+ /* ==========================================================================
288
+ Forms
289
+ ========================================================================== */
290
+
291
+ /*
292
+ * Define consistent border, margin, and padding.
293
+ */
294
+
295
+ fieldset {
296
+ border: 1px solid #c0c0c0;
297
+ margin: 0 2px;
298
+ padding: 0.35em 0.625em 0.75em;
299
+ }
300
+
301
+ /*
302
+ * 1. Corrects color not being inherited in IE 8/9.
303
+ * 2. Remove padding so people aren't caught out if they zero out fieldsets.
304
+ */
305
+
306
+ legend {
307
+ border: 0; /* 1 */
308
+ padding: 0; /* 2 */
309
+ }
310
+
311
+ /*
312
+ * 1. Corrects font family not being inherited in all browsers.
313
+ * 2. Corrects font size not being inherited in all browsers.
314
+ * 3. Addresses margins set differently in Firefox 4+, Safari 5, and Chrome
315
+ */
316
+
317
+ button,
318
+ input,
319
+ select,
320
+ textarea {
321
+ font-family: inherit; /* 1 */
322
+ font-size: 100%; /* 2 */
323
+ margin: 0; /* 3 */
324
+ }
325
+
326
+ /*
327
+ * Addresses Firefox 4+ setting `line-height` on `input` using `!important` in
328
+ * the UA stylesheet.
329
+ */
330
+
331
+ button,
332
+ input {
333
+ line-height: normal;
334
+ }
335
+
336
+ /*
337
+ * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
338
+ * and `video` controls.
339
+ * 2. Corrects inability to style clickable `input` types in iOS.
340
+ * 3. Improves usability and consistency of cursor style between image-type
341
+ * `input` and others.
342
+ */
343
+
344
+ button,
345
+ html input[type="button"], /* 1 */
346
+ input[type="reset"],
347
+ input[type="submit"] {
348
+ -webkit-appearance: button; /* 2 */
349
+ cursor: pointer; /* 3 */
350
+ }
351
+
352
+ /*
353
+ * Re-set default cursor for disabled elements.
354
+ */
355
+
356
+ button[disabled],
357
+ input[disabled] {
358
+ cursor: default;
359
+ }
360
+
361
+ /*
362
+ * 1. Addresses box sizing set to `content-box` in IE 8/9.
363
+ * 2. Removes excess padding in IE 8/9.
364
+ */
365
+
366
+ input[type="checkbox"],
367
+ input[type="radio"] {
368
+ box-sizing: border-box; /* 1 */
369
+ padding: 0; /* 2 */
370
+ }
371
+
372
+ /*
373
+ * 1. Addresses `appearance` set to `searchfield` in Safari 5 and Chrome.
374
+ * 2. Addresses `box-sizing` set to `border-box` in Safari 5 and Chrome
375
+ * (include `-moz` to future-proof).
376
+ */
377
+
378
+ input[type="search"] {
379
+ -webkit-appearance: textfield; /* 1 */
380
+ -moz-box-sizing: content-box;
381
+ -webkit-box-sizing: content-box; /* 2 */
382
+ box-sizing: content-box;
383
+ }
384
+
385
+ /*
386
+ * Removes inner padding and search cancel button in Safari 5 and Chrome
387
+ * on OS X.
388
+ */
389
+
390
+ input[type="search"]::-webkit-search-cancel-button,
391
+ input[type="search"]::-webkit-search-decoration {
392
+ -webkit-appearance: none;
393
+ }
394
+
395
+ /*
396
+ * Removes inner padding and border in Firefox 4+.
397
+ */
398
+
399
+ button::-moz-focus-inner,
400
+ input::-moz-focus-inner {
401
+ border: 0;
402
+ padding: 0;
403
+ }
404
+
405
+ /*
406
+ * 1. Removes default vertical scrollbar in IE 8/9.
407
+ * 2. Improves readability and alignment in all browsers.
408
+ */
409
+
410
+ textarea {
411
+ overflow: auto; /* 1 */
412
+ vertical-align: top; /* 2 */
413
+ }
414
+
415
+ /* ==========================================================================
416
+ Tables
417
+ ========================================================================== */
418
+
419
+ /*
420
+ * Remove most spacing between table cells.
421
+ */
422
+
423
+ table {
424
+ border-collapse: collapse;
425
+ border-spacing: 0;
426
+ }*,
427
+ *:before,
428
+ *:after {
429
+ box-sizing: border-box; }
430
+
2
431
  /*# sourceMappingURL=app.css.map*/
data/docs/app.css.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"app.css","sources":[],"mappings":"","sourceRoot":""}
1
+ {"version":3,"file":"app.css","sources":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","sourceRoot":""}