@marimo-team/islands 0.15.2 → 0.15.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/dist/{ConnectedDataExplorerComponent-C39nQwtD.js → ConnectedDataExplorerComponent-DfvW3rBn.js} +323 -328
- package/dist/{ImageComparisonComponent-BhkiyswP.js → ImageComparisonComponent-XaJshw7d.js} +13 -13
- package/dist/{_baseUniq-DdHL34FO.js → _baseUniq-dN9WKF9m.js} +67 -67
- package/dist/any-language-editor-CpFniVi-.js +27 -0
- package/dist/{arc-BXrety1g.js → arc-BOhn-m2C.js} +1 -1
- package/dist/{architectureDiagram-KFL7JDKH-BMy6ywCF.js → architectureDiagram-W76B3OCA-Bpg85ZKv.js} +144 -144
- package/dist/assets/{worker-COGufAQn.js → worker-Y-Q4G-N2.js} +30 -26
- package/dist/asterisk-DS281yxp.js +271 -0
- package/dist/{blockDiagram-ZYB65J3Q-DYT2-nlI.js → blockDiagram-QIGZ2CNN-DS1kOHlW.js} +10 -10
- package/dist/{c4Diagram-AAMF2YG6-ZiQzioe6.js → c4Diagram-FPNF74CW-CyRVKssw.js} +8 -8
- package/dist/{channel-CeuXqUAU.js → channel-BilGXox7.js} +1 -1
- package/dist/{chunk-ANTBXLJU-BvYnIrdq.js → chunk-4BX2VUAB-CZR39zCO.js} +1 -1
- package/dist/{chunk-WVR4S24B-DXj8yaUk.js → chunk-55IACEB6-BIH-MYov.js} +1 -1
- package/dist/{chunk-GLLZNHP4-CyFsosAe.js → chunk-FMBD7UC4-4PZXFZE8.js} +1 -1
- package/dist/{chunk-JBRWN2VN-DA_EEhy2.js → chunk-K7UQS3LO-CEvWKznk.js} +117 -117
- package/dist/{chunk-NRVI72HA-BYx2jMlI.js → chunk-QN33PNHL-D5LO5Jq_.js} +1 -1
- package/dist/{chunk-FHKO5MBM-DfCztBk8.js → chunk-QZHKN3VN-6gwUonWI.js} +1 -1
- package/dist/{chunk-LXBSTHXV-Se7vdY6J.js → chunk-TVAH2DTR-3gm06QdU.js} +7 -7
- package/dist/{chunk-OMD6QJNC-CqgcPMgL.js → chunk-TZMSLE5B-Cm8Iy9bO.js} +1 -1
- package/dist/{classDiagram-v2-QTMF73CY-B19A3G1l.js → classDiagram-KNZD7YFC-DC529O_z.js} +2 -2
- package/dist/{classDiagram-3BZAVTQC-B19A3G1l.js → classDiagram-v2-RKCZMP56-DC529O_z.js} +2 -2
- package/dist/{clone-78au0tn1.js → clone-CLoRX3j6.js} +1 -1
- package/dist/cose-bilkent-S5V4N54A-qf5DlS6Y.js +2609 -0
- package/dist/{cytoscape.esm-BYnVVhJX.js → cytoscape.esm-DfdJODL8.js} +34 -34
- package/dist/{dagre-2BBEFEWP-BfEn3ZUV.js → dagre-5GWH7T2D-Ceocls0m.js} +6 -6
- package/dist/{data-grid-overlay-editor-CH_qLkV2.js → data-grid-overlay-editor-AqDS_UKe.js} +11 -11
- package/dist/{diagram-4IRLE6MV-CL8xidnG.js → diagram-N5W7TBWH-CP66oSiv.js} +59 -60
- package/dist/{diagram-RP2FKANI-B1BPcUew.js → diagram-QEK2KX5R-_YD4kxxi.js} +15 -15
- package/dist/{diagram-GUPCWM2R-CZ5cfqlq.js → diagram-S2PKOQOG-Cnj8T-OP.js} +10 -10
- package/dist/dockerfile-Cm8cRYCN.js +194 -0
- package/dist/ebnf-DUPDuY4r.js +78 -0
- package/dist/{erDiagram-HZWUO2LU-BEAIww50.js → erDiagram-AWTI2OKA-CGnvoHx6.js} +8 -8
- package/dist/fcl-CPC2WYrI.js +103 -0
- package/dist/{flowDiagram-THRYKUMA-Czs2UAI2.js → flowDiagram-PVAE7QVJ-DG-pr9R9.js} +9 -9
- package/dist/{ganttDiagram-WV7ZQ7D5-ByYIAVFO.js → ganttDiagram-OWAHRB6G-JmChtxvn.js} +34 -34
- package/dist/{gitGraphDiagram-OJR772UL-BcpDsiyB.js → gitGraphDiagram-NY62KEGX-D8wLfOPd.js} +4 -4
- package/dist/{glide-data-editor-CmN6FVyi.js → glide-data-editor-9nC3iCIZ.js} +33 -33
- package/dist/{graph-77W6heli.js → graph-CoRe7vAN.js} +3 -3
- package/dist/http-D9LttvKF.js +44 -0
- package/dist/{index-Bfk9dnyS.js → index-6qYeHHjQ.js} +33090 -32892
- package/dist/{index-BOojn38D.js → index-BpzLh4Qe.js} +7711 -7711
- package/dist/{index-CmozKMxx.js → index-BthgsgYX.js} +6 -6
- package/dist/{index-pBmAzQJl.js → index-MCx5v1x0.js} +2 -2
- package/dist/index-jkm77Jrz.js +98 -0
- package/dist/{infoDiagram-6WOFNB3A-CfzLHHVP.js → infoDiagram-STP46IZ2-BlXxvOrR.js} +2 -2
- package/dist/{journeyDiagram-FFXJYRFH-ndAcpkGn.js → journeyDiagram-BIP6EPQ6-CNRYs_Fc.js} +24 -26
- package/dist/{kanban-definition-KOZQBZVT-DcQYzNvc.js → kanban-definition-6OIFK2YF-B9HeMAuP.js} +14 -14
- package/dist/{layout-XySVHJgD.js → layout-m2vOUiW1.js} +81 -81
- package/dist/{linear-PbooOqg7.js → linear-DU6Q5CX3.js} +35 -35
- package/dist/{main-B5yML0bw.js → main-BD2KGFpU.js} +74594 -68034
- package/dist/main.js +1 -1
- package/dist/{mermaid-Cg5IX6Nv.js → mermaid-HVCtvbyx.js} +6160 -7493
- package/dist/min-DcGMA4e_.js +80 -0
- package/dist/mindmap-definition-Q6HEUPPD-BW8UmIDQ.js +785 -0
- package/dist/nginx-zDPm3Z74.js +89 -0
- package/dist/{number-overlay-editor-DUhfZqtP.js → number-overlay-editor-D8Hl0Syo.js} +19 -19
- package/dist/{pieDiagram-DBDJKBY4-DTOlNsja.js → pieDiagram-ADFJNKIX-Bg-3zg5U.js} +17 -17
- package/dist/{quadrantDiagram-YPSRARAO-BX2d8VS-.js → quadrantDiagram-LMRXKWRM-BO4IG6Yz.js} +6 -6
- package/dist/{react-plotly-Dcyw-3Sa.js → react-plotly-dkvHVuRb.js} +3577 -3577
- package/dist/{requirementDiagram-EGVEC5DT-D1T5u-wG.js → requirementDiagram-4UW4RH46-5sdTguSM.js} +7 -7
- package/dist/{sankeyDiagram-HRAUVNP4-G6xDfnp-.js → sankeyDiagram-GR3RE2ED-Buhlv9OI.js} +5 -5
- package/dist/sequenceDiagram-C3RYC4MD-C3qsM2UP.js +2519 -0
- package/dist/{slides-component-BJLlPJSr.js → slides-component-D209A0-s.js} +66 -66
- package/dist/solr-BNlsLglM.js +41 -0
- package/dist/spreadsheet-C-cy4P5N.js +49 -0
- package/dist/{stateDiagram-UUKSUZ4H-CYXbjaom.js → stateDiagram-KXAO66HF-CopJ7G6P.js} +5 -5
- package/dist/{stateDiagram-v2-EYPG3UTE-Br1HYKT6.js → stateDiagram-v2-UMBNRL4Z-CejL8AKf.js} +2 -2
- package/dist/style.css +1 -1
- package/dist/tiddlywiki-5wqsXtSk.js +155 -0
- package/dist/tiki-__Kn3CeS.js +181 -0
- package/dist/{time-B9SZnSen.js → time-BwSBitlN.js} +58 -58
- package/dist/{timeline-definition-3HZDQTIS-DeK_ZRD0.js → timeline-definition-XQNQX7LJ-DzMNTX-C.js} +10 -12
- package/dist/{timer-BYwnU4DF.js → timer-B0-z63CM.js} +16 -16
- package/dist/{treemap-75Q7IDZK-CKP4vV_0.js → treemap-75Q7IDZK-zeJG07dk.js} +14 -14
- package/dist/{vega-component-CpgdqX2d.js → vega-component-CUkiTayd.js} +30 -30
- package/dist/{xychartDiagram-FDP5SA34-AMEPsx_R.js → xychartDiagram-6GGTOJPD-DiENNXMS.js} +7 -7
- package/package.json +39 -39
- package/src/__mocks__/notebook.ts +3 -0
- package/src/__mocks__/requests.ts +3 -0
- package/src/__tests__/__snapshots__/CellStatus.test.tsx.snap +12 -12
- package/src/__tests__/chat-utils.test.ts +26 -211
- package/src/components/ai/ai-model-dropdown.tsx +25 -9
- package/src/components/app-config/ai-config.tsx +7 -0
- package/src/components/chat/chat-components.tsx +71 -0
- package/src/components/chat/chat-panel.tsx +481 -291
- package/src/components/chat/chat-utils.ts +50 -0
- package/src/components/chat/markdown-renderer.tsx +3 -7
- package/src/components/chat/tool-call-accordion.tsx +5 -5
- package/src/components/datasources/__tests__/utils.test.ts +6 -0
- package/src/components/datasources/column-preview.tsx +1 -3
- package/src/components/editor/actions/useNotebookActions.tsx +1 -1
- package/src/components/editor/ai/add-cell-with-ai.tsx +20 -15
- package/src/components/editor/ai/ai-completion-editor.tsx +22 -3
- package/src/components/editor/ai/completion-handlers.tsx +2 -4
- package/src/components/editor/ai/completion-utils.ts +85 -11
- package/src/components/editor/alerts/startup-logs-alert.tsx +72 -0
- package/src/components/editor/chrome/panels/datasources-panel.tsx +3 -1
- package/src/components/editor/chrome/panels/dependency-graph-panel.tsx +3 -1
- package/src/components/editor/chrome/panels/documentation-panel.tsx +3 -1
- package/src/components/editor/chrome/panels/error-panel.tsx +3 -1
- package/src/components/editor/chrome/panels/file-explorer-panel.tsx +3 -1
- package/src/components/editor/chrome/panels/logs-panel.tsx +3 -1
- package/src/components/editor/chrome/panels/outline-panel.tsx +3 -1
- package/src/components/editor/chrome/panels/packages-panel.tsx +4 -2
- package/src/components/editor/chrome/panels/scratchpad-panel.tsx +3 -1
- package/src/components/editor/chrome/panels/secrets-panel.tsx +3 -1
- package/src/components/editor/chrome/panels/snippets-panel.tsx +3 -1
- package/src/components/editor/chrome/panels/tracing-panel.tsx +3 -1
- package/src/components/editor/chrome/panels/variable-panel.tsx +3 -1
- package/src/components/editor/chrome/wrapper/app-chrome.tsx +38 -28
- package/src/components/editor/controls/command-palette-button.tsx +1 -1
- package/src/components/editor/controls/command-palette.tsx +5 -4
- package/src/components/editor/controls/state.ts +4 -0
- package/src/components/editor/package-alert.tsx +108 -58
- package/src/components/editor/renderers/CellArray.tsx +2 -0
- package/src/components/editor/renderers/vertical-layout/vertical-layout.tsx +0 -1
- package/src/components/pages/edit-page.tsx +7 -3
- package/src/core/ai/chat-utils.ts +26 -43
- package/src/core/ai/config.ts +1 -1
- package/src/core/ai/context/__tests__/registry.test.ts +277 -3
- package/src/core/ai/context/context.ts +11 -1
- package/src/core/ai/context/providers/__tests__/cell-output.test.ts +378 -0
- package/src/core/ai/context/providers/__tests__/error.test.ts +3 -2
- package/src/core/ai/context/providers/__tests__/file.test.ts +119 -0
- package/src/core/ai/context/providers/cell-output.ts +349 -0
- package/src/core/ai/context/providers/common.ts +5 -1
- package/src/core/ai/context/providers/file.ts +287 -0
- package/src/core/ai/context/registry.ts +79 -0
- package/src/core/ai/state.ts +22 -5
- package/src/core/alerts/state.ts +71 -3
- package/src/core/cells/cell.ts +2 -2
- package/src/core/cells/cells.ts +1 -1
- package/src/core/cells/logs.ts +1 -1
- package/src/core/cells/runs.ts +6 -5
- package/src/core/codemirror/ai/resources.ts +47 -5
- package/src/core/codemirror/ai/state.ts +12 -0
- package/src/core/codemirror/language/__tests__/sql.test.ts +45 -0
- package/src/core/codemirror/markdown/__tests__/commands.test.ts +1 -0
- package/src/core/codemirror/theme/dark.ts +1 -1
- package/src/core/config/capabilities.ts +1 -1
- package/src/core/datasets/__tests__/data-source.test.ts +24 -0
- package/src/core/errors/__tests__/errors.test.ts +2 -0
- package/src/core/islands/bridge.ts +1 -0
- package/src/core/islands/main.ts +1 -0
- package/src/core/kernel/messages.ts +12 -6
- package/src/core/layout/layout.ts +3 -3
- package/src/core/network/requests-network.ts +8 -0
- package/src/core/network/requests-static.ts +1 -0
- package/src/core/network/requests-toasting.ts +1 -0
- package/src/core/network/types.ts +4 -1
- package/src/core/wasm/bridge.ts +18 -2
- package/src/core/wasm/worker/bootstrap.ts +3 -1
- package/src/core/wasm/worker/getMarimoWheel.ts +3 -8
- package/src/core/wasm/worker/types.ts +3 -0
- package/src/core/websocket/useMarimoWebSocket.tsx +7 -1
- package/src/css/app/Cell.css +42 -21
- package/src/css/app/codemirror.css +5 -1
- package/src/css/globals.css +3 -0
- package/src/css/md.css +1 -1
- package/src/plugins/impl/MicrophonePlugin.tsx +2 -2
- package/src/plugins/impl/chat/ChatPlugin.tsx +2 -9
- package/src/plugins/impl/chat/chat-ui.tsx +129 -110
- package/src/plugins/impl/chat/types.ts +5 -8
- package/src/plugins/impl/code/__tests__/language.test.ts +15 -0
- package/src/plugins/impl/code/any-language-editor.tsx +11 -8
- package/src/plugins/layout/MimeRenderPlugin.tsx +3 -6
- package/src/stories/cell.stories.tsx +6 -0
- package/src/stories/layout/vertical/one-column.stories.tsx +215 -0
- package/src/theme/useTheme.ts +11 -6
- package/src/utils/__tests__/blob.test.ts +37 -0
- package/src/utils/arrays.ts +13 -0
- package/src/utils/fileToBase64.ts +21 -6
- package/src/utils/json/base64.ts +5 -2
- package/src/utils/numbers.ts +9 -7
- package/dist/any-language-editor-DC5170DQ.js +0 -45
- package/dist/asn1-jKiBa2Ya.js +0 -95
- package/dist/clojure-CCKyeQKf.js +0 -800
- package/dist/css-BkF-NPzE.js +0 -1553
- package/dist/index-5ZH_qS8j.js +0 -288
- package/dist/index-U4yn89qO.js +0 -341
- package/dist/javascript-C2yteZeJ.js +0 -691
- package/dist/min-DS5Jz-hg.js +0 -80
- package/dist/mindmap-definition-LNHGMQRG-0aOVaMR8.js +0 -3234
- package/dist/mllike-BSnXJBGA.js +0 -272
- package/dist/pug-CwAQJzGR.js +0 -248
- package/dist/python-BkR3uSy8.js +0 -313
- package/dist/rpm-IznJm2Xc.js +0 -57
- package/dist/sequenceDiagram-WFGC7UMF-DMhHzllb.js +0 -2284
- package/dist/ttcn-cfg-Bac_acMi.js +0 -88
package/dist/mllike-BSnXJBGA.js
DELETED
|
@@ -1,272 +0,0 @@
|
|
|
1
|
-
function y(i) {
|
|
2
|
-
var t = {
|
|
3
|
-
as: "keyword",
|
|
4
|
-
do: "keyword",
|
|
5
|
-
else: "keyword",
|
|
6
|
-
end: "keyword",
|
|
7
|
-
exception: "keyword",
|
|
8
|
-
fun: "keyword",
|
|
9
|
-
functor: "keyword",
|
|
10
|
-
if: "keyword",
|
|
11
|
-
in: "keyword",
|
|
12
|
-
include: "keyword",
|
|
13
|
-
let: "keyword",
|
|
14
|
-
of: "keyword",
|
|
15
|
-
open: "keyword",
|
|
16
|
-
rec: "keyword",
|
|
17
|
-
struct: "keyword",
|
|
18
|
-
then: "keyword",
|
|
19
|
-
type: "keyword",
|
|
20
|
-
val: "keyword",
|
|
21
|
-
while: "keyword",
|
|
22
|
-
with: "keyword"
|
|
23
|
-
}, l = i.extraWords || {};
|
|
24
|
-
for (var w in l)
|
|
25
|
-
l.hasOwnProperty(w) && (t[w] = i.extraWords[w]);
|
|
26
|
-
var u = [];
|
|
27
|
-
for (var a in t)
|
|
28
|
-
u.push(a);
|
|
29
|
-
function d(e, r) {
|
|
30
|
-
var o = e.next();
|
|
31
|
-
if (o === '"')
|
|
32
|
-
return r.tokenize = c, r.tokenize(e, r);
|
|
33
|
-
if (o === "{" && e.eat("|"))
|
|
34
|
-
return r.longString = true, r.tokenize = b, r.tokenize(e, r);
|
|
35
|
-
if (o === "(" && e.match(/^\*(?!\))/))
|
|
36
|
-
return r.commentLevel++, r.tokenize = f, r.tokenize(e, r);
|
|
37
|
-
if (o === "~" || o === "?")
|
|
38
|
-
return e.eatWhile(/\w/), "variableName.special";
|
|
39
|
-
if (o === "`")
|
|
40
|
-
return e.eatWhile(/\w/), "quote";
|
|
41
|
-
if (o === "/" && i.slashComments && e.eat("/"))
|
|
42
|
-
return e.skipToEnd(), "comment";
|
|
43
|
-
if (/\d/.test(o))
|
|
44
|
-
return o === "0" && e.eat(/[bB]/) && e.eatWhile(/[01]/), o === "0" && e.eat(/[xX]/) && e.eatWhile(/[0-9a-fA-F]/), o === "0" && e.eat(/[oO]/) ? e.eatWhile(/[0-7]/) : (e.eatWhile(/[\d_]/), e.eat(".") && e.eatWhile(/[\d]/), e.eat(/[eE]/) && e.eatWhile(/[\d\-+]/)), "number";
|
|
45
|
-
if (/[+\-*&%=<>!?|@\.~:]/.test(o))
|
|
46
|
-
return "operator";
|
|
47
|
-
if (/[\w\xa1-\uffff]/.test(o)) {
|
|
48
|
-
e.eatWhile(/[\w\xa1-\uffff]/);
|
|
49
|
-
var n = e.current();
|
|
50
|
-
return t.hasOwnProperty(n) ? t[n] : "variable";
|
|
51
|
-
}
|
|
52
|
-
return null;
|
|
53
|
-
}
|
|
54
|
-
function c(e, r) {
|
|
55
|
-
for (var o, n = false, k = false; (o = e.next()) != null; ) {
|
|
56
|
-
if (o === '"' && !k) {
|
|
57
|
-
n = true;
|
|
58
|
-
break;
|
|
59
|
-
}
|
|
60
|
-
k = !k && o === "\\";
|
|
61
|
-
}
|
|
62
|
-
return n && !k && (r.tokenize = d), "string";
|
|
63
|
-
}
|
|
64
|
-
function f(e, r) {
|
|
65
|
-
for (var o, n; r.commentLevel > 0 && (n = e.next()) != null; )
|
|
66
|
-
o === "(" && n === "*" && r.commentLevel++, o === "*" && n === ")" && r.commentLevel--, o = n;
|
|
67
|
-
return r.commentLevel <= 0 && (r.tokenize = d), "comment";
|
|
68
|
-
}
|
|
69
|
-
function b(e, r) {
|
|
70
|
-
for (var o, n; r.longString && (n = e.next()) != null; )
|
|
71
|
-
o === "|" && n === "}" && (r.longString = false), o = n;
|
|
72
|
-
return r.longString || (r.tokenize = d), "string";
|
|
73
|
-
}
|
|
74
|
-
return {
|
|
75
|
-
startState: function() {
|
|
76
|
-
return { tokenize: d, commentLevel: 0, longString: false };
|
|
77
|
-
},
|
|
78
|
-
token: function(e, r) {
|
|
79
|
-
return e.eatSpace() ? null : r.tokenize(e, r);
|
|
80
|
-
},
|
|
81
|
-
languageData: {
|
|
82
|
-
autocomplete: u,
|
|
83
|
-
commentTokens: {
|
|
84
|
-
line: i.slashComments ? "//" : void 0,
|
|
85
|
-
block: { open: "(*", close: "*)" }
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
};
|
|
89
|
-
}
|
|
90
|
-
const s = y({
|
|
91
|
-
extraWords: {
|
|
92
|
-
and: "keyword",
|
|
93
|
-
assert: "keyword",
|
|
94
|
-
begin: "keyword",
|
|
95
|
-
class: "keyword",
|
|
96
|
-
constraint: "keyword",
|
|
97
|
-
done: "keyword",
|
|
98
|
-
downto: "keyword",
|
|
99
|
-
external: "keyword",
|
|
100
|
-
function: "keyword",
|
|
101
|
-
initializer: "keyword",
|
|
102
|
-
lazy: "keyword",
|
|
103
|
-
match: "keyword",
|
|
104
|
-
method: "keyword",
|
|
105
|
-
module: "keyword",
|
|
106
|
-
mutable: "keyword",
|
|
107
|
-
new: "keyword",
|
|
108
|
-
nonrec: "keyword",
|
|
109
|
-
object: "keyword",
|
|
110
|
-
private: "keyword",
|
|
111
|
-
sig: "keyword",
|
|
112
|
-
to: "keyword",
|
|
113
|
-
try: "keyword",
|
|
114
|
-
value: "keyword",
|
|
115
|
-
virtual: "keyword",
|
|
116
|
-
when: "keyword",
|
|
117
|
-
// builtins
|
|
118
|
-
raise: "builtin",
|
|
119
|
-
failwith: "builtin",
|
|
120
|
-
true: "builtin",
|
|
121
|
-
false: "builtin",
|
|
122
|
-
// Pervasives builtins
|
|
123
|
-
asr: "builtin",
|
|
124
|
-
land: "builtin",
|
|
125
|
-
lor: "builtin",
|
|
126
|
-
lsl: "builtin",
|
|
127
|
-
lsr: "builtin",
|
|
128
|
-
lxor: "builtin",
|
|
129
|
-
mod: "builtin",
|
|
130
|
-
or: "builtin",
|
|
131
|
-
// More Pervasives
|
|
132
|
-
raise_notrace: "builtin",
|
|
133
|
-
trace: "builtin",
|
|
134
|
-
exit: "builtin",
|
|
135
|
-
print_string: "builtin",
|
|
136
|
-
print_endline: "builtin",
|
|
137
|
-
int: "type",
|
|
138
|
-
float: "type",
|
|
139
|
-
bool: "type",
|
|
140
|
-
char: "type",
|
|
141
|
-
string: "type",
|
|
142
|
-
unit: "type",
|
|
143
|
-
// Modules
|
|
144
|
-
List: "builtin"
|
|
145
|
-
}
|
|
146
|
-
}), h = y({
|
|
147
|
-
extraWords: {
|
|
148
|
-
abstract: "keyword",
|
|
149
|
-
assert: "keyword",
|
|
150
|
-
base: "keyword",
|
|
151
|
-
begin: "keyword",
|
|
152
|
-
class: "keyword",
|
|
153
|
-
default: "keyword",
|
|
154
|
-
delegate: "keyword",
|
|
155
|
-
"do!": "keyword",
|
|
156
|
-
done: "keyword",
|
|
157
|
-
downcast: "keyword",
|
|
158
|
-
downto: "keyword",
|
|
159
|
-
elif: "keyword",
|
|
160
|
-
extern: "keyword",
|
|
161
|
-
finally: "keyword",
|
|
162
|
-
for: "keyword",
|
|
163
|
-
function: "keyword",
|
|
164
|
-
global: "keyword",
|
|
165
|
-
inherit: "keyword",
|
|
166
|
-
inline: "keyword",
|
|
167
|
-
interface: "keyword",
|
|
168
|
-
internal: "keyword",
|
|
169
|
-
lazy: "keyword",
|
|
170
|
-
"let!": "keyword",
|
|
171
|
-
match: "keyword",
|
|
172
|
-
member: "keyword",
|
|
173
|
-
module: "keyword",
|
|
174
|
-
mutable: "keyword",
|
|
175
|
-
namespace: "keyword",
|
|
176
|
-
new: "keyword",
|
|
177
|
-
null: "keyword",
|
|
178
|
-
override: "keyword",
|
|
179
|
-
private: "keyword",
|
|
180
|
-
public: "keyword",
|
|
181
|
-
"return!": "keyword",
|
|
182
|
-
return: "keyword",
|
|
183
|
-
select: "keyword",
|
|
184
|
-
static: "keyword",
|
|
185
|
-
to: "keyword",
|
|
186
|
-
try: "keyword",
|
|
187
|
-
upcast: "keyword",
|
|
188
|
-
"use!": "keyword",
|
|
189
|
-
use: "keyword",
|
|
190
|
-
void: "keyword",
|
|
191
|
-
when: "keyword",
|
|
192
|
-
"yield!": "keyword",
|
|
193
|
-
yield: "keyword",
|
|
194
|
-
// Reserved words
|
|
195
|
-
atomic: "keyword",
|
|
196
|
-
break: "keyword",
|
|
197
|
-
checked: "keyword",
|
|
198
|
-
component: "keyword",
|
|
199
|
-
const: "keyword",
|
|
200
|
-
constraint: "keyword",
|
|
201
|
-
constructor: "keyword",
|
|
202
|
-
continue: "keyword",
|
|
203
|
-
eager: "keyword",
|
|
204
|
-
event: "keyword",
|
|
205
|
-
external: "keyword",
|
|
206
|
-
fixed: "keyword",
|
|
207
|
-
method: "keyword",
|
|
208
|
-
mixin: "keyword",
|
|
209
|
-
object: "keyword",
|
|
210
|
-
parallel: "keyword",
|
|
211
|
-
process: "keyword",
|
|
212
|
-
protected: "keyword",
|
|
213
|
-
pure: "keyword",
|
|
214
|
-
sealed: "keyword",
|
|
215
|
-
tailcall: "keyword",
|
|
216
|
-
trait: "keyword",
|
|
217
|
-
virtual: "keyword",
|
|
218
|
-
volatile: "keyword",
|
|
219
|
-
// builtins
|
|
220
|
-
List: "builtin",
|
|
221
|
-
Seq: "builtin",
|
|
222
|
-
Map: "builtin",
|
|
223
|
-
Set: "builtin",
|
|
224
|
-
Option: "builtin",
|
|
225
|
-
int: "builtin",
|
|
226
|
-
string: "builtin",
|
|
227
|
-
not: "builtin",
|
|
228
|
-
true: "builtin",
|
|
229
|
-
false: "builtin",
|
|
230
|
-
raise: "builtin",
|
|
231
|
-
failwith: "builtin"
|
|
232
|
-
},
|
|
233
|
-
slashComments: true
|
|
234
|
-
}), p = y({
|
|
235
|
-
extraWords: {
|
|
236
|
-
abstype: "keyword",
|
|
237
|
-
and: "keyword",
|
|
238
|
-
andalso: "keyword",
|
|
239
|
-
case: "keyword",
|
|
240
|
-
datatype: "keyword",
|
|
241
|
-
fn: "keyword",
|
|
242
|
-
handle: "keyword",
|
|
243
|
-
infix: "keyword",
|
|
244
|
-
infixr: "keyword",
|
|
245
|
-
local: "keyword",
|
|
246
|
-
nonfix: "keyword",
|
|
247
|
-
op: "keyword",
|
|
248
|
-
orelse: "keyword",
|
|
249
|
-
raise: "keyword",
|
|
250
|
-
withtype: "keyword",
|
|
251
|
-
eqtype: "keyword",
|
|
252
|
-
sharing: "keyword",
|
|
253
|
-
sig: "keyword",
|
|
254
|
-
signature: "keyword",
|
|
255
|
-
structure: "keyword",
|
|
256
|
-
where: "keyword",
|
|
257
|
-
true: "keyword",
|
|
258
|
-
false: "keyword",
|
|
259
|
-
// types
|
|
260
|
-
int: "builtin",
|
|
261
|
-
real: "builtin",
|
|
262
|
-
string: "builtin",
|
|
263
|
-
char: "builtin",
|
|
264
|
-
bool: "builtin"
|
|
265
|
-
},
|
|
266
|
-
slashComments: true
|
|
267
|
-
});
|
|
268
|
-
export {
|
|
269
|
-
h as fSharp,
|
|
270
|
-
s as oCaml,
|
|
271
|
-
p as sml
|
|
272
|
-
};
|
package/dist/pug-CwAQJzGR.js
DELETED
|
@@ -1,248 +0,0 @@
|
|
|
1
|
-
import { javascript as e } from "./javascript-C2yteZeJ.js";
|
|
2
|
-
var f = {
|
|
3
|
-
"{": "}",
|
|
4
|
-
"(": ")",
|
|
5
|
-
"[": "]"
|
|
6
|
-
};
|
|
7
|
-
function p(i) {
|
|
8
|
-
if (typeof i != "object") return i;
|
|
9
|
-
let n = {};
|
|
10
|
-
for (let t in i) {
|
|
11
|
-
let r = i[t];
|
|
12
|
-
n[t] = r instanceof Array ? r.slice() : r;
|
|
13
|
-
}
|
|
14
|
-
return n;
|
|
15
|
-
}
|
|
16
|
-
class u {
|
|
17
|
-
constructor(n) {
|
|
18
|
-
this.indentUnit = n, this.javaScriptLine = false, this.javaScriptLineExcludesColon = false, this.javaScriptArguments = false, this.javaScriptArgumentsDepth = 0, this.isInterpolating = false, this.interpolationNesting = 0, this.jsState = e.startState(n), this.restOfLine = "", this.isIncludeFiltered = false, this.isEach = false, this.lastTag = "", this.isAttrs = false, this.attrsNest = [], this.inAttributeName = true, this.attributeIsType = false, this.attrValue = "", this.indentOf = 1 / 0, this.indentToken = "";
|
|
19
|
-
}
|
|
20
|
-
copy() {
|
|
21
|
-
var n = new u(this.indentUnit);
|
|
22
|
-
return n.javaScriptLine = this.javaScriptLine, n.javaScriptLineExcludesColon = this.javaScriptLineExcludesColon, n.javaScriptArguments = this.javaScriptArguments, n.javaScriptArgumentsDepth = this.javaScriptArgumentsDepth, n.isInterpolating = this.isInterpolating, n.interpolationNesting = this.interpolationNesting, n.jsState = (e.copyState || p)(this.jsState), n.restOfLine = this.restOfLine, n.isIncludeFiltered = this.isIncludeFiltered, n.isEach = this.isEach, n.lastTag = this.lastTag, n.isAttrs = this.isAttrs, n.attrsNest = this.attrsNest.slice(), n.inAttributeName = this.inAttributeName, n.attributeIsType = this.attributeIsType, n.attrValue = this.attrValue, n.indentOf = this.indentOf, n.indentToken = this.indentToken, n;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
function h(i, n) {
|
|
26
|
-
if (i.sol() && (n.javaScriptLine = false, n.javaScriptLineExcludesColon = false), n.javaScriptLine) {
|
|
27
|
-
if (n.javaScriptLineExcludesColon && i.peek() === ":") {
|
|
28
|
-
n.javaScriptLine = false, n.javaScriptLineExcludesColon = false;
|
|
29
|
-
return;
|
|
30
|
-
}
|
|
31
|
-
var t = e.token(i, n.jsState);
|
|
32
|
-
return i.eol() && (n.javaScriptLine = false), t || true;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
function d(i, n) {
|
|
36
|
-
if (n.javaScriptArguments) {
|
|
37
|
-
if (n.javaScriptArgumentsDepth === 0 && i.peek() !== "(") {
|
|
38
|
-
n.javaScriptArguments = false;
|
|
39
|
-
return;
|
|
40
|
-
}
|
|
41
|
-
if (i.peek() === "(" ? n.javaScriptArgumentsDepth++ : i.peek() === ")" && n.javaScriptArgumentsDepth--, n.javaScriptArgumentsDepth === 0) {
|
|
42
|
-
n.javaScriptArguments = false;
|
|
43
|
-
return;
|
|
44
|
-
}
|
|
45
|
-
var t = e.token(i, n.jsState);
|
|
46
|
-
return t || true;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
function s(i) {
|
|
50
|
-
if (i.match(/^yield\b/))
|
|
51
|
-
return "keyword";
|
|
52
|
-
}
|
|
53
|
-
function S(i) {
|
|
54
|
-
if (i.match(/^(?:doctype) *([^\n]+)?/)) return "meta";
|
|
55
|
-
}
|
|
56
|
-
function o(i, n) {
|
|
57
|
-
if (i.match("#{"))
|
|
58
|
-
return n.isInterpolating = true, n.interpolationNesting = 0, "punctuation";
|
|
59
|
-
}
|
|
60
|
-
function v(i, n) {
|
|
61
|
-
if (n.isInterpolating) {
|
|
62
|
-
if (i.peek() === "}") {
|
|
63
|
-
if (n.interpolationNesting--, n.interpolationNesting < 0)
|
|
64
|
-
return i.next(), n.isInterpolating = false, "punctuation";
|
|
65
|
-
} else i.peek() === "{" && n.interpolationNesting++;
|
|
66
|
-
return e.token(i, n.jsState) || true;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
function g(i, n) {
|
|
70
|
-
if (i.match(/^case\b/))
|
|
71
|
-
return n.javaScriptLine = true, "keyword";
|
|
72
|
-
}
|
|
73
|
-
function j(i, n) {
|
|
74
|
-
if (i.match(/^when\b/))
|
|
75
|
-
return n.javaScriptLine = true, n.javaScriptLineExcludesColon = true, "keyword";
|
|
76
|
-
}
|
|
77
|
-
function k(i) {
|
|
78
|
-
if (i.match(/^default\b/))
|
|
79
|
-
return "keyword";
|
|
80
|
-
}
|
|
81
|
-
function b(i, n) {
|
|
82
|
-
if (i.match(/^extends?\b/))
|
|
83
|
-
return n.restOfLine = "string", "keyword";
|
|
84
|
-
}
|
|
85
|
-
function A(i, n) {
|
|
86
|
-
if (i.match(/^append\b/))
|
|
87
|
-
return n.restOfLine = "variable", "keyword";
|
|
88
|
-
}
|
|
89
|
-
function y(i, n) {
|
|
90
|
-
if (i.match(/^prepend\b/))
|
|
91
|
-
return n.restOfLine = "variable", "keyword";
|
|
92
|
-
}
|
|
93
|
-
function L(i, n) {
|
|
94
|
-
if (i.match(/^block\b *(?:(prepend|append)\b)?/))
|
|
95
|
-
return n.restOfLine = "variable", "keyword";
|
|
96
|
-
}
|
|
97
|
-
function w(i, n) {
|
|
98
|
-
if (i.match(/^include\b/))
|
|
99
|
-
return n.restOfLine = "string", "keyword";
|
|
100
|
-
}
|
|
101
|
-
function N(i, n) {
|
|
102
|
-
if (i.match(/^include:([a-zA-Z0-9\-]+)/, false) && i.match("include"))
|
|
103
|
-
return n.isIncludeFiltered = true, "keyword";
|
|
104
|
-
}
|
|
105
|
-
function x(i, n) {
|
|
106
|
-
if (n.isIncludeFiltered) {
|
|
107
|
-
var t = l(i, n);
|
|
108
|
-
return n.isIncludeFiltered = false, n.restOfLine = "string", t;
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
function T(i, n) {
|
|
112
|
-
if (i.match(/^mixin\b/))
|
|
113
|
-
return n.javaScriptLine = true, "keyword";
|
|
114
|
-
}
|
|
115
|
-
function I(i, n) {
|
|
116
|
-
if (i.match(/^\+([-\w]+)/))
|
|
117
|
-
return i.match(/^\( *[-\w]+ *=/, false) || (n.javaScriptArguments = true, n.javaScriptArgumentsDepth = 0), "variable";
|
|
118
|
-
if (i.match("+#{", false))
|
|
119
|
-
return i.next(), n.mixinCallAfter = true, o(i, n);
|
|
120
|
-
}
|
|
121
|
-
function O(i, n) {
|
|
122
|
-
if (n.mixinCallAfter)
|
|
123
|
-
return n.mixinCallAfter = false, i.match(/^\( *[-\w]+ *=/, false) || (n.javaScriptArguments = true, n.javaScriptArgumentsDepth = 0), true;
|
|
124
|
-
}
|
|
125
|
-
function C(i, n) {
|
|
126
|
-
if (i.match(/^(if|unless|else if|else)\b/))
|
|
127
|
-
return n.javaScriptLine = true, "keyword";
|
|
128
|
-
}
|
|
129
|
-
function E(i, n) {
|
|
130
|
-
if (i.match(/^(- *)?(each|for)\b/))
|
|
131
|
-
return n.isEach = true, "keyword";
|
|
132
|
-
}
|
|
133
|
-
function D(i, n) {
|
|
134
|
-
if (n.isEach) {
|
|
135
|
-
if (i.match(/^ in\b/))
|
|
136
|
-
return n.javaScriptLine = true, n.isEach = false, "keyword";
|
|
137
|
-
if (i.sol() || i.eol())
|
|
138
|
-
n.isEach = false;
|
|
139
|
-
else if (i.next()) {
|
|
140
|
-
for (; !i.match(/^ in\b/, false) && i.next(); )
|
|
141
|
-
;
|
|
142
|
-
return "variable";
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
function F(i, n) {
|
|
147
|
-
if (i.match(/^while\b/))
|
|
148
|
-
return n.javaScriptLine = true, "keyword";
|
|
149
|
-
}
|
|
150
|
-
function m(i, n) {
|
|
151
|
-
var t;
|
|
152
|
-
if (t = i.match(/^(\w(?:[-:\w]*\w)?)\/?/))
|
|
153
|
-
return n.lastTag = t[1].toLowerCase(), "tag";
|
|
154
|
-
}
|
|
155
|
-
function l(i, n) {
|
|
156
|
-
if (i.match(/^:([\w\-]+)/))
|
|
157
|
-
return c(i, n), "atom";
|
|
158
|
-
}
|
|
159
|
-
function V(i, n) {
|
|
160
|
-
if (i.match(/^(!?=|-)/))
|
|
161
|
-
return n.javaScriptLine = true, "punctuation";
|
|
162
|
-
}
|
|
163
|
-
function U(i) {
|
|
164
|
-
if (i.match(/^#([\w-]+)/))
|
|
165
|
-
return "builtin";
|
|
166
|
-
}
|
|
167
|
-
function z(i) {
|
|
168
|
-
if (i.match(/^\.([\w-]+)/))
|
|
169
|
-
return "className";
|
|
170
|
-
}
|
|
171
|
-
function B(i, n) {
|
|
172
|
-
if (i.peek() == "(")
|
|
173
|
-
return i.next(), n.isAttrs = true, n.attrsNest = [], n.inAttributeName = true, n.attrValue = "", n.attributeIsType = false, "punctuation";
|
|
174
|
-
}
|
|
175
|
-
function a(i, n) {
|
|
176
|
-
if (n.isAttrs) {
|
|
177
|
-
if (f[i.peek()] && n.attrsNest.push(f[i.peek()]), n.attrsNest[n.attrsNest.length - 1] === i.peek())
|
|
178
|
-
n.attrsNest.pop();
|
|
179
|
-
else if (i.eat(")"))
|
|
180
|
-
return n.isAttrs = false, "punctuation";
|
|
181
|
-
if (n.inAttributeName && i.match(/^[^=,\)!]+/))
|
|
182
|
-
return (i.peek() === "=" || i.peek() === "!") && (n.inAttributeName = false, n.jsState = e.startState(2), n.lastTag === "script" && i.current().trim().toLowerCase() === "type" ? n.attributeIsType = true : n.attributeIsType = false), "attribute";
|
|
183
|
-
var t = e.token(i, n.jsState);
|
|
184
|
-
if (n.attrsNest.length === 0 && (t === "string" || t === "variable" || t === "keyword"))
|
|
185
|
-
try {
|
|
186
|
-
return Function("", "var x " + n.attrValue.replace(/,\s*$/, "").replace(/^!/, "")), n.inAttributeName = true, n.attrValue = "", i.backUp(i.current().length), a(i, n);
|
|
187
|
-
} catch {
|
|
188
|
-
}
|
|
189
|
-
return n.attrValue += i.current(), t || true;
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
function M(i, n) {
|
|
193
|
-
if (i.match(/^&attributes\b/))
|
|
194
|
-
return n.javaScriptArguments = true, n.javaScriptArgumentsDepth = 0, "keyword";
|
|
195
|
-
}
|
|
196
|
-
function R(i) {
|
|
197
|
-
if (i.sol() && i.eatSpace())
|
|
198
|
-
return "indent";
|
|
199
|
-
}
|
|
200
|
-
function Z(i, n) {
|
|
201
|
-
if (i.match(/^ *\/\/(-)?([^\n]*)/))
|
|
202
|
-
return n.indentOf = i.indentation(), n.indentToken = "comment", "comment";
|
|
203
|
-
}
|
|
204
|
-
function $(i) {
|
|
205
|
-
if (i.match(/^: */))
|
|
206
|
-
return "colon";
|
|
207
|
-
}
|
|
208
|
-
function q(i, n) {
|
|
209
|
-
if (i.match(/^(?:\| ?| )([^\n]+)/))
|
|
210
|
-
return "string";
|
|
211
|
-
if (i.match(/^(<[^\n]*)/, false))
|
|
212
|
-
return c(i, n), i.skipToEnd(), n.indentToken;
|
|
213
|
-
}
|
|
214
|
-
function G(i, n) {
|
|
215
|
-
if (i.eat("."))
|
|
216
|
-
return c(i, n), "dot";
|
|
217
|
-
}
|
|
218
|
-
function H(i) {
|
|
219
|
-
return i.next(), null;
|
|
220
|
-
}
|
|
221
|
-
function c(i, n) {
|
|
222
|
-
n.indentOf = i.indentation(), n.indentToken = "string";
|
|
223
|
-
}
|
|
224
|
-
function J(i, n) {
|
|
225
|
-
if (i.sol() && (n.restOfLine = ""), n.restOfLine) {
|
|
226
|
-
i.skipToEnd();
|
|
227
|
-
var t = n.restOfLine;
|
|
228
|
-
return n.restOfLine = "", t;
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
function K(i) {
|
|
232
|
-
return new u(i);
|
|
233
|
-
}
|
|
234
|
-
function P(i) {
|
|
235
|
-
return i.copy();
|
|
236
|
-
}
|
|
237
|
-
function Q(i, n) {
|
|
238
|
-
var t = J(i, n) || v(i, n) || x(i, n) || D(i, n) || a(i, n) || h(i, n) || d(i, n) || O(i, n) || s(i) || S(i) || o(i, n) || g(i, n) || j(i, n) || k(i) || b(i, n) || A(i, n) || y(i, n) || L(i, n) || w(i, n) || N(i, n) || T(i, n) || I(i, n) || C(i, n) || E(i, n) || F(i, n) || m(i, n) || l(i, n) || V(i, n) || U(i) || z(i) || B(i, n) || M(i, n) || R(i) || q(i, n) || Z(i, n) || $(i) || G(i, n) || H(i);
|
|
239
|
-
return t === true ? null : t;
|
|
240
|
-
}
|
|
241
|
-
const X = {
|
|
242
|
-
startState: K,
|
|
243
|
-
copyState: P,
|
|
244
|
-
token: Q
|
|
245
|
-
};
|
|
246
|
-
export {
|
|
247
|
-
X as pug
|
|
248
|
-
};
|