@lapis-notes/lapis-plugin-contacts 0.0.0-stage → 0.1.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.
Files changed (145) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/LICENSE +661 -0
  3. package/README.md +125 -2
  4. package/dist/ContactMarkdownEditor-DoTuV5ka.js +69 -0
  5. package/dist/apl-B2DGVGxc.js +76 -0
  6. package/dist/asciiarmor-2LVJmxlE.js +34 -0
  7. package/dist/asn1-jKiBa2Ya.js +95 -0
  8. package/dist/asterisk-DS281yxp.js +271 -0
  9. package/dist/brainfuck-C_p9pTT8.js +34 -0
  10. package/dist/clike-BMALKCNj.js +620 -0
  11. package/dist/clojure-CCKyeQKf.js +800 -0
  12. package/dist/cmake-CuaCgAKt.js +28 -0
  13. package/dist/cobol-BlTKFDRj.js +72 -0
  14. package/dist/coffeescript-BVCvwO8I.js +179 -0
  15. package/dist/commonlisp-D_kxz07b.js +75 -0
  16. package/dist/crystal-D309uH6_.js +217 -0
  17. package/dist/css-BkF-NPzE.js +1553 -0
  18. package/dist/cypher-BMq4Fwjl.js +68 -0
  19. package/dist/d-BZcgY6La.js +127 -0
  20. package/dist/diff-Cg9d_RX2.js +18 -0
  21. package/dist/dist--69zc0xf.js +247 -0
  22. package/dist/dist-3FBhTVCW.js +260 -0
  23. package/dist/dist-BIUwdsPJ.js +300 -0
  24. package/dist/dist-BKba7kvs.js +75 -0
  25. package/dist/dist-BqWvrEwT.js +98 -0
  26. package/dist/dist-ByOxufTQ.js +58 -0
  27. package/dist/dist-CU8VWvs8.js +288 -0
  28. package/dist/dist-C_EduL9A.js +268 -0
  29. package/dist/dist-Cqfbp9Nb.js +310 -0
  30. package/dist/dist-DLu2t1SV.js +611 -0
  31. package/dist/dist-DPPvU9Yj.js +134 -0
  32. package/dist/dist-DufK_s_A.js +564 -0
  33. package/dist/dist-Dug8cDx1.js +93 -0
  34. package/dist/dist-IBryJBJR.js +137 -0
  35. package/dist/dist-ciD_jrkE.js +158 -0
  36. package/dist/dist-v6nTmcwY.js +71 -0
  37. package/dist/dockerfile-DFX8bq9N.js +194 -0
  38. package/dist/dtd-CtLokQ-U.js +84 -0
  39. package/dist/dylan-QYeExnWK.js +234 -0
  40. package/dist/ebnf-DUPDuY4r.js +78 -0
  41. package/dist/ecl-CiXN-g_D.js +121 -0
  42. package/dist/eiffel-yQhjl4T1.js +110 -0
  43. package/dist/elm-CNT9vbN0.js +108 -0
  44. package/dist/erlang-CFOYdy9e.js +487 -0
  45. package/dist/factor-Clf6BoVk.js +65 -0
  46. package/dist/fcl-CPC2WYrI.js +103 -0
  47. package/dist/forth-BmxRyE9S.js +60 -0
  48. package/dist/fortran-9bvPyrOW.js +442 -0
  49. package/dist/gas-cpmYfFX2.js +183 -0
  50. package/dist/gherkin-CJuwpceU.js +34 -0
  51. package/dist/groovy-DZeT_VM-.js +146 -0
  52. package/dist/haskell-CxiO_7JL.js +375 -0
  53. package/dist/haxe-70NVW1pR.js +359 -0
  54. package/dist/http-D9LttvKF.js +44 -0
  55. package/dist/idl-B6TRFYjl.js +947 -0
  56. package/dist/index-BGQ4A2O3.js +148265 -0
  57. package/dist/index.js +16 -0
  58. package/dist/javascript-DOuB9oqA.js +691 -0
  59. package/dist/julia-DpvXAuO6.js +241 -0
  60. package/dist/livescript-CanGTf8u.js +272 -0
  61. package/dist/lua-DBWH1E3Q.js +217 -0
  62. package/dist/mathematica-jaRHnSxC.js +35 -0
  63. package/dist/mbox-BctzC1hL.js +76 -0
  64. package/dist/mirc-CFBPAOaF.js +72 -0
  65. package/dist/mllike-BSnXJBGA.js +272 -0
  66. package/dist/modelica-vUgVs--1.js +93 -0
  67. package/dist/module-BFIPY8X5.js +2973 -0
  68. package/dist/mscgen-Cpl0NYLN.js +104 -0
  69. package/dist/mumps-CQoS1kWX.js +25 -0
  70. package/dist/native-CDi4YD_s.js +13 -0
  71. package/dist/nginx-zDPm3Z74.js +89 -0
  72. package/dist/nsis-DAjtFbMY.js +62 -0
  73. package/dist/ntriples-CsNjv2QF.js +79 -0
  74. package/dist/octave-C8PmmSRH.js +143 -0
  75. package/dist/oz-Ce8aN8oE.js +151 -0
  76. package/dist/pascal-De0D6mP7.js +77 -0
  77. package/dist/perl-B4bSCe1C.js +915 -0
  78. package/dist/pig-D24Z8EXi.js +54 -0
  79. package/dist/powershell-DkYVfTzP.js +249 -0
  80. package/dist/properties-Dn9wna3M.js +26 -0
  81. package/dist/protobuf-BPIjwpzm.js +49 -0
  82. package/dist/pug-TGXr6c5j.js +248 -0
  83. package/dist/puppet-nyd4dhjf.js +45 -0
  84. package/dist/python-BkR3uSy8.js +313 -0
  85. package/dist/q-DyHZGnqm.js +86 -0
  86. package/dist/r-LKEuhEGI.js +104 -0
  87. package/dist/rpm-IznJm2Xc.js +57 -0
  88. package/dist/ruby-DjGRFiOI.js +228 -0
  89. package/dist/sas-7E8yHoCW.js +105 -0
  90. package/dist/scheme-DjibxsNh.js +124 -0
  91. package/dist/shell-C0C2sNA_.js +182 -0
  92. package/dist/sieve-Bwz7vjP5.js +72 -0
  93. package/dist/simple-mode-mNVtnu0l.js +89 -0
  94. package/dist/smalltalk-Bhddl2pB.js +48 -0
  95. package/dist/solr-BNlsLglM.js +41 -0
  96. package/dist/sparql-FarWu_Gb.js +197 -0
  97. package/dist/spreadsheet-C-cy4P5N.js +49 -0
  98. package/dist/sql-CfG5lQ3l.js +282 -0
  99. package/dist/styles.css +1 -0
  100. package/dist/stylus-CAdqWld3.js +250 -0
  101. package/dist/swift-DSxqR9R6.js +230 -0
  102. package/dist/tcl-xfoLljhY.js +81 -0
  103. package/dist/textile-D1AWE-pc.js +295 -0
  104. package/dist/tiddlywiki-5wqsXtSk.js +155 -0
  105. package/dist/tiki-__Kn3CeS.js +181 -0
  106. package/dist/toml-DWAmxCjl.js +58 -0
  107. package/dist/troff-D2UO-fKf.js +35 -0
  108. package/dist/ttcn-Bsa4sfRm.js +123 -0
  109. package/dist/ttcn-cfg-Bac_acMi.js +88 -0
  110. package/dist/turtle-xwJUxoPV.js +80 -0
  111. package/dist/types/contacts/contact-fields.d.ts +28 -0
  112. package/dist/types/contacts/contact-list-view.d.ts +41 -0
  113. package/dist/types/contacts/contact-methods.d.ts +38 -0
  114. package/dist/types/contacts/contact-selection.d.ts +23 -0
  115. package/dist/types/contacts/markdown-session-types.d.ts +8 -0
  116. package/dist/types/contacts/model.d.ts +103 -0
  117. package/dist/types/contacts/person.d.ts +49 -0
  118. package/dist/types/contacts/validate-frontmatter.d.ts +1 -0
  119. package/dist/types/lib/contacts-plugin.d.ts +34 -0
  120. package/dist/types/lib/contacts-settings-definition.d.ts +24 -0
  121. package/dist/types/lib/contacts-settings.d.ts +48 -0
  122. package/dist/types/lib/contacts-view.d.ts +22 -0
  123. package/dist/types/lib/google/conflict-queue.d.ts +35 -0
  124. package/dist/types/lib/google/google-person.d.ts +54 -0
  125. package/dist/types/lib/google/google-sync.d.ts +50 -0
  126. package/dist/types/lib/google/people-client.d.ts +50 -0
  127. package/dist/types/lib/google/people-import.d.ts +61 -0
  128. package/dist/types/lib/google/people-push.d.ts +30 -0
  129. package/dist/types/lib/google/reconcile.d.ts +62 -0
  130. package/dist/types/lib/google/vault-contact-files.d.ts +8 -0
  131. package/dist/types/lib/google-conflicts-view.d.ts +15 -0
  132. package/dist/types/lib/index.d.ts +4 -0
  133. package/dist/types/lib/vault-contacts.d.ts +64 -0
  134. package/dist/vb-c2kQGd6-.js +74 -0
  135. package/dist/vbscript-1f_Dhg5H.js +324 -0
  136. package/dist/velocity-DJd0pTTC.js +96 -0
  137. package/dist/verilog-CiS1jyi5.js +262 -0
  138. package/dist/vhdl-T9HkrbI2.js +106 -0
  139. package/dist/webidl-CjfDENEo.js +155 -0
  140. package/dist/xquery-Ct6lEb4B.js +422 -0
  141. package/dist/yacas-C0absKBh.js +73 -0
  142. package/dist/z80-Pki2zAjW.js +61 -0
  143. package/manifest.json +43 -0
  144. package/package.json +116 -4
  145. package/schemas/contact.schema.json +619 -0
package/README.md CHANGED
@@ -1,3 +1,126 @@
1
- # Temporary Holding Version
1
+ # Contacts for Lapis
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ [![Contacts preview](https://github.com/lapismd/lapis-plugin-contacts/actions/workflows/ci.yml/badge.svg)](https://github.com/lapismd/lapis-plugin-contacts/actions/workflows/ci.yml)
4
+ [![Storybook Pages](https://github.com/lapismd/lapis-plugin-contacts/actions/workflows/publish-storybook-pages.yml/badge.svg)](https://github.com/lapismd/lapis-plugin-contacts/actions/workflows/publish-storybook-pages.yml)
5
+ [![Storybook](https://img.shields.io/badge/storybook-live-ff4785?logo=storybook&logoColor=white)](https://lapismd.github.io/lapis-plugin-contacts/)
6
+
7
+ `@lapis-notes/lapis-plugin-contacts` is the first-party external Contacts plugin for [Lapis](https://github.com/lapismd/lapis-notes). It keeps a directory of the people you work with and the replies you owe or are waiting for. Every person is one Markdown file in your vault, so your contacts stay plain text you own, can search and can edit anywhere.
8
+
9
+ The runtime plugin ID is `contacts`. Package version: `@lapis-notes/lapis-plugin-contacts@0.1.0`.
10
+
11
+ [![Contacts in the Lapis workspace](registry-assets/banner.preview.webp)](registry-assets/banner.full.webp)
12
+
13
+ <details>
14
+ <summary>More screenshots</summary>
15
+
16
+ [![Directory](registry-assets/gallery/directory.preview.webp)](registry-assets/gallery/directory.full.webp)
17
+
18
+ [![Contact editor](registry-assets/gallery/editor.preview.webp)](registry-assets/gallery/editor.full.webp)
19
+
20
+ [![Pending replies](registry-assets/gallery/replies.preview.webp)](registry-assets/gallery/replies.full.webp)
21
+
22
+ </details>
23
+
24
+ ## Features
25
+
26
+ - **Directory** of everyone in your contacts folder, with search, groups, favourites and sorting by name, last contact, next due date or pending replies.
27
+ - **Follow-ups** that record who owes the reply, the topic and a due date. New follow-ups are due seven days after opening by default. The directory flags overdue replies and orders by what is due next.
28
+ - **Interaction log** recording the date, channel and a note for each contact, with the most recent contact shown on each profile.
29
+ - **Inline contact editor** that uses the same field layout as the CV form. Add emails, phones, URLs, addresses, birthdays and custom fields, and choose an avatar from an image, an image URL or an emoji.
30
+ - **Markdown editing** of the complete file in Lapis live preview or as raw source. Edits save back to the same vault file, and Cancel leaves it untouched.
31
+ - **Google People field names**, so a Google contact can be opened and kept in sync-ready form without losing fields the editor does not show.
32
+ - **Settings** for the contacts folder, reply interval, default list, sort order and the activity sidebar.
33
+ - **Responsive layout** that moves from three columns to a single column on narrow screens.
34
+
35
+ ## Using Contacts
36
+
37
+ Run **Open contacts** from the command palette, or use the Contacts ribbon icon. Select a person to see their profile, pending replies and activity.
38
+
39
+ - Use **New contact** to create a file in the contacts folder. Use **Edit contact details** to change an existing one.
40
+ - Use **Log contact** to record a call, message or meeting.
41
+ - Use **Add follow-up** in the activity sidebar, choose who owes the reply, then pick Today or a date from the calendar.
42
+ - Use the source-code button on a profile to edit the Markdown file directly.
43
+ - Open the sidebar's **Groups** list, or the Groups icon when the sidebar is minimised, to filter by group.
44
+
45
+ Set the contacts folder and reply interval in **Settings → Contacts**. The folder defaults to `/contacts`, and changing it leaves existing files where they are.
46
+
47
+ ## Contact files
48
+
49
+ Each contact is a single Markdown file under the contacts folder. YAML frontmatter holds the structured details, dated interactions and follow-ups. The note body is free Markdown.
50
+
51
+ ```yaml
52
+ resourceName: contacts/41fb4e0d-b71b-48c4-a841-e7b5c79c9130
53
+ names:
54
+ - givenName: Amara
55
+ familyName: Okafor
56
+ organizations:
57
+ - name: Fieldwork Studio
58
+ title: Design director
59
+ department: Research
60
+ emailAddresses:
61
+ - { type: work, value: amara@example.org }
62
+ phoneNumbers:
63
+ - { type: mobile, value: "+44 1632 960010" }
64
+ urls:
65
+ - { type: portfolio, value: https://example.org/amara }
66
+ userDefined:
67
+ - { key: Signal, value: amara.42 }
68
+ birthdays:
69
+ - { date: { month: 2, day: 29 } }
70
+ tags: [studio/research]
71
+ ```
72
+
73
+ - New contacts receive a permanent `contacts/<UUID>` identifier. A Google person opened as a contact keeps its `people/…` identifier, and a local contact can record its Google identity in `google.resourceName`. Renaming or moving the file preserves the identity and related-person links.
74
+ - Names, organisations, photos, birthdays, addresses, typed contact methods and custom key/value pairs use Google People field names. The editor retains unfamiliar fields, source metadata and etags.
75
+ - Interactions, follow-ups, groups, favourites, tags, address history, significant dates and related-contact references belong to Lapis. Legacy `name`, `role`, `organisation`, `email` and `phone` fields keep their original YAML until the corresponding field changes.
76
+
77
+ The distributed JSON Schema is available as `@lapis-notes/lapis-plugin-contacts/contact.schema.json` ([source](schemas/contact.schema.json)). Its root validates stored frontmatter, and the `#/definitions/form` subschema describes a form submission including the Markdown notes.
78
+
79
+ Google synchronisation is not implemented yet. See the [implementation handoff](spec/src/implementation-handoff.md) for what is built and what remains.
80
+
81
+ ## Try it in Storybook
82
+
83
+ The package Storybook runs a real Lapis workspace that loads this plugin over an in-memory vault of fictional contacts. Open the [published Storybook](https://lapismd.github.io/lapis-plugin-contacts/), or run it locally.
84
+
85
+ ```sh
86
+ pnpm install --frozen-lockfile
87
+ pnpm storybook
88
+ ```
89
+
90
+ Then open one of the stories at <http://localhost:7047>:
91
+
92
+ - [Directory](http://localhost:7047/?path=/story/plugins-contacts-app-shell--directory)
93
+ - [Open profile](http://localhost:7047/?path=/story/plugins-contacts-app-shell--profile)
94
+ - [Inline contact editor](http://localhost:7047/?path=/story/plugins-contacts-app-shell--edit-contact)
95
+ - [Empty optional sections](http://localhost:7047/?path=/story/plugins-contacts-app-shell--empty-optional-sections)
96
+ - [Google contact and avatar](http://localhost:7047/?path=/story/plugins-contacts-app-shell--google-contact)
97
+ - [Narrow profile](http://localhost:7047/?path=/story/plugins-contacts-app-shell--narrow-profile)
98
+
99
+ Each story starts from the fictional files in `src/preview/vault/contacts` with the clock fixed to 5 December 2026. Reload to restore them. Every successful CI run also uploads the static `contacts-storybook` artifact.
100
+
101
+ ## Development
102
+
103
+ Use Node 24 and pnpm 10.34.5. Published LapisMD dependencies resolve through npm semver ranges, so package manifests stay portable and contain no machine-specific paths.
104
+
105
+ ```sh
106
+ pnpm install --frozen-lockfile
107
+ pnpm spec:check
108
+ pnpm check
109
+ pnpm test
110
+ pnpm build
111
+ pnpm publint
112
+ pnpm smoke:packed
113
+ pnpm exec playwright install chromium
114
+ pnpm test:storybook
115
+ pnpm build-storybook
116
+ ```
117
+
118
+ Specification checks use mdBook. Requirements live under [`spec/src`](spec/src/index.md), and [the verification table](spec/src/verification.md) records the evidence for each one. Registry listing images are generated from package-owned stories with `pnpm registry:media:capture`.
119
+
120
+ ## Credits
121
+
122
+ Styling follows the Lapis Tasks plugin. See [provenance](PROVENANCE.md).
123
+
124
+ ## Licence
125
+
126
+ AGPL-3.0-or-later. See [LICENSE](LICENSE).
@@ -0,0 +1,69 @@
1
+ import "svelte/renderer/5.56.10/internal/disclose-version";
2
+ import * as t from "svelte/renderer/5.56.10/internal/client";
3
+ import { untrack as h, onMount as C } from "svelte/renderer/5.56.10";
4
+ import { Editor as L } from "@lapis-notes/api";
5
+ import { diagnosticCount as A } from "@lapis-notes/api/editor";
6
+ import { Prec as B } from "@codemirror/state";
7
+ import { EditorView as c } from "@codemirror/view";
8
+ var D = t.from_html('<p role="alert"> </p>'), F = t.from_html('<div class="contact-markdown-editor markdown-editor-surface" data-ui-component="editor" data-mira-theme="obsidian contacts"></div> <!>', 1);
9
+ function H(b, n) {
10
+ t.push(n, !0);
11
+ let p = t.prop(n, "value", 15), d, f = t.state(void 0), u = t.state(""), m = t.state(0);
12
+ const w = c.updateListener.of((e) => {
13
+ e.docChanged && p(e.state.doc.toString());
14
+ }), x = c.editorAttributes.of((e) => A(e.state) === 0 ? { class: "contact-editor-no-diagnostics" } : null), _ = c.theme({
15
+ "&.cm-focused, .cm-content:focus, .cm-scroller:focus": { outline: "none", boxShadow: "none" }
16
+ }), k = h(() => n.openMarkdownSession());
17
+ C(() => {
18
+ let e = !1, o, r;
19
+ return k.then(async (s) => {
20
+ if (e) {
21
+ await s.dispose();
22
+ return;
23
+ }
24
+ o = s;
25
+ const { app: i } = o, l = () => {
26
+ t.update(m);
27
+ }, M = i.configuration.on("updated", l), S = i.plugins.on("plugin-enabled", l), P = i.plugins.on("plugin-disabled", l);
28
+ r = () => {
29
+ i.configuration.offref(M), i.plugins.offref(S), i.plugins.offref(P);
30
+ };
31
+ const a = new L(p(), [], i);
32
+ a.persistence = "external", a.file = i.vault.getFileByPath(n.sourcePath), d.append(a.view.dom), t.set(f, a);
33
+ }).catch((s) => {
34
+ e || t.set(u, String(s), !0);
35
+ }), () => {
36
+ e = !0, r?.(), t.get(f)?.destroy(), o && o.dispose();
37
+ };
38
+ }), t.user_effect(() => {
39
+ const e = t.get(f), o = n.mode, r = n.sourcePath;
40
+ t.get(m), e && h(() => {
41
+ const s = e.app.editorExtensions("markdown", { mode: o, file: r, surface: { id: "contacts-profile" } });
42
+ e.updateExtensions([
43
+ ...s,
44
+ w,
45
+ x,
46
+ _,
47
+ B.highest(c.contentAttributes.of({
48
+ "aria-label": o === "source" ? "Markdown source editor" : "Live preview editor"
49
+ }))
50
+ ]);
51
+ });
52
+ });
53
+ var g = F(), v = t.first_child(g);
54
+ t.bind_this(v, (e) => d = e, () => d);
55
+ var y = t.sibling(v, 2);
56
+ {
57
+ var E = (e) => {
58
+ var o = D(), r = t.child(o, !0);
59
+ t.reset(o), t.template_effect(() => t.set_text(r, t.get(u))), t.append(e, o);
60
+ };
61
+ t.if(y, (e) => {
62
+ t.get(u) && e(E);
63
+ });
64
+ }
65
+ t.append(b, g), t.pop();
66
+ }
67
+ export {
68
+ H as default
69
+ };
@@ -0,0 +1,76 @@
1
+ var l = {
2
+ "+": ["conjugate", "add"],
3
+ "−": ["negate", "subtract"],
4
+ "×": ["signOf", "multiply"],
5
+ "÷": ["reciprocal", "divide"],
6
+ "⌈": ["ceiling", "greaterOf"],
7
+ "⌊": ["floor", "lesserOf"],
8
+ "∣": ["absolute", "residue"],
9
+ "⍳": ["indexGenerate", "indexOf"],
10
+ "?": ["roll", "deal"],
11
+ "⋆": ["exponentiate", "toThePowerOf"],
12
+ "⍟": ["naturalLog", "logToTheBase"],
13
+ "○": ["piTimes", "circularFuncs"],
14
+ "!": ["factorial", "binomial"],
15
+ "⌹": ["matrixInverse", "matrixDivide"],
16
+ "<": [null, "lessThan"],
17
+ "≤": [null, "lessThanOrEqual"],
18
+ "=": [null, "equals"],
19
+ ">": [null, "greaterThan"],
20
+ "≥": [null, "greaterThanOrEqual"],
21
+ "≠": [null, "notEqual"],
22
+ "≡": ["depth", "match"],
23
+ "≢": [null, "notMatch"],
24
+ "∈": ["enlist", "membership"],
25
+ "⍷": [null, "find"],
26
+ "∪": ["unique", "union"],
27
+ "∩": [null, "intersection"],
28
+ "∼": ["not", "without"],
29
+ "∨": [null, "or"],
30
+ "∧": [null, "and"],
31
+ "⍱": [null, "nor"],
32
+ "⍲": [null, "nand"],
33
+ "⍴": ["shapeOf", "reshape"],
34
+ ",": ["ravel", "catenate"],
35
+ "⍪": [null, "firstAxisCatenate"],
36
+ "⌽": ["reverse", "rotate"],
37
+ "⊖": ["axis1Reverse", "axis1Rotate"],
38
+ "⍉": ["transpose", null],
39
+ "↑": ["first", "take"],
40
+ "↓": [null, "drop"],
41
+ "⊂": ["enclose", "partitionWithAxis"],
42
+ "⊃": ["diclose", "pick"],
43
+ "⌷": [null, "index"],
44
+ "⍋": ["gradeUp", null],
45
+ "⍒": ["gradeDown", null],
46
+ "⊤": ["encode", null],
47
+ "⊥": ["decode", null],
48
+ "⍕": ["format", "formatByExample"],
49
+ "⍎": ["execute", null],
50
+ "⊣": ["stop", "left"],
51
+ "⊢": ["pass", "right"]
52
+ }, t = /[\.\/⌿⍀¨⍣]/, a = /⍬/, i = /[\+−×÷⌈⌊∣⍳\?⋆⍟○!⌹<≤=>≥≠≡≢∈⍷∪∩∼∨∧⍱⍲⍴,⍪⌽⊖⍉↑↓⊂⊃⌷⍋⍒⊤⊥⍕⍎⊣⊢]/, u = /←/, o = /[⍝#].*$/, s = function(r) {
53
+ var n;
54
+ return n = !1, function(e) {
55
+ return n = e, e === r ? n === "\\" : !0;
56
+ };
57
+ };
58
+ const f = {
59
+ name: "apl",
60
+ startState: function() {
61
+ return {
62
+ prev: !1,
63
+ func: !1,
64
+ op: !1,
65
+ string: !1,
66
+ escape: !1
67
+ };
68
+ },
69
+ token: function(r, n) {
70
+ var e;
71
+ return r.eatSpace() ? null : (e = r.next(), e === '"' || e === "'" ? (r.eatWhile(s(e)), r.next(), n.prev = !0, "string") : /[\[{\(]/.test(e) ? (n.prev = !1, null) : /[\]}\)]/.test(e) ? (n.prev = !0, null) : a.test(e) ? (n.prev = !1, "atom") : /[¯\d]/.test(e) ? (n.func ? (n.func = !1, n.prev = !1) : n.prev = !0, r.eatWhile(/[\w\.]/), "number") : t.test(e) || u.test(e) ? "operator" : i.test(e) ? (n.func = !0, n.prev = !1, l[e] ? "variableName.function.standard" : "variableName.function") : o.test(e) ? (r.skipToEnd(), "comment") : e === "∘" && r.peek() === "." ? (r.next(), "variableName.function") : (r.eatWhile(/[\w\$_]/), n.prev = !0, "keyword"));
72
+ }
73
+ };
74
+ export {
75
+ f as apl
76
+ };
@@ -0,0 +1,34 @@
1
+ function t(e) {
2
+ var r = e.match(/^\s*\S/);
3
+ return e.skipToEnd(), r ? "error" : null;
4
+ }
5
+ const i = {
6
+ name: "asciiarmor",
7
+ token: function(e, r) {
8
+ var n;
9
+ if (r.state == "top")
10
+ return e.sol() && (n = e.match(/^-----BEGIN (.*)?-----\s*$/)) ? (r.state = "headers", r.type = n[1], "tag") : t(e);
11
+ if (r.state == "headers") {
12
+ if (e.sol() && e.match(/^\w+:/))
13
+ return r.state = "header", "atom";
14
+ var o = t(e);
15
+ return o && (r.state = "body"), o;
16
+ } else {
17
+ if (r.state == "header")
18
+ return e.skipToEnd(), r.state = "headers", "string";
19
+ if (r.state == "body")
20
+ return e.sol() && (n = e.match(/^-----END (.*)?-----\s*$/)) ? n[1] != r.type ? "error" : (r.state = "end", "tag") : e.eatWhile(/[A-Za-z0-9+\/=]/) ? null : (e.next(), "error");
21
+ if (r.state == "end")
22
+ return t(e);
23
+ }
24
+ },
25
+ blankLine: function(e) {
26
+ e.state == "headers" && (e.state = "body");
27
+ },
28
+ startState: function() {
29
+ return { state: "top", type: null };
30
+ }
31
+ };
32
+ export {
33
+ i as asciiArmor
34
+ };
@@ -0,0 +1,95 @@
1
+ function u(i) {
2
+ for (var s = {}, c = i.split(" "), T = 0; T < c.length; ++T) s[c[T]] = !0;
3
+ return s;
4
+ }
5
+ const o = {
6
+ keywords: u("DEFINITIONS OBJECTS IF DERIVED INFORMATION ACTION REPLY ANY NAMED CHARACTERIZED BEHAVIOUR REGISTERED WITH AS IDENTIFIED CONSTRAINED BY PRESENT BEGIN IMPORTS FROM UNITS SYNTAX MIN-ACCESS MAX-ACCESS MINACCESS MAXACCESS REVISION STATUS DESCRIPTION SEQUENCE SET COMPONENTS OF CHOICE DistinguishedName ENUMERATED SIZE MODULE END INDEX AUGMENTS EXTENSIBILITY IMPLIED EXPORTS"),
7
+ cmipVerbs: u("ACTIONS ADD GET NOTIFICATIONS REPLACE REMOVE"),
8
+ compareTypes: u("OPTIONAL DEFAULT MANAGED MODULE-TYPE MODULE_IDENTITY MODULE-COMPLIANCE OBJECT-TYPE OBJECT-IDENTITY OBJECT-COMPLIANCE MODE CONFIRMED CONDITIONAL SUBORDINATE SUPERIOR CLASS TRUE FALSE NULL TEXTUAL-CONVENTION"),
9
+ status: u("current deprecated mandatory obsolete"),
10
+ tags: u("APPLICATION AUTOMATIC EXPLICIT IMPLICIT PRIVATE TAGS UNIVERSAL"),
11
+ storage: u("BOOLEAN INTEGER OBJECT IDENTIFIER BIT OCTET STRING UTCTime InterfaceIndex IANAifType CMIP-Attribute REAL PACKAGE PACKAGES IpAddress PhysAddress NetworkAddress BITS BMPString TimeStamp TimeTicks TruthValue RowStatus DisplayString GeneralString GraphicString IA5String NumericString PrintableString SnmpAdminString TeletexString UTF8String VideotexString VisibleString StringStore ISO646String T61String UniversalString Unsigned32 Integer32 Gauge Gauge32 Counter Counter32 Counter64"),
12
+ modifier: u("ATTRIBUTE ATTRIBUTES MANDATORY-GROUP MANDATORY-GROUPS GROUP GROUPS ELEMENTS EQUALITY ORDERING SUBSTRINGS DEFINED"),
13
+ accessTypes: u("not-accessible accessible-for-notify read-only read-create read-write"),
14
+ multiLineStrings: !0
15
+ };
16
+ function g(i) {
17
+ var s = i.keywords || o.keywords, c = i.cmipVerbs || o.cmipVerbs, T = i.compareTypes || o.compareTypes, N = i.status || o.status, d = i.tags || o.tags, f = i.storage || o.storage, m = i.modifier || o.modifier, C = i.accessTypes || o.accessTypes;
18
+ i.multiLineStrings || o.multiLineStrings;
19
+ var R = i.indentStatements !== !1, A = /[\|\^]/, E;
20
+ function y(e, n) {
21
+ var t = e.next();
22
+ if (t == '"' || t == "'")
23
+ return n.tokenize = D(t), n.tokenize(e, n);
24
+ if (/[\[\]\(\){}:=,;]/.test(t))
25
+ return E = t, "punctuation";
26
+ if (t == "-" && e.eat("-"))
27
+ return e.skipToEnd(), "comment";
28
+ if (/\d/.test(t))
29
+ return e.eatWhile(/[\w\.]/), "number";
30
+ if (A.test(t))
31
+ return e.eatWhile(A), "operator";
32
+ e.eatWhile(/[\w\-]/);
33
+ var r = e.current();
34
+ return s.propertyIsEnumerable(r) ? "keyword" : c.propertyIsEnumerable(r) ? "variableName" : T.propertyIsEnumerable(r) ? "atom" : N.propertyIsEnumerable(r) ? "comment" : d.propertyIsEnumerable(r) ? "typeName" : f.propertyIsEnumerable(r) || m.propertyIsEnumerable(r) || C.propertyIsEnumerable(r) ? "modifier" : "variableName";
35
+ }
36
+ function D(e) {
37
+ return function(n, t) {
38
+ for (var r = !1, S, O = !1; (S = n.next()) != null; ) {
39
+ if (S == e && !r) {
40
+ var I = n.peek();
41
+ I && (I = I.toLowerCase(), (I == "b" || I == "h" || I == "o") && n.next()), O = !0;
42
+ break;
43
+ }
44
+ r = !r && S == "\\";
45
+ }
46
+ return O && (t.tokenize = null), "string";
47
+ };
48
+ }
49
+ function p(e, n, t, r, S) {
50
+ this.indented = e, this.column = n, this.type = t, this.align = r, this.prev = S;
51
+ }
52
+ function a(e, n, t) {
53
+ var r = e.indented;
54
+ return e.context && e.context.type == "statement" && (r = e.context.indented), e.context = new p(r, n, t, null, e.context);
55
+ }
56
+ function l(e) {
57
+ var n = e.context.type;
58
+ return (n == ")" || n == "]" || n == "}") && (e.indented = e.context.indented), e.context = e.context.prev;
59
+ }
60
+ return {
61
+ name: "asn1",
62
+ startState: function() {
63
+ return {
64
+ tokenize: null,
65
+ context: new p(-2, 0, "top", !1),
66
+ indented: 0,
67
+ startOfLine: !0
68
+ };
69
+ },
70
+ token: function(e, n) {
71
+ var t = n.context;
72
+ if (e.sol() && (t.align == null && (t.align = !1), n.indented = e.indentation(), n.startOfLine = !0), e.eatSpace()) return null;
73
+ E = null;
74
+ var r = (n.tokenize || y)(e, n);
75
+ if (r == "comment") return r;
76
+ if (t.align == null && (t.align = !0), (E == ";" || E == ":" || E == ",") && t.type == "statement")
77
+ l(n);
78
+ else if (E == "{") a(n, e.column(), "}");
79
+ else if (E == "[") a(n, e.column(), "]");
80
+ else if (E == "(") a(n, e.column(), ")");
81
+ else if (E == "}") {
82
+ for (; t.type == "statement"; ) t = l(n);
83
+ for (t.type == "}" && (t = l(n)); t.type == "statement"; ) t = l(n);
84
+ } else E == t.type ? l(n) : R && ((t.type == "}" || t.type == "top") && E != ";" || t.type == "statement" && E == "newstatement") && a(n, e.column(), "statement");
85
+ return n.startOfLine = !1, r;
86
+ },
87
+ languageData: {
88
+ indentOnInput: /^\s*[{}]$/,
89
+ commentTokens: { line: "--" }
90
+ }
91
+ };
92
+ }
93
+ export {
94
+ g as asn1
95
+ };
@@ -0,0 +1,271 @@
1
+ var t = ["exten", "same", "include", "ignorepat", "switch"], o = ["#include", "#exec"], c = [
2
+ "addqueuemember",
3
+ "adsiprog",
4
+ "aelsub",
5
+ "agentlogin",
6
+ "agentmonitoroutgoing",
7
+ "agi",
8
+ "alarmreceiver",
9
+ "amd",
10
+ "answer",
11
+ "authenticate",
12
+ "background",
13
+ "backgrounddetect",
14
+ "bridge",
15
+ "busy",
16
+ "callcompletioncancel",
17
+ "callcompletionrequest",
18
+ "celgenuserevent",
19
+ "changemonitor",
20
+ "chanisavail",
21
+ "channelredirect",
22
+ "chanspy",
23
+ "clearhash",
24
+ "confbridge",
25
+ "congestion",
26
+ "continuewhile",
27
+ "controlplayback",
28
+ "dahdiacceptr2call",
29
+ "dahdibarge",
30
+ "dahdiras",
31
+ "dahdiscan",
32
+ "dahdisendcallreroutingfacility",
33
+ "dahdisendkeypadfacility",
34
+ "datetime",
35
+ "dbdel",
36
+ "dbdeltree",
37
+ "deadagi",
38
+ "dial",
39
+ "dictate",
40
+ "directory",
41
+ "disa",
42
+ "dumpchan",
43
+ "eagi",
44
+ "echo",
45
+ "endwhile",
46
+ "exec",
47
+ "execif",
48
+ "execiftime",
49
+ "exitwhile",
50
+ "extenspy",
51
+ "externalivr",
52
+ "festival",
53
+ "flash",
54
+ "followme",
55
+ "forkcdr",
56
+ "getcpeid",
57
+ "gosub",
58
+ "gosubif",
59
+ "goto",
60
+ "gotoif",
61
+ "gotoiftime",
62
+ "hangup",
63
+ "iax2provision",
64
+ "ices",
65
+ "importvar",
66
+ "incomplete",
67
+ "ivrdemo",
68
+ "jabberjoin",
69
+ "jabberleave",
70
+ "jabbersend",
71
+ "jabbersendgroup",
72
+ "jabberstatus",
73
+ "jack",
74
+ "log",
75
+ "macro",
76
+ "macroexclusive",
77
+ "macroexit",
78
+ "macroif",
79
+ "mailboxexists",
80
+ "meetme",
81
+ "meetmeadmin",
82
+ "meetmechanneladmin",
83
+ "meetmecount",
84
+ "milliwatt",
85
+ "minivmaccmess",
86
+ "minivmdelete",
87
+ "minivmgreet",
88
+ "minivmmwi",
89
+ "minivmnotify",
90
+ "minivmrecord",
91
+ "mixmonitor",
92
+ "monitor",
93
+ "morsecode",
94
+ "mp3player",
95
+ "mset",
96
+ "musiconhold",
97
+ "nbscat",
98
+ "nocdr",
99
+ "noop",
100
+ "odbc",
101
+ "odbc",
102
+ "odbcfinish",
103
+ "originate",
104
+ "ospauth",
105
+ "ospfinish",
106
+ "osplookup",
107
+ "ospnext",
108
+ "page",
109
+ "park",
110
+ "parkandannounce",
111
+ "parkedcall",
112
+ "pausemonitor",
113
+ "pausequeuemember",
114
+ "pickup",
115
+ "pickupchan",
116
+ "playback",
117
+ "playtones",
118
+ "privacymanager",
119
+ "proceeding",
120
+ "progress",
121
+ "queue",
122
+ "queuelog",
123
+ "raiseexception",
124
+ "read",
125
+ "readexten",
126
+ "readfile",
127
+ "receivefax",
128
+ "receivefax",
129
+ "receivefax",
130
+ "record",
131
+ "removequeuemember",
132
+ "resetcdr",
133
+ "retrydial",
134
+ "return",
135
+ "ringing",
136
+ "sayalpha",
137
+ "saycountedadj",
138
+ "saycountednoun",
139
+ "saycountpl",
140
+ "saydigits",
141
+ "saynumber",
142
+ "sayphonetic",
143
+ "sayunixtime",
144
+ "senddtmf",
145
+ "sendfax",
146
+ "sendfax",
147
+ "sendfax",
148
+ "sendimage",
149
+ "sendtext",
150
+ "sendurl",
151
+ "set",
152
+ "setamaflags",
153
+ "setcallerpres",
154
+ "setmusiconhold",
155
+ "sipaddheader",
156
+ "sipdtmfmode",
157
+ "sipremoveheader",
158
+ "skel",
159
+ "slastation",
160
+ "slatrunk",
161
+ "sms",
162
+ "softhangup",
163
+ "speechactivategrammar",
164
+ "speechbackground",
165
+ "speechcreate",
166
+ "speechdeactivategrammar",
167
+ "speechdestroy",
168
+ "speechloadgrammar",
169
+ "speechprocessingsound",
170
+ "speechstart",
171
+ "speechunloadgrammar",
172
+ "stackpop",
173
+ "startmusiconhold",
174
+ "stopmixmonitor",
175
+ "stopmonitor",
176
+ "stopmusiconhold",
177
+ "stopplaytones",
178
+ "system",
179
+ "testclient",
180
+ "testserver",
181
+ "transfer",
182
+ "tryexec",
183
+ "trysystem",
184
+ "unpausemonitor",
185
+ "unpausequeuemember",
186
+ "userevent",
187
+ "verbose",
188
+ "vmauthenticate",
189
+ "vmsayname",
190
+ "voicemail",
191
+ "voicemailmain",
192
+ "wait",
193
+ "waitexten",
194
+ "waitfornoise",
195
+ "waitforring",
196
+ "waitforsilence",
197
+ "waitmusiconhold",
198
+ "waituntil",
199
+ "while",
200
+ "zapateller"
201
+ ];
202
+ function l(e, n) {
203
+ var i = "", a = e.next();
204
+ if (n.blockComment)
205
+ return a == "-" && e.match("-;", !0) ? n.blockComment = !1 : e.skipTo("--;") ? (e.next(), e.next(), e.next(), n.blockComment = !1) : e.skipToEnd(), "comment";
206
+ if (a == ";")
207
+ return e.match("--", !0) && !e.match("-", !1) ? (n.blockComment = !0, "comment") : (e.skipToEnd(), "comment");
208
+ if (a == "[")
209
+ return e.skipTo("]"), e.eat("]"), "header";
210
+ if (a == '"')
211
+ return e.skipTo('"'), "string";
212
+ if (a == "'")
213
+ return e.skipTo("'"), "string.special";
214
+ if (a == "#" && (e.eatWhile(/\w/), i = e.current(), o.indexOf(i) !== -1))
215
+ return e.skipToEnd(), "strong";
216
+ if (a == "$") {
217
+ var r = e.peek();
218
+ if (r == "{")
219
+ return e.skipTo("}"), e.eat("}"), "variableName.special";
220
+ }
221
+ if (e.eatWhile(/\w/), i = e.current(), t.indexOf(i) !== -1) {
222
+ switch (n.extenStart = !0, i) {
223
+ case "same":
224
+ n.extenSame = !0;
225
+ break;
226
+ case "include":
227
+ case "switch":
228
+ case "ignorepat":
229
+ n.extenInclude = !0;
230
+ break;
231
+ }
232
+ return "atom";
233
+ }
234
+ }
235
+ const s = {
236
+ name: "asterisk",
237
+ startState: function() {
238
+ return {
239
+ blockComment: !1,
240
+ extenStart: !1,
241
+ extenSame: !1,
242
+ extenInclude: !1,
243
+ extenExten: !1,
244
+ extenPriority: !1,
245
+ extenApplication: !1
246
+ };
247
+ },
248
+ token: function(e, n) {
249
+ var i = "";
250
+ if (e.eatSpace()) return null;
251
+ if (n.extenStart)
252
+ return e.eatWhile(/[^\s]/), i = e.current(), /^=>?$/.test(i) ? (n.extenExten = !0, n.extenStart = !1, "strong") : (n.extenStart = !1, e.skipToEnd(), "error");
253
+ if (n.extenExten)
254
+ return n.extenExten = !1, n.extenPriority = !0, e.eatWhile(/[^,]/), n.extenInclude && (e.skipToEnd(), n.extenPriority = !1, n.extenInclude = !1), n.extenSame && (n.extenPriority = !1, n.extenSame = !1, n.extenApplication = !0), "tag";
255
+ if (n.extenPriority)
256
+ return n.extenPriority = !1, n.extenApplication = !0, e.next(), n.extenSame ? null : (e.eatWhile(/[^,]/), "number");
257
+ if (n.extenApplication) {
258
+ if (e.eatWhile(/,/), i = e.current(), i === ",") return null;
259
+ if (e.eatWhile(/\w/), i = e.current().toLowerCase(), n.extenApplication = !1, c.indexOf(i) !== -1)
260
+ return "def";
261
+ } else
262
+ return l(e, n);
263
+ return null;
264
+ },
265
+ languageData: {
266
+ commentTokens: { line: ";", block: { open: ";--", close: "--;" } }
267
+ }
268
+ };
269
+ export {
270
+ s as asterisk
271
+ };