nadesiko3 3.2.51 → 3.3.2
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 +1 -1
- package/bin/cnako3 +1 -1
- package/bin/cnako3.bat +1 -1
- package/demo/browsers.html +9 -10
- package/demo/flow.html +1 -0
- package/demo/turtle3.html +18 -17
- package/demo/turtle3d.html +1 -1
- package/demo/turtle3d2.html +1 -1
- package/doc/browsers.md +9 -10
- package/package.json +58 -57
- package/release/_hash.txt +57 -52
- package/release/_script-tags.txt +14 -13
- package/release/command.json +1 -1
- package/release/command.json.js +1 -1
- package/release/command_cnako3.json +1 -1
- package/release/command_list.json +1 -1
- package/release/editor.js +1 -1
- package/release/editor.js.LICENSE.txt +9 -12
- package/release/nako_gen_async.js +1 -1
- package/release/nako_gen_async.js.LICENSE.txt +10 -666
- package/release/plugin_caniuse.js +1 -1
- package/release/plugin_caniuse.js.LICENSE.txt +9 -425
- package/release/plugin_csv.js +1 -1
- package/release/plugin_csv.js.LICENSE.txt +3 -419
- package/release/plugin_datetime.js +1 -1
- package/release/plugin_datetime.js.LICENSE.txt +6 -530
- package/release/plugin_kansuji.js +1 -1
- package/release/plugin_kansuji.js.LICENSE.txt +3 -559
- package/release/plugin_markup.js +1 -1
- package/release/plugin_markup.js.LICENSE.txt +4 -420
- package/release/plugin_turtle.js +1 -1
- package/release/plugin_turtle.js.LICENSE.txt +12 -500
- package/release/plugin_webworker.js +1 -1
- package/release/plugin_webworker.js.LICENSE.txt +3 -563
- package/release/plugin_weykturtle3d.js +1 -0
- package/release/stats.json +1 -1
- package/release/version.js +1 -1
- package/release/version.js.LICENSE.txt +9 -12
- package/release/wnako3.js +1 -1
- package/release/wnako3.js.LICENSE.txt +1 -1
- package/release/wnako3webworker.js +1 -1
- package/release/wnako3webworker.js.LICENSE.txt +1 -1117
- package/src/browsers.mjs +1 -0
- package/src/browsers.txt +15 -15
- package/src/browsers_agents.mjs +1 -0
- package/src/cnako3.mjs +13 -0
- package/src/{cnako3.js → cnako3mod.mjs} +46 -53
- package/src/{commander_ja.js → commander_ja.mjs} +16 -11
- package/src/{enako3.js → enako3.mjs} +0 -0
- package/src/{era.json → era.mjs} +1 -1
- package/src/image_turtle-elephant.mjs +5 -0
- package/src/image_turtle-panda.mjs +5 -0
- package/src/image_turtle64.mjs +5 -0
- package/src/index.mjs +9 -0
- package/src/{nako3.js → nako3.mjs} +56 -52
- package/src/{nako3_assert.js → nako3_assert.mjs} +7 -6
- package/src/{nako3server.js → nako3server.mjs} +12 -5
- package/src/{nako_colors.js → nako_colors.mjs} +1 -1
- package/src/{nako_errors.js → nako_errors.mjs} +8 -18
- package/src/{nako_from_dncl.js → nako_from_dncl.mjs} +8 -6
- package/src/{nako_gen.js → nako_gen.mjs} +107 -89
- package/src/{nako_gen_async.js → nako_gen_async.mjs} +5 -8
- package/src/{nako_global.js → nako_global.mjs} +4 -5
- package/src/{nako_indent.js → nako_indent.mjs} +4 -4
- package/src/{nako_josi_list.js → nako_josi_list.mjs} +16 -14
- package/src/nako_lex_rules.mjs +244 -0
- package/src/{nako_lexer.js → nako_lexer.mjs} +7 -10
- package/src/{nako_logger.js → nako_logger.mjs} +3 -4
- package/src/{nako_parser3.js → nako_parser3.mjs} +5 -5
- package/src/{nako_parser_base.js → nako_parser_base.mjs} +1 -9
- package/src/{nako_parser_const.js → nako_parser_const.mjs} +2 -6
- package/src/{nako_prepare.js → nako_prepare.mjs} +1 -2
- package/src/{nako_reserved_words.js → nako_reserved_words.mjs} +1 -1
- package/src/{nako_source_mapping.js → nako_source_mapping.mjs} +4 -11
- package/src/{nako_test.js → nako_test.mjs} +0 -0
- package/src/nako_version.mjs +7 -0
- package/src/{plugin_browser.js → plugin_browser.mjs} +30 -30
- package/src/{plugin_browser_ajax.js → plugin_browser_ajax.mjs} +7 -7
- package/src/{plugin_browser_audio.js → plugin_browser_audio.mjs} +1 -1
- package/src/{plugin_browser_canvas.js → plugin_browser_canvas.mjs} +1 -1
- package/src/{plugin_browser_chart.js → plugin_browser_chart.mjs} +1 -1
- package/src/{plugin_browser_color.js → plugin_browser_color.mjs} +1 -1
- package/src/{plugin_browser_crypto.js → plugin_browser_crypto.mjs} +1 -1
- package/src/{plugin_browser_dialog.js → plugin_browser_dialog.mjs} +1 -1
- package/src/{plugin_browser_dom_basic.js → plugin_browser_dom_basic.mjs} +1 -1
- package/src/{plugin_browser_dom_event.js → plugin_browser_dom_event.mjs} +1 -1
- package/src/{plugin_browser_dom_parts.js → plugin_browser_dom_parts.mjs} +1 -1
- package/src/{plugin_browser_geolocation.js → plugin_browser_geolocation.mjs} +1 -1
- package/src/{plugin_browser_hotkey.js → plugin_browser_hotkey.mjs} +2 -2
- package/src/{plugin_browser_html.js → plugin_browser_html.mjs} +1 -1
- package/src/{plugin_browser_in_worker.js → plugin_browser_in_worker.mjs} +4 -4
- package/src/{plugin_browser_location.js → plugin_browser_location.mjs} +1 -1
- package/src/{plugin_browser_speech.js → plugin_browser_speech.mjs} +1 -1
- package/src/{plugin_browser_storage.js → plugin_browser_storage.mjs} +1 -1
- package/src/{plugin_browser_system.js → plugin_browser_system.mjs} +1 -1
- package/src/{plugin_browser_websocket.js → plugin_browser_websocket.mjs} +1 -1
- package/src/{plugin_caniuse.js → plugin_caniuse.mjs} +8 -3
- package/src/{plugin_csv.js → plugin_csv.mjs} +4 -5
- package/src/{plugin_datetime.js → plugin_datetime.mjs} +19 -26
- package/src/{plugin_express.js → plugin_express.mjs} +4 -3
- package/src/{plugin_kansuji.js → plugin_kansuji.mjs} +1 -1
- package/src/{plugin_keigo.js → plugin_keigo.mjs} +0 -0
- package/src/{plugin_markup.js → plugin_markup.mjs} +6 -6
- package/src/{plugin_math.js → plugin_math.mjs} +1 -4
- package/src/{plugin_node.js → plugin_node.mjs} +25 -57
- package/src/{plugin_promise.js → plugin_promise.mjs} +1 -3
- package/src/{plugin_system.js → plugin_system.mjs} +32 -15
- package/src/{plugin_test.js → plugin_test.mjs} +1 -3
- package/src/{plugin_turtle.js → plugin_turtle.mjs} +5 -4
- package/src/{plugin_webworker.js → plugin_webworker.mjs} +3 -3
- package/src/{plugin_weykturtle3d.js → plugin_weykturtle3d.mjs} +1 -3
- package/src/{plugin_worker.js → plugin_worker.mjs} +4 -1
- package/src/{wnako3.js → wnako3.mjs} +5 -5
- package/src/{wnako3_editor.js → wnako3_editor.mjs} +24 -18
- package/src/{wnako3webworker.js → wnako3webworker.mjs} +0 -0
- package/test/async/{async_basic_test.js → async_basic_test.mjs} +3 -4
- package/test/browser/karma.config.js +9 -0
- package/test/browser/test/plugin_browser_test.js +2 -2
- package/test/browser/test/plugin_turtle_test.js +2 -2
- package/test/browser/test/plugin_webworker_test.js +3 -3
- package/test/browser/test/require_test.js +2 -2
- package/test/common/{array_test.js → array_test.mjs} +3 -3
- package/test/common/{basic_test.js → basic_test.mjs} +3 -13
- package/test/common/{calc_test.js → calc_test.mjs} +2 -2
- package/test/common/{debug_test.js → debug_test.mjs} +2 -2
- package/test/common/{dncl_test.js → dncl_test.mjs} +3 -3
- package/test/common/{error_test.js → error_test.mjs} +2 -2
- package/test/common/{flow_test.js → flow_test.mjs} +2 -2
- package/test/common/{func_call.js → func_call.mjs} +3 -3
- package/test/common/{func_test.js → func_test.mjs} +2 -2
- package/test/common/{indent_test.js → indent_test.mjs} +3 -2
- package/test/common/{lex_test.js → lex_test.mjs} +2 -2
- package/test/common/{literal_test.js → literal_test.mjs} +3 -2
- package/test/common/{nako_logger_test.js → nako_logger_test.mjs} +3 -3
- package/test/common/{plugin_browser_test.js → plugin_browser_test.mjs} +4 -4
- package/test/common/{plugin_browser_ut_audio_test.js → plugin_browser_ut_audio_test.mjs} +4 -4
- package/test/common/{plugin_browser_ut_color_test.js → plugin_browser_ut_color_test.mjs} +2 -2
- package/test/common/{plugin_browser_ut_dialog_test.js → plugin_browser_ut_dialog_test.mjs} +3 -3
- package/test/common/{plugin_browser_ut_html_test.js → plugin_browser_ut_html_test.mjs} +2 -2
- package/test/common/{plugin_browser_ut_system_test.js → plugin_browser_ut_system_test.mjs} +2 -2
- package/test/common/{plugin_csv_test.js → plugin_csv_test.mjs} +3 -3
- package/test/common/{plugin_datetime_test.js → plugin_datetime_test.mjs} +4 -4
- package/test/common/{plugin_kansuji_test.js → plugin_kansuji_test.mjs} +3 -3
- package/test/common/{plugin_markup_test.js → plugin_markup_test.mjs} +3 -3
- package/test/common/{plugin_promise_test.js → plugin_promise_test.mjs} +2 -2
- package/test/common/{plugin_system_test.js → plugin_system_test.mjs} +2 -2
- package/test/common/{prepare_test.js → prepare_test.mjs} +2 -2
- package/test/common/{re_test.js → re_test.mjs} +2 -2
- package/test/common/{variable_scope_test.js → variable_scope_test.mjs} +2 -2
- package/test/karma.config.js +3 -3
- package/test/node/{async_test.js → async_test.mjs} +4 -2
- package/test/node/{commander_ja_test.js → commander_ja_test.mjs} +17 -12
- package/test/node/{error_message_test.js → error_message_test.mjs} +13 -10
- package/test/node/node_test.mjs +57 -0
- package/test/node/{plugin_browser_ut_ajax_test.js → plugin_browser_ut_ajax_test.mjs} +7 -5
- package/test/node/{plugin_browser_ut_location_test.js → plugin_browser_ut_location_test.mjs} +3 -3
- package/test/node/{plugin_markup_test.js → plugin_markup_test.mjs} +6 -7
- package/test/node/{plugin_math_test.js → plugin_math_test.mjs} +5 -5
- package/test/node/{plugin_node_test.js → plugin_node_test.mjs} +11 -7
- package/test/node/{plugin_test.js → plugin_test.mjs} +11 -5
- package/test/node/{require_nako3_test.js → require_nako3_test.mjs} +19 -12
- package/test/node/{side_effects_test.js → side_effects_test.mjs} +24 -13
- package/test/node/{wnako3_editor_test.js → wnako3_editor_test.mjs} +16 -9
- package/tools/nako3edit/index.nako3 +1 -1
- package/tools/nako3edit/{run.js → run.mjs} +8 -2
- package/src/index.js +0 -5
- package/src/nako_lex_rules.js +0 -260
- package/src/nako_version.js +0 -8
- package/test/node/node_test.js +0 -43
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
2
|
// plugin_browser_in_worker.js
|
|
3
3
|
|
|
4
|
-
const PartBrowserColor = require('./plugin_browser_color.
|
|
5
|
-
const PartBrowserAjax = require('./plugin_browser_ajax.
|
|
6
|
-
const PartBrowserHtml = require('./plugin_browser_html.
|
|
7
|
-
const PartBrowserWebsocket = require('./plugin_browser_websocket.
|
|
4
|
+
const PartBrowserColor = require('./plugin_browser_color.mjs')
|
|
5
|
+
const PartBrowserAjax = require('./plugin_browser_ajax.mjs')
|
|
6
|
+
const PartBrowserHtml = require('./plugin_browser_html.mjs')
|
|
7
|
+
const PartBrowserWebsocket = require('./plugin_browser_websocket.mjs')
|
|
8
8
|
|
|
9
9
|
const BrowserParts = [
|
|
10
10
|
PartBrowserColor,
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
2
|
// (memo) require('caniuse-db/data.json').agents を確認
|
|
3
|
+
// `npm run build:browsers` を実行すると browsers.mjs が生成される
|
|
4
|
+
|
|
5
|
+
import browsers from './browsers.mjs'
|
|
6
|
+
import agents from './browsers_agents.mjs'
|
|
7
|
+
|
|
3
8
|
const PluginCaniuse = {
|
|
4
9
|
'初期化': {
|
|
5
10
|
type: 'func',
|
|
@@ -9,16 +14,16 @@ const PluginCaniuse = {
|
|
|
9
14
|
}
|
|
10
15
|
},
|
|
11
16
|
// @ブラウザサポート
|
|
12
|
-
'ブラウザ名変換表': { type: 'const', value:
|
|
17
|
+
'ブラウザ名変換表': { type: 'const', value: agents }, // @ぶらうざめいへんかんひょう
|
|
13
18
|
'対応ブラウザ一覧取得': { // @対応しているブラウザの一覧を取得する // @たいおうぶらうざいちらんしゅとく
|
|
14
19
|
type: 'func',
|
|
15
20
|
josi: [],
|
|
16
21
|
fn: function () {
|
|
17
|
-
return
|
|
22
|
+
return browsers
|
|
18
23
|
}
|
|
19
24
|
}
|
|
20
25
|
}
|
|
21
|
-
|
|
26
|
+
export default PluginCaniuse
|
|
22
27
|
// scriptタグで取り込んだ時、自動で登録する
|
|
23
28
|
/* istanbul ignore else */
|
|
24
29
|
if (typeof (navigator) === 'object' && typeof (navigator.nako3)) { navigator.nako3.addPluginObject('PluginCaniuse', PluginCaniuse) }
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
|
+
|
|
3
|
+
import CSV from 'csv-lite-js'
|
|
4
|
+
|
|
2
5
|
const PluginCSV = {
|
|
3
6
|
'初期化': {
|
|
4
7
|
type: 'func',
|
|
@@ -13,7 +16,6 @@ const PluginCSV = {
|
|
|
13
16
|
josi: [['を', 'の', 'で']],
|
|
14
17
|
pure: true,
|
|
15
18
|
fn: function (str) {
|
|
16
|
-
const CSV = require('csv-lite-js')
|
|
17
19
|
CSV.options.delimiter = ','
|
|
18
20
|
return CSV.parse(str)
|
|
19
21
|
}
|
|
@@ -23,7 +25,6 @@ const PluginCSV = {
|
|
|
23
25
|
josi: [['を', 'の', 'で']],
|
|
24
26
|
pure: true,
|
|
25
27
|
fn: function (str) {
|
|
26
|
-
const CSV = require('csv-lite-js')
|
|
27
28
|
CSV.options.delimiter = '\t'
|
|
28
29
|
return CSV.parse(str)
|
|
29
30
|
}
|
|
@@ -33,7 +34,6 @@ const PluginCSV = {
|
|
|
33
34
|
josi: [['を']],
|
|
34
35
|
pure: true,
|
|
35
36
|
fn: function (a) {
|
|
36
|
-
const CSV = require('csv-lite-js')
|
|
37
37
|
CSV.options.delimiter = ','
|
|
38
38
|
return CSV.stringify(a)
|
|
39
39
|
}
|
|
@@ -43,14 +43,13 @@ const PluginCSV = {
|
|
|
43
43
|
josi: [['を']],
|
|
44
44
|
pure: true,
|
|
45
45
|
fn: function (a) {
|
|
46
|
-
const CSV = require('csv-lite-js')
|
|
47
46
|
CSV.options.delimiter = '\t'
|
|
48
47
|
return CSV.stringify(a)
|
|
49
48
|
}
|
|
50
49
|
}
|
|
51
50
|
}
|
|
51
|
+
export default PluginCSV
|
|
52
52
|
|
|
53
|
-
module.exports = PluginCSV
|
|
54
53
|
// scriptタグで取り込んだ時、自動で登録する
|
|
55
54
|
if (typeof (navigator) === 'object' && typeof (navigator.nako3) === 'object') {
|
|
56
55
|
navigator.nako3.addPluginObject('PluginCSV', PluginCSV)
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
2
|
// file: plugin_datetime.js
|
|
3
|
+
import dayjs from 'dayjs'
|
|
4
|
+
import _ja from 'dayjs/locale/ja.js'
|
|
5
|
+
|
|
6
|
+
import era from './era.mjs'
|
|
7
|
+
|
|
3
8
|
const PluginDateTime = {
|
|
4
9
|
'初期化': {
|
|
5
10
|
type: 'func',
|
|
@@ -9,13 +14,12 @@ const PluginDateTime = {
|
|
|
9
14
|
}
|
|
10
15
|
},
|
|
11
16
|
// @日時処理
|
|
12
|
-
'元号データ': { type: 'const', value:
|
|
17
|
+
'元号データ': { type: 'const', value: era }, // @げんごうでーた
|
|
13
18
|
'今': { // @現在時刻を「HH:mm:ss」の形式で返す // @いま
|
|
14
19
|
type: 'func',
|
|
15
20
|
josi: [],
|
|
16
21
|
pure: true,
|
|
17
22
|
fn: function () {
|
|
18
|
-
const dayjs = require('dayjs')
|
|
19
23
|
return dayjs().format('HH:mm:ss')
|
|
20
24
|
}
|
|
21
25
|
},
|
|
@@ -24,7 +28,6 @@ const PluginDateTime = {
|
|
|
24
28
|
josi: [],
|
|
25
29
|
pure: true,
|
|
26
30
|
fn: function () {
|
|
27
|
-
const dayjs = require('dayjs')
|
|
28
31
|
return dayjs().unix()
|
|
29
32
|
}
|
|
30
33
|
},
|
|
@@ -33,7 +36,6 @@ const PluginDateTime = {
|
|
|
33
36
|
josi: [],
|
|
34
37
|
pure: true,
|
|
35
38
|
fn: function () {
|
|
36
|
-
const dayjs = require('dayjs')
|
|
37
39
|
return dayjs().format('YYYY/MM/DD')
|
|
38
40
|
}
|
|
39
41
|
},
|
|
@@ -42,7 +44,6 @@ const PluginDateTime = {
|
|
|
42
44
|
josi: [],
|
|
43
45
|
pure: true,
|
|
44
46
|
fn: function () {
|
|
45
|
-
const dayjs = require('dayjs')
|
|
46
47
|
return dayjs().add(1, 'days').format('YYYY/MM/DD')
|
|
47
48
|
}
|
|
48
49
|
},
|
|
@@ -51,7 +52,6 @@ const PluginDateTime = {
|
|
|
51
52
|
josi: [],
|
|
52
53
|
pure: true,
|
|
53
54
|
fn: function () {
|
|
54
|
-
const dayjs = require('dayjs')
|
|
55
55
|
return dayjs().subtract(1, 'days').format('YYYY/MM/DD')
|
|
56
56
|
}
|
|
57
57
|
},
|
|
@@ -60,7 +60,6 @@ const PluginDateTime = {
|
|
|
60
60
|
josi: [],
|
|
61
61
|
pure: true,
|
|
62
62
|
fn: function () {
|
|
63
|
-
const dayjs = require('dayjs')
|
|
64
63
|
return dayjs().year()
|
|
65
64
|
}
|
|
66
65
|
},
|
|
@@ -69,7 +68,7 @@ const PluginDateTime = {
|
|
|
69
68
|
josi: [],
|
|
70
69
|
pure: true,
|
|
71
70
|
fn: function () {
|
|
72
|
-
|
|
71
|
+
|
|
73
72
|
return dayjs().add(1, 'years').year()
|
|
74
73
|
}
|
|
75
74
|
},
|
|
@@ -78,7 +77,7 @@ const PluginDateTime = {
|
|
|
78
77
|
josi: [],
|
|
79
78
|
pure: true,
|
|
80
79
|
fn: function () {
|
|
81
|
-
|
|
80
|
+
|
|
82
81
|
return dayjs().subtract(1, 'years').year()
|
|
83
82
|
}
|
|
84
83
|
},
|
|
@@ -87,7 +86,7 @@ const PluginDateTime = {
|
|
|
87
86
|
josi: [],
|
|
88
87
|
pure: true,
|
|
89
88
|
fn: function () {
|
|
90
|
-
|
|
89
|
+
|
|
91
90
|
return dayjs().month() + 1
|
|
92
91
|
}
|
|
93
92
|
},
|
|
@@ -96,7 +95,7 @@ const PluginDateTime = {
|
|
|
96
95
|
josi: [],
|
|
97
96
|
pure: true,
|
|
98
97
|
fn: function () {
|
|
99
|
-
|
|
98
|
+
|
|
100
99
|
return dayjs().add(1, 'months').month() + 1
|
|
101
100
|
}
|
|
102
101
|
},
|
|
@@ -105,7 +104,7 @@ const PluginDateTime = {
|
|
|
105
104
|
josi: [],
|
|
106
105
|
pure: true,
|
|
107
106
|
fn: function () {
|
|
108
|
-
|
|
107
|
+
|
|
109
108
|
return dayjs().subtract(1, 'months').month() + 1
|
|
110
109
|
}
|
|
111
110
|
},
|
|
@@ -114,8 +113,6 @@ const PluginDateTime = {
|
|
|
114
113
|
josi: [['の']],
|
|
115
114
|
pure: true,
|
|
116
115
|
fn: function (s) {
|
|
117
|
-
const dayjs = require('dayjs')
|
|
118
|
-
require('dayjs/locale/ja')
|
|
119
116
|
return dayjs(s, 'YYYY/MM/DD').locale('ja').format('ddd')
|
|
120
117
|
}
|
|
121
118
|
},
|
|
@@ -124,11 +121,7 @@ const PluginDateTime = {
|
|
|
124
121
|
josi: [['の']],
|
|
125
122
|
pure: true,
|
|
126
123
|
fn: function (s) {
|
|
127
|
-
const dayjs = require('dayjs')
|
|
128
|
-
require('dayjs/locale/ja')
|
|
129
|
-
|
|
130
124
|
let t = dayjs(s, 'YYYY/MM/DD')
|
|
131
|
-
|
|
132
125
|
if (!t.isValid()) {
|
|
133
126
|
t = dayjs()
|
|
134
127
|
}
|
|
@@ -149,7 +142,7 @@ const PluginDateTime = {
|
|
|
149
142
|
josi: [['の', 'を', 'から']],
|
|
150
143
|
pure: true,
|
|
151
144
|
fn: function (s) {
|
|
152
|
-
|
|
145
|
+
|
|
153
146
|
return dayjs(s, 'YYYY/MM/DD HH:mm:ss').unix()
|
|
154
147
|
}
|
|
155
148
|
},
|
|
@@ -158,7 +151,7 @@ const PluginDateTime = {
|
|
|
158
151
|
josi: [['を', 'から']],
|
|
159
152
|
pure: true,
|
|
160
153
|
fn: function (tm) {
|
|
161
|
-
|
|
154
|
+
|
|
162
155
|
return dayjs.unix(tm).format('YYYY/MM/DD HH:mm:ss')
|
|
163
156
|
}
|
|
164
157
|
},
|
|
@@ -167,7 +160,7 @@ const PluginDateTime = {
|
|
|
167
160
|
josi: [['を']],
|
|
168
161
|
pure: true,
|
|
169
162
|
fn: function (s, sys) {
|
|
170
|
-
|
|
163
|
+
|
|
171
164
|
const date = dayjs(s, 'YYYY/MM/DD')
|
|
172
165
|
|
|
173
166
|
for (const era of sys.__v0['元号データ']) {
|
|
@@ -215,7 +208,7 @@ const PluginDateTime = {
|
|
|
215
208
|
josi: [['と', 'から'], ['の', 'までの'], ['による']],
|
|
216
209
|
pure: true,
|
|
217
210
|
fn: function (a, b, unit) {
|
|
218
|
-
|
|
211
|
+
|
|
219
212
|
|
|
220
213
|
switch (unit) {
|
|
221
214
|
case '年':
|
|
@@ -339,10 +332,7 @@ const PluginDateTime = {
|
|
|
339
332
|
josi: [['に'], ['を']],
|
|
340
333
|
pure: true,
|
|
341
334
|
fn: function (s, a) {
|
|
342
|
-
const dayjs = require('dayjs')
|
|
343
|
-
|
|
344
335
|
let unit
|
|
345
|
-
|
|
346
336
|
switch (a.match(/(年|ヶ月|日|時間|分|秒)$/)[0]) {
|
|
347
337
|
case '年':
|
|
348
338
|
unit = 'years'
|
|
@@ -408,7 +398,10 @@ const PluginDateTime = {
|
|
|
408
398
|
}
|
|
409
399
|
}
|
|
410
400
|
|
|
411
|
-
|
|
401
|
+
export default PluginDateTime
|
|
402
|
+
|
|
412
403
|
// scriptタグで取り込んだ時、自動で登録する
|
|
413
404
|
/* istanbul ignore else */
|
|
414
405
|
if (typeof (navigator) === 'object' && typeof (navigator.nako3) === 'object') { navigator.nako3.addPluginObject('PluginDateTime', PluginDateTime) }
|
|
406
|
+
|
|
407
|
+
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* file: plugin_express.js
|
|
4
4
|
* Webサーバのためのプラグイン (expressをラップしたもの)
|
|
5
5
|
*/
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
import express from 'express'
|
|
7
|
+
import bodyParser from 'body-parser'
|
|
8
8
|
|
|
9
9
|
// 定数・変数
|
|
10
10
|
let WEBSERVER_NAME = 'WEBサーバ(なでしこ+Express)'
|
|
@@ -209,4 +209,5 @@ function callbackServerFunc (callback, req, res, sys) {
|
|
|
209
209
|
callback(req, res)
|
|
210
210
|
}
|
|
211
211
|
|
|
212
|
-
module.exports = PluginExpress
|
|
212
|
+
// module.exports = PluginExpress
|
|
213
|
+
export default PluginExpress
|
|
@@ -218,7 +218,7 @@ const 軸数字 = [
|
|
|
218
218
|
const 基本算用数字 = '0123456789'.split('')
|
|
219
219
|
const 基本漢数字 = '〇一二三四五六七八九'.split('')
|
|
220
220
|
|
|
221
|
-
|
|
221
|
+
export default PluginKansuji
|
|
222
222
|
|
|
223
223
|
// scriptタグで取り込んだ時、自動で登録する
|
|
224
224
|
if (typeof (navigator) === 'object' && typeof (navigator.nako3) === 'object') { navigator.nako3.addPluginObject('PluginKansuji', PluginKansuji) }
|
|
File without changes
|
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
* file: plugin_markup.js
|
|
4
4
|
* マークアップ言語関連のプラグイン
|
|
5
5
|
*/
|
|
6
|
+
|
|
7
|
+
import { parse as parseMD } from 'marked'
|
|
8
|
+
import html from 'html'
|
|
9
|
+
|
|
6
10
|
const PluginMarkup = {
|
|
7
11
|
// @マークアップ
|
|
8
12
|
'マークダウンHTML変換': { // @マークダウン形式で記述された文字列SをHTML形式に変換する // @まーくだうんHTMLへんかん
|
|
@@ -10,8 +14,7 @@ const PluginMarkup = {
|
|
|
10
14
|
josi: [['を']],
|
|
11
15
|
pure: true,
|
|
12
16
|
fn: function (s) {
|
|
13
|
-
const
|
|
14
|
-
const html = marked.parse(s)
|
|
17
|
+
const html = parseMD(s)
|
|
15
18
|
return html
|
|
16
19
|
}
|
|
17
20
|
},
|
|
@@ -20,13 +23,10 @@ const PluginMarkup = {
|
|
|
20
23
|
josi: [['を']],
|
|
21
24
|
pure: true,
|
|
22
25
|
fn: function (s) {
|
|
23
|
-
const html = require('html')
|
|
24
26
|
return html.prettyPrint(s, { indent_size: 2 })
|
|
25
27
|
}
|
|
26
28
|
}
|
|
27
29
|
}
|
|
28
|
-
|
|
29
|
-
module.exports = PluginMarkup
|
|
30
|
-
|
|
30
|
+
export default PluginMarkup
|
|
31
31
|
// scriptタグで取り込んだ時、自動で登録する
|
|
32
32
|
if (typeof (navigator) === 'object') { navigator.nako3.addPluginObject('PluginMarkup', PluginMarkup) }
|