nadesiko3 3.7.13 → 3.7.14

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 (127) hide show
  1. package/batch/command.txt +473 -473
  2. package/batch/jsplugin2text.nako3 +2 -0
  3. package/core/package.json +1 -1
  4. package/core/src/nako3.mjs +0 -4
  5. package/core/src/nako3.mts +55 -55
  6. package/core/src/nako_ast.mjs +0 -1
  7. package/core/src/nako_ast.mts +1 -1
  8. package/core/src/nako_colors.mjs +0 -1
  9. package/core/src/nako_colors.mts +1 -1
  10. package/core/src/nako_core_version.mjs +2 -2
  11. package/core/src/nako_core_version.mts +2 -2
  12. package/core/src/nako_csv.mjs +0 -1
  13. package/core/src/nako_csv.mts +9 -9
  14. package/core/src/nako_errors.mts +8 -8
  15. package/core/src/nako_from_dncl.mts +5 -5
  16. package/core/src/nako_from_dncl2.mjs +0 -1
  17. package/core/src/nako_from_dncl2.mts +5 -5
  18. package/core/src/nako_gen.mjs +13 -15
  19. package/core/src/nako_gen.mts +224 -220
  20. package/core/src/nako_global.mts +11 -11
  21. package/core/src/nako_indent.mts +92 -92
  22. package/core/src/nako_indent_chars.mts +1 -1
  23. package/core/src/nako_indent_inline.mjs +11 -11
  24. package/core/src/nako_indent_inline.mts +20 -20
  25. package/core/src/nako_lex_rules.mjs +0 -1
  26. package/core/src/nako_lex_rules.mts +8 -8
  27. package/core/src/nako_lexer.mjs +0 -1
  28. package/core/src/nako_lexer.mts +23 -23
  29. package/core/src/nako_logger.mjs +1 -1
  30. package/core/src/nako_logger.mts +38 -38
  31. package/core/src/nako_parser3.mjs +4 -5
  32. package/core/src/nako_parser3.mts +79 -79
  33. package/core/src/nako_parser_base.mjs +1 -1
  34. package/core/src/nako_parser_base.mts +68 -68
  35. package/core/src/nako_parser_const.mjs +0 -1
  36. package/core/src/nako_parser_const.mts +1 -1
  37. package/core/src/nako_prepare.mts +12 -12
  38. package/core/src/nako_source_mapping.mts +9 -9
  39. package/core/src/nako_token.mjs +0 -1
  40. package/core/src/nako_token.mts +2 -2
  41. package/core/src/nako_tools.mjs +0 -1
  42. package/core/src/nako_tools.mts +4 -4
  43. package/core/src/nako_types.mjs +0 -1
  44. package/core/src/nako_types.mts +3 -3
  45. package/core/src/plugin_api.mjs +0 -1
  46. package/core/src/plugin_api.mts +1 -1
  47. package/core/src/plugin_csv.mjs +0 -1
  48. package/core/src/plugin_csv.mts +7 -7
  49. package/core/src/plugin_math.mjs +0 -1
  50. package/core/src/plugin_math.mts +39 -40
  51. package/core/src/plugin_promise.mjs +1 -1
  52. package/core/src/plugin_promise.mts +9 -9
  53. package/core/src/plugin_system.mjs +1 -10
  54. package/core/src/plugin_system.mts +319 -321
  55. package/core/src/plugin_test.mjs +0 -2
  56. package/core/src/plugin_test.mts +6 -6
  57. package/core/src/plugin_toml.mjs +1 -1
  58. package/core/src/plugin_toml.mts +4 -4
  59. package/core/test/flow_test.mjs +22 -0
  60. package/package.json +31 -34
  61. package/release/_hash.txt +24 -24
  62. package/release/_script-tags.txt +16 -16
  63. package/release/command_cnako3.json +1 -1
  64. package/release/edit_main.js +33 -21
  65. package/release/edit_main.js.map +4 -4
  66. package/release/editor.js +33 -21
  67. package/release/plugin_keigo.js.map +2 -2
  68. package/release/plugin_turtle.js.map +2 -2
  69. package/release/plugin_weykturtle3d.js.map +2 -2
  70. package/release/version.js +29 -17
  71. package/release/version_main.js +29 -17
  72. package/release/version_main.js.map +4 -4
  73. package/release/wnako3.js +51 -44
  74. package/release/wnako3.js.map +3 -3
  75. package/release/wnako3webworker.js +45 -38
  76. package/release/wnako3webworker.js.map +2 -2
  77. package/src/cnako3.mts +1 -1
  78. package/src/cnako3mod.mjs +4 -7
  79. package/src/cnako3mod.mts +24 -24
  80. package/src/commander_ja.mts +8 -8
  81. package/src/deno_wrapper.mjs +0 -1
  82. package/src/deno_wrapper.mts +5 -5
  83. package/src/nako_version.mjs +2 -2
  84. package/src/nako_version.mts +2 -2
  85. package/src/plugin_browser.mjs +21 -29
  86. package/src/plugin_browser.mts +30 -35
  87. package/src/plugin_browser_ajax.mts +27 -27
  88. package/src/plugin_browser_audio.mjs +0 -1
  89. package/src/plugin_browser_audio.mts +11 -11
  90. package/src/plugin_browser_camera.mts +8 -8
  91. package/src/plugin_browser_canvas.mjs +0 -2
  92. package/src/plugin_browser_canvas.mts +34 -34
  93. package/src/plugin_browser_chart.mjs +0 -1
  94. package/src/plugin_browser_chart.mts +13 -13
  95. package/src/plugin_browser_color.mts +2 -2
  96. package/src/plugin_browser_crypto.mts +5 -5
  97. package/src/plugin_browser_dialog.mts +4 -4
  98. package/src/plugin_browser_dom_basic.mts +42 -42
  99. package/src/plugin_browser_dom_event.mjs +0 -1
  100. package/src/plugin_browser_dom_event.mts +27 -28
  101. package/src/plugin_browser_dom_parts.mjs +0 -2
  102. package/src/plugin_browser_dom_parts.mts +31 -31
  103. package/src/plugin_browser_geolocation.mts +3 -3
  104. package/src/plugin_browser_hotkey.mts +3 -3
  105. package/src/plugin_browser_html.mts +4 -4
  106. package/src/plugin_browser_in_worker.mts +1 -1
  107. package/src/plugin_browser_location.mts +2 -2
  108. package/src/plugin_browser_speech.mts +7 -7
  109. package/src/plugin_browser_storage.mts +11 -11
  110. package/src/plugin_browser_system.mts +2 -2
  111. package/src/plugin_browser_websocket.mts +6 -6
  112. package/src/plugin_httpserver.mts +17 -17
  113. package/src/plugin_keigo.mts +5 -5
  114. package/src/plugin_node.mjs +7 -48
  115. package/src/plugin_node.mts +114 -145
  116. package/src/plugin_turtle.mts +143 -143
  117. package/src/plugin_weykturtle3d.mjs +0 -3
  118. package/src/plugin_weykturtle3d.mts +135 -135
  119. package/src/plugin_weykturtle3d_three.mjs +0 -1
  120. package/src/plugin_weykturtle3d_three.mts +1 -1
  121. package/src/plugin_weykturtle3d_threeutil.mts +3 -3
  122. package/src/wnako3.mjs +0 -1
  123. package/src/wnako3.mts +1 -1
  124. package/src/wnako3_editor.mjs +0 -2
  125. package/src/wnako3_editor.mts +132 -132
  126. package/src/wnako3mod.mjs +0 -5
  127. package/src/wnako3mod.mts +19 -19
@@ -1,4 +1,4 @@
1
- /* eslint-disable @typescript-eslint/no-explicit-any */
1
+
2
2
  export default {
3
3
  // @DOM部品操作
4
4
  'DOM親要素': { type: 'const', value: '' }, // @DOMおやようそ
@@ -8,7 +8,7 @@ export default {
8
8
  type: 'func',
9
9
  josi: [['に', 'へ']],
10
10
  pure: true,
11
- fn: function (el: any, sys: any) {
11
+ fn: function(el: any, sys: any) {
12
12
  if (typeof el === 'string') { el = document.querySelector(el) || document.getElementById(el) }
13
13
  sys.__setSysVar('DOM親要素', el)
14
14
  sys.__addPropMethod(el)
@@ -19,7 +19,7 @@ export default {
19
19
  type: 'func',
20
20
  josi: [['に', 'へ']],
21
21
  pure: true,
22
- fn: function (el: any, sys: any) {
22
+ fn: function(el: any, sys: any) {
23
23
  return sys.__exec('DOM親要素設定', [el, sys])
24
24
  }
25
25
  },
@@ -29,7 +29,7 @@ export default {
29
29
  type: 'func',
30
30
  josi: [['を', 'に', 'の']],
31
31
  pure: true,
32
- fn: function (skin: any, sys: any) {
32
+ fn: function(skin: any, sys: any) {
33
33
  sys.__setSysVar('DOMスキン', skin)
34
34
  },
35
35
 
@@ -39,7 +39,7 @@ export default {
39
39
  type: 'func',
40
40
  josi: [['の']],
41
41
  pure: true,
42
- fn: function (elm: any, sys: any) {
42
+ fn: function(elm: any, sys: any) {
43
43
  const parent = sys.__getSysVar('DOM親要素')
44
44
  const btn = (typeof (elm) === 'string') ? document.createElement(elm) : elm
45
45
  btn.id = 'nadesi-dom-' + sys.__getSysVar('DOM部品個数')
@@ -64,7 +64,7 @@ export default {
64
64
  type: 'func',
65
65
  josi: [['の', 'を']],
66
66
  pure: true,
67
- fn: function (elm: any) {
67
+ fn: function(elm: any) {
68
68
  if (typeof elm === 'string') { elm = document.querySelector(elm) }
69
69
  if (elm) { elm.parentNode.removeChild(elm) }
70
70
  },
@@ -74,7 +74,7 @@ export default {
74
74
  type: 'func',
75
75
  josi: [['の']],
76
76
  pure: true,
77
- fn: function (label: any, sys: any) {
77
+ fn: function(label: any, sys: any) {
78
78
  const btn = sys.__exec('DOM部品作成', ['button', sys])
79
79
  btn.innerHTML = label
80
80
  return btn
@@ -84,7 +84,7 @@ export default {
84
84
  type: 'func',
85
85
  josi: [['の']],
86
86
  pure: true,
87
- fn: function (text: any, sys: any) {
87
+ fn: function(text: any, sys: any) {
88
88
  const inp = sys.__exec('DOM部品作成', ['input', sys])
89
89
  inp.type = 'text'
90
90
  inp.value = text
@@ -95,7 +95,7 @@ export default {
95
95
  type: 'func',
96
96
  josi: [['の']],
97
97
  pure: true,
98
- fn: function (text: any, sys: any) {
98
+ fn: function(text: any, sys: any) {
99
99
  const te = sys.__exec('DOM部品作成', ['textarea', sys])
100
100
  te.value = text
101
101
  return te
@@ -105,7 +105,7 @@ export default {
105
105
  type: 'func',
106
106
  josi: [['の']],
107
107
  pure: true,
108
- fn: function (text: any, sys: any) {
108
+ fn: function(text: any, sys: any) {
109
109
  const lbl = sys.__exec('DOM部品作成', ['span', sys])
110
110
  lbl.innerHTML = text
111
111
  return lbl
@@ -115,7 +115,7 @@ export default {
115
115
  type: 'func',
116
116
  josi: [['の']],
117
117
  pure: true,
118
- fn: function (size: any, sys: any) {
118
+ fn: function(size: any, sys: any) {
119
119
  const cv = sys.__exec('DOM部品作成', ['canvas', sys])
120
120
  cv.width = size[0]
121
121
  cv.height = size[1]
@@ -130,7 +130,7 @@ export default {
130
130
  type: 'func',
131
131
  josi: [['の', 'から']],
132
132
  pure: true,
133
- fn: function (url: any, sys: any) {
133
+ fn: function(url: any, sys: any) {
134
134
  const img = sys.__exec('DOM部品作成', ['img', sys])
135
135
  img.src = url
136
136
  return img
@@ -140,7 +140,7 @@ export default {
140
140
  type: 'func',
141
141
  josi: [],
142
142
  pure: true,
143
- fn: function (sys: any) {
143
+ fn: function(sys: any) {
144
144
  const br = sys.__exec('DOM部品作成', ['br', sys])
145
145
  return br
146
146
  }
@@ -149,7 +149,7 @@ export default {
149
149
  type: 'func',
150
150
  josi: [['の']],
151
151
  pure: true,
152
- fn: function (text: any, sys: any) {
152
+ fn: function(text: any, sys: any) {
153
153
  // チェックボックスは、<span><input><label></span>で成り立つように構築
154
154
  const span = document.createElement('span')
155
155
  const inp = document.createElement('input')
@@ -170,7 +170,7 @@ export default {
170
170
  type: 'func',
171
171
  josi: [['の']],
172
172
  pure: true,
173
- fn: function (options: any, sys: any) {
173
+ fn: function(options: any, sys: any) {
174
174
  const dom = document.createElement('select')
175
175
  for (let i = 0; i < options.length; i++) {
176
176
  const item = document.createElement('option')
@@ -187,7 +187,7 @@ export default {
187
187
  type: 'func',
188
188
  josi: [['を'], ['へ', 'に']],
189
189
  pure: true,
190
- fn: function (options: any, dom: any) {
190
+ fn: function(options: any, dom: any) {
191
191
  if (typeof dom === 'string') { dom = document.querySelector(dom) }
192
192
  // 既存のoptionsをクリア
193
193
  dom.options.length = 0
@@ -205,7 +205,7 @@ export default {
205
205
  type: 'func',
206
206
  josi: [],
207
207
  pure: true,
208
- fn: function (sys: any) {
208
+ fn: function(sys: any) {
209
209
  const inp = sys.__exec('DOM部品作成', ['input', sys])
210
210
  inp.type = 'color'
211
211
  return inp
@@ -215,7 +215,7 @@ export default {
215
215
  type: 'func',
216
216
  josi: [],
217
217
  pure: true,
218
- fn: function (sys: any) {
218
+ fn: function(sys: any) {
219
219
  const inp = sys.__exec('DOM部品作成', ['input', sys])
220
220
  inp.type = 'date'
221
221
  return inp
@@ -225,7 +225,7 @@ export default {
225
225
  type: 'func',
226
226
  josi: [['の', 'で']],
227
227
  pure: true,
228
- fn: function (s: any, sys: any) {
228
+ fn: function(s: any, sys: any) {
229
229
  const inp = sys.__exec('DOM部品作成', ['input', sys])
230
230
  inp.type = 'password'
231
231
  inp.value = s
@@ -236,7 +236,7 @@ export default {
236
236
  type: 'func',
237
237
  josi: [['の', 'で']],
238
238
  pure: true,
239
- fn: function (range: any, sys: any) {
239
+ fn: function(range: any, sys: any) {
240
240
  if (!(range instanceof Array) || range.length < 2) {
241
241
  range = [0, 100, 50]
242
242
  }
@@ -255,7 +255,7 @@ export default {
255
255
  type: 'func',
256
256
  josi: [['の']],
257
257
  pure: true,
258
- fn: function (label: any, sys: any) {
258
+ fn: function(label: any, sys: any) {
259
259
  const inp = sys.__exec('DOM部品作成', ['input', sys])
260
260
  inp.type = 'submit'
261
261
  inp.value = label
@@ -266,7 +266,7 @@ export default {
266
266
  type: 'func',
267
267
  josi: [['で', 'の'], ['を']],
268
268
  pure: true,
269
- fn: function (obj: any, s: string|Array<string>|Array<Array<string>>, sys: any) {
269
+ fn: function(obj: any, s: string|Array<string>|Array<Array<string>>, sys: any) {
270
270
  const frm = sys.__exec('DOM部品作成', ['form', sys])
271
271
  // 可能ならformにobjの値を移し替える
272
272
  if (obj instanceof Object) {
@@ -284,7 +284,7 @@ export default {
284
284
  rows = s
285
285
  }
286
286
  // 入力項目に合わせて行を追加
287
- // eslint-disable-next-line @typescript-eslint/no-for-in-array
287
+
288
288
  for (const rowIndex in rows) {
289
289
  const row: Array<string>|string = rows[rowIndex]
290
290
  let cols: Array<string>
@@ -418,7 +418,7 @@ export default {
418
418
  type: 'func',
419
419
  josi: [['の', 'から']],
420
420
  pure: true,
421
- fn: function (dom: any) {
421
+ fn: function(dom: any) {
422
422
  if (typeof (dom) === 'string') { dom = document.querySelector(dom) }
423
423
  const res: any = {}
424
424
  const getChildren = (pa: any) => {
@@ -454,7 +454,7 @@ export default {
454
454
  type: 'func',
455
455
  josi: [['の', 'から']],
456
456
  pure: true,
457
- fn: function (aa: any, sys: any) {
457
+ fn: function(aa: any, sys: any) {
458
458
  const table = sys.__exec('DOM部品作成', ['table', sys])
459
459
  return sys.__exec('テーブル更新', [table, aa, sys])
460
460
  }
@@ -463,7 +463,7 @@ export default {
463
463
  type: 'func',
464
464
  josi: [['の', 'から']],
465
465
  pure: true,
466
- fn: function (aa: any, sys: any) {
466
+ fn: function(aa: any, sys: any) {
467
467
  const domOption = sys.__getSysVar('DOM部品オプション')
468
468
  const tmpTableHeader = domOption['テーブルヘッダ']
469
469
  domOption['テーブルヘッダ'] = true
@@ -476,7 +476,7 @@ export default {
476
476
  type: 'func',
477
477
  josi: [['の', 'から']],
478
478
  pure: true,
479
- fn: function (aa: any, sys: any) {
479
+ fn: function(aa: any, sys: any) {
480
480
  const domOption = sys.__getSysVar('DOM部品オプション')
481
481
  const tmpTableHeader = domOption['テーブルヘッダ']
482
482
  domOption['テーブルヘッダ'] = false
@@ -489,7 +489,7 @@ export default {
489
489
  type: 'func',
490
490
  josi: [['を'], ['に', 'へ']],
491
491
  pure: true,
492
- fn: function (tbl: any, aa: any, sys: any) {
492
+ fn: function(tbl: any, aa: any, sys: any) {
493
493
  // 既存のテーブルを取得
494
494
  if (typeof tbl === 'string') {
495
495
  tbl = sys.__query(tbl, 'テーブル更新', false)
@@ -555,7 +555,7 @@ export default {
555
555
  type: 'func',
556
556
  josi: [['の'], ['を'], ['に', 'へ']],
557
557
  pure: true,
558
- fn: function (t: any, cell: any, v: string|Array<Array<string>>, sys: any) {
558
+ fn: function(t: any, cell: any, v: string|Array<Array<string>>, sys: any) {
559
559
  if (typeof (t) === 'string') { t = document.querySelector(t) }
560
560
  if (typeof (cell) === 'string') { cell = cell.split(',') }
561
561
  if (cell.length !== 2) {
@@ -606,7 +606,7 @@ export default {
606
606
  josi: [['の']],
607
607
  pure: true,
608
608
  asyncFn: true,
609
- fn: async function (src: string, sys: any) {
609
+ fn: async function(src: string, sys: any) {
610
610
  const div = sys.__exec('DOM部品作成', ['div', sys])
611
611
  div.classList.add('mermaid')
612
612
  div.innerHTML = src
@@ -625,7 +625,7 @@ export default {
625
625
  type: 'func',
626
626
  josi: [],
627
627
  pure: true,
628
- fn: function (sys: any) {
628
+ fn: function(sys: any) {
629
629
  const video = sys.__exec('DOM部品作成', ['video', sys])
630
630
  return video
631
631
  }
@@ -5,7 +5,7 @@ export default {
5
5
  type: 'func',
6
6
  josi: [['の', 'に', 'へ']],
7
7
  pure: true,
8
- fn: function (func: any, sys: any) {
8
+ fn: function(func: any, sys: any) {
9
9
  let cb = func
10
10
  if (typeof cb === 'string') { cb = sys.__findVar(cb) }
11
11
  if (!('geolocation' in navigator)) { throw new Error('関数『位置情報取得時』は使えません。') }
@@ -24,7 +24,7 @@ export default {
24
24
  type: 'func',
25
25
  josi: [['の', 'に', 'へ']],
26
26
  pure: true,
27
- fn: function (func: any, sys: any) {
27
+ fn: function(func: any, sys: any) {
28
28
  let cb = func
29
29
  if (typeof cb === 'string') { cb = sys.__findVar(cb) }
30
30
  if (!('geolocation' in navigator)) { throw new Error('関数『位置情報監視時』は使えません。') }
@@ -43,7 +43,7 @@ export default {
43
43
  type: 'func',
44
44
  josi: [['の']],
45
45
  pure: true,
46
- fn: function (wid: any, sys: any) {
46
+ fn: function(wid: any, sys: any) {
47
47
  navigator.geolocation.clearWatch(wid)
48
48
  },
49
49
  return_none: true
@@ -7,8 +7,8 @@ export default {
7
7
  type: 'func',
8
8
  josi: [['に', 'で'], ['を']],
9
9
  pure: true,
10
- fn: function (key: any, fname: any, sys: any) {
11
- hotkeys(key, function (event: any, handler: any) {
10
+ fn: function(key: any, fname: any, sys: any) {
11
+ hotkeys(key, function(event: any, handler: any) {
12
12
  event.preventDefault()
13
13
  const f = sys.__findFunc(fname)
14
14
  f(sys)
@@ -19,7 +19,7 @@ export default {
19
19
  type: 'func',
20
20
  josi: [['を', 'の']],
21
21
  pure: true,
22
- fn: function (key: any) {
22
+ fn: function(key: any) {
23
23
  hotkeys.unbind(key)
24
24
  }
25
25
  }
@@ -5,7 +5,7 @@ export default {
5
5
  type: 'func',
6
6
  josi: [['を']],
7
7
  pure: true,
8
- fn: function (text: any) {
8
+ fn: function(text: any) {
9
9
  return String(text)
10
10
  .replace(/&/g, '&amp;')
11
11
  .replace(/>/g, '&gt;')
@@ -18,7 +18,7 @@ export default {
18
18
  josi: [['を']],
19
19
  pure: true,
20
20
  asyncFn: true,
21
- fn: async function (text: any) {
21
+ fn: async function(text: any) {
22
22
  // Clipboard APIをサポートしているか
23
23
  if (navigator.clipboard) {
24
24
  await navigator.clipboard.writeText(text)
@@ -44,7 +44,7 @@ export default {
44
44
  type: 'func',
45
45
  josi: [['を']],
46
46
  pure: true,
47
- fn: function (f: any, sys: any) {
47
+ fn: function(f: any, sys: any) {
48
48
  // Clipboard APIをサポートしているか
49
49
  if (navigator.clipboard) {
50
50
  if (typeof (f) === 'string') { f = sys.__findFunc(f, 'クリップボード取得時') }
@@ -63,7 +63,7 @@ export default {
63
63
  josi: [],
64
64
  pure: true,
65
65
  asyncFn: true,
66
- fn: async function (sys: any) {
66
+ fn: async function(sys: any) {
67
67
  // Clipboard APIをサポートしているか
68
68
  if (navigator.clipboard) {
69
69
  const result = await navigator.clipboard.readText()
@@ -18,7 +18,7 @@ const PluginBrowserInWorker = {
18
18
  type: 'func',
19
19
  josi: [],
20
20
  pure: true,
21
- fn: function (sys: any) {
21
+ fn: function(sys: any) {
22
22
  /* eslint no-global-assign: 0 */
23
23
  if (typeof self === 'undefined') { self = {} }
24
24
  if (typeof navigator === 'undefined') { navigator = {} }
@@ -5,7 +5,7 @@ export default {
5
5
  type: 'func',
6
6
  josi: [['に', 'へ']],
7
7
  pure: true,
8
- fn: function (url: any, sys: any) {
8
+ fn: function(url: any, sys: any) {
9
9
  window.location.href = url
10
10
  }
11
11
  },
@@ -13,7 +13,7 @@ export default {
13
13
  type: 'func',
14
14
  josi: [],
15
15
  pure: true,
16
- fn: function () {
16
+ fn: function() {
17
17
  window.history.back(-1)
18
18
  }
19
19
  },
@@ -5,7 +5,7 @@ export default {
5
5
  type: 'func',
6
6
  josi: [['と', 'を', 'の']],
7
7
  pure: true,
8
- fn: function (s: any, sys: any) {
8
+ fn: function(s: any, sys: any) {
9
9
  const msg = sys.__exec('音声合成発話オブジェクト取得', [s, sys])
10
10
  window.speechSynthesis.speak(msg)
11
11
  console.log('#話す:', s)
@@ -17,7 +17,7 @@ export default {
17
17
  josi: [['と', 'を', 'の']],
18
18
  pure: true,
19
19
  asyncFn: true,
20
- fn: function (s: any, sys: any) {
20
+ fn: function(s: any, sys: any) {
21
21
  return new Promise((resolve, reject) => {
22
22
  try {
23
23
  const msg = sys.__exec('音声合成発話オブジェクト取得', [s, sys])
@@ -34,7 +34,7 @@ export default {
34
34
  type: 'func',
35
35
  josi: [['で'], ['と', 'を', 'の']],
36
36
  pure: true,
37
- fn: function (callback: any, s: any, sys: any) {
37
+ fn: function(callback: any, s: any, sys: any) {
38
38
  const msg = sys.__exec('音声合成発話オブジェクト取得', [s, sys])
39
39
  msg.onend = (e) => {
40
40
  console.log('#話終時')
@@ -50,7 +50,7 @@ export default {
50
50
  type: 'func',
51
51
  josi: [['の', 'で']],
52
52
  pure: true,
53
- fn: function (s: string, sys: any) {
53
+ fn: function(s: string, sys: any) {
54
54
  // 話者の特定
55
55
  let voice = sys.__getSysVar('話:話者')
56
56
  if (!voice) { voice = sys.__exec('話者設定', ['ja', sys]) }
@@ -68,7 +68,7 @@ export default {
68
68
  type: 'func',
69
69
  josi: [],
70
70
  pure: true,
71
- fn: function (sys: any) {
71
+ fn: function(sys: any) {
72
72
  // 対応している?
73
73
  if (!('SpeechSynthesisUtterance' in window)) { throw new Error('音声合成APIに対応していません') }
74
74
  return window.speechSynthesis.getVoices()
@@ -78,7 +78,7 @@ export default {
78
78
  type: 'func',
79
79
  josi: [['に', 'へ']],
80
80
  pure: true,
81
- fn: function (v: any, sys: any) {
81
+ fn: function(v: any, sys: any) {
82
82
  // 対応している?
83
83
  if (!('SpeechSynthesisUtterance' in window)) { throw new Error('音声合成APIに対応していません') }
84
84
  // 文字列で値を指定
@@ -111,7 +111,7 @@ export default {
111
111
  type: 'func',
112
112
  josi: [['で', 'に', 'へ']],
113
113
  pure: true,
114
- fn: function (obj: any, sys: any) {
114
+ fn: function(obj: any, sys: any) {
115
115
  const changeFunc = (key, v) => {
116
116
  if (key === '速度') { sys.__setSysVar('話者速度', v) }
117
117
  if (key === '声高' || key === 'ピッチ') { sys.__setSysVar('話者声高', v) }
@@ -5,7 +5,7 @@ export default {
5
5
  type: 'func',
6
6
  josi: [['を'], ['に', 'へ']],
7
7
  pure: true,
8
- fn: function (v: any, key: any, sys: any) {
8
+ fn: function(v: any, key: any, sys: any) {
9
9
  sys.__exec('ローカルストレージ保存', [v, key, sys])
10
10
  },
11
11
  return_none: true
@@ -14,7 +14,7 @@ export default {
14
14
  type: 'func',
15
15
  josi: [['を', 'から', 'の']],
16
16
  pure: true,
17
- fn: function (key: any, sys: any) {
17
+ fn: function(key: any, sys: any) {
18
18
  return sys.__exec('ローカルストレージ読', [key, sys])
19
19
  },
20
20
  return_none: false
@@ -23,7 +23,7 @@ export default {
23
23
  type: 'func',
24
24
  josi: [['を', 'から', 'の']],
25
25
  pure: true,
26
- fn: function (key: any, sys: any) {
26
+ fn: function(key: any, sys: any) {
27
27
  return sys.__exec('ローカルストレージ読', [key, sys])
28
28
  },
29
29
  return_none: false
@@ -32,7 +32,7 @@ export default {
32
32
  type: 'func',
33
33
  josi: [['が']],
34
34
  pure: true,
35
- fn: function (key: any) {
35
+ fn: function(key: any) {
36
36
  const s = window.localStorage.getItem(key)
37
37
  return (s !== null)
38
38
  },
@@ -42,7 +42,7 @@ export default {
42
42
  type: 'func',
43
43
  josi: [['を'], ['に', 'へ']],
44
44
  pure: true,
45
- fn: function (v: any, key: any, sys: any) {
45
+ fn: function(v: any, key: any, sys: any) {
46
46
  let body = v
47
47
  if (sys.__getSysVar('保存オプション')) {
48
48
  if ((sys.__getSysVar('保存オプション').indexOf('json') >= 0)) {
@@ -59,7 +59,7 @@ export default {
59
59
  type: 'func',
60
60
  josi: [['を', 'から', 'の']],
61
61
  pure: true,
62
- fn: function (key: any, sys: any) {
62
+ fn: function(key: any, sys: any) {
63
63
  const v = window.localStorage[key]
64
64
  if (sys.__getSysVar('保存オプション') && (sys.__getSysVar('保存オプション').indexOf('json') >= 0)) {
65
65
  try {
@@ -76,7 +76,7 @@ export default {
76
76
  type: 'func',
77
77
  josi: [],
78
78
  pure: true,
79
- fn: function (sys: any) {
79
+ fn: function(sys: any) {
80
80
  const keys = []
81
81
  for (const key in window.localStorage) { keys.push(key) }
82
82
  return keys
@@ -87,7 +87,7 @@ export default {
87
87
  type: 'func',
88
88
  josi: [['を', 'の']],
89
89
  pure: true,
90
- fn: function (key: any) {
90
+ fn: function(key: any) {
91
91
  window.localStorage.removeItem(key)
92
92
  },
93
93
  return_none: true
@@ -96,7 +96,7 @@ export default {
96
96
  type: 'func',
97
97
  josi: [],
98
98
  pure: true,
99
- fn: function () {
99
+ fn: function() {
100
100
  window.localStorage.clear()
101
101
  },
102
102
  return_none: true
@@ -105,7 +105,7 @@ export default {
105
105
  type: 'func',
106
106
  josi: [],
107
107
  pure: true,
108
- fn: function () {
108
+ fn: function() {
109
109
  return (typeof window.localStorage !== 'undefined')
110
110
  },
111
111
  return_none: false
@@ -115,7 +115,7 @@ export default {
115
115
  type: 'func',
116
116
  josi: [['に', 'へ']],
117
117
  pure: true,
118
- fn: function (v: any, sys: any) {
118
+ fn: function(v: any, sys: any) {
119
119
  v = v.toUpperCase(v)
120
120
  sys.__setSysVar('保存オプション', v)
121
121
  },
@@ -5,7 +5,7 @@ export default {
5
5
  type: 'func',
6
6
  josi: [],
7
7
  pure: true,
8
- fn: function (sys: any) {
8
+ fn: function(sys: any) {
9
9
  // v3.3.74以降 plugin_system.mjsと挙動が同じになった
10
10
  // デバッグモードでなければ例外を投げることでプログラムを終了させる
11
11
  if (sys && sys.__v0) {
@@ -21,7 +21,7 @@ export default {
21
21
  type: 'func',
22
22
  josi: [],
23
23
  pure: true,
24
- fn: function () {
24
+ fn: function() {
25
25
  const ua = window.navigator.userAgent.toLowerCase()
26
26
  if (ua.indexOf('windows') !== -1) { return 'windows' }
27
27
  if (ua.indexOf('android') !== -1) { return 'android' }
@@ -5,7 +5,7 @@ export default {
5
5
  type: 'func',
6
6
  josi: [['を']],
7
7
  pure: true,
8
- fn: function (callback: any, sys: any) {
8
+ fn: function(callback: any, sys: any) {
9
9
  sys.__setSysVar('WS:ONOPEN', callback)
10
10
  },
11
11
  return_none: true
@@ -14,7 +14,7 @@ export default {
14
14
  type: 'func',
15
15
  josi: [['を']],
16
16
  pure: true,
17
- fn: function (callback: any, sys: any) {
17
+ fn: function(callback: any, sys: any) {
18
18
  sys.__setSysVar('WS:ONMESSAGE', callback)
19
19
  },
20
20
  return_none: true
@@ -23,7 +23,7 @@ export default {
23
23
  type: 'func',
24
24
  josi: [['を']],
25
25
  pure: true,
26
- fn: function (callback: any, sys: any) {
26
+ fn: function(callback: any, sys: any) {
27
27
  sys.__setSysVar('WS:ONERROR', callback)
28
28
  },
29
29
  return_none: true
@@ -32,7 +32,7 @@ export default {
32
32
  type: 'func',
33
33
  josi: [['に', 'へ', 'の']],
34
34
  pure: true,
35
- fn: function (s: any, sys: any) {
35
+ fn: function(s: any, sys: any) {
36
36
  const ws = new WebSocket(s)
37
37
  ws.onopen = () => {
38
38
  const cbOpen = sys.__getSysVar('WS:ONOPEN')
@@ -56,7 +56,7 @@ export default {
56
56
  type: 'func',
57
57
  josi: [['を', 'と']],
58
58
  pure: true,
59
- fn: function (s: any, sys: any) {
59
+ fn: function(s: any, sys: any) {
60
60
  const ws = sys.__getSysVar('WS:SOCKET')
61
61
  ws.send(s)
62
62
  }
@@ -65,7 +65,7 @@ export default {
65
65
  type: 'func',
66
66
  josi: [],
67
67
  pure: true,
68
- fn: function (sys: any) {
68
+ fn: function(sys: any) {
69
69
  const ws = sys.__getSysVar('WS:SOCKET')
70
70
  ws.close()
71
71
  }