nadesiko3 3.2.52 → 3.3.3
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/runscript3.html +35 -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/plugin_weykturtle3d.js.LICENSE.txt +3 -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} +119 -101
- 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} +69 -57
- 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} +10 -20
- package/src/{nako_from_dncl.js → nako_from_dncl.mjs} +11 -8
- package/src/{nako_gen.js → nako_gen.mjs} +93 -87
- 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} +29 -25
- 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} +46 -8
- 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} +1 -1
- 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} +24 -14
- package/src/{wnako3_editor.js → wnako3_editor.mjs} +28 -22
- 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/html/daisyui/LICENSE +22 -0
- package/tools/nako3edit/html/daisyui/full.css +1 -0
- package/tools/nako3edit/html/daisyui/tailwind.min.css +1 -0
- package/tools/nako3edit/html/daisyui/version_2.14.1 +1 -0
- package/tools/nako3edit/html/edit.html +104 -19
- package/tools/nako3edit/html/files.html +84 -8
- package/tools/nako3edit/html/nako3edit.css +6 -7
- package/tools/nako3edit/index.nako3 +45 -6
- 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
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
/**
|
|
8
8
|
* 置換後の位置から置換前の位置へマッピングできる文字列
|
|
9
9
|
*/
|
|
10
|
-
class Replace {
|
|
10
|
+
export class Replace {
|
|
11
11
|
/**
|
|
12
12
|
* @param {string} code
|
|
13
13
|
*/
|
|
@@ -65,15 +65,33 @@ class Replace {
|
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
68
|
+
/** @type {NakoPrepare} */
|
|
69
|
+
let nakoPrepareObj = null
|
|
70
|
+
/**
|
|
71
|
+
* 字句解析を行う前に全角文字を半角に揃える
|
|
72
|
+
* [memo]
|
|
73
|
+
* ただし、文字列部分だけは、そのまま全角で出力するようにする
|
|
74
|
+
* for https://github.com/kujirahand/nadesiko3/issues/94
|
|
75
|
+
*/
|
|
76
|
+
export class NakoPrepare {
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* 唯一のインスタンスを返す
|
|
80
|
+
* @param {import("./nako_logger.mjs") | null} logger
|
|
81
|
+
* @returns {NakoPrepare}
|
|
82
|
+
*/
|
|
83
|
+
static getInstance(logger) {
|
|
84
|
+
if (nakoPrepareObj === null) {
|
|
85
|
+
nakoPrepareObj = new NakoPrepare(logger)
|
|
86
|
+
}
|
|
87
|
+
return nakoPrepareObj
|
|
88
|
+
}
|
|
89
|
+
|
|
72
90
|
/**
|
|
73
|
-
* @param {import("./nako_logger")} logger
|
|
91
|
+
* @param {import("./nako_logger.mjs") | null} logger
|
|
74
92
|
*/
|
|
75
93
|
constructor (logger) {
|
|
76
|
-
this.logger = logger
|
|
94
|
+
if (logger !== null) { this.logger = logger }
|
|
77
95
|
|
|
78
96
|
// 参考) https://hydrocul.github.io/wiki/blog/2014/1101-hyphen-minus-wave-tilde.html
|
|
79
97
|
this.HYPHENS = { // ハイフン問題
|
|
@@ -294,4 +312,24 @@ class NakoPrepare {
|
|
|
294
312
|
}
|
|
295
313
|
}
|
|
296
314
|
|
|
297
|
-
|
|
315
|
+
/**
|
|
316
|
+
* なでしこのソースコードのモード(!インデント構文など)が設定されているか調べる
|
|
317
|
+
* @param {string} code
|
|
318
|
+
* @param {Array<string>} modeNames
|
|
319
|
+
* @returns {boolean}
|
|
320
|
+
*/
|
|
321
|
+
export function checkNakoMode(code, modeNames) {
|
|
322
|
+
// 先頭の256文字について調べる
|
|
323
|
+
code = code.substring(0, 256)
|
|
324
|
+
// 全角半角の揺れを吸収
|
|
325
|
+
code = code.replace(/(!|💡)/, '!')
|
|
326
|
+
// 範囲コメントを削除
|
|
327
|
+
code = code.replace(/\/\*.*?\*\//g, '')
|
|
328
|
+
// 毎文調べる
|
|
329
|
+
const lines = code.split(/[;。\n]/, 30)
|
|
330
|
+
for (let line of lines) {
|
|
331
|
+
line = line.replace(/^\s+/, '').replace(/\s+$/, '') // trim
|
|
332
|
+
if (modeNames.indexOf(line) >= 0) return true
|
|
333
|
+
}
|
|
334
|
+
return false
|
|
335
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** prepareとtokenizeのソースマッピング */
|
|
2
|
-
class SourceMappingOfTokenization {
|
|
2
|
+
export class SourceMappingOfTokenization {
|
|
3
3
|
/**
|
|
4
4
|
* @param {number} sourceCodeLength
|
|
5
5
|
* @param {{ text: string; sourcePosition: number }[]} preprocessed
|
|
@@ -62,7 +62,7 @@ class SourceMappingOfTokenization {
|
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
class SourceMappingOfIndentSyntax {
|
|
65
|
+
export class SourceMappingOfIndentSyntax {
|
|
66
66
|
/**
|
|
67
67
|
* @param {string} codeAfterProcessingIndentationSyntax
|
|
68
68
|
* @param {readonly number[]} linesInsertedByIndentationSyntax
|
|
@@ -165,7 +165,7 @@ class SourceMappingOfIndentSyntax {
|
|
|
165
165
|
}
|
|
166
166
|
|
|
167
167
|
/** offsetから (line, column) へ変換する。 */
|
|
168
|
-
class OffsetToLineColumn {
|
|
168
|
+
export class OffsetToLineColumn {
|
|
169
169
|
/**
|
|
170
170
|
* @param {string} code
|
|
171
171
|
*/
|
|
@@ -220,7 +220,7 @@ class OffsetToLineColumn {
|
|
|
220
220
|
* preCodeの分、ソースマップのoffset、行数、列数を減らす。
|
|
221
221
|
* @type {<T extends {line?: number, column?: number, startOffset: number | null, endOffset: number | null }>(sourceMap: T, preCode: string) => T}
|
|
222
222
|
*/
|
|
223
|
-
function subtractSourceMapByPreCodeLength (sourceMap, preCode) {
|
|
223
|
+
export function subtractSourceMapByPreCodeLength (sourceMap, preCode) {
|
|
224
224
|
// offsetは単純に引くだけでよい
|
|
225
225
|
if (typeof sourceMap.startOffset === 'number') {
|
|
226
226
|
sourceMap.startOffset -= preCode.length
|
|
@@ -242,10 +242,3 @@ function subtractSourceMapByPreCodeLength (sourceMap, preCode) {
|
|
|
242
242
|
|
|
243
243
|
return sourceMap
|
|
244
244
|
}
|
|
245
|
-
|
|
246
|
-
module.exports = {
|
|
247
|
-
SourceMappingOfTokenization,
|
|
248
|
-
SourceMappingOfIndentSyntax,
|
|
249
|
-
OffsetToLineColumn,
|
|
250
|
-
subtractSourceMapByPreCodeLength
|
|
251
|
-
}
|
|
File without changes
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
2
|
// plugin_browser.js
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
3
|
+
import PartBrowserColor from './plugin_browser_color.mjs'
|
|
4
|
+
import PartBrowserSystem from './plugin_browser_system.mjs'
|
|
5
|
+
import PartBrowserDialog from './plugin_browser_dialog.mjs'
|
|
6
|
+
import PartBrowserLocation from './plugin_browser_location.mjs'
|
|
7
|
+
import PartBrowserAjax from './plugin_browser_ajax.mjs'
|
|
8
|
+
import PartBrowserDomBasic from './plugin_browser_dom_basic.mjs'
|
|
9
|
+
import PartBrowserDomEvent from './plugin_browser_dom_event.mjs'
|
|
10
|
+
import PartBrowserDomParts from './plugin_browser_dom_parts.mjs'
|
|
11
|
+
import PartBrowserHtml from './plugin_browser_html.mjs'
|
|
12
|
+
import PartBrowserStorage from './plugin_browser_storage.mjs'
|
|
13
|
+
import PartBrowserCanvas from './plugin_browser_canvas.mjs'
|
|
14
|
+
import PartBrowserGeolocation from './plugin_browser_geolocation.mjs'
|
|
15
|
+
import PartBrowserSpeech from './plugin_browser_speech.mjs'
|
|
16
|
+
import PartBrowserWebsocket from './plugin_browser_websocket.mjs'
|
|
17
|
+
import PartBrowserAudio from './plugin_browser_audio.mjs'
|
|
18
|
+
import PartBrowserHotkey from './plugin_browser_hotkey.mjs'
|
|
19
|
+
import PartBrowserChart from './plugin_browser_chart.mjs'
|
|
20
|
+
import PartBrowserCrypto from './plugin_browser_crypto.mjs'
|
|
21
21
|
|
|
22
22
|
const BrowserParts = [
|
|
23
23
|
PartBrowserColor,
|
|
@@ -56,18 +56,18 @@ const PluginBrowser = {
|
|
|
56
56
|
pure: true,
|
|
57
57
|
fn: function (sys) {
|
|
58
58
|
/* eslint no-global-assign: 0 */
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
59
|
+
const doc = (typeof document === 'undefined') ? {'body': {}} : document
|
|
60
|
+
const win = (typeof window === 'undefined') ? {'location': { 'href': '' }} : window
|
|
61
|
+
const nav = (typeof navigator === 'undefined') ? {} : navigator
|
|
62
62
|
|
|
63
63
|
// 定数を初期化
|
|
64
64
|
sys.__v0['AJAX:ONERROR'] = (err) => { console.log(err) }
|
|
65
65
|
// オブジェクトを初期化
|
|
66
|
-
sys.__v0.DOCUMENT =
|
|
67
|
-
sys.__v0.WINDOW =
|
|
68
|
-
sys.__v0.NAVIGATOR =
|
|
69
|
-
sys.__v0['DOM親要素'] =
|
|
70
|
-
sys.__v0['ブラウザURL'] =
|
|
66
|
+
sys.__v0.DOCUMENT = doc
|
|
67
|
+
sys.__v0.WINDOW = win
|
|
68
|
+
sys.__v0.NAVIGATOR = nav
|
|
69
|
+
sys.__v0['DOM親要素'] = doc.body
|
|
70
|
+
sys.__v0['ブラウザURL'] = win.location.href
|
|
71
71
|
|
|
72
72
|
// 便利なメソッドを定義
|
|
73
73
|
sys.__tohtml = (text) => {
|
|
@@ -88,7 +88,7 @@ const PluginBrowser = {
|
|
|
88
88
|
sys.__addEvent = (dom, event, func, setHandler) => {
|
|
89
89
|
// dom
|
|
90
90
|
if (typeof (dom) === 'string') {
|
|
91
|
-
dom =
|
|
91
|
+
dom = doc.querySelector(dom)
|
|
92
92
|
if (!dom) { throw new Error('DOMイベントが追加できません。要素が見当たりません。') }
|
|
93
93
|
}
|
|
94
94
|
// func
|
|
@@ -142,7 +142,7 @@ const PluginBrowser = {
|
|
|
142
142
|
sys.__removeEvent = (dom, event, func) => {
|
|
143
143
|
// dom
|
|
144
144
|
if (typeof (dom) === 'string') {
|
|
145
|
-
dom =
|
|
145
|
+
dom = doc.querySelector(dom)
|
|
146
146
|
if (!dom) { throw new Error('DOMイベントが削除できません。要素が見当たりません。') }
|
|
147
147
|
}
|
|
148
148
|
// func
|
|
@@ -171,7 +171,7 @@ const PluginBrowser = {
|
|
|
171
171
|
sys.__dom_events = []
|
|
172
172
|
// requestAnimationFrame
|
|
173
173
|
if (sys.__requestAnimationFrameLastId > 0) {
|
|
174
|
-
|
|
174
|
+
win.cancelAnimationFrame(sys.__requestAnimationFrameLastId)
|
|
175
175
|
sys.__requestAnimationFrameLastId = 0
|
|
176
176
|
}
|
|
177
177
|
}
|
|
@@ -202,4 +202,4 @@ BrowserParts.forEach((a) => {
|
|
|
202
202
|
Object.assign(PluginBrowser, b)
|
|
203
203
|
})
|
|
204
204
|
|
|
205
|
-
|
|
205
|
+
export default PluginBrowser
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
2
|
/* eslint-disable quote-props */
|
|
3
|
-
|
|
3
|
+
export default {
|
|
4
4
|
// @AJAXとHTTP
|
|
5
5
|
'AJAX送信時': { // @非同期通信(Ajax)でURLにデータを送信し、成功するとcallbackが実行される。その際『対象』にデータが代入される。『AJAXオプション』を指定できる。 // @AJAXそうしんしたとき
|
|
6
6
|
type: 'func',
|
|
@@ -22,7 +22,7 @@ module.exports = {
|
|
|
22
22
|
},
|
|
23
23
|
return_none: true
|
|
24
24
|
},
|
|
25
|
-
'AJAX受信': { //
|
|
25
|
+
'AJAX受信': { // @ (非推奨)『AJAXテキスト取得』をご利用ください。-「!非同期モード」で非同期通信(Ajax)でURLからデータを受信する。『AJAXオプション』を指定できる。結果は変数『対象』に入る// @AJAXじゅしん
|
|
26
26
|
type: 'func',
|
|
27
27
|
josi: [['から', 'を']],
|
|
28
28
|
pure: true,
|
|
@@ -162,7 +162,7 @@ module.exports = {
|
|
|
162
162
|
},
|
|
163
163
|
return_none: true
|
|
164
164
|
},
|
|
165
|
-
'AJAX送信': { //
|
|
165
|
+
'AJAX送信': { // @(非推奨)『AJAXテキスト取得』をご利用ください。- 逐次実行構文にて、非同期通信(Ajax)でURLにデータを送信する。成功すると『対象』にデータが代入される。 // @AJAXそうしん
|
|
166
166
|
type: 'func',
|
|
167
167
|
josi: [['まで', 'へ', 'に']],
|
|
168
168
|
pure: true,
|
|
@@ -172,7 +172,7 @@ module.exports = {
|
|
|
172
172
|
},
|
|
173
173
|
return_none: true
|
|
174
174
|
},
|
|
175
|
-
'AJAX逐次送信': { //
|
|
175
|
+
'AJAX逐次送信': { // @(非推奨)『AJAXテキスト取得』をご利用ください。- 逐次実行構文にて、非同期通信(Ajax)でURLにデータを送信する。成功すると『対象』にデータが代入される。 // @AJAXちくじそうしん
|
|
176
176
|
type: 'func',
|
|
177
177
|
josi: [['まで', 'へ', 'に']],
|
|
178
178
|
pure: true,
|
|
@@ -205,17 +205,17 @@ module.exports = {
|
|
|
205
205
|
},
|
|
206
206
|
return_none: false
|
|
207
207
|
},
|
|
208
|
-
'HTTP取得': { //
|
|
208
|
+
'HTTP取得': { // @(非推奨)『AJAXテキスト取得』をご利用ください。- 逐次実行構文にて、非同期通信(Ajax)でURLにデータを送信する。成功すると『対象』にデータが代入される。失敗すると『AJAX失敗時』を実行。 // @HTTPしゅとく
|
|
209
209
|
type: 'func',
|
|
210
210
|
josi: [['の', 'から', 'を']],
|
|
211
|
-
pure:
|
|
211
|
+
pure: true,
|
|
212
212
|
fn: function (url, sys) {
|
|
213
213
|
if (!sys.resolve) { throw new Error('『HTTP取得』は『逐次実行』構文内で利用する必要があります。') }
|
|
214
214
|
sys.__exec('AJAX逐次送信', [url, sys])
|
|
215
215
|
},
|
|
216
216
|
return_none: true
|
|
217
217
|
},
|
|
218
|
-
'HTTP逐次取得': { //
|
|
218
|
+
'HTTP逐次取得': { // @(非推奨)『AJAXテキスト取得』をご利用ください。- 逐次実行構文にて、非同期通信(Ajax)でURLにデータを送信する。成功すると『対象』にデータが代入される。失敗すると『AJAX失敗時』を実行。 // @HTTPちくじしゅとく
|
|
219
219
|
type: 'func',
|
|
220
220
|
josi: [['の', 'から', 'を']],
|
|
221
221
|
pure: false,
|
|
@@ -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)
|