@burger-editor/local 4.0.0-alpha.45 → 4.0.0-alpha.46
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/README.md +7 -3
- package/dist/client.js +73 -41
- package/dist/client.js.map +1 -1
- package/package.json +8 -8
- package/server/helpers/edit-content.d.ts +11 -8
- package/server/helpers/edit-content.d.ts.map +1 -1
- package/server/helpers/edit-content.js +41 -45
- package/server/model/get-user-config.d.ts.map +1 -1
- package/server/model/get-user-config.js +1 -0
- package/server/route.d.ts +1 -0
- package/server/route.d.ts.map +1 -1
- package/server/route.js +6 -2
- package/server/types.d.ts +1 -0
- package/server/types.d.ts.map +1 -1
package/README.md
CHANGED
|
@@ -57,6 +57,9 @@ export default {
|
|
|
57
57
|
// 編集可能エリアのセレクタ
|
|
58
58
|
editableArea: '.my-editor',
|
|
59
59
|
|
|
60
|
+
// インデックスファイル名(パスが / で終わる場合に使用)
|
|
61
|
+
indexFileName: 'index.html',
|
|
62
|
+
|
|
60
63
|
// ブロックカタログ
|
|
61
64
|
catalog: defaultCatalog,
|
|
62
65
|
|
|
@@ -103,6 +106,7 @@ title: 'New Page'
|
|
|
103
106
|
- `stylesheets` (string[]): 読み込むスタイルシートのパス(デフォルト: [])
|
|
104
107
|
- `classList` (string[]): ブロックに適用するCSSクラス(デフォルト: [])
|
|
105
108
|
- `editableArea` (string | null): 編集可能エリアのセレクタ(デフォルト: null)
|
|
109
|
+
- `indexFileName` (string): パスが `/` で終わる場合に使用するインデックスファイル名(デフォルト: 'index.html')
|
|
106
110
|
- `catalog` (BlockCatalog): ブロックカタログ(デフォルト: {})
|
|
107
111
|
- `newFileContent` (string): 新規ファイル作成時のテンプレート
|
|
108
112
|
- `googleMapsApiKey` (string | null): Google Maps APIキー(デフォルト: null)
|
|
@@ -110,10 +114,10 @@ title: 'New Page'
|
|
|
110
114
|
- `sampleFilePath` (string): サンプルファイルのパス
|
|
111
115
|
- `filesDir` (object): ファイルタイプごとの保存先ディレクトリ
|
|
112
116
|
- `open` (boolean): 起動時にブラウザを自動で開く(デフォルト: true)
|
|
113
|
-
- `enableImportBlock` (boolean): インポートブロックを有効にする(デフォルト:
|
|
117
|
+
- `enableImportBlock` (boolean): インポートブロックを有効にする(デフォルト: true)
|
|
114
118
|
- `healthCheck` (object): ヘルスチェックの設定
|
|
115
|
-
- `enabled` (boolean): ヘルスチェックを有効にする(デフォルト:
|
|
116
|
-
- `interval` (number): チェック間隔(ミリ秒)(デフォルト:
|
|
119
|
+
- `enabled` (boolean): ヘルスチェックを有効にする(デフォルト: true)
|
|
120
|
+
- `interval` (number): チェック間隔(ミリ秒)(デフォルト: 10000)
|
|
117
121
|
- `retryCount` (number): リトライ回数(デフォルト: 3)
|
|
118
122
|
|
|
119
123
|
## カスタムブロックカタログの追加
|
package/dist/client.js
CHANGED
|
@@ -1294,7 +1294,7 @@ var style$b = "/* No Styling */\n";
|
|
|
1294
1294
|
var template$b = "<a href=\"\" data-kind=\"primary\" data-before-icon=\"none\" data-after-icon=\"none\" data-bge=\"link:href, target:target, kind:data-kind, before-icon:data-before-icon, after-icon:data-after-icon\">\n\t<div>\n\t\t<span data-bge=\"text\">ボタン</span>\n\t\t<span data-bge=\"subtext\">サブテキスト</span>\n\t</div>\n</a>\n";
|
|
1295
1295
|
|
|
1296
1296
|
var button = createItem$1({
|
|
1297
|
-
version: "4.0.0-alpha.
|
|
1297
|
+
version: "4.0.0-alpha.45",
|
|
1298
1298
|
name: "button",
|
|
1299
1299
|
template: template$b,
|
|
1300
1300
|
style: style$b,
|
|
@@ -1350,7 +1350,7 @@ var style$a = "/* No Styling */\n";
|
|
|
1350
1350
|
var template$a = "<details data-bge=\"open:open\">\n\t<summary data-bge=\"summary\">折りたたみコンテンツ</summary>\n\t<div data-bge=\"content\"><p>内容を入力してください</p></div>\n</details>\n";
|
|
1351
1351
|
|
|
1352
1352
|
var details = createItem$1({
|
|
1353
|
-
version: "4.0.0-alpha.
|
|
1353
|
+
version: "4.0.0-alpha.45",
|
|
1354
1354
|
name: "details",
|
|
1355
1355
|
template: template$a,
|
|
1356
1356
|
style: style$a,
|
|
@@ -1364,7 +1364,7 @@ var style$9 = "[data-bgi='download-file'] {\n\t[data-bge*='size'] {\n\t\t&::befo
|
|
|
1364
1364
|
var template$9 = "<a href=\"./files/bgeditor/bg-sample.pdf\" target=\"_blank\" data-bge=\"path:href, download:download\">\n\t<div>\n\t\t<span data-bge=\"name\">サンプルダウンロードファイル</span>\n\t\t<span data-bge=\"formated-size, size:data-size\" data-size=\"138158\">134.92kB</span>\n\t</div>\n</a>\n";
|
|
1365
1365
|
|
|
1366
1366
|
var downloadFile = createItem$1({
|
|
1367
|
-
version: "4.0.0-alpha.
|
|
1367
|
+
version: "4.0.0-alpha.45",
|
|
1368
1368
|
name: "download-file",
|
|
1369
1369
|
template: template$9,
|
|
1370
1370
|
style: style$9,
|
|
@@ -1403,7 +1403,7 @@ var style$8 = "[data-bgi='google-maps'] {\n\tdiv {\n\t\tinline-size: 100%;\n\t\t
|
|
|
1403
1403
|
var template$8 = "<div data-lat=\"35.681382\" data-lng=\"139.766084\" data-zoom=\"16\" data-bge=\"lat:data-lat, lng:data-lng, zoom:data-zoom\">\n\t<img data-bge=\"img:src\" src=\"https://maps.google.com/maps/api/staticmap?center=35.681382,139.766084&zoom=16&size=640x400&markers=color:red|color:red|35.681382,139.766084&scale=2&key=%googleMapsApiKey%\" width=\"8\" height=\"5\" alt=\"Google Maps\" />\n</div>\n<a href=\"https://maps.apple.com/?q=35.681382,139.766084\" data-bge=\"url:href\" target=\"_blank\"><span>アプリで開く</span></a>\n";
|
|
1404
1404
|
|
|
1405
1405
|
var googleMaps = createItem$1({
|
|
1406
|
-
version: "4.0.0-alpha.
|
|
1406
|
+
version: "4.0.0-alpha.45",
|
|
1407
1407
|
name: "google-maps",
|
|
1408
1408
|
template: template$8,
|
|
1409
1409
|
style: style$8,
|
|
@@ -1538,7 +1538,7 @@ var style$7 = "[data-bgi='hr'] {\n\t--inline-size: 100%;\n\t--border-color: #000
|
|
|
1538
1538
|
var template$7 = "<div data-bgi-hr-kind=\"primary\" data-bge=\"kind:data-bgi-hr-kind\">\n\t<hr />\n</div>\n";
|
|
1539
1539
|
|
|
1540
1540
|
var hr = createItem$1({
|
|
1541
|
-
version: "4.0.0-alpha.
|
|
1541
|
+
version: "4.0.0-alpha.45",
|
|
1542
1542
|
name: "hr",
|
|
1543
1543
|
template: template$7,
|
|
1544
1544
|
style: style$7,
|
|
@@ -1628,7 +1628,7 @@ function createWidthState() {
|
|
|
1628
1628
|
|
|
1629
1629
|
const ORIGIN = "__org";
|
|
1630
1630
|
var image = createItem$1({
|
|
1631
|
-
version: "4.0.0-alpha.
|
|
1631
|
+
version: "4.0.0-alpha.45",
|
|
1632
1632
|
name: "image",
|
|
1633
1633
|
template: template$6,
|
|
1634
1634
|
style: style$6,
|
|
@@ -1826,7 +1826,7 @@ var style$5 = "[data-bgi='import'] {\n\tbge-import {\n\t\t&::before {\n\t\t\tfon
|
|
|
1826
1826
|
var template$5 = "<bge-import data-bge=\":src\" src=\"\"></bge-import>\n";
|
|
1827
1827
|
|
|
1828
1828
|
var importItem = createItem$1({
|
|
1829
|
-
version: "4.0.0-alpha.
|
|
1829
|
+
version: "4.0.0-alpha.45",
|
|
1830
1830
|
name: "import",
|
|
1831
1831
|
template: template$5,
|
|
1832
1832
|
style: style$5,
|
|
@@ -1840,7 +1840,7 @@ var style$4 = "/* No Styling */\n";
|
|
|
1840
1840
|
var template$4 = "<div data-bge=\":scrollable\" data-bge-scrollable=\"false\">\n\t<table>\n\t\t<caption data-bge=\"caption\">\n\t\t\tキャプションを入力してください\n\t\t</caption>\n\t\t<tbody data-bge-list>\n\t\t\t<tr>\n\t\t\t\t<th data-bge=\"th\">表組の見出し</th>\n\t\t\t\t<td data-bge=\"td\">表組の内容を入力してください</td>\n\t\t\t</tr>\n\t\t</tbody>\n\t</table>\n</div>\n";
|
|
1841
1841
|
|
|
1842
1842
|
var table = createItem$1({
|
|
1843
|
-
version: "4.0.0-alpha.
|
|
1843
|
+
version: "4.0.0-alpha.45",
|
|
1844
1844
|
name: "table",
|
|
1845
1845
|
template: template$4,
|
|
1846
1846
|
style: style$4,
|
|
@@ -1868,7 +1868,7 @@ var style$3 = "/* No Styling */\n";
|
|
|
1868
1868
|
var template$3 = "<h2 data-bge=\"title-h2\">見出しを入力してください</h2>\n";
|
|
1869
1869
|
|
|
1870
1870
|
var titleH2 = createItem$1({
|
|
1871
|
-
version: "4.0.0-alpha.
|
|
1871
|
+
version: "4.0.0-alpha.45",
|
|
1872
1872
|
name: "title-h2",
|
|
1873
1873
|
template: template$3,
|
|
1874
1874
|
style: style$3,
|
|
@@ -1882,7 +1882,7 @@ var style$2 = "/* No Styling */\n";
|
|
|
1882
1882
|
var template$2 = "<h3 data-bge=\"title-h3\">見出しを入力してください</h3>\n";
|
|
1883
1883
|
|
|
1884
1884
|
var titleH3 = createItem$1({
|
|
1885
|
-
version: "4.0.0-alpha.
|
|
1885
|
+
version: "4.0.0-alpha.45",
|
|
1886
1886
|
name: "title-h3",
|
|
1887
1887
|
template: template$2,
|
|
1888
1888
|
style: style$2,
|
|
@@ -1896,7 +1896,7 @@ var style$1 = "/* No Styling */\n";
|
|
|
1896
1896
|
var template$1 = "<div data-bge=\"wysiwyg\"><p>本文を入力してください</p></div>\n";
|
|
1897
1897
|
|
|
1898
1898
|
var wysiwyg = createItem$1({
|
|
1899
|
-
version: "4.0.0-alpha.
|
|
1899
|
+
version: "4.0.0-alpha.45",
|
|
1900
1900
|
name: "wysiwyg",
|
|
1901
1901
|
template: template$1,
|
|
1902
1902
|
style: style$1,
|
|
@@ -1911,7 +1911,7 @@ var template = "<div data-id=\"3KtWfp0UopM\" data-title=\"YouTube動画\" data-w
|
|
|
1911
1911
|
|
|
1912
1912
|
const FALLBACK_TITLE = "YouTube\u52D5\u753B";
|
|
1913
1913
|
var youtube = createItem$1({
|
|
1914
|
-
version: "4.0.0-alpha.
|
|
1914
|
+
version: "4.0.0-alpha.45",
|
|
1915
1915
|
name: "youtube",
|
|
1916
1916
|
template,
|
|
1917
1917
|
style: style$c,
|
|
@@ -6992,9 +6992,9 @@ class BurgerEditorEngine {
|
|
|
6992
6992
|
return engine;
|
|
6993
6993
|
}
|
|
6994
6994
|
}
|
|
6995
|
-
const IconAlignBoxCenterStretch = '<svg\n xmlns="http://www.w3.org/2000/svg"\n width="24"\n height="24"\n viewBox="0 0 24 24"\n fill="none"\n stroke="currentColor"\n stroke-width="2"\n stroke-linecap="round"\n stroke-linejoin="round"\n class="icon icon-tabler icons-tabler-outline icon-tabler-align-box-center-stretch"\n>\n <path stroke="none" d="M0 0h24v24H0z" fill="none"/>\n <path d="M3 19v-14a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -
|
|
6995
|
+
const IconAlignBoxCenterStretch = '<svg\n xmlns="http://www.w3.org/2000/svg"\n width="24"\n height="24"\n viewBox="0 0 24 24"\n fill="none"\n stroke="currentColor"\n stroke-width="2"\n stroke-linecap="round"\n stroke-linejoin="round"\n class="icon icon-tabler icons-tabler-outline icon-tabler-align-box-center-stretch"\n>\n <path stroke="none" d="M0 0h24v24H0z" fill="none"/>\n <path d="M3 19v-14a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2" />\n <path d="M11 17h2" />\n <path d="M9 12h6" />\n <path d="M10 7h4" />\n</svg>';
|
|
6996
6996
|
const IconBlockquote = '<svg\n xmlns="http://www.w3.org/2000/svg"\n width="24"\n height="24"\n viewBox="0 0 24 24"\n fill="none"\n stroke="currentColor"\n stroke-width="2"\n stroke-linecap="round"\n stroke-linejoin="round"\n class="icon icon-tabler icons-tabler-outline icon-tabler-blockquote"\n>\n <path stroke="none" d="M0 0h24v24H0z" fill="none"/>\n <path d="M6 15h15" />\n <path d="M21 19h-15" />\n <path d="M15 11h6" />\n <path d="M21 7h-6" />\n <path d="M9 9h1a1 1 0 1 1 -1 1v-2.5a2 2 0 0 1 2 -2" />\n <path d="M3 9h1a1 1 0 1 1 -1 1v-2.5a2 2 0 0 1 2 -2" />\n</svg>';
|
|
6997
|
-
const IconBold = '<svg\n xmlns="http://www.w3.org/2000/svg"\n width="24"\n height="24"\n viewBox="0 0 24 24"\n fill="none"\n stroke="currentColor"\n stroke-width="2"\n stroke-linecap="round"\n stroke-linejoin="round"\n class="icon icon-tabler icons-tabler-outline icon-tabler-bold"\n>\n <path stroke="none" d="M0 0h24v24H0z" fill="none"/>\n <path d="M7 5h6a3.5 3.5 0 0 1 0 7h-
|
|
6997
|
+
const IconBold = '<svg\n xmlns="http://www.w3.org/2000/svg"\n width="24"\n height="24"\n viewBox="0 0 24 24"\n fill="none"\n stroke="currentColor"\n stroke-width="2"\n stroke-linecap="round"\n stroke-linejoin="round"\n class="icon icon-tabler icons-tabler-outline icon-tabler-bold"\n>\n <path stroke="none" d="M0 0h24v24H0z" fill="none"/>\n <path d="M7 5h6a3.5 3.5 0 0 1 0 7h-6l0 -7" />\n <path d="M13 12h1a3.5 3.5 0 0 1 0 7h-7v-7" />\n</svg>';
|
|
6998
6998
|
const IconCloud = '<svg\n xmlns="http://www.w3.org/2000/svg"\n width="24"\n height="24"\n viewBox="0 0 24 24"\n fill="none"\n stroke="currentColor"\n stroke-width="2"\n stroke-linecap="round"\n stroke-linejoin="round"\n class="icon icon-tabler icons-tabler-outline icon-tabler-cloud"\n>\n <path stroke="none" d="M0 0h24v24H0z" fill="none"/>\n <path d="M6.657 18c-2.572 0 -4.657 -2.007 -4.657 -4.483c0 -2.475 2.085 -4.482 4.657 -4.482c.393 -1.762 1.794 -3.2 3.675 -3.773c1.88 -.572 3.956 -.193 5.444 1c1.488 1.19 2.162 3.007 1.77 4.769h.99c1.913 0 3.464 1.56 3.464 3.486c0 1.927 -1.551 3.487 -3.465 3.487h-11.878" />\n</svg>';
|
|
6999
6999
|
const IconCode = '<svg\n xmlns="http://www.w3.org/2000/svg"\n width="24"\n height="24"\n viewBox="0 0 24 24"\n fill="none"\n stroke="currentColor"\n stroke-width="2"\n stroke-linecap="round"\n stroke-linejoin="round"\n class="icon icon-tabler icons-tabler-outline icon-tabler-code"\n>\n <path stroke="none" d="M0 0h24v24H0z" fill="none"/>\n <path d="M7 8l-4 4l4 4" />\n <path d="M17 8l4 4l-4 4" />\n <path d="M14 4l-4 16" />\n</svg>';
|
|
7000
7000
|
const IconH1 = '<svg\n xmlns="http://www.w3.org/2000/svg"\n width="24"\n height="24"\n viewBox="0 0 24 24"\n fill="none"\n stroke="currentColor"\n stroke-width="2"\n stroke-linecap="round"\n stroke-linejoin="round"\n class="icon icon-tabler icons-tabler-outline icon-tabler-h-1"\n>\n <path stroke="none" d="M0 0h24v24H0z" fill="none"/>\n <path d="M19 18v-8l-2 2" />\n <path d="M4 6v12" />\n <path d="M12 6v12" />\n <path d="M11 18h2" />\n <path d="M3 18h2" />\n <path d="M4 12h8" />\n <path d="M3 6h2" />\n <path d="M11 6h2" />\n</svg>';
|
|
@@ -7002,12 +7002,12 @@ const IconH2 = '<svg\n xmlns="http://www.w3.org/2000/svg"\n width="24"\n heig
|
|
|
7002
7002
|
const IconH3 = '<svg\n xmlns="http://www.w3.org/2000/svg"\n width="24"\n height="24"\n viewBox="0 0 24 24"\n fill="none"\n stroke="currentColor"\n stroke-width="2"\n stroke-linecap="round"\n stroke-linejoin="round"\n class="icon icon-tabler icons-tabler-outline icon-tabler-h-3"\n>\n <path stroke="none" d="M0 0h24v24H0z" fill="none"/>\n <path d="M19 14a2 2 0 1 0 -2 -2" />\n <path d="M17 16a2 2 0 1 0 2 -2" />\n <path d="M4 6v12" />\n <path d="M12 6v12" />\n <path d="M11 18h2" />\n <path d="M3 18h2" />\n <path d="M4 12h8" />\n <path d="M3 6h2" />\n <path d="M11 6h2" />\n</svg>';
|
|
7003
7003
|
const IconH4 = '<svg\n xmlns="http://www.w3.org/2000/svg"\n width="24"\n height="24"\n viewBox="0 0 24 24"\n fill="none"\n stroke="currentColor"\n stroke-width="2"\n stroke-linecap="round"\n stroke-linejoin="round"\n class="icon icon-tabler icons-tabler-outline icon-tabler-h-4"\n>\n <path stroke="none" d="M0 0h24v24H0z" fill="none"/>\n <path d="M20 18v-8l-4 6h5" />\n <path d="M4 6v12" />\n <path d="M12 6v12" />\n <path d="M11 18h2" />\n <path d="M3 18h2" />\n <path d="M4 12h8" />\n <path d="M3 6h2" />\n <path d="M11 6h2" />\n</svg>';
|
|
7004
7004
|
const IconH5 = '<svg\n xmlns="http://www.w3.org/2000/svg"\n width="24"\n height="24"\n viewBox="0 0 24 24"\n fill="none"\n stroke="currentColor"\n stroke-width="2"\n stroke-linecap="round"\n stroke-linejoin="round"\n class="icon icon-tabler icons-tabler-outline icon-tabler-h-5"\n>\n <path stroke="none" d="M0 0h24v24H0z" fill="none"/>\n <path d="M17 18h2a2 2 0 1 0 0 -4h-2v-4h4" />\n <path d="M4 6v12" />\n <path d="M12 6v12" />\n <path d="M11 18h2" />\n <path d="M3 18h2" />\n <path d="M4 12h8" />\n <path d="M3 6h2" />\n <path d="M11 6h2" />\n</svg>';
|
|
7005
|
-
const IconH6 = '<svg\n xmlns="http://www.w3.org/2000/svg"\n width="24"\n height="24"\n viewBox="0 0 24 24"\n fill="none"\n stroke="currentColor"\n stroke-width="2"\n stroke-linecap="round"\n stroke-linejoin="round"\n class="icon icon-tabler icons-tabler-outline icon-tabler-h-6"\n>\n <path stroke="none" d="M0 0h24v24H0z" fill="none"/>\n <path d="M19 14a2 2 0 1 0 0 4a2 2 0 0 0 0 -
|
|
7005
|
+
const IconH6 = '<svg\n xmlns="http://www.w3.org/2000/svg"\n width="24"\n height="24"\n viewBox="0 0 24 24"\n fill="none"\n stroke="currentColor"\n stroke-width="2"\n stroke-linecap="round"\n stroke-linejoin="round"\n class="icon icon-tabler icons-tabler-outline icon-tabler-h-6"\n>\n <path stroke="none" d="M0 0h24v24H0z" fill="none"/>\n <path d="M19 14a2 2 0 1 0 0 4a2 2 0 0 0 0 -4" />\n <path d="M21 12a2 2 0 1 0 -4 0v4" />\n <path d="M4 6v12" />\n <path d="M12 6v12" />\n <path d="M11 18h2" />\n <path d="M3 18h2" />\n <path d="M4 12h8" />\n <path d="M3 6h2" />\n <path d="M11 6h2" />\n</svg>';
|
|
7006
7006
|
const IconItalic = '<svg\n xmlns="http://www.w3.org/2000/svg"\n width="24"\n height="24"\n viewBox="0 0 24 24"\n fill="none"\n stroke="currentColor"\n stroke-width="2"\n stroke-linecap="round"\n stroke-linejoin="round"\n class="icon icon-tabler icons-tabler-outline icon-tabler-italic"\n>\n <path stroke="none" d="M0 0h24v24H0z" fill="none"/>\n <path d="M11 5l6 0" />\n <path d="M7 19l6 0" />\n <path d="M14 5l-4 14" />\n</svg>';
|
|
7007
7007
|
const IconLink = '<svg\n xmlns="http://www.w3.org/2000/svg"\n width="24"\n height="24"\n viewBox="0 0 24 24"\n fill="none"\n stroke="currentColor"\n stroke-width="2"\n stroke-linecap="round"\n stroke-linejoin="round"\n class="icon icon-tabler icons-tabler-outline icon-tabler-link"\n>\n <path stroke="none" d="M0 0h24v24H0z" fill="none"/>\n <path d="M9 15l6 -6" />\n <path d="M11 6l.463 -.536a5 5 0 0 1 7.071 7.072l-.534 .464" />\n <path d="M13 18l-.397 .534a5.068 5.068 0 0 1 -7.127 0a4.972 4.972 0 0 1 0 -7.071l.524 -.463" />\n</svg>';
|
|
7008
7008
|
const IconOrderedList = '<svg\n xmlns="http://www.w3.org/2000/svg"\n width="24"\n height="24"\n viewBox="0 0 24 24"\n fill="none"\n stroke="currentColor"\n stroke-width="2"\n stroke-linecap="round"\n stroke-linejoin="round"\n class="icon icon-tabler icons-tabler-outline icon-tabler-list-numbers"\n>\n <path stroke="none" d="M0 0h24v24H0z" fill="none"/>\n <path d="M11 6h9" />\n <path d="M11 12h9" />\n <path d="M12 18h8" />\n <path d="M4 16a2 2 0 1 1 4 0c0 .591 -.5 1 -1 1.5l-3 2.5h4" />\n <path d="M6 10v-6l-2 2" />\n</svg>';
|
|
7009
7009
|
const IconBulletList = '<svg\n xmlns="http://www.w3.org/2000/svg"\n width="24"\n height="24"\n viewBox="0 0 24 24"\n fill="none"\n stroke="currentColor"\n stroke-width="2"\n stroke-linecap="round"\n stroke-linejoin="round"\n class="icon icon-tabler icons-tabler-outline icon-tabler-list"\n>\n <path stroke="none" d="M0 0h24v24H0z" fill="none"/>\n <path d="M9 6l11 0" />\n <path d="M9 12l11 0" />\n <path d="M9 18l11 0" />\n <path d="M5 6l0 .01" />\n <path d="M5 12l0 .01" />\n <path d="M5 18l0 .01" />\n</svg>';
|
|
7010
|
-
const IconNotes = '<svg\n xmlns="http://www.w3.org/2000/svg"\n width="24"\n height="24"\n viewBox="0 0 24 24"\n fill="none"\n stroke="currentColor"\n stroke-width="2"\n stroke-linecap="round"\n stroke-linejoin="round"\n class="icon icon-tabler icons-tabler-outline icon-tabler-notes"\n>\n <path stroke="none" d="M0 0h24v24H0z" fill="none"/>\n <path d="M5
|
|
7010
|
+
const IconNotes = '<svg\n xmlns="http://www.w3.org/2000/svg"\n width="24"\n height="24"\n viewBox="0 0 24 24"\n fill="none"\n stroke="currentColor"\n stroke-width="2"\n stroke-linecap="round"\n stroke-linejoin="round"\n class="icon icon-tabler icons-tabler-outline icon-tabler-notes"\n>\n <path stroke="none" d="M0 0h24v24H0z" fill="none"/>\n <path d="M5 5a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2l0 -14" />\n <path d="M9 7l6 0" />\n <path d="M9 11l6 0" />\n <path d="M9 15l4 0" />\n</svg>';
|
|
7011
7011
|
const IconStrikethrough = '<svg\n xmlns="http://www.w3.org/2000/svg"\n width="24"\n height="24"\n viewBox="0 0 24 24"\n fill="none"\n stroke="currentColor"\n stroke-width="2"\n stroke-linecap="round"\n stroke-linejoin="round"\n class="icon icon-tabler icons-tabler-outline icon-tabler-strikethrough"\n>\n <path stroke="none" d="M0 0h24v24H0z" fill="none"/>\n <path d="M5 12l14 0" />\n <path d="M16 6.5a4 2 0 0 0 -4 -1.5h-1a3.5 3.5 0 0 0 0 7h2a3.5 3.5 0 0 1 0 7h-1.5a4 2 0 0 1 -4 -1.5" />\n</svg>';
|
|
7012
7012
|
const IconUnderline = '<svg\n xmlns="http://www.w3.org/2000/svg"\n width="24"\n height="24"\n viewBox="0 0 24 24"\n fill="none"\n stroke="currentColor"\n stroke-width="2"\n stroke-linecap="round"\n stroke-linejoin="round"\n class="icon icon-tabler icons-tabler-outline icon-tabler-underline"\n>\n <path stroke="none" d="M0 0h24v24H0z" fill="none"/>\n <path d="M7 5v5a5 5 0 0 0 10 0v-5" />\n <path d="M5 19h14" />\n</svg>';
|
|
7013
7013
|
function OrderedMap(content) {
|
|
@@ -22149,6 +22149,35 @@ var ExtensionManager = class {
|
|
|
22149
22149
|
})
|
|
22150
22150
|
);
|
|
22151
22151
|
}
|
|
22152
|
+
/**
|
|
22153
|
+
* Get the composed dispatchTransaction function from all extensions.
|
|
22154
|
+
* @param baseDispatch The base dispatch function (e.g. from the editor or user props)
|
|
22155
|
+
* @returns A composed dispatch function
|
|
22156
|
+
*/
|
|
22157
|
+
dispatchTransaction(baseDispatch) {
|
|
22158
|
+
const { editor } = this;
|
|
22159
|
+
const extensions = sortExtensions([...this.extensions].reverse());
|
|
22160
|
+
return extensions.reduceRight((next, extension) => {
|
|
22161
|
+
const context = {
|
|
22162
|
+
name: extension.name,
|
|
22163
|
+
options: extension.options,
|
|
22164
|
+
storage: this.editor.extensionStorage[extension.name],
|
|
22165
|
+
editor,
|
|
22166
|
+
type: getSchemaTypeByName(extension.name, this.schema)
|
|
22167
|
+
};
|
|
22168
|
+
const dispatchTransaction = getExtensionField(
|
|
22169
|
+
extension,
|
|
22170
|
+
"dispatchTransaction",
|
|
22171
|
+
context
|
|
22172
|
+
);
|
|
22173
|
+
if (!dispatchTransaction) {
|
|
22174
|
+
return next;
|
|
22175
|
+
}
|
|
22176
|
+
return (transaction) => {
|
|
22177
|
+
dispatchTransaction.call(context, { transaction, next });
|
|
22178
|
+
};
|
|
22179
|
+
}, baseDispatch);
|
|
22180
|
+
}
|
|
22152
22181
|
get markViews() {
|
|
22153
22182
|
const { editor } = this;
|
|
22154
22183
|
const { markExtensions } = splitExtensions(this.extensions);
|
|
@@ -22961,7 +22990,8 @@ var Editor = class extends EventEmitter {
|
|
|
22961
22990
|
},
|
|
22962
22991
|
onPaste: () => null,
|
|
22963
22992
|
onDrop: () => null,
|
|
22964
|
-
onDelete: () => null
|
|
22993
|
+
onDelete: () => null,
|
|
22994
|
+
enableExtensionDispatchTransaction: true
|
|
22965
22995
|
};
|
|
22966
22996
|
this.isCapturingTransaction = false;
|
|
22967
22997
|
this.capturedTransaction = null;
|
|
@@ -23282,15 +23312,17 @@ var Editor = class extends EventEmitter {
|
|
|
23282
23312
|
* Creates a ProseMirror view.
|
|
23283
23313
|
*/
|
|
23284
23314
|
createView(element2) {
|
|
23285
|
-
|
|
23315
|
+
const { editorProps, enableExtensionDispatchTransaction } = this.options;
|
|
23316
|
+
const baseDispatch = editorProps.dispatchTransaction || this.dispatchTransaction.bind(this);
|
|
23317
|
+
const dispatch = enableExtensionDispatchTransaction ? this.extensionManager.dispatchTransaction(baseDispatch) : baseDispatch;
|
|
23286
23318
|
this.editorView = new EditorView(element2, {
|
|
23287
|
-
...
|
|
23319
|
+
...editorProps,
|
|
23288
23320
|
attributes: {
|
|
23289
23321
|
// add `role="textbox"` to the editor element
|
|
23290
23322
|
role: "textbox",
|
|
23291
|
-
...
|
|
23323
|
+
...editorProps == null ? void 0 : editorProps.attributes
|
|
23292
23324
|
},
|
|
23293
|
-
dispatchTransaction:
|
|
23325
|
+
dispatchTransaction: dispatch,
|
|
23294
23326
|
state: this.editorState,
|
|
23295
23327
|
markViews: this.extensionManager.markViews,
|
|
23296
23328
|
nodeViews: this.extensionManager.nodeViews
|
|
@@ -37956,7 +37988,7 @@ function Arrow_big_down_line($$anchor, $$props) {
|
|
|
37956
37988
|
[
|
|
37957
37989
|
"path",
|
|
37958
37990
|
{
|
|
37959
|
-
"d": "M15 12h3.586a1 1 0 0 1 .707 1.707l-6.586 6.586a1 1 0 0 1 -1.414 0l-6.586 -6.586a1 1 0 0 1 .707 -1.707h3.586v-
|
|
37991
|
+
"d": "M15 12h3.586a1 1 0 0 1 .707 1.707l-6.586 6.586a1 1 0 0 1 -1.414 0l-6.586 -6.586a1 1 0 0 1 .707 -1.707h3.586v-6h6v6"
|
|
37960
37992
|
}
|
|
37961
37993
|
],
|
|
37962
37994
|
["path", { "d": "M15 3h-6" }]
|
|
@@ -37980,7 +38012,7 @@ function Arrow_big_up_line($$anchor, $$props) {
|
|
|
37980
38012
|
[
|
|
37981
38013
|
"path",
|
|
37982
38014
|
{
|
|
37983
|
-
"d": "M9 12h-3.586a1 1 0 0 1 -.707 -1.707l6.586 -6.586a1 1 0 0 1 1.414 0l6.586 6.586a1 1 0 0 1 -.707 1.707h-3.586v6h-6v-
|
|
38015
|
+
"d": "M9 12h-3.586a1 1 0 0 1 -.707 -1.707l6.586 -6.586a1 1 0 0 1 1.414 0l6.586 6.586a1 1 0 0 1 -.707 1.707h-3.586v6h-6v-6"
|
|
37984
38016
|
}
|
|
37985
38017
|
],
|
|
37986
38018
|
["path", { "d": "M9 21h6" }]
|
|
@@ -38010,7 +38042,7 @@ function Clipboard_plus($$anchor, $$props) {
|
|
|
38010
38042
|
[
|
|
38011
38043
|
"path",
|
|
38012
38044
|
{
|
|
38013
|
-
"d": "M9
|
|
38045
|
+
"d": "M9 5a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2"
|
|
38014
38046
|
}
|
|
38015
38047
|
],
|
|
38016
38048
|
["path", { "d": "M10 14h4" }],
|
|
@@ -38035,19 +38067,19 @@ function Layout_grid_add($$anchor, $$props) {
|
|
|
38035
38067
|
[
|
|
38036
38068
|
"path",
|
|
38037
38069
|
{
|
|
38038
|
-
"d": "M4
|
|
38070
|
+
"d": "M4 5a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1l0 -4"
|
|
38039
38071
|
}
|
|
38040
38072
|
],
|
|
38041
38073
|
[
|
|
38042
38074
|
"path",
|
|
38043
38075
|
{
|
|
38044
|
-
"d": "M14
|
|
38076
|
+
"d": "M14 5a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1l0 -4"
|
|
38045
38077
|
}
|
|
38046
38078
|
],
|
|
38047
38079
|
[
|
|
38048
38080
|
"path",
|
|
38049
38081
|
{
|
|
38050
|
-
"d": "M4
|
|
38082
|
+
"d": "M4 15a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1l0 -4"
|
|
38051
38083
|
}
|
|
38052
38084
|
],
|
|
38053
38085
|
["path", { "d": "M14 17h6m-3 -3v6" }]
|
|
@@ -38071,19 +38103,19 @@ function Layout_grid_remove($$anchor, $$props) {
|
|
|
38071
38103
|
[
|
|
38072
38104
|
"path",
|
|
38073
38105
|
{
|
|
38074
|
-
"d": "M4 5a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1v-
|
|
38106
|
+
"d": "M4 5a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1v-4"
|
|
38075
38107
|
}
|
|
38076
38108
|
],
|
|
38077
38109
|
[
|
|
38078
38110
|
"path",
|
|
38079
38111
|
{
|
|
38080
|
-
"d": "M14 5a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1v-
|
|
38112
|
+
"d": "M14 5a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1v-4"
|
|
38081
38113
|
}
|
|
38082
38114
|
],
|
|
38083
38115
|
[
|
|
38084
38116
|
"path",
|
|
38085
38117
|
{
|
|
38086
|
-
"d": "M4 15a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1v-
|
|
38118
|
+
"d": "M4 15a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1v-4"
|
|
38087
38119
|
}
|
|
38088
38120
|
],
|
|
38089
38121
|
["path", { "d": "M14 17h6" }]
|
|
@@ -38107,7 +38139,7 @@ function Row_insert_bottom($$anchor, $$props) {
|
|
|
38107
38139
|
[
|
|
38108
38140
|
"path",
|
|
38109
38141
|
{
|
|
38110
|
-
"d": "M20 6v4a1 1 0 0 1 -1 1h-14a1 1 0 0 1 -1 -1v-4a1 1 0 0 1 1 -1h14a1 1 0 0 1 1
|
|
38142
|
+
"d": "M20 6v4a1 1 0 0 1 -1 1h-14a1 1 0 0 1 -1 -1v-4a1 1 0 0 1 1 -1h14a1 1 0 0 1 1 1"
|
|
38111
38143
|
}
|
|
38112
38144
|
],
|
|
38113
38145
|
["path", { "d": "M12 15l0 4" }],
|
|
@@ -38132,7 +38164,7 @@ function Row_insert_top($$anchor, $$props) {
|
|
|
38132
38164
|
[
|
|
38133
38165
|
"path",
|
|
38134
38166
|
{
|
|
38135
|
-
"d": "M4 18v-4a1 1 0 0 1 1 -1h14a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-14a1 1 0 0 1 -1 -
|
|
38167
|
+
"d": "M4 18v-4a1 1 0 0 1 1 -1h14a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-14a1 1 0 0 1 -1 -1"
|
|
38136
38168
|
}
|
|
38137
38169
|
],
|
|
38138
38170
|
["path", { "d": "M12 9v-4" }],
|
|
@@ -38157,7 +38189,7 @@ function Settings($$anchor, $$props) {
|
|
|
38157
38189
|
[
|
|
38158
38190
|
"path",
|
|
38159
38191
|
{
|
|
38160
|
-
"d": "M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.
|
|
38192
|
+
"d": "M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065"
|
|
38161
38193
|
}
|
|
38162
38194
|
],
|
|
38163
38195
|
["path", { "d": "M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0" }]
|
|
@@ -38769,7 +38801,7 @@ function File($$anchor, $$props) {
|
|
|
38769
38801
|
[
|
|
38770
38802
|
"path",
|
|
38771
38803
|
{
|
|
38772
|
-
"d": "M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2
|
|
38804
|
+
"d": "M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2"
|
|
38773
38805
|
}
|
|
38774
38806
|
]
|
|
38775
38807
|
];
|
|
@@ -38793,7 +38825,7 @@ function File_type_doc($$anchor, $$props) {
|
|
|
38793
38825
|
["path", { "d": "M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4" }],
|
|
38794
38826
|
[
|
|
38795
38827
|
"path",
|
|
38796
|
-
{ "d": "M5 15v6h1a2 2 0 0 0 2 -2v-2a2 2 0 0 0 -2 -2h-
|
|
38828
|
+
{ "d": "M5 15v6h1a2 2 0 0 0 2 -2v-2a2 2 0 0 0 -2 -2h-1" }
|
|
38797
38829
|
],
|
|
38798
38830
|
[
|
|
38799
38831
|
"path",
|
|
@@ -38802,7 +38834,7 @@ function File_type_doc($$anchor, $$props) {
|
|
|
38802
38834
|
[
|
|
38803
38835
|
"path",
|
|
38804
38836
|
{
|
|
38805
|
-
"d": "M12.5 15a1.5 1.5 0 0 1 1.5 1.5v3a1.5 1.5 0 0 1 -3 0v-3a1.5 1.5 0 0 1 1.5 -1.
|
|
38837
|
+
"d": "M12.5 15a1.5 1.5 0 0 1 1.5 1.5v3a1.5 1.5 0 0 1 -3 0v-3a1.5 1.5 0 0 1 1.5 -1.5"
|
|
38806
38838
|
}
|
|
38807
38839
|
]
|
|
38808
38840
|
];
|
|
@@ -38829,7 +38861,7 @@ function File_type_pdf($$anchor, $$props) {
|
|
|
38829
38861
|
["path", { "d": "M20 15h-3v6" }],
|
|
38830
38862
|
[
|
|
38831
38863
|
"path",
|
|
38832
|
-
{ "d": "M11 15v6h1a2 2 0 0 0 2 -2v-2a2 2 0 0 0 -2 -2h-
|
|
38864
|
+
{ "d": "M11 15v6h1a2 2 0 0 0 2 -2v-2a2 2 0 0 0 -2 -2h-1" }
|
|
38833
38865
|
]
|
|
38834
38866
|
];
|
|
38835
38867
|
Icon($$anchor, spread_props({ type: "outline", name: "file-type-pdf" }, () => $$sanitized_props, {
|
|
@@ -38903,13 +38935,13 @@ function Headphones($$anchor, $$props) {
|
|
|
38903
38935
|
[
|
|
38904
38936
|
"path",
|
|
38905
38937
|
{
|
|
38906
|
-
"d": "M4
|
|
38938
|
+
"d": "M4 15a2 2 0 0 1 2 -2h1a2 2 0 0 1 2 2v3a2 2 0 0 1 -2 2h-1a2 2 0 0 1 -2 -2l0 -3"
|
|
38907
38939
|
}
|
|
38908
38940
|
],
|
|
38909
38941
|
[
|
|
38910
38942
|
"path",
|
|
38911
38943
|
{
|
|
38912
|
-
"d": "M15
|
|
38944
|
+
"d": "M15 15a2 2 0 0 1 2 -2h1a2 2 0 0 1 2 2v3a2 2 0 0 1 -2 2h-1a2 2 0 0 1 -2 -2l0 -3"
|
|
38913
38945
|
}
|
|
38914
38946
|
],
|
|
38915
38947
|
["path", { "d": "M4 15v-3a8 8 0 0 1 16 0v3" }]
|
|
@@ -38933,13 +38965,13 @@ function Video($$anchor, $$props) {
|
|
|
38933
38965
|
[
|
|
38934
38966
|
"path",
|
|
38935
38967
|
{
|
|
38936
|
-
"d": "M15 10l4.553 -2.276a1 1 0 0 1 1.447 .894v6.764a1 1 0 0 1 -1.447 .894l-4.553 -2.276v-
|
|
38968
|
+
"d": "M15 10l4.553 -2.276a1 1 0 0 1 1.447 .894v6.764a1 1 0 0 1 -1.447 .894l-4.553 -2.276v-4"
|
|
38937
38969
|
}
|
|
38938
38970
|
],
|
|
38939
38971
|
[
|
|
38940
38972
|
"path",
|
|
38941
38973
|
{
|
|
38942
|
-
"d": "M3
|
|
38974
|
+
"d": "M3 8a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2l0 -8"
|
|
38943
38975
|
}
|
|
38944
38976
|
]
|
|
38945
38977
|
];
|