@canvist/headless 0.0.0-stage → 0.2.0
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/dist/calls.d.ts +15 -0
- package/dist/calls.js +20 -0
- package/dist/create.d.ts +17 -0
- package/dist/create.js +29 -0
- package/dist/engine.d.ts +125 -0
- package/dist/engine.js +176 -0
- package/dist/errors.d.ts +13 -0
- package/dist/errors.js +5 -0
- package/dist/extensions.generated.d.ts +1022 -0
- package/dist/extensions.generated.js +744 -0
- package/dist/extras.generated.d.ts +5803 -0
- package/dist/extras.generated.js +2600 -0
- package/dist/full.d.ts +21 -0
- package/dist/full.js +63 -0
- package/dist/gemoji.generated.d.ts +29 -0
- package/dist/gemoji.generated.js +30 -0
- package/dist/load.d.ts +21 -0
- package/dist/load.js +41 -0
- package/dist/mod.d.ts +25 -0
- package/dist/mod.js +24 -0
- package/dist/native.d.ts +115 -0
- package/dist/native.js +235 -0
- package/dist/scene-types.d.ts +223 -0
- package/dist/scene-types.js +1 -0
- package/dist/scene.d.ts +105 -0
- package/dist/scene.js +153 -0
- package/dist/ssr.d.ts +66 -0
- package/dist/ssr.js +98 -0
- package/dist/types.d.ts +232 -0
- package/dist/types.js +1 -0
- package/package.json +89 -5
- package/readme.md +96 -0
- package/wasm/canvist_headless_wasm.d.ts +216 -0
- package/wasm/canvist_headless_wasm.js +910 -0
- package/wasm/canvist_headless_wasm_bg.wasm +0 -0
- package/wasm/canvist_headless_wasm_bg.wasm.d.ts +44 -0
- package/wasm-full/canvist_headless_full.d.ts +223 -0
- package/wasm-full/canvist_headless_full.js +923 -0
- package/wasm-full/canvist_headless_full_bg.wasm +0 -0
- package/wasm-full/canvist_headless_full_bg.wasm.d.ts +45 -0
- package/wasm-scene/canvist_headless_scene.d.ts +332 -0
- package/wasm-scene/canvist_headless_scene.js +1231 -0
- package/wasm-scene/canvist_headless_scene_bg.wasm +0 -0
- package/wasm-scene/canvist_headless_scene_bg.wasm.d.ts +66 -0
- package/wasm-ssr/canvist_headless_ssr.d.ts +250 -0
- package/wasm-ssr/canvist_headless_ssr.js +1025 -0
- package/wasm-ssr/canvist_headless_ssr_bg.wasm +0 -0
- package/wasm-ssr/canvist_headless_ssr_bg.wasm.d.ts +50 -0
- package/README.md +0 -3
package/dist/full.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Engine, type EngineOptions } from "./engine.ts";
|
|
2
|
+
import { type WasmSource } from "./load.ts";
|
|
3
|
+
import type { Extensions, StarterKit } from "./types.ts";
|
|
4
|
+
export { type CanvistError, Doc, Engine, type EngineOptions, isCanvistError, type SyncReply, type Validation, } from "./engine.ts";
|
|
5
|
+
export * from "./extensions.generated.ts";
|
|
6
|
+
export * from "./extras.generated.ts";
|
|
7
|
+
export type { WasmSource } from "./load.ts";
|
|
8
|
+
export type * from "./types.ts";
|
|
9
|
+
/**
|
|
10
|
+
* Load the full WebAssembly module once. Later calls return the first
|
|
11
|
+
* call's promise. Without a source, Node, Deno, and Bun read the bundled
|
|
12
|
+
* file; runtimes without a file system pass the module they imported.
|
|
13
|
+
*/
|
|
14
|
+
export declare function load(source?: WasmSource): Promise<void>;
|
|
15
|
+
/**
|
|
16
|
+
* Load canvist and create an engine with the given extensions, the
|
|
17
|
+
* StarterKit by default. The engine's documents only offer the registered
|
|
18
|
+
* extensions' commands, queries, blocks, and marks, so using another one
|
|
19
|
+
* is a type error.
|
|
20
|
+
*/
|
|
21
|
+
export declare function createEngine<const E extends Extensions = StarterKit>(extensions?: E, options?: EngineOptions): Promise<Engine<E>>;
|
package/dist/full.js
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Every extension canvist ships, in a second WebAssembly module, so
|
|
3
|
+
* `@canvist/headless` stays small with only the StarterKit. The API is the
|
|
4
|
+
* same; `createEngine` here also takes the extensions beyond the StarterKit.
|
|
5
|
+
*
|
|
6
|
+
* ```ts
|
|
7
|
+
* import { createEngine, highlight, starterKit } from "@canvist/headless/full";
|
|
8
|
+
*
|
|
9
|
+
* const engine = await createEngine([...starterKit, highlight]);
|
|
10
|
+
* const doc = engine.parse("markdown", "Hello world");
|
|
11
|
+
* doc.selectAll();
|
|
12
|
+
* doc.commands.toggleHighlight();
|
|
13
|
+
* doc.export("html"); // "<p><mark>Hello world</mark></p>"
|
|
14
|
+
* ```
|
|
15
|
+
*
|
|
16
|
+
* The emoji table is data rather than code: the first engine with `emoji`
|
|
17
|
+
* loads it.
|
|
18
|
+
*
|
|
19
|
+
* @module
|
|
20
|
+
*/
|
|
21
|
+
import init, { loadEmoji, WasmEngine, } from "../wasm-full/canvist_headless_full.js";
|
|
22
|
+
import { Engine } from "./engine.js";
|
|
23
|
+
import { starterKit } from "./extensions.generated.js";
|
|
24
|
+
import { bundled } from "./load.js";
|
|
25
|
+
export { Doc, Engine, isCanvistError, } from "./engine.js";
|
|
26
|
+
export * from "./extensions.generated.js";
|
|
27
|
+
export * from "./extras.generated.js";
|
|
28
|
+
const BUNDLED = new URL("../wasm-full/canvist_headless_full_bg.wasm", import.meta.url);
|
|
29
|
+
let loading;
|
|
30
|
+
let loadingEmoji;
|
|
31
|
+
/**
|
|
32
|
+
* Load the full WebAssembly module once. Later calls return the first
|
|
33
|
+
* call's promise. Without a source, Node, Deno, and Bun read the bundled
|
|
34
|
+
* file; runtimes without a file system pass the module they imported.
|
|
35
|
+
*/
|
|
36
|
+
export function load(source) {
|
|
37
|
+
loading ??= (async () => {
|
|
38
|
+
await init({ module_or_path: source ?? await bundled(BUNDLED) });
|
|
39
|
+
})();
|
|
40
|
+
return loading;
|
|
41
|
+
}
|
|
42
|
+
/** Give the module the emoji table, once. */
|
|
43
|
+
function emojiTable() {
|
|
44
|
+
loadingEmoji ??= import("./gemoji.generated.js").then(({ gemoji }) => {
|
|
45
|
+
loadEmoji(gemoji);
|
|
46
|
+
});
|
|
47
|
+
return loadingEmoji;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Load canvist and create an engine with the given extensions, the
|
|
51
|
+
* StarterKit by default. The engine's documents only offer the registered
|
|
52
|
+
* extensions' commands, queries, blocks, and marks, so using another one
|
|
53
|
+
* is a type error.
|
|
54
|
+
*/
|
|
55
|
+
export async function createEngine(extensions, options = {}) {
|
|
56
|
+
await load(options.wasm);
|
|
57
|
+
const registered = (extensions ?? starterKit);
|
|
58
|
+
const names = registered.map((extension) => extension.name);
|
|
59
|
+
if (names.includes("emoji")) {
|
|
60
|
+
await emojiTable();
|
|
61
|
+
}
|
|
62
|
+
return new Engine(new WasmEngine(names, options.client ?? 1), registered);
|
|
63
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GitHub's gemoji: one emoji per line, a tab, and its shortcodes.
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2019 GitHub, Inc.
|
|
5
|
+
*
|
|
6
|
+
* Permission is hereby granted, free of charge, to any person
|
|
7
|
+
* obtaining a copy of this software and associated documentation
|
|
8
|
+
* files (the "Software"), to deal in the Software without
|
|
9
|
+
* restriction, including without limitation the rights to use,
|
|
10
|
+
* copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
11
|
+
* copies of the Software, and to permit persons to whom the
|
|
12
|
+
* Software is furnished to do so, subject to the following
|
|
13
|
+
* conditions:
|
|
14
|
+
*
|
|
15
|
+
* The above copyright notice and this permission notice shall be
|
|
16
|
+
* included in all copies or substantial portions of the Software.
|
|
17
|
+
*
|
|
18
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
19
|
+
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
|
20
|
+
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
21
|
+
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
22
|
+
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
23
|
+
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
24
|
+
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
25
|
+
* OTHER DEALINGS IN THE SOFTWARE.
|
|
26
|
+
*
|
|
27
|
+
* @module
|
|
28
|
+
*/
|
|
29
|
+
export declare const gemoji: string;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// Generated by scripts/generate.ts from canvist_extensions' gemoji table. Do not edit.
|
|
2
|
+
/**
|
|
3
|
+
* GitHub's gemoji: one emoji per line, a tab, and its shortcodes.
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) 2019 GitHub, Inc.
|
|
6
|
+
*
|
|
7
|
+
* Permission is hereby granted, free of charge, to any person
|
|
8
|
+
* obtaining a copy of this software and associated documentation
|
|
9
|
+
* files (the "Software"), to deal in the Software without
|
|
10
|
+
* restriction, including without limitation the rights to use,
|
|
11
|
+
* copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
12
|
+
* copies of the Software, and to permit persons to whom the
|
|
13
|
+
* Software is furnished to do so, subject to the following
|
|
14
|
+
* conditions:
|
|
15
|
+
*
|
|
16
|
+
* The above copyright notice and this permission notice shall be
|
|
17
|
+
* included in all copies or substantial portions of the Software.
|
|
18
|
+
*
|
|
19
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
20
|
+
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
|
21
|
+
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
22
|
+
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
23
|
+
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
24
|
+
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
25
|
+
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
26
|
+
* OTHER DEALINGS IN THE SOFTWARE.
|
|
27
|
+
*
|
|
28
|
+
* @module
|
|
29
|
+
*/
|
|
30
|
+
export const gemoji = "😀\tgrinning\n😃\tsmiley\n😄\tsmile\n😁\tgrin\n😆\tlaughing satisfied\n😅\tsweat_smile\n🤣\trofl\n😂\tjoy\n🙂\tslightly_smiling_face\n🙃\tupside_down_face\n🫠\tmelting_face\n😉\twink\n😊\tblush\n😇\tinnocent\n🥰\tsmiling_face_with_three_hearts\n😍\theart_eyes\n🤩\tstar_struck\n😘\tkissing_heart\n😗\tkissing\n☺️\trelaxed\n😚\tkissing_closed_eyes\n😙\tkissing_smiling_eyes\n🥲\tsmiling_face_with_tear\n😋\tyum\n😛\tstuck_out_tongue\n😜\tstuck_out_tongue_winking_eye\n🤪\tzany_face\n😝\tstuck_out_tongue_closed_eyes\n🤑\tmoney_mouth_face\n🤗\thugs\n🤭\thand_over_mouth\n🫢\tface_with_open_eyes_and_hand_over_mouth\n🫣\tface_with_peeking_eye\n🤫\tshushing_face\n🤔\tthinking\n🫡\tsaluting_face\n🤐\tzipper_mouth_face\n🤨\traised_eyebrow\n😐\tneutral_face\n😑\texpressionless\n😶\tno_mouth\n🫥\tdotted_line_face\n😶🌫️\tface_in_clouds\n😏\tsmirk\n😒\tunamused\n🙄\troll_eyes\n😬\tgrimacing\n😮💨\tface_exhaling\n🤥\tlying_face\n🫨\tshaking_face\n😌\trelieved\n😔\tpensive\n😪\tsleepy\n🤤\tdrooling_face\n😴\tsleeping\n😷\tmask\n🤒\tface_with_thermometer\n🤕\tface_with_head_bandage\n🤢\tnauseated_face\n🤮\tvomiting_face\n🤧\tsneezing_face\n🥵\thot_face\n🥶\tcold_face\n🥴\twoozy_face\n😵\tdizzy_face\n😵💫\tface_with_spiral_eyes\n🤯\texploding_head\n🤠\tcowboy_hat_face\n🥳\tpartying_face\n🥸\tdisguised_face\n😎\tsunglasses\n🤓\tnerd_face\n🧐\tmonocle_face\n😕\tconfused\n🫤\tface_with_diagonal_mouth\n😟\tworried\n🙁\tslightly_frowning_face\n☹️\tfrowning_face\n😮\topen_mouth\n😯\thushed\n😲\tastonished\n😳\tflushed\n🥺\tpleading_face\n🥹\tface_holding_back_tears\n😦\tfrowning\n😧\tanguished\n😨\tfearful\n😰\tcold_sweat\n😥\tdisappointed_relieved\n😢\tcry\n😭\tsob\n😱\tscream\n😖\tconfounded\n😣\tpersevere\n😞\tdisappointed\n😓\tsweat\n😩\tweary\n😫\ttired_face\n🥱\tyawning_face\n😤\ttriumph\n😡\trage pout\n😠\tangry\n🤬\tcursing_face\n😈\tsmiling_imp\n👿\timp\n💀\tskull\n☠️\tskull_and_crossbones\n💩\thankey poop shit\n🤡\tclown_face\n👹\tjapanese_ogre\n👺\tjapanese_goblin\n👻\tghost\n👽\talien\n👾\tspace_invader\n🤖\trobot\n😺\tsmiley_cat\n😸\tsmile_cat\n😹\tjoy_cat\n😻\theart_eyes_cat\n😼\tsmirk_cat\n😽\tkissing_cat\n🙀\tscream_cat\n😿\tcrying_cat_face\n😾\tpouting_cat\n🙈\tsee_no_evil\n🙉\thear_no_evil\n🙊\tspeak_no_evil\n💌\tlove_letter\n💘\tcupid\n💝\tgift_heart\n💖\tsparkling_heart\n💗\theartpulse\n💓\theartbeat\n💞\trevolving_hearts\n💕\ttwo_hearts\n💟\theart_decoration\n❣️\theavy_heart_exclamation\n💔\tbroken_heart\n❤️🔥\theart_on_fire\n❤️🩹\tmending_heart\n❤️\theart\n🩷\tpink_heart\n🧡\torange_heart\n💛\tyellow_heart\n💚\tgreen_heart\n💙\tblue_heart\n🩵\tlight_blue_heart\n💜\tpurple_heart\n🤎\tbrown_heart\n🖤\tblack_heart\n🩶\tgrey_heart\n🤍\twhite_heart\n💋\tkiss\n💯\t100\n💢\tanger\n💥\tboom collision\n💫\tdizzy\n💦\tsweat_drops\n💨\tdash\n🕳️\thole\n💬\tspeech_balloon\n👁️🗨️\teye_speech_bubble\n🗨️\tleft_speech_bubble\n🗯️\tright_anger_bubble\n💭\tthought_balloon\n💤\tzzz\n👋\twave\n🤚\traised_back_of_hand\n🖐️\traised_hand_with_fingers_splayed\n✋\thand raised_hand\n🖖\tvulcan_salute\n🫱\trightwards_hand\n🫲\tleftwards_hand\n🫳\tpalm_down_hand\n🫴\tpalm_up_hand\n🫷\tleftwards_pushing_hand\n🫸\trightwards_pushing_hand\n👌\tok_hand\n🤌\tpinched_fingers\n🤏\tpinching_hand\n✌️\tv\n🤞\tcrossed_fingers\n🫰\thand_with_index_finger_and_thumb_crossed\n🤟\tlove_you_gesture\n🤘\tmetal\n🤙\tcall_me_hand\n👈\tpoint_left\n👉\tpoint_right\n👆\tpoint_up_2\n🖕\tmiddle_finger fu\n👇\tpoint_down\n☝️\tpoint_up\n🫵\tindex_pointing_at_the_viewer\n👍\t+1 thumbsup\n👎\t-1 thumbsdown\n✊\tfist_raised fist\n👊\tfist_oncoming facepunch punch\n🤛\tfist_left\n🤜\tfist_right\n👏\tclap\n🙌\traised_hands\n🫶\theart_hands\n👐\topen_hands\n🤲\tpalms_up_together\n🤝\thandshake\n🙏\tpray\n✍️\twriting_hand\n💅\tnail_care\n🤳\tselfie\n💪\tmuscle\n🦾\tmechanical_arm\n🦿\tmechanical_leg\n🦵\tleg\n🦶\tfoot\n👂\tear\n🦻\tear_with_hearing_aid\n👃\tnose\n🧠\tbrain\n🫀\tanatomical_heart\n🫁\tlungs\n🦷\ttooth\n🦴\tbone\n👀\teyes\n👁️\teye\n👅\ttongue\n👄\tlips\n🫦\tbiting_lip\n👶\tbaby\n🧒\tchild\n👦\tboy\n👧\tgirl\n🧑\tadult\n👱\tblond_haired_person\n👨\tman\n🧔\tbearded_person\n🧔♂️\tman_beard\n🧔♀️\twoman_beard\n👨🦰\tred_haired_man\n👨🦱\tcurly_haired_man\n👨🦳\twhite_haired_man\n👨🦲\tbald_man\n👩\twoman\n👩🦰\tred_haired_woman\n🧑🦰\tperson_red_hair\n👩🦱\tcurly_haired_woman\n🧑🦱\tperson_curly_hair\n👩🦳\twhite_haired_woman\n🧑🦳\tperson_white_hair\n👩🦲\tbald_woman\n🧑🦲\tperson_bald\n👱♀️\tblond_haired_woman blonde_woman\n👱♂️\tblond_haired_man\n🧓\tolder_adult\n👴\tolder_man\n👵\tolder_woman\n🙍\tfrowning_person\n🙍♂️\tfrowning_man\n🙍♀️\tfrowning_woman\n🙎\tpouting_face\n🙎♂️\tpouting_man\n🙎♀️\tpouting_woman\n🙅\tno_good\n🙅♂️\tno_good_man ng_man\n🙅♀️\tno_good_woman ng_woman\n🙆\tok_person\n🙆♂️\tok_man\n🙆♀️\tok_woman\n💁\ttipping_hand_person information_desk_person\n💁♂️\ttipping_hand_man sassy_man\n💁♀️\ttipping_hand_woman sassy_woman\n🙋\traising_hand\n🙋♂️\traising_hand_man\n🙋♀️\traising_hand_woman\n🧏\tdeaf_person\n🧏♂️\tdeaf_man\n🧏♀️\tdeaf_woman\n🙇\tbow\n🙇♂️\tbowing_man\n🙇♀️\tbowing_woman\n🤦\tfacepalm\n🤦♂️\tman_facepalming\n🤦♀️\twoman_facepalming\n🤷\tshrug\n🤷♂️\tman_shrugging\n🤷♀️\twoman_shrugging\n🧑⚕️\thealth_worker\n👨⚕️\tman_health_worker\n👩⚕️\twoman_health_worker\n🧑🎓\tstudent\n👨🎓\tman_student\n👩🎓\twoman_student\n🧑🏫\tteacher\n👨🏫\tman_teacher\n👩🏫\twoman_teacher\n🧑⚖️\tjudge\n👨⚖️\tman_judge\n👩⚖️\twoman_judge\n🧑🌾\tfarmer\n👨🌾\tman_farmer\n👩🌾\twoman_farmer\n🧑🍳\tcook\n👨🍳\tman_cook\n👩🍳\twoman_cook\n🧑🔧\tmechanic\n👨🔧\tman_mechanic\n👩🔧\twoman_mechanic\n🧑🏭\tfactory_worker\n👨🏭\tman_factory_worker\n👩🏭\twoman_factory_worker\n🧑💼\toffice_worker\n👨💼\tman_office_worker\n👩💼\twoman_office_worker\n🧑🔬\tscientist\n👨🔬\tman_scientist\n👩🔬\twoman_scientist\n🧑💻\ttechnologist\n👨💻\tman_technologist\n👩💻\twoman_technologist\n🧑🎤\tsinger\n👨🎤\tman_singer\n👩🎤\twoman_singer\n🧑🎨\tartist\n👨🎨\tman_artist\n👩🎨\twoman_artist\n🧑✈️\tpilot\n👨✈️\tman_pilot\n👩✈️\twoman_pilot\n🧑🚀\tastronaut\n👨🚀\tman_astronaut\n👩🚀\twoman_astronaut\n🧑🚒\tfirefighter\n👨🚒\tman_firefighter\n👩🚒\twoman_firefighter\n👮\tpolice_officer cop\n👮♂️\tpoliceman\n👮♀️\tpolicewoman\n🕵️\tdetective\n🕵️♂️\tmale_detective\n🕵️♀️\tfemale_detective\n💂\tguard\n💂♂️\tguardsman\n💂♀️\tguardswoman\n🥷\tninja\n👷\tconstruction_worker\n👷♂️\tconstruction_worker_man\n👷♀️\tconstruction_worker_woman\n🫅\tperson_with_crown\n🤴\tprince\n👸\tprincess\n👳\tperson_with_turban\n👳♂️\tman_with_turban\n👳♀️\twoman_with_turban\n👲\tman_with_gua_pi_mao\n🧕\twoman_with_headscarf\n🤵\tperson_in_tuxedo\n🤵♂️\tman_in_tuxedo\n🤵♀️\twoman_in_tuxedo\n👰\tperson_with_veil\n👰♂️\tman_with_veil\n👰♀️\twoman_with_veil bride_with_veil\n🤰\tpregnant_woman\n🫃\tpregnant_man\n🫄\tpregnant_person\n🤱\tbreast_feeding\n👩🍼\twoman_feeding_baby\n👨🍼\tman_feeding_baby\n🧑🍼\tperson_feeding_baby\n👼\tangel\n🎅\tsanta\n🤶\tmrs_claus\n🧑🎄\tmx_claus\n🦸\tsuperhero\n🦸♂️\tsuperhero_man\n🦸♀️\tsuperhero_woman\n🦹\tsupervillain\n🦹♂️\tsupervillain_man\n🦹♀️\tsupervillain_woman\n🧙\tmage\n🧙♂️\tmage_man\n🧙♀️\tmage_woman\n🧚\tfairy\n🧚♂️\tfairy_man\n🧚♀️\tfairy_woman\n🧛\tvampire\n🧛♂️\tvampire_man\n🧛♀️\tvampire_woman\n🧜\tmerperson\n🧜♂️\tmerman\n🧜♀️\tmermaid\n🧝\telf\n🧝♂️\telf_man\n🧝♀️\telf_woman\n🧞\tgenie\n🧞♂️\tgenie_man\n🧞♀️\tgenie_woman\n🧟\tzombie\n🧟♂️\tzombie_man\n🧟♀️\tzombie_woman\n🧌\ttroll\n💆\tmassage\n💆♂️\tmassage_man\n💆♀️\tmassage_woman\n💇\thaircut\n💇♂️\thaircut_man\n💇♀️\thaircut_woman\n🚶\twalking\n🚶♂️\twalking_man\n🚶♀️\twalking_woman\n🧍\tstanding_person\n🧍♂️\tstanding_man\n🧍♀️\tstanding_woman\n🧎\tkneeling_person\n🧎♂️\tkneeling_man\n🧎♀️\tkneeling_woman\n🧑🦯\tperson_with_probing_cane\n👨🦯\tman_with_probing_cane\n👩🦯\twoman_with_probing_cane\n🧑🦼\tperson_in_motorized_wheelchair\n👨🦼\tman_in_motorized_wheelchair\n👩🦼\twoman_in_motorized_wheelchair\n🧑🦽\tperson_in_manual_wheelchair\n👨🦽\tman_in_manual_wheelchair\n👩🦽\twoman_in_manual_wheelchair\n🏃\trunner running\n🏃♂️\trunning_man\n🏃♀️\trunning_woman\n💃\twoman_dancing dancer\n🕺\tman_dancing\n🕴️\tbusiness_suit_levitating\n👯\tdancers\n👯♂️\tdancing_men\n👯♀️\tdancing_women\n🧖\tsauna_person\n🧖♂️\tsauna_man\n🧖♀️\tsauna_woman\n🧗\tclimbing\n🧗♂️\tclimbing_man\n🧗♀️\tclimbing_woman\n🤺\tperson_fencing\n🏇\thorse_racing\n⛷️\tskier\n🏂\tsnowboarder\n🏌️\tgolfing\n🏌️♂️\tgolfing_man\n🏌️♀️\tgolfing_woman\n🏄\tsurfer\n🏄♂️\tsurfing_man\n🏄♀️\tsurfing_woman\n🚣\trowboat\n🚣♂️\trowing_man\n🚣♀️\trowing_woman\n🏊\tswimmer\n🏊♂️\tswimming_man\n🏊♀️\tswimming_woman\n⛹️\tbouncing_ball_person\n⛹️♂️\tbouncing_ball_man basketball_man\n⛹️♀️\tbouncing_ball_woman basketball_woman\n🏋️\tweight_lifting\n🏋️♂️\tweight_lifting_man\n🏋️♀️\tweight_lifting_woman\n🚴\tbicyclist\n🚴♂️\tbiking_man\n🚴♀️\tbiking_woman\n🚵\tmountain_bicyclist\n🚵♂️\tmountain_biking_man\n🚵♀️\tmountain_biking_woman\n🤸\tcartwheeling\n🤸♂️\tman_cartwheeling\n🤸♀️\twoman_cartwheeling\n🤼\twrestling\n🤼♂️\tmen_wrestling\n🤼♀️\twomen_wrestling\n🤽\twater_polo\n🤽♂️\tman_playing_water_polo\n🤽♀️\twoman_playing_water_polo\n🤾\thandball_person\n🤾♂️\tman_playing_handball\n🤾♀️\twoman_playing_handball\n🤹\tjuggling_person\n🤹♂️\tman_juggling\n🤹♀️\twoman_juggling\n🧘\tlotus_position\n🧘♂️\tlotus_position_man\n🧘♀️\tlotus_position_woman\n🛀\tbath\n🛌\tsleeping_bed\n🧑🤝🧑\tpeople_holding_hands\n👭\ttwo_women_holding_hands\n👫\tcouple\n👬\ttwo_men_holding_hands\n💏\tcouplekiss\n👩❤️💋👨\tcouplekiss_man_woman\n👨❤️💋👨\tcouplekiss_man_man\n👩❤️💋👩\tcouplekiss_woman_woman\n💑\tcouple_with_heart\n👩❤️👨\tcouple_with_heart_woman_man\n👨❤️👨\tcouple_with_heart_man_man\n👩❤️👩\tcouple_with_heart_woman_woman\n👪\tfamily\n👨👩👦\tfamily_man_woman_boy\n👨👩👧\tfamily_man_woman_girl\n👨👩👧👦\tfamily_man_woman_girl_boy\n👨👩👦👦\tfamily_man_woman_boy_boy\n👨👩👧👧\tfamily_man_woman_girl_girl\n👨👨👦\tfamily_man_man_boy\n👨👨👧\tfamily_man_man_girl\n👨👨👧👦\tfamily_man_man_girl_boy\n👨👨👦👦\tfamily_man_man_boy_boy\n👨👨👧👧\tfamily_man_man_girl_girl\n👩👩👦\tfamily_woman_woman_boy\n👩👩👧\tfamily_woman_woman_girl\n👩👩👧👦\tfamily_woman_woman_girl_boy\n👩👩👦👦\tfamily_woman_woman_boy_boy\n👩👩👧👧\tfamily_woman_woman_girl_girl\n👨👦\tfamily_man_boy\n👨👦👦\tfamily_man_boy_boy\n👨👧\tfamily_man_girl\n👨👧👦\tfamily_man_girl_boy\n👨👧👧\tfamily_man_girl_girl\n👩👦\tfamily_woman_boy\n👩👦👦\tfamily_woman_boy_boy\n👩👧\tfamily_woman_girl\n👩👧👦\tfamily_woman_girl_boy\n👩👧👧\tfamily_woman_girl_girl\n🗣️\tspeaking_head\n👤\tbust_in_silhouette\n👥\tbusts_in_silhouette\n🫂\tpeople_hugging\n👣\tfootprints\n🐵\tmonkey_face\n🐒\tmonkey\n🦍\tgorilla\n🦧\torangutan\n🐶\tdog\n🐕\tdog2\n🦮\tguide_dog\n🐕🦺\tservice_dog\n🐩\tpoodle\n🐺\twolf\n🦊\tfox_face\n🦝\traccoon\n🐱\tcat\n🐈\tcat2\n🐈⬛\tblack_cat\n🦁\tlion\n🐯\ttiger\n🐅\ttiger2\n🐆\tleopard\n🐴\thorse\n🫎\tmoose\n🫏\tdonkey\n🐎\tracehorse\n🦄\tunicorn\n🦓\tzebra\n🦌\tdeer\n🦬\tbison\n🐮\tcow\n🐂\tox\n🐃\twater_buffalo\n🐄\tcow2\n🐷\tpig\n🐖\tpig2\n🐗\tboar\n🐽\tpig_nose\n🐏\tram\n🐑\tsheep\n🐐\tgoat\n🐪\tdromedary_camel\n🐫\tcamel\n🦙\tllama\n🦒\tgiraffe\n🐘\telephant\n🦣\tmammoth\n🦏\trhinoceros\n🦛\thippopotamus\n🐭\tmouse\n🐁\tmouse2\n🐀\trat\n🐹\thamster\n🐰\trabbit\n🐇\trabbit2\n🐿️\tchipmunk\n🦫\tbeaver\n🦔\thedgehog\n🦇\tbat\n🐻\tbear\n🐻❄️\tpolar_bear\n🐨\tkoala\n🐼\tpanda_face\n🦥\tsloth\n🦦\totter\n🦨\tskunk\n🦘\tkangaroo\n🦡\tbadger\n🐾\tfeet paw_prints\n🦃\tturkey\n🐔\tchicken\n🐓\trooster\n🐣\thatching_chick\n🐤\tbaby_chick\n🐥\thatched_chick\n🐦\tbird\n🐧\tpenguin\n🕊️\tdove\n🦅\teagle\n🦆\tduck\n🦢\tswan\n🦉\towl\n🦤\tdodo\n🪶\tfeather\n🦩\tflamingo\n🦚\tpeacock\n🦜\tparrot\n🪽\twing\n🐦⬛\tblack_bird\n🪿\tgoose\n🐸\tfrog\n🐊\tcrocodile\n🐢\tturtle\n🦎\tlizard\n🐍\tsnake\n🐲\tdragon_face\n🐉\tdragon\n🦕\tsauropod\n🦖\tt-rex\n🐳\twhale\n🐋\twhale2\n🐬\tdolphin flipper\n🦭\tseal\n🐟\tfish\n🐠\ttropical_fish\n🐡\tblowfish\n🦈\tshark\n🐙\toctopus\n🐚\tshell\n🪸\tcoral\n🪼\tjellyfish\n🐌\tsnail\n🦋\tbutterfly\n🐛\tbug\n🐜\tant\n🐝\tbee honeybee\n🪲\tbeetle\n🐞\tlady_beetle\n🦗\tcricket\n🪳\tcockroach\n🕷️\tspider\n🕸️\tspider_web\n🦂\tscorpion\n🦟\tmosquito\n🪰\tfly\n🪱\tworm\n🦠\tmicrobe\n💐\tbouquet\n🌸\tcherry_blossom\n💮\twhite_flower\n🪷\tlotus\n🏵️\trosette\n🌹\trose\n🥀\twilted_flower\n🌺\thibiscus\n🌻\tsunflower\n🌼\tblossom\n🌷\ttulip\n🪻\thyacinth\n🌱\tseedling\n🪴\tpotted_plant\n🌲\tevergreen_tree\n🌳\tdeciduous_tree\n🌴\tpalm_tree\n🌵\tcactus\n🌾\tear_of_rice\n🌿\therb\n☘️\tshamrock\n🍀\tfour_leaf_clover\n🍁\tmaple_leaf\n🍂\tfallen_leaf\n🍃\tleaves\n🪹\tempty_nest\n🪺\tnest_with_eggs\n🍄\tmushroom\n🍇\tgrapes\n🍈\tmelon\n🍉\twatermelon\n🍊\ttangerine orange mandarin\n🍋\tlemon\n🍌\tbanana\n🍍\tpineapple\n🥭\tmango\n🍎\tapple\n🍏\tgreen_apple\n🍐\tpear\n🍑\tpeach\n🍒\tcherries\n🍓\tstrawberry\n🫐\tblueberries\n🥝\tkiwi_fruit\n🍅\ttomato\n🫒\tolive\n🥥\tcoconut\n🥑\tavocado\n🍆\teggplant\n🥔\tpotato\n🥕\tcarrot\n🌽\tcorn\n🌶️\thot_pepper\n🫑\tbell_pepper\n🥒\tcucumber\n🥬\tleafy_green\n🥦\tbroccoli\n🧄\tgarlic\n🧅\tonion\n🥜\tpeanuts\n🫘\tbeans\n🌰\tchestnut\n🫚\tginger_root\n🫛\tpea_pod\n🍞\tbread\n🥐\tcroissant\n🥖\tbaguette_bread\n🫓\tflatbread\n🥨\tpretzel\n🥯\tbagel\n🥞\tpancakes\n🧇\twaffle\n🧀\tcheese\n🍖\tmeat_on_bone\n🍗\tpoultry_leg\n🥩\tcut_of_meat\n🥓\tbacon\n🍔\thamburger\n🍟\tfries\n🍕\tpizza\n🌭\thotdog\n🥪\tsandwich\n🌮\ttaco\n🌯\tburrito\n🫔\ttamale\n🥙\tstuffed_flatbread\n🧆\tfalafel\n🥚\tegg\n🍳\tfried_egg\n🥘\tshallow_pan_of_food\n🍲\tstew\n🫕\tfondue\n🥣\tbowl_with_spoon\n🥗\tgreen_salad\n🍿\tpopcorn\n🧈\tbutter\n🧂\tsalt\n🥫\tcanned_food\n🍱\tbento\n🍘\trice_cracker\n🍙\trice_ball\n🍚\trice\n🍛\tcurry\n🍜\tramen\n🍝\tspaghetti\n🍠\tsweet_potato\n🍢\toden\n🍣\tsushi\n🍤\tfried_shrimp\n🍥\tfish_cake\n🥮\tmoon_cake\n🍡\tdango\n🥟\tdumpling\n🥠\tfortune_cookie\n🥡\ttakeout_box\n🦀\tcrab\n🦞\tlobster\n🦐\tshrimp\n🦑\tsquid\n🦪\toyster\n🍦\ticecream\n🍧\tshaved_ice\n🍨\tice_cream\n🍩\tdoughnut\n🍪\tcookie\n🎂\tbirthday\n🍰\tcake\n🧁\tcupcake\n🥧\tpie\n🍫\tchocolate_bar\n🍬\tcandy\n🍭\tlollipop\n🍮\tcustard\n🍯\thoney_pot\n🍼\tbaby_bottle\n🥛\tmilk_glass\n☕\tcoffee\n🫖\tteapot\n🍵\ttea\n🍶\tsake\n🍾\tchampagne\n🍷\twine_glass\n🍸\tcocktail\n🍹\ttropical_drink\n🍺\tbeer\n🍻\tbeers\n🥂\tclinking_glasses\n🥃\ttumbler_glass\n🫗\tpouring_liquid\n🥤\tcup_with_straw\n🧋\tbubble_tea\n🧃\tbeverage_box\n🧉\tmate\n🧊\tice_cube\n🥢\tchopsticks\n🍽️\tplate_with_cutlery\n🍴\tfork_and_knife\n🥄\tspoon\n🔪\thocho knife\n🫙\tjar\n🏺\tamphora\n🌍\tearth_africa\n🌎\tearth_americas\n🌏\tearth_asia\n🌐\tglobe_with_meridians\n🗺️\tworld_map\n🗾\tjapan\n🧭\tcompass\n🏔️\tmountain_snow\n⛰️\tmountain\n🌋\tvolcano\n🗻\tmount_fuji\n🏕️\tcamping\n🏖️\tbeach_umbrella\n🏜️\tdesert\n🏝️\tdesert_island\n🏞️\tnational_park\n🏟️\tstadium\n🏛️\tclassical_building\n🏗️\tbuilding_construction\n🧱\tbricks\n🪨\trock\n🪵\twood\n🛖\thut\n🏘️\thouses\n🏚️\tderelict_house\n🏠\thouse\n🏡\thouse_with_garden\n🏢\toffice\n🏣\tpost_office\n🏤\teuropean_post_office\n🏥\thospital\n🏦\tbank\n🏨\thotel\n🏩\tlove_hotel\n🏪\tconvenience_store\n🏫\tschool\n🏬\tdepartment_store\n🏭\tfactory\n🏯\tjapanese_castle\n🏰\teuropean_castle\n💒\twedding\n🗼\ttokyo_tower\n🗽\tstatue_of_liberty\n⛪\tchurch\n🕌\tmosque\n🛕\thindu_temple\n🕍\tsynagogue\n⛩️\tshinto_shrine\n🕋\tkaaba\n⛲\tfountain\n⛺\ttent\n🌁\tfoggy\n🌃\tnight_with_stars\n🏙️\tcityscape\n🌄\tsunrise_over_mountains\n🌅\tsunrise\n🌆\tcity_sunset\n🌇\tcity_sunrise\n🌉\tbridge_at_night\n♨️\thotsprings\n🎠\tcarousel_horse\n🛝\tplayground_slide\n🎡\tferris_wheel\n🎢\troller_coaster\n💈\tbarber\n🎪\tcircus_tent\n🚂\tsteam_locomotive\n🚃\trailway_car\n🚄\tbullettrain_side\n🚅\tbullettrain_front\n🚆\ttrain2\n🚇\tmetro\n🚈\tlight_rail\n🚉\tstation\n🚊\ttram\n🚝\tmonorail\n🚞\tmountain_railway\n🚋\ttrain\n🚌\tbus\n🚍\toncoming_bus\n🚎\ttrolleybus\n🚐\tminibus\n🚑\tambulance\n🚒\tfire_engine\n🚓\tpolice_car\n🚔\toncoming_police_car\n🚕\ttaxi\n🚖\toncoming_taxi\n🚗\tcar red_car\n🚘\toncoming_automobile\n🚙\tblue_car\n🛻\tpickup_truck\n🚚\ttruck\n🚛\tarticulated_lorry\n🚜\ttractor\n🏎️\tracing_car\n🏍️\tmotorcycle\n🛵\tmotor_scooter\n🦽\tmanual_wheelchair\n🦼\tmotorized_wheelchair\n🛺\tauto_rickshaw\n🚲\tbike\n🛴\tkick_scooter\n🛹\tskateboard\n🛼\troller_skate\n🚏\tbusstop\n🛣️\tmotorway\n🛤️\trailway_track\n🛢️\toil_drum\n⛽\tfuelpump\n🛞\twheel\n🚨\trotating_light\n🚥\ttraffic_light\n🚦\tvertical_traffic_light\n🛑\tstop_sign\n🚧\tconstruction\n⚓\tanchor\n🛟\tring_buoy\n⛵\tboat sailboat\n🛶\tcanoe\n🚤\tspeedboat\n🛳️\tpassenger_ship\n⛴️\tferry\n🛥️\tmotor_boat\n🚢\tship\n✈️\tairplane\n🛩️\tsmall_airplane\n🛫\tflight_departure\n🛬\tflight_arrival\n🪂\tparachute\n💺\tseat\n🚁\thelicopter\n🚟\tsuspension_railway\n🚠\tmountain_cableway\n🚡\taerial_tramway\n🛰️\tartificial_satellite\n🚀\trocket\n🛸\tflying_saucer\n🛎️\tbellhop_bell\n🧳\tluggage\n⌛\thourglass\n⏳\thourglass_flowing_sand\n⌚\twatch\n⏰\talarm_clock\n⏱️\tstopwatch\n⏲️\ttimer_clock\n🕰️\tmantelpiece_clock\n🕛\tclock12\n🕧\tclock1230\n🕐\tclock1\n🕜\tclock130\n🕑\tclock2\n🕝\tclock230\n🕒\tclock3\n🕞\tclock330\n🕓\tclock4\n🕟\tclock430\n🕔\tclock5\n🕠\tclock530\n🕕\tclock6\n🕡\tclock630\n🕖\tclock7\n🕢\tclock730\n🕗\tclock8\n🕣\tclock830\n🕘\tclock9\n🕤\tclock930\n🕙\tclock10\n🕥\tclock1030\n🕚\tclock11\n🕦\tclock1130\n🌑\tnew_moon\n🌒\twaxing_crescent_moon\n🌓\tfirst_quarter_moon\n🌔\tmoon waxing_gibbous_moon\n🌕\tfull_moon\n🌖\twaning_gibbous_moon\n🌗\tlast_quarter_moon\n🌘\twaning_crescent_moon\n🌙\tcrescent_moon\n🌚\tnew_moon_with_face\n🌛\tfirst_quarter_moon_with_face\n🌜\tlast_quarter_moon_with_face\n🌡️\tthermometer\n☀️\tsunny\n🌝\tfull_moon_with_face\n🌞\tsun_with_face\n🪐\tringed_planet\n⭐\tstar\n🌟\tstar2\n🌠\tstars\n🌌\tmilky_way\n☁️\tcloud\n⛅\tpartly_sunny\n⛈️\tcloud_with_lightning_and_rain\n🌤️\tsun_behind_small_cloud\n🌥️\tsun_behind_large_cloud\n🌦️\tsun_behind_rain_cloud\n🌧️\tcloud_with_rain\n🌨️\tcloud_with_snow\n🌩️\tcloud_with_lightning\n🌪️\ttornado\n🌫️\tfog\n🌬️\twind_face\n🌀\tcyclone\n🌈\trainbow\n🌂\tclosed_umbrella\n☂️\topen_umbrella\n☔\tumbrella\n⛱️\tparasol_on_ground\n⚡\tzap\n❄️\tsnowflake\n☃️\tsnowman_with_snow\n⛄\tsnowman\n☄️\tcomet\n🔥\tfire\n💧\tdroplet\n🌊\tocean\n🎃\tjack_o_lantern\n🎄\tchristmas_tree\n🎆\tfireworks\n🎇\tsparkler\n🧨\tfirecracker\n✨\tsparkles\n🎈\tballoon\n🎉\ttada\n🎊\tconfetti_ball\n🎋\ttanabata_tree\n🎍\tbamboo\n🎎\tdolls\n🎏\tflags\n🎐\twind_chime\n🎑\trice_scene\n🧧\tred_envelope\n🎀\tribbon\n🎁\tgift\n🎗️\treminder_ribbon\n🎟️\ttickets\n🎫\tticket\n🎖️\tmedal_military\n🏆\ttrophy\n🏅\tmedal_sports\n🥇\t1st_place_medal\n🥈\t2nd_place_medal\n🥉\t3rd_place_medal\n⚽\tsoccer\n⚾\tbaseball\n🥎\tsoftball\n🏀\tbasketball\n🏐\tvolleyball\n🏈\tfootball\n🏉\trugby_football\n🎾\ttennis\n🥏\tflying_disc\n🎳\tbowling\n🏏\tcricket_game\n🏑\tfield_hockey\n🏒\tice_hockey\n🥍\tlacrosse\n🏓\tping_pong\n🏸\tbadminton\n🥊\tboxing_glove\n🥋\tmartial_arts_uniform\n🥅\tgoal_net\n⛳\tgolf\n⛸️\tice_skate\n🎣\tfishing_pole_and_fish\n🤿\tdiving_mask\n🎽\trunning_shirt_with_sash\n🎿\tski\n🛷\tsled\n🥌\tcurling_stone\n🎯\tdart\n🪀\tyo_yo\n🪁\tkite\n🔫\tgun\n🎱\t8ball\n🔮\tcrystal_ball\n🪄\tmagic_wand\n🎮\tvideo_game\n🕹️\tjoystick\n🎰\tslot_machine\n🎲\tgame_die\n🧩\tjigsaw\n🧸\tteddy_bear\n🪅\tpinata\n🪩\tmirror_ball\n🪆\tnesting_dolls\n♠️\tspades\n♥️\thearts\n♦️\tdiamonds\n♣️\tclubs\n♟️\tchess_pawn\n🃏\tblack_joker\n🀄\tmahjong\n🎴\tflower_playing_cards\n🎭\tperforming_arts\n🖼️\tframed_picture\n🎨\tart\n🧵\tthread\n🪡\tsewing_needle\n🧶\tyarn\n🪢\tknot\n👓\teyeglasses\n🕶️\tdark_sunglasses\n🥽\tgoggles\n🥼\tlab_coat\n🦺\tsafety_vest\n👔\tnecktie\n👕\tshirt tshirt\n👖\tjeans\n🧣\tscarf\n🧤\tgloves\n🧥\tcoat\n🧦\tsocks\n👗\tdress\n👘\tkimono\n🥻\tsari\n🩱\tone_piece_swimsuit\n🩲\tswim_brief\n🩳\tshorts\n👙\tbikini\n👚\twomans_clothes\n🪭\tfolding_hand_fan\n👛\tpurse\n👜\thandbag\n👝\tpouch\n🛍️\tshopping\n🎒\tschool_satchel\n🩴\tthong_sandal\n👞\tmans_shoe shoe\n👟\tathletic_shoe\n🥾\thiking_boot\n🥿\tflat_shoe\n👠\thigh_heel\n👡\tsandal\n🩰\tballet_shoes\n👢\tboot\n🪮\thair_pick\n👑\tcrown\n👒\twomans_hat\n🎩\ttophat\n🎓\tmortar_board\n🧢\tbilled_cap\n🪖\tmilitary_helmet\n⛑️\trescue_worker_helmet\n📿\tprayer_beads\n💄\tlipstick\n💍\tring\n💎\tgem\n🔇\tmute\n🔈\tspeaker\n🔉\tsound\n🔊\tloud_sound\n📢\tloudspeaker\n📣\tmega\n📯\tpostal_horn\n🔔\tbell\n🔕\tno_bell\n🎼\tmusical_score\n🎵\tmusical_note\n🎶\tnotes\n🎙️\tstudio_microphone\n🎚️\tlevel_slider\n🎛️\tcontrol_knobs\n🎤\tmicrophone\n🎧\theadphones\n📻\tradio\n🎷\tsaxophone\n🪗\taccordion\n🎸\tguitar\n🎹\tmusical_keyboard\n🎺\ttrumpet\n🎻\tviolin\n🪕\tbanjo\n🥁\tdrum\n🪘\tlong_drum\n🪇\tmaracas\n🪈\tflute\n📱\tiphone\n📲\tcalling\n☎️\tphone telephone\n📞\ttelephone_receiver\n📟\tpager\n📠\tfax\n🔋\tbattery\n🪫\tlow_battery\n🔌\telectric_plug\n💻\tcomputer\n🖥️\tdesktop_computer\n🖨️\tprinter\n⌨️\tkeyboard\n🖱️\tcomputer_mouse\n🖲️\ttrackball\n💽\tminidisc\n💾\tfloppy_disk\n💿\tcd\n📀\tdvd\n🧮\tabacus\n🎥\tmovie_camera\n🎞️\tfilm_strip\n📽️\tfilm_projector\n🎬\tclapper\n📺\ttv\n📷\tcamera\n📸\tcamera_flash\n📹\tvideo_camera\n📼\tvhs\n🔍\tmag\n🔎\tmag_right\n🕯️\tcandle\n💡\tbulb\n🔦\tflashlight\n🏮\tizakaya_lantern lantern\n🪔\tdiya_lamp\n📔\tnotebook_with_decorative_cover\n📕\tclosed_book\n📖\tbook open_book\n📗\tgreen_book\n📘\tblue_book\n📙\torange_book\n📚\tbooks\n📓\tnotebook\n📒\tledger\n📃\tpage_with_curl\n📜\tscroll\n📄\tpage_facing_up\n📰\tnewspaper\n🗞️\tnewspaper_roll\n📑\tbookmark_tabs\n🔖\tbookmark\n🏷️\tlabel\n💰\tmoneybag\n🪙\tcoin\n💴\tyen\n💵\tdollar\n💶\teuro\n💷\tpound\n💸\tmoney_with_wings\n💳\tcredit_card\n🧾\treceipt\n💹\tchart\n✉️\tenvelope\n📧\temail e-mail\n📨\tincoming_envelope\n📩\tenvelope_with_arrow\n📤\toutbox_tray\n📥\tinbox_tray\n📦\tpackage\n📫\tmailbox\n📪\tmailbox_closed\n📬\tmailbox_with_mail\n📭\tmailbox_with_no_mail\n📮\tpostbox\n🗳️\tballot_box\n✏️\tpencil2\n✒️\tblack_nib\n🖋️\tfountain_pen\n🖊️\tpen\n🖌️\tpaintbrush\n🖍️\tcrayon\n📝\tmemo pencil\n💼\tbriefcase\n📁\tfile_folder\n📂\topen_file_folder\n🗂️\tcard_index_dividers\n📅\tdate\n📆\tcalendar\n🗒️\tspiral_notepad\n🗓️\tspiral_calendar\n📇\tcard_index\n📈\tchart_with_upwards_trend\n📉\tchart_with_downwards_trend\n📊\tbar_chart\n📋\tclipboard\n📌\tpushpin\n📍\tround_pushpin\n📎\tpaperclip\n🖇️\tpaperclips\n📏\tstraight_ruler\n📐\ttriangular_ruler\n✂️\tscissors\n🗃️\tcard_file_box\n🗄️\tfile_cabinet\n🗑️\twastebasket\n🔒\tlock\n🔓\tunlock\n🔏\tlock_with_ink_pen\n🔐\tclosed_lock_with_key\n🔑\tkey\n🗝️\told_key\n🔨\thammer\n🪓\taxe\n⛏️\tpick\n⚒️\thammer_and_pick\n🛠️\thammer_and_wrench\n🗡️\tdagger\n⚔️\tcrossed_swords\n💣\tbomb\n🪃\tboomerang\n🏹\tbow_and_arrow\n🛡️\tshield\n🪚\tcarpentry_saw\n🔧\twrench\n🪛\tscrewdriver\n🔩\tnut_and_bolt\n⚙️\tgear\n🗜️\tclamp\n⚖️\tbalance_scale\n🦯\tprobing_cane\n🔗\tlink\n⛓️\tchains\n🪝\thook\n🧰\ttoolbox\n🧲\tmagnet\n🪜\tladder\n⚗️\talembic\n🧪\ttest_tube\n🧫\tpetri_dish\n🧬\tdna\n🔬\tmicroscope\n🔭\ttelescope\n📡\tsatellite\n💉\tsyringe\n🩸\tdrop_of_blood\n💊\tpill\n🩹\tadhesive_bandage\n🩼\tcrutch\n🩺\tstethoscope\n🩻\tx_ray\n🚪\tdoor\n🛗\televator\n🪞\tmirror\n🪟\twindow\n🛏️\tbed\n🛋️\tcouch_and_lamp\n🪑\tchair\n🚽\ttoilet\n🪠\tplunger\n🚿\tshower\n🛁\tbathtub\n🪤\tmouse_trap\n🪒\trazor\n🧴\tlotion_bottle\n🧷\tsafety_pin\n🧹\tbroom\n🧺\tbasket\n🧻\troll_of_paper\n🪣\tbucket\n🧼\tsoap\n🫧\tbubbles\n🪥\ttoothbrush\n🧽\tsponge\n🧯\tfire_extinguisher\n🛒\tshopping_cart\n🚬\tsmoking\n⚰️\tcoffin\n🪦\theadstone\n⚱️\tfuneral_urn\n🧿\tnazar_amulet\n🪬\thamsa\n🗿\tmoyai\n🪧\tplacard\n🪪\tidentification_card\n🏧\tatm\n🚮\tput_litter_in_its_place\n🚰\tpotable_water\n♿\twheelchair\n🚹\tmens\n🚺\twomens\n🚻\trestroom\n🚼\tbaby_symbol\n🚾\twc\n🛂\tpassport_control\n🛃\tcustoms\n🛄\tbaggage_claim\n🛅\tleft_luggage\n⚠️\twarning\n🚸\tchildren_crossing\n⛔\tno_entry\n🚫\tno_entry_sign\n🚳\tno_bicycles\n🚭\tno_smoking\n🚯\tdo_not_litter\n🚱\tnon-potable_water\n🚷\tno_pedestrians\n📵\tno_mobile_phones\n🔞\tunderage\n☢️\tradioactive\n☣️\tbiohazard\n⬆️\tarrow_up\n↗️\tarrow_upper_right\n➡️\tarrow_right\n↘️\tarrow_lower_right\n⬇️\tarrow_down\n↙️\tarrow_lower_left\n⬅️\tarrow_left\n↖️\tarrow_upper_left\n↕️\tarrow_up_down\n↔️\tleft_right_arrow\n↩️\tleftwards_arrow_with_hook\n↪️\tarrow_right_hook\n⤴️\tarrow_heading_up\n⤵️\tarrow_heading_down\n🔃\tarrows_clockwise\n🔄\tarrows_counterclockwise\n🔙\tback\n🔚\tend\n🔛\ton\n🔜\tsoon\n🔝\ttop\n🛐\tplace_of_worship\n⚛️\tatom_symbol\n🕉️\tom\n✡️\tstar_of_david\n☸️\twheel_of_dharma\n☯️\tyin_yang\n✝️\tlatin_cross\n☦️\torthodox_cross\n☪️\tstar_and_crescent\n☮️\tpeace_symbol\n🕎\tmenorah\n🔯\tsix_pointed_star\n🪯\tkhanda\n♈\taries\n♉\ttaurus\n♊\tgemini\n♋\tcancer\n♌\tleo\n♍\tvirgo\n♎\tlibra\n♏\tscorpius\n♐\tsagittarius\n♑\tcapricorn\n♒\taquarius\n♓\tpisces\n⛎\tophiuchus\n🔀\ttwisted_rightwards_arrows\n🔁\trepeat\n🔂\trepeat_one\n▶️\tarrow_forward\n⏩\tfast_forward\n⏭️\tnext_track_button\n⏯️\tplay_or_pause_button\n◀️\tarrow_backward\n⏪\trewind\n⏮️\tprevious_track_button\n🔼\tarrow_up_small\n⏫\tarrow_double_up\n🔽\tarrow_down_small\n⏬\tarrow_double_down\n⏸️\tpause_button\n⏹️\tstop_button\n⏺️\trecord_button\n⏏️\teject_button\n🎦\tcinema\n🔅\tlow_brightness\n🔆\thigh_brightness\n📶\tsignal_strength\n🛜\twireless\n📳\tvibration_mode\n📴\tmobile_phone_off\n♀️\tfemale_sign\n♂️\tmale_sign\n⚧️\ttransgender_symbol\n✖️\theavy_multiplication_x\n➕\theavy_plus_sign\n➖\theavy_minus_sign\n➗\theavy_division_sign\n🟰\theavy_equals_sign\n♾️\tinfinity\n‼️\tbangbang\n⁉️\tinterrobang\n❓\tquestion\n❔\tgrey_question\n❕\tgrey_exclamation\n❗\texclamation heavy_exclamation_mark\n〰️\twavy_dash\n💱\tcurrency_exchange\n💲\theavy_dollar_sign\n⚕️\tmedical_symbol\n♻️\trecycle\n⚜️\tfleur_de_lis\n🔱\ttrident\n📛\tname_badge\n🔰\tbeginner\n⭕\to\n✅\twhite_check_mark\n☑️\tballot_box_with_check\n✔️\theavy_check_mark\n❌\tx\n❎\tnegative_squared_cross_mark\n➰\tcurly_loop\n➿\tloop\n〽️\tpart_alternation_mark\n✳️\teight_spoked_asterisk\n✴️\teight_pointed_black_star\n❇️\tsparkle\n©️\tcopyright\n®️\tregistered\n™️\ttm\n#️⃣\thash\n*️⃣\tasterisk\n0️⃣\tzero\n1️⃣\tone\n2️⃣\ttwo\n3️⃣\tthree\n4️⃣\tfour\n5️⃣\tfive\n6️⃣\tsix\n7️⃣\tseven\n8️⃣\teight\n9️⃣\tnine\n🔟\tkeycap_ten\n🔠\tcapital_abcd\n🔡\tabcd\n🔢\t1234\n🔣\tsymbols\n🔤\tabc\n🅰️\ta\n🆎\tab\n🅱️\tb\n🆑\tcl\n🆒\tcool\n🆓\tfree\nℹ️\tinformation_source\n🆔\tid\nⓂ️\tm\n🆕\tnew\n🆖\tng\n🅾️\to2\n🆗\tok\n🅿️\tparking\n🆘\tsos\n🆙\tup\n🆚\tvs\n🈁\tkoko\n🈂️\tsa\n🈷️\tu6708\n🈶\tu6709\n🈯\tu6307\n🉐\tideograph_advantage\n🈹\tu5272\n🈚\tu7121\n🈲\tu7981\n🉑\taccept\n🈸\tu7533\n🈴\tu5408\n🈳\tu7a7a\n㊗️\tcongratulations\n㊙️\tsecret\n🈺\tu55b6\n🈵\tu6e80\n🔴\tred_circle\n🟠\torange_circle\n🟡\tyellow_circle\n🟢\tgreen_circle\n🔵\tlarge_blue_circle\n🟣\tpurple_circle\n🟤\tbrown_circle\n⚫\tblack_circle\n⚪\twhite_circle\n🟥\tred_square\n🟧\torange_square\n🟨\tyellow_square\n🟩\tgreen_square\n🟦\tblue_square\n🟪\tpurple_square\n🟫\tbrown_square\n⬛\tblack_large_square\n⬜\twhite_large_square\n◼️\tblack_medium_square\n◻️\twhite_medium_square\n◾\tblack_medium_small_square\n◽\twhite_medium_small_square\n▪️\tblack_small_square\n▫️\twhite_small_square\n🔶\tlarge_orange_diamond\n🔷\tlarge_blue_diamond\n🔸\tsmall_orange_diamond\n🔹\tsmall_blue_diamond\n🔺\tsmall_red_triangle\n🔻\tsmall_red_triangle_down\n💠\tdiamond_shape_with_a_dot_inside\n🔘\tradio_button\n🔳\twhite_square_button\n🔲\tblack_square_button\n🏁\tcheckered_flag\n🚩\ttriangular_flag_on_post\n🎌\tcrossed_flags\n🏴\tblack_flag\n🏳️\twhite_flag\n🏳️🌈\trainbow_flag\n🏳️⚧️\ttransgender_flag\n🏴☠️\tpirate_flag\n🇦🇨\tascension_island\n🇦🇩\tandorra\n🇦🇪\tunited_arab_emirates\n🇦🇫\tafghanistan\n🇦🇬\tantigua_barbuda\n🇦🇮\tanguilla\n🇦🇱\talbania\n🇦🇲\tarmenia\n🇦🇴\tangola\n🇦🇶\tantarctica\n🇦🇷\targentina\n🇦🇸\tamerican_samoa\n🇦🇹\taustria\n🇦🇺\taustralia\n🇦🇼\taruba\n🇦🇽\taland_islands\n🇦🇿\tazerbaijan\n🇧🇦\tbosnia_herzegovina\n🇧🇧\tbarbados\n🇧🇩\tbangladesh\n🇧🇪\tbelgium\n🇧🇫\tburkina_faso\n🇧🇬\tbulgaria\n🇧🇭\tbahrain\n🇧🇮\tburundi\n🇧🇯\tbenin\n🇧🇱\tst_barthelemy\n🇧🇲\tbermuda\n🇧🇳\tbrunei\n🇧🇴\tbolivia\n🇧🇶\tcaribbean_netherlands\n🇧🇷\tbrazil\n🇧🇸\tbahamas\n🇧🇹\tbhutan\n🇧🇻\tbouvet_island\n🇧🇼\tbotswana\n🇧🇾\tbelarus\n🇧🇿\tbelize\n🇨🇦\tcanada\n🇨🇨\tcocos_islands\n🇨🇩\tcongo_kinshasa\n🇨🇫\tcentral_african_republic\n🇨🇬\tcongo_brazzaville\n🇨🇭\tswitzerland\n🇨🇮\tcote_divoire\n🇨🇰\tcook_islands\n🇨🇱\tchile\n🇨🇲\tcameroon\n🇨🇳\tcn\n🇨🇴\tcolombia\n🇨🇵\tclipperton_island\n🇨🇷\tcosta_rica\n🇨🇺\tcuba\n🇨🇻\tcape_verde\n🇨🇼\tcuracao\n🇨🇽\tchristmas_island\n🇨🇾\tcyprus\n🇨🇿\tczech_republic\n🇩🇪\tde\n🇩🇬\tdiego_garcia\n🇩🇯\tdjibouti\n🇩🇰\tdenmark\n🇩🇲\tdominica\n🇩🇴\tdominican_republic\n🇩🇿\talgeria\n🇪🇦\tceuta_melilla\n🇪🇨\tecuador\n🇪🇪\testonia\n🇪🇬\tegypt\n🇪🇭\twestern_sahara\n🇪🇷\teritrea\n🇪🇸\tes\n🇪🇹\tethiopia\n🇪🇺\teu european_union\n🇫🇮\tfinland\n🇫🇯\tfiji\n🇫🇰\tfalkland_islands\n🇫🇲\tmicronesia\n🇫🇴\tfaroe_islands\n🇫🇷\tfr\n🇬🇦\tgabon\n🇬🇧\tgb uk\n🇬🇩\tgrenada\n🇬🇪\tgeorgia\n🇬🇫\tfrench_guiana\n🇬🇬\tguernsey\n🇬🇭\tghana\n🇬🇮\tgibraltar\n🇬🇱\tgreenland\n🇬🇲\tgambia\n🇬🇳\tguinea\n🇬🇵\tguadeloupe\n🇬🇶\tequatorial_guinea\n🇬🇷\tgreece\n🇬🇸\tsouth_georgia_south_sandwich_islands\n🇬🇹\tguatemala\n🇬🇺\tguam\n🇬🇼\tguinea_bissau\n🇬🇾\tguyana\n🇭🇰\thong_kong\n🇭🇲\theard_mcdonald_islands\n🇭🇳\thonduras\n🇭🇷\tcroatia\n🇭🇹\thaiti\n🇭🇺\thungary\n🇮🇨\tcanary_islands\n🇮🇩\tindonesia\n🇮🇪\tireland\n🇮🇱\tisrael\n🇮🇲\tisle_of_man\n🇮🇳\tindia\n🇮🇴\tbritish_indian_ocean_territory\n🇮🇶\tiraq\n🇮🇷\tiran\n🇮🇸\ticeland\n🇮🇹\tit\n🇯🇪\tjersey\n🇯🇲\tjamaica\n🇯🇴\tjordan\n🇯🇵\tjp\n🇰🇪\tkenya\n🇰🇬\tkyrgyzstan\n🇰🇭\tcambodia\n🇰🇮\tkiribati\n🇰🇲\tcomoros\n🇰🇳\tst_kitts_nevis\n🇰🇵\tnorth_korea\n🇰🇷\tkr\n🇰🇼\tkuwait\n🇰🇾\tcayman_islands\n🇰🇿\tkazakhstan\n🇱🇦\tlaos\n🇱🇧\tlebanon\n🇱🇨\tst_lucia\n🇱🇮\tliechtenstein\n🇱🇰\tsri_lanka\n🇱🇷\tliberia\n🇱🇸\tlesotho\n🇱🇹\tlithuania\n🇱🇺\tluxembourg\n🇱🇻\tlatvia\n🇱🇾\tlibya\n🇲🇦\tmorocco\n🇲🇨\tmonaco\n🇲🇩\tmoldova\n🇲🇪\tmontenegro\n🇲🇫\tst_martin\n🇲🇬\tmadagascar\n🇲🇭\tmarshall_islands\n🇲🇰\tmacedonia\n🇲🇱\tmali\n🇲🇲\tmyanmar\n🇲🇳\tmongolia\n🇲🇴\tmacau\n🇲🇵\tnorthern_mariana_islands\n🇲🇶\tmartinique\n🇲🇷\tmauritania\n🇲🇸\tmontserrat\n🇲🇹\tmalta\n🇲🇺\tmauritius\n🇲🇻\tmaldives\n🇲🇼\tmalawi\n🇲🇽\tmexico\n🇲🇾\tmalaysia\n🇲🇿\tmozambique\n🇳🇦\tnamibia\n🇳🇨\tnew_caledonia\n🇳🇪\tniger\n🇳🇫\tnorfolk_island\n🇳🇬\tnigeria\n🇳🇮\tnicaragua\n🇳🇱\tnetherlands\n🇳🇴\tnorway\n🇳🇵\tnepal\n🇳🇷\tnauru\n🇳🇺\tniue\n🇳🇿\tnew_zealand\n🇴🇲\toman\n🇵🇦\tpanama\n🇵🇪\tperu\n🇵🇫\tfrench_polynesia\n🇵🇬\tpapua_new_guinea\n🇵🇭\tphilippines\n🇵🇰\tpakistan\n🇵🇱\tpoland\n🇵🇲\tst_pierre_miquelon\n🇵🇳\tpitcairn_islands\n🇵🇷\tpuerto_rico\n🇵🇸\tpalestinian_territories\n🇵🇹\tportugal\n🇵🇼\tpalau\n🇵🇾\tparaguay\n🇶🇦\tqatar\n🇷🇪\treunion\n🇷🇴\tromania\n🇷🇸\tserbia\n🇷🇺\tru\n🇷🇼\trwanda\n🇸🇦\tsaudi_arabia\n🇸🇧\tsolomon_islands\n🇸🇨\tseychelles\n🇸🇩\tsudan\n🇸🇪\tsweden\n🇸🇬\tsingapore\n🇸🇭\tst_helena\n🇸🇮\tslovenia\n🇸🇯\tsvalbard_jan_mayen\n🇸🇰\tslovakia\n🇸🇱\tsierra_leone\n🇸🇲\tsan_marino\n🇸🇳\tsenegal\n🇸🇴\tsomalia\n🇸🇷\tsuriname\n🇸🇸\tsouth_sudan\n🇸🇹\tsao_tome_principe\n🇸🇻\tel_salvador\n🇸🇽\tsint_maarten\n🇸🇾\tsyria\n🇸🇿\tswaziland\n🇹🇦\ttristan_da_cunha\n🇹🇨\tturks_caicos_islands\n🇹🇩\tchad\n🇹🇫\tfrench_southern_territories\n🇹🇬\ttogo\n🇹🇭\tthailand\n🇹🇯\ttajikistan\n🇹🇰\ttokelau\n🇹🇱\ttimor_leste\n🇹🇲\tturkmenistan\n🇹🇳\ttunisia\n🇹🇴\ttonga\n🇹🇷\ttr\n🇹🇹\ttrinidad_tobago\n🇹🇻\ttuvalu\n🇹🇼\ttaiwan\n🇹🇿\ttanzania\n🇺🇦\tukraine\n🇺🇬\tuganda\n🇺🇲\tus_outlying_islands\n🇺🇳\tunited_nations\n🇺🇸\tus\n🇺🇾\turuguay\n🇺🇿\tuzbekistan\n🇻🇦\tvatican_city\n🇻🇨\tst_vincent_grenadines\n🇻🇪\tvenezuela\n🇻🇬\tbritish_virgin_islands\n🇻🇮\tus_virgin_islands\n🇻🇳\tvietnam\n🇻🇺\tvanuatu\n🇼🇫\twallis_futuna\n🇼🇸\tsamoa\n🇽🇰\tkosovo\n🇾🇪\tyemen\n🇾🇹\tmayotte\n🇿🇦\tsouth_africa\n🇿🇲\tzambia\n🇿🇼\tzimbabwe\n🏴\tengland\n🏴\tscotland\n🏴\twales\n";
|
package/dist/load.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where the WebAssembly module comes from: its bytes, a compiled module (as
|
|
3
|
+
* Cloudflare Workers import `.wasm` files), a URL, or a response.
|
|
4
|
+
*/
|
|
5
|
+
export type WasmSource = ArrayBuffer | ArrayBufferView | WebAssembly.Module | URL | Response | Promise<Response>;
|
|
6
|
+
/**
|
|
7
|
+
* Load the WebAssembly module once. Later calls return the first call's
|
|
8
|
+
* promise, so passing a source only matters the first time.
|
|
9
|
+
*
|
|
10
|
+
* Without a source, Node, Deno, and Bun read the bundled file from disk.
|
|
11
|
+
* Runtimes without a file system, such as Workers, pass the module they
|
|
12
|
+
* imported: `await load(wasmModule)`.
|
|
13
|
+
*/
|
|
14
|
+
export declare function load(source?: WasmSource): Promise<void>;
|
|
15
|
+
/**
|
|
16
|
+
* A bundled module at `url`: read from disk when it is a file, fetched
|
|
17
|
+
* otherwise.
|
|
18
|
+
*
|
|
19
|
+
* @internal
|
|
20
|
+
*/
|
|
21
|
+
export declare function bundled(url: URL): Promise<WasmSource>;
|
package/dist/load.js
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Loading the WebAssembly module in any JavaScript runtime.
|
|
3
|
+
*
|
|
4
|
+
* @module
|
|
5
|
+
*/
|
|
6
|
+
import init from "../wasm/canvist_headless_wasm.js";
|
|
7
|
+
const BUNDLED = new URL("../wasm/canvist_headless_wasm_bg.wasm", import.meta.url);
|
|
8
|
+
let loading;
|
|
9
|
+
/**
|
|
10
|
+
* Load the WebAssembly module once. Later calls return the first call's
|
|
11
|
+
* promise, so passing a source only matters the first time.
|
|
12
|
+
*
|
|
13
|
+
* Without a source, Node, Deno, and Bun read the bundled file from disk.
|
|
14
|
+
* Runtimes without a file system, such as Workers, pass the module they
|
|
15
|
+
* imported: `await load(wasmModule)`.
|
|
16
|
+
*/
|
|
17
|
+
export function load(source) {
|
|
18
|
+
loading ??= instantiate(source);
|
|
19
|
+
return loading;
|
|
20
|
+
}
|
|
21
|
+
async function instantiate(source) {
|
|
22
|
+
await init({ module_or_path: source ?? await bundled(BUNDLED) });
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* A bundled module at `url`: read from disk when it is a file, fetched
|
|
26
|
+
* otherwise.
|
|
27
|
+
*
|
|
28
|
+
* @internal
|
|
29
|
+
*/
|
|
30
|
+
export async function bundled(url) {
|
|
31
|
+
if (url.protocol !== "file:") {
|
|
32
|
+
return url;
|
|
33
|
+
}
|
|
34
|
+
const [{ readFile }, { fileURLToPath }] = await Promise.all([
|
|
35
|
+
import("node:fs/promises"),
|
|
36
|
+
import("node:url"),
|
|
37
|
+
]);
|
|
38
|
+
// Pass strings: some type environments (`deno publish` with @types/node)
|
|
39
|
+
// see the global `URL` and Node's `URL` as different types.
|
|
40
|
+
return readFile(fileURLToPath(url.href));
|
|
41
|
+
}
|
package/dist/mod.d.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* canvist's document model and editing engine with no DOM, for Node, Deno,
|
|
3
|
+
* Bun, and Workers: load and export ProseMirror JSON, HTML, Markdown, and
|
|
4
|
+
* text, run typed commands, and serve Yjs collaboration.
|
|
5
|
+
*
|
|
6
|
+
* This module compiles in TipTap's StarterKit. Every other extension is in
|
|
7
|
+
* `@canvist/headless/full`, a larger module with the same API.
|
|
8
|
+
*
|
|
9
|
+
* ```ts
|
|
10
|
+
* import { createEngine } from "@canvist/headless";
|
|
11
|
+
*
|
|
12
|
+
* const engine = await createEngine();
|
|
13
|
+
* const doc = engine.parse("markdown", "Hello world");
|
|
14
|
+
* doc.select({ path: [0], offset: 6 }, { path: [0], offset: 11 });
|
|
15
|
+
* doc.commands.toggleBold();
|
|
16
|
+
* doc.export("html"); // "<p>Hello <strong>world</strong></p>"
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
19
|
+
* @module
|
|
20
|
+
*/
|
|
21
|
+
export { createEngine } from "./create.ts";
|
|
22
|
+
export { type CanvistError, Doc, Engine, type EngineOptions, isCanvistError, type SyncReply, type Validation, } from "./engine.ts";
|
|
23
|
+
export * from "./extensions.generated.ts";
|
|
24
|
+
export { load, type WasmSource } from "./load.ts";
|
|
25
|
+
export type * from "./types.ts";
|
package/dist/mod.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* canvist's document model and editing engine with no DOM, for Node, Deno,
|
|
3
|
+
* Bun, and Workers: load and export ProseMirror JSON, HTML, Markdown, and
|
|
4
|
+
* text, run typed commands, and serve Yjs collaboration.
|
|
5
|
+
*
|
|
6
|
+
* This module compiles in TipTap's StarterKit. Every other extension is in
|
|
7
|
+
* `@canvist/headless/full`, a larger module with the same API.
|
|
8
|
+
*
|
|
9
|
+
* ```ts
|
|
10
|
+
* import { createEngine } from "@canvist/headless";
|
|
11
|
+
*
|
|
12
|
+
* const engine = await createEngine();
|
|
13
|
+
* const doc = engine.parse("markdown", "Hello world");
|
|
14
|
+
* doc.select({ path: [0], offset: 6 }, { path: [0], offset: 11 });
|
|
15
|
+
* doc.commands.toggleBold();
|
|
16
|
+
* doc.export("html"); // "<p>Hello <strong>world</strong></p>"
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
19
|
+
* @module
|
|
20
|
+
*/
|
|
21
|
+
export { createEngine } from "./create.js";
|
|
22
|
+
export { Doc, Engine, isCanvistError, } from "./engine.js";
|
|
23
|
+
export * from "./extensions.generated.js";
|
|
24
|
+
export { load } from "./load.js";
|
package/dist/native.d.ts
ADDED
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
export { type CanvistError, isCanvistError } from "./errors.ts";
|
|
2
|
+
import type { CanvistError } from "./errors.ts";
|
|
3
|
+
import type { CommandName, CommandParams, Commands, Content, DocJson, Extensions, Format, Position, Queries, QueryName, QueryParams, QueryResult, Range, Registered } from "./types.ts";
|
|
4
|
+
/**
|
|
5
|
+
* The calls a native editor answers, synchronously, on the JavaScript
|
|
6
|
+
* thread. Arguments, answers, and selections are JSON text, as the Rust
|
|
7
|
+
* engine reads and writes them.
|
|
8
|
+
*
|
|
9
|
+
* A call that fails throws an `Error` whose message contains
|
|
10
|
+
* `[canvist:<code>] <reason>`, where `<code>` is an {@link ErrorCode};
|
|
11
|
+
* {@link NativeEditor} rethrows it as a `CanvistError` with that code.
|
|
12
|
+
*/
|
|
13
|
+
export interface NativeBridge {
|
|
14
|
+
/** Run the command `name` with `args` (a JSON object or `null`); whether it applied. */
|
|
15
|
+
run(name: string, args: string): boolean;
|
|
16
|
+
/** Whether the command `name` would apply. Nothing changes. */
|
|
17
|
+
can(name: string, args: string): boolean;
|
|
18
|
+
/** Answer the query `name`, as JSON. */
|
|
19
|
+
query(name: string, args: string): string;
|
|
20
|
+
/** Replace the document with `content` read as `format`. */
|
|
21
|
+
load(format: Format, content: string): void;
|
|
22
|
+
/** The document as `format`. */
|
|
23
|
+
export(format: Format): string;
|
|
24
|
+
/** The selection as a JSON {@link Range}, or `null` for a block selection. */
|
|
25
|
+
selection(): string;
|
|
26
|
+
/** Select the JSON {@link Range} `range`. */
|
|
27
|
+
select(range: string): void;
|
|
28
|
+
/** Select the whole document. */
|
|
29
|
+
selectAll(): void;
|
|
30
|
+
/** Type `text` over the selection, as the keyboard does; whether it changed anything. */
|
|
31
|
+
insertText(text: string): boolean;
|
|
32
|
+
/** Undo the last change; whether there was one. */
|
|
33
|
+
undo(): boolean;
|
|
34
|
+
/** Redo the last undone change; whether there was one. */
|
|
35
|
+
redo(): boolean;
|
|
36
|
+
/** Whether there is a change to undo. */
|
|
37
|
+
canUndo(): boolean;
|
|
38
|
+
/** Whether there is an undone change to redo. */
|
|
39
|
+
canRedo(): boolean;
|
|
40
|
+
/** Focus the view and show the keyboard. */
|
|
41
|
+
focus(): void;
|
|
42
|
+
/** Take focus away from the view and hide the keyboard. */
|
|
43
|
+
blur(): void;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* A native editor with commands, queries, and document types that follow
|
|
47
|
+
* its extensions. Hosts create it once their view is ready and report
|
|
48
|
+
* changes with {@link NativeEditor.notifyChange} and
|
|
49
|
+
* {@link NativeEditor.notifyFocus}; subscribers then hear of every edit,
|
|
50
|
+
* whether it came from the keyboard or from JavaScript. Edits made from
|
|
51
|
+
* JavaScript notify subscribers once the calls in the current task are
|
|
52
|
+
* done, and again when the view reports them.
|
|
53
|
+
*/
|
|
54
|
+
export declare class NativeEditor<E extends Extensions> {
|
|
55
|
+
#private;
|
|
56
|
+
/** Run a registered command against the selection; returns whether it applied. */
|
|
57
|
+
readonly commands: Commands<Registered<E>>;
|
|
58
|
+
/** Whether a registered command would apply. Nothing changes. */
|
|
59
|
+
readonly can: Commands<Registered<E>>;
|
|
60
|
+
/** Answer a registered query. */
|
|
61
|
+
readonly query: Queries<Registered<E>>;
|
|
62
|
+
/** An editor over `bridge`, whose view registered `extensions`. */
|
|
63
|
+
constructor(bridge: NativeBridge, extensions: E);
|
|
64
|
+
/** The registered extensions, including the ones every editor has. */
|
|
65
|
+
get extensions(): Registered<E>;
|
|
66
|
+
/** Run the command named `name`, for callers that pick commands at runtime. */
|
|
67
|
+
run<N extends CommandName<Registered<E>>>(name: N, ...args: CommandParams<Registered<E>, N>): boolean;
|
|
68
|
+
/** Whether the command named `name` would apply. Nothing changes. */
|
|
69
|
+
canRun<N extends CommandName<Registered<E>>>(name: N, ...args: CommandParams<Registered<E>, N>): boolean;
|
|
70
|
+
/** Answer the query named `name`, for callers that pick queries at runtime. */
|
|
71
|
+
ask<N extends QueryName<Registered<E>>>(name: N, ...args: QueryParams<Registered<E>, N>): QueryResult<Registered<E>, N>;
|
|
72
|
+
/** Replace the document. */
|
|
73
|
+
setContent(content: Content<E>): void;
|
|
74
|
+
/** The document as `format`. */
|
|
75
|
+
export(format: Format): string;
|
|
76
|
+
/** The document as ProseMirror JSON, with block ids in `attrs.id`. */
|
|
77
|
+
toJson(): DocJson<Registered<E>>;
|
|
78
|
+
/** The text selection, or `null` for a block selection. */
|
|
79
|
+
get selection(): Range | null;
|
|
80
|
+
/** Select from `anchor` to `head`, or place a caret at `anchor`. Offsets count UTF-16 code units. */
|
|
81
|
+
select(anchor: Position, head?: Position): void;
|
|
82
|
+
/** Select the whole document. */
|
|
83
|
+
selectAll(): void;
|
|
84
|
+
/** Replace the selection with `text`, as typing does (input rules apply). */
|
|
85
|
+
insertText(text: string): boolean;
|
|
86
|
+
/** Undo the last change. */
|
|
87
|
+
undo(): boolean;
|
|
88
|
+
/** Redo the last undone change. */
|
|
89
|
+
redo(): boolean;
|
|
90
|
+
/** Whether {@link NativeEditor.undo} has anything to undo. */
|
|
91
|
+
canUndo(): boolean;
|
|
92
|
+
/** Whether {@link NativeEditor.redo} has anything to redo. */
|
|
93
|
+
canRedo(): boolean;
|
|
94
|
+
/** Focus the editor and show the keyboard. */
|
|
95
|
+
focus(): void;
|
|
96
|
+
/** Take focus away from the editor and hide the keyboard. */
|
|
97
|
+
blur(): void;
|
|
98
|
+
/** Whether the editor has focus, as the view last reported. */
|
|
99
|
+
get focused(): boolean;
|
|
100
|
+
/**
|
|
101
|
+
* Call `listener` after every change to the document, the selection, or
|
|
102
|
+
* focus. Returns a function that stops it.
|
|
103
|
+
*/
|
|
104
|
+
subscribe(listener: () => void): () => void;
|
|
105
|
+
/** For hosts: the view reported that the document or selection changed. */
|
|
106
|
+
notifyChange(): void;
|
|
107
|
+
/** For hosts: the view gained or lost focus. */
|
|
108
|
+
notifyFocus(focused: boolean): void;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* A `CanvistError` for a failure a native view reports outside a call,
|
|
112
|
+
* such as an editor it could not create. A code canvist does not define
|
|
113
|
+
* is reported as `editor`, with the code kept in the message.
|
|
114
|
+
*/
|
|
115
|
+
export declare function nativeCanvistError(code: string, reason: string): CanvistError;
|