@mcp-b/interactive-components 0.2.21 → 0.2.22

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.
@@ -1891,12 +1891,12 @@
1891
1891
  },
1892
1892
  {
1893
1893
  "kind": "javascript-module",
1894
- "path": "src/components/r-editor/r-editor.ts",
1894
+ "path": "src/components/sql-editor/sql-editor.ts",
1895
1895
  "declarations": [
1896
1896
  {
1897
1897
  "kind": "class",
1898
- "description": "`<sigvelo-r-editor>`",
1899
- "name": "SigveloREditor",
1898
+ "description": "`<sigvelo-sql-editor>`",
1899
+ "name": "SigveloSqlEditor",
1900
1900
  "members": [
1901
1901
  {
1902
1902
  "kind": "field",
@@ -1916,6 +1916,15 @@
1916
1916
  "static": true,
1917
1917
  "default": "[hostStyles, styles]"
1918
1918
  },
1919
+ {
1920
+ "kind": "field",
1921
+ "name": "setupSql",
1922
+ "type": {
1923
+ "text": "string"
1924
+ },
1925
+ "default": "\"\"",
1926
+ "description": "SQL to execute on database initialization (CREATE TABLE, INSERT, etc.)."
1927
+ },
1919
1928
  {
1920
1929
  "kind": "field",
1921
1930
  "name": "code",
@@ -1923,16 +1932,25 @@
1923
1932
  "text": "string"
1924
1933
  },
1925
1934
  "default": "\"\"",
1926
- "description": "Initial R code to display in the editor."
1935
+ "description": "Initial query in the editor."
1927
1936
  },
1928
1937
  {
1929
1938
  "kind": "field",
1930
- "name": "packages",
1939
+ "name": "dbName",
1931
1940
  "type": {
1932
- "text": "string[]"
1941
+ "text": "string"
1933
1942
  },
1934
- "default": "[]",
1935
- "description": "R packages to pre-install before running code (e.g. `['ggplot2']`)."
1943
+ "default": "\"\"",
1944
+ "description": "IndexedDB name for persistence. Empty = in-memory (no persistence)."
1945
+ },
1946
+ {
1947
+ "kind": "field",
1948
+ "name": "postgis",
1949
+ "type": {
1950
+ "text": "boolean"
1951
+ },
1952
+ "default": "false",
1953
+ "description": "Enable PostGIS extension on the in-browser database."
1936
1954
  },
1937
1955
  {
1938
1956
  "kind": "field",
@@ -1940,7 +1958,7 @@
1940
1958
  "type": {
1941
1959
  "text": "string"
1942
1960
  },
1943
- "default": "\"R code editor\"",
1961
+ "default": "\"SQL code editor\"",
1944
1962
  "description": "Accessible label for the editor."
1945
1963
  },
1946
1964
  {
@@ -1954,14 +1972,50 @@
1954
1972
  },
1955
1973
  {
1956
1974
  "kind": "field",
1957
- "name": "_consoleLogs",
1975
+ "name": "_pgliteReady",
1958
1976
  "type": {
1959
- "text": "ConsoleEntry[]",
1977
+ "text": "boolean"
1978
+ },
1979
+ "privacy": "private",
1980
+ "default": "false"
1981
+ },
1982
+ {
1983
+ "kind": "field",
1984
+ "name": "_pgliteLoading",
1985
+ "type": {
1986
+ "text": "boolean"
1987
+ },
1988
+ "privacy": "private",
1989
+ "default": "true"
1990
+ },
1991
+ {
1992
+ "kind": "field",
1993
+ "name": "_loadingMessage",
1994
+ "type": {
1995
+ "text": "string"
1996
+ },
1997
+ "privacy": "private",
1998
+ "default": "\"Initializing PostgreSQL...\""
1999
+ },
2000
+ {
2001
+ "kind": "field",
2002
+ "name": "_running",
2003
+ "type": {
2004
+ "text": "boolean"
2005
+ },
2006
+ "privacy": "private",
2007
+ "default": "false"
2008
+ },
2009
+ {
2010
+ "kind": "field",
2011
+ "name": "_resultFields",
2012
+ "type": {
2013
+ "text": "ResultField[]",
1960
2014
  "references": [
1961
2015
  {
1962
- "name": "ConsoleEntry",
2016
+ "name": "ResultField",
1963
2017
  "start": 0,
1964
- "end": 12
2018
+ "end": 11
1965
2019
  }
1966
2020
  ]
1967
2021
  },
@@ -1970,23 +2024,16 @@
1970
2024
  },
1971
2025
  {
1972
2026
  "kind": "field",
1973
- "name": "_plots",
2027
+ "name": "_resultRows",
1974
2028
  "type": {
1975
- "text": "PlotEntry[]",
1976
- "references": [
1977
- {
1978
- "name": "PlotEntry",
1979
- "start": 0,
1980
- "end": 9
1981
- }
1982
- ]
2029
+ "text": "Record<string, unknown>[]"
1983
2030
  },
1984
2031
  "privacy": "private",
1985
2032
  "default": "[]"
1986
2033
  },
1987
2034
  {
1988
2035
  "kind": "field",
1989
- "name": "_currentPlotIndex",
2036
+ "name": "_rowCount",
1990
2037
  "type": {
1991
2038
  "text": "number"
1992
2039
  },
@@ -1995,39 +2042,68 @@
1995
2042
  },
1996
2043
  {
1997
2044
  "kind": "field",
1998
- "name": "_webRReady",
2045
+ "name": "_executionTimeMs",
1999
2046
  "type": {
2000
- "text": "boolean"
2047
+ "text": "number"
2001
2048
  },
2002
2049
  "privacy": "private",
2003
- "default": "false"
2050
+ "default": "0"
2004
2051
  },
2005
2052
  {
2006
2053
  "kind": "field",
2007
- "name": "_webRLoading",
2054
+ "name": "_error",
2008
2055
  "type": {
2009
- "text": "boolean"
2056
+ "text": "string | null"
2010
2057
  },
2011
2058
  "privacy": "private",
2012
- "default": "true"
2059
+ "default": "null"
2013
2060
  },
2014
2061
  {
2015
2062
  "kind": "field",
2016
- "name": "_loadingMessage",
2063
+ "name": "_schema",
2017
2064
  "type": {
2018
- "text": "string"
2065
+ "text": "SchemaTable[]",
2066
+ "references": [
2067
+ {
2068
+ "name": "SchemaTable",
2069
+ "start": 0,
2070
+ "end": 11
2071
+ }
2072
+ ]
2019
2073
  },
2020
2074
  "privacy": "private",
2021
- "default": "\"Initializing WebR...\""
2075
+ "default": "[]"
2022
2076
  },
2023
2077
  {
2024
2078
  "kind": "field",
2025
- "name": "_running",
2079
+ "name": "_expandedTables",
2080
+ "privacy": "private",
2081
+ "default": "new Set<string>()"
2082
+ },
2083
+ {
2084
+ "kind": "field",
2085
+ "name": "_sortColumn",
2026
2086
  "type": {
2027
- "text": "boolean"
2087
+ "text": "string | null"
2028
2088
  },
2029
2089
  "privacy": "private",
2030
- "default": "false"
2090
+ "default": "null"
2091
+ },
2092
+ {
2093
+ "kind": "field",
2094
+ "name": "_sortDirection",
2095
+ "type": {
2096
+ "text": "SortDirection",
2097
+ "references": [
2098
+ {
2099
+ "name": "SortDirection",
2100
+ "start": 0,
2101
+ "end": 13
2102
+ }
2103
+ ]
2104
+ },
2105
+ "privacy": "private",
2106
+ "default": "null"
2031
2107
  },
2032
2108
  {
2033
2109
  "kind": "field",
@@ -2042,7 +2118,7 @@
2042
2118
  "kind": "field",
2043
2119
  "name": "_compactView",
2044
2120
  "type": {
2045
- "text": "\"code\" | \"plots\" | \"console\""
2121
+ "text": "\"code\" | \"results\" | \"schema\""
2046
2122
  },
2047
2123
  "privacy": "private",
2048
2124
  "default": "\"code\""
@@ -2051,19 +2127,19 @@
2051
2127
  "kind": "field",
2052
2128
  "name": "_rightPane",
2053
2129
  "type": {
2054
- "text": "\"plots\" | \"console\""
2130
+ "text": "\"results\" | \"schema\""
2055
2131
  },
2056
2132
  "privacy": "private",
2057
- "default": "\"console\""
2133
+ "default": "\"results\""
2058
2134
  },
2059
2135
  {
2060
2136
  "kind": "field",
2061
- "name": "_unreadConsoleCount",
2137
+ "name": "_runner",
2062
2138
  "type": {
2063
- "text": "number"
2139
+ "text": "Worker | null"
2064
2140
  },
2065
2141
  "privacy": "private",
2066
- "default": "0"
2142
+ "default": "null"
2067
2143
  },
2068
2144
  {
2069
2145
  "kind": "field",
@@ -2084,35 +2160,12 @@
2084
2160
  },
2085
2161
  {
2086
2162
  "kind": "field",
2087
- "name": "_runnerIframe",
2088
- "type": {
2089
- "text": "HTMLIFrameElement | null",
2090
- "references": [
2091
- {
2092
- "name": "HTMLIFrameElement",
2093
- "package": "dom",
2094
- "start": 0,
2095
- "end": 17
2096
- }
2097
- ]
2098
- },
2099
- "privacy": "private",
2100
- "default": "null"
2101
- },
2102
- {
2103
- "kind": "field",
2104
- "name": "_runnerPort",
2163
+ "name": "_execId",
2105
2164
  "type": {
2106
- "text": "MessagePort | null"
2165
+ "text": "number"
2107
2166
  },
2108
2167
  "privacy": "private",
2109
- "default": "null"
2110
- },
2111
- {
2112
- "kind": "field",
2113
- "name": "_runnerChannelId",
2114
- "privacy": "private",
2115
- "readonly": true
2168
+ "default": "0"
2116
2169
  },
2117
2170
  {
2118
2171
  "kind": "method",
@@ -2124,6 +2177,19 @@
2124
2177
  "name": "_initRunner",
2125
2178
  "privacy": "private"
2126
2179
  },
2180
+ {
2181
+ "kind": "method",
2182
+ "name": "_postToRunner",
2183
+ "privacy": "private",
2184
+ "parameters": [
2185
+ {
2186
+ "name": "msg",
2187
+ "type": {
2188
+ "text": "Record<string, unknown>"
2189
+ }
2190
+ }
2191
+ ]
2192
+ },
2127
2193
  {
2128
2194
  "kind": "method",
2129
2195
  "name": "_onMessage",
@@ -2137,6 +2203,11 @@
2137
2203
  }
2138
2204
  ]
2139
2205
  },
2206
+ {
2207
+ "kind": "method",
2208
+ "name": "_requestSchema",
2209
+ "privacy": "private"
2210
+ },
2140
2211
  {
2141
2212
  "kind": "method",
2142
2213
  "name": "_runCode",
@@ -2165,55 +2236,84 @@
2165
2236
  },
2166
2237
  {
2167
2238
  "kind": "method",
2168
- "name": "_prevPlot",
2169
- "privacy": "private"
2170
- },
2171
- {
2172
- "kind": "method",
2173
- "name": "_nextPlot",
2239
+ "name": "_resetDatabase",
2174
2240
  "privacy": "private"
2175
2241
  },
2176
2242
  {
2177
- "kind": "method",
2178
- "name": "_savePlot",
2243
+ "kind": "field",
2244
+ "name": "_boundOnKeydown",
2179
2245
  "privacy": "private"
2180
2246
  },
2181
2247
  {
2182
2248
  "kind": "method",
2183
- "name": "_clearPlots",
2184
- "privacy": "private"
2249
+ "name": "_onKeydown",
2250
+ "privacy": "private",
2251
+ "parameters": [
2252
+ {
2253
+ "name": "e",
2254
+ "type": {
2255
+ "text": "KeyboardEvent",
2256
+ "references": [
2257
+ {
2258
+ "name": "KeyboardEvent",
2259
+ "package": "dom",
2260
+ "start": 0,
2261
+ "end": 13
2262
+ }
2263
+ ]
2264
+ }
2265
+ }
2266
+ ]
2185
2267
  },
2186
2268
  {
2187
2269
  "kind": "method",
2188
- "name": "_clearConsole",
2189
- "privacy": "private"
2270
+ "name": "_toggleTable",
2271
+ "privacy": "private",
2272
+ "parameters": [
2273
+ {
2274
+ "name": "name",
2275
+ "type": {
2276
+ "text": "string"
2277
+ }
2278
+ }
2279
+ ]
2190
2280
  },
2191
2281
  {
2192
2282
  "kind": "method",
2193
- "name": "_switchRightPane",
2283
+ "name": "_insertSelectQuery",
2194
2284
  "privacy": "private",
2195
2285
  "parameters": [
2196
2286
  {
2197
- "name": "pane",
2287
+ "name": "tableName",
2198
2288
  "type": {
2199
- "text": "\"plots\" | \"console\""
2289
+ "text": "string"
2200
2290
  }
2201
2291
  }
2202
2292
  ]
2203
2293
  },
2204
2294
  {
2205
2295
  "kind": "method",
2206
- "name": "_switchView",
2296
+ "name": "_toggleSort",
2207
2297
  "privacy": "private",
2208
2298
  "parameters": [
2209
2299
  {
2210
- "name": "view",
2300
+ "name": "columnName",
2211
2301
  "type": {
2212
- "text": "\"code\" | \"plots\" | \"console\""
2302
+ "text": "string"
2213
2303
  }
2214
2304
  }
2215
2305
  ]
2216
2306
  },
2307
+ {
2308
+ "kind": "method",
2309
+ "name": "_getSortedRows",
2310
+ "privacy": "private",
2311
+ "return": {
2312
+ "type": {
2313
+ "text": "Record<string, unknown>[]"
2314
+ }
2315
+ }
2316
+ },
2217
2317
  {
2218
2318
  "kind": "method",
2219
2319
  "name": "_renderEditorPane",
@@ -2230,12 +2330,12 @@
2230
2330
  },
2231
2331
  {
2232
2332
  "kind": "method",
2233
- "name": "_renderPlotViewer",
2333
+ "name": "_renderResultsView",
2234
2334
  "privacy": "private"
2235
2335
  },
2236
2336
  {
2237
2337
  "kind": "method",
2238
- "name": "_renderConsoleView",
2338
+ "name": "_renderSchemaView",
2239
2339
  "privacy": "private"
2240
2340
  },
2241
2341
  {
@@ -2272,38 +2372,38 @@
2272
2372
  "name": "SigveloElement",
2273
2373
  "package": "@mcp-b/wc-support/base/sigvelo-element"
2274
2374
  },
2275
- "tagName": "sigvelo-r-editor",
2375
+ "tagName": "sigvelo-sql-editor",
2276
2376
  "customElement": true,
2277
- "summary": "A WebR-powered R code editor with integrated console output and plot\nviewer. Runs R code in the browser via WebAssembly. The editor pane uses\nCodeMirror with R syntax highlighting, while the right pane shows captured\nplots and console output in separate tabs."
2377
+ "summary": "An in-browser PostgreSQL editor powered by PGlite (WASM). Runs\nSQL queries locally with no server. Includes a results table, schema\nbrowser with autocompletion, and optional dataset preloading via the\n`setup-sql` attribute."
2278
2378
  }
2279
2379
  ],
2280
2380
  "exports": [
2281
2381
  {
2282
2382
  "kind": "js",
2283
- "name": "SigveloREditor",
2383
+ "name": "SigveloSqlEditor",
2284
2384
  "declaration": {
2285
- "name": "SigveloREditor",
2286
- "module": "src/components/r-editor/r-editor.ts"
2385
+ "name": "SigveloSqlEditor",
2386
+ "module": "src/components/sql-editor/sql-editor.ts"
2287
2387
  }
2288
2388
  },
2289
2389
  {
2290
2390
  "kind": "custom-element-definition",
2291
- "name": "sigvelo-r-editor",
2391
+ "name": "sigvelo-sql-editor",
2292
2392
  "declaration": {
2293
- "name": "SigveloREditor",
2294
- "module": "src/components/r-editor/r-editor.ts"
2393
+ "name": "SigveloSqlEditor",
2394
+ "module": "src/components/sql-editor/sql-editor.ts"
2295
2395
  }
2296
2396
  }
2297
2397
  ]
2298
2398
  },
2299
2399
  {
2300
2400
  "kind": "javascript-module",
2301
- "path": "src/components/sql-editor/sql-editor.ts",
2401
+ "path": "src/components/r-editor/r-editor.ts",
2302
2402
  "declarations": [
2303
2403
  {
2304
2404
  "kind": "class",
2305
- "description": "`<sigvelo-sql-editor>`",
2306
- "name": "SigveloSqlEditor",
2405
+ "description": "`<sigvelo-r-editor>`",
2406
+ "name": "SigveloREditor",
2307
2407
  "members": [
2308
2408
  {
2309
2409
  "kind": "field",
@@ -2313,116 +2413,62 @@
2313
2413
  "references": [
2314
2414
  {
2315
2415
  "name": "CSSResultGroup",
2316
- "package": "lit",
2317
- "module": "lit",
2318
- "start": 0,
2319
- "end": 14
2320
- }
2321
- ]
2322
- },
2323
- "static": true,
2324
- "default": "[hostStyles, styles]"
2325
- },
2326
- {
2327
- "kind": "field",
2328
- "name": "setupSql",
2329
- "type": {
2330
- "text": "string"
2331
- },
2332
- "default": "\"\"",
2333
- "description": "SQL to execute on database initialization (CREATE TABLE, INSERT, etc.)."
2334
- },
2335
- {
2336
- "kind": "field",
2337
- "name": "code",
2338
- "type": {
2339
- "text": "string"
2340
- },
2341
- "default": "\"\"",
2342
- "description": "Initial query in the editor."
2343
- },
2344
- {
2345
- "kind": "field",
2346
- "name": "dbName",
2347
- "type": {
2348
- "text": "string"
2349
- },
2350
- "default": "\"\"",
2351
- "description": "IndexedDB name for persistence. Empty = in-memory (no persistence)."
2352
- },
2353
- {
2354
- "kind": "field",
2355
- "name": "postgis",
2356
- "type": {
2357
- "text": "boolean"
2358
- },
2359
- "default": "false",
2360
- "description": "Enable PostGIS extension on the in-browser database."
2361
- },
2362
- {
2363
- "kind": "field",
2364
- "name": "editorLabel",
2365
- "type": {
2366
- "text": "string"
2367
- },
2368
- "default": "\"SQL code editor\"",
2369
- "description": "Accessible label for the editor."
2370
- },
2371
- {
2372
- "kind": "field",
2373
- "name": "_editedCode",
2374
- "type": {
2375
- "text": "string"
2416
+ "package": "lit",
2417
+ "module": "lit",
2418
+ "start": 0,
2419
+ "end": 14
2420
+ }
2421
+ ]
2376
2422
  },
2377
- "privacy": "private",
2378
- "default": "\"\""
2423
+ "static": true,
2424
+ "default": "[hostStyles, styles]"
2379
2425
  },
2380
2426
  {
2381
2427
  "kind": "field",
2382
- "name": "_pgliteReady",
2428
+ "name": "code",
2383
2429
  "type": {
2384
- "text": "boolean"
2430
+ "text": "string"
2385
2431
  },
2386
- "privacy": "private",
2387
- "default": "false"
2432
+ "default": "\"\"",
2433
+ "description": "Initial R code to display in the editor."
2388
2434
  },
2389
2435
  {
2390
2436
  "kind": "field",
2391
- "name": "_pgliteLoading",
2437
+ "name": "packages",
2392
2438
  "type": {
2393
- "text": "boolean"
2439
+ "text": "string[]"
2394
2440
  },
2395
- "privacy": "private",
2396
- "default": "true"
2441
+ "default": "[]",
2442
+ "description": "R packages to pre-install before running code (e.g. `['ggplot2']`)."
2397
2443
  },
2398
2444
  {
2399
2445
  "kind": "field",
2400
- "name": "_loadingMessage",
2446
+ "name": "editorLabel",
2401
2447
  "type": {
2402
2448
  "text": "string"
2403
2449
  },
2404
- "privacy": "private",
2405
- "default": "\"Initializing PostgreSQL...\""
2450
+ "default": "\"R code editor\"",
2451
+ "description": "Accessible label for the editor."
2406
2452
  },
2407
2453
  {
2408
2454
  "kind": "field",
2409
- "name": "_running",
2455
+ "name": "_editedCode",
2410
2456
  "type": {
2411
- "text": "boolean"
2457
+ "text": "string"
2412
2458
  },
2413
2459
  "privacy": "private",
2414
- "default": "false"
2460
+ "default": "\"\""
2415
2461
  },
2416
2462
  {
2417
2463
  "kind": "field",
2418
- "name": "_resultFields",
2464
+ "name": "_consoleLogs",
2419
2465
  "type": {
2420
- "text": "ResultField[]",
2466
+ "text": "ConsoleEntry[]",
2421
2467
  "references": [
2422
2468
  {
2423
- "name": "ResultField",
2469
+ "name": "ConsoleEntry",
2424
2470
  "start": 0,
2425
- "end": 11
2471
+ "end": 12
2426
2472
  }
2427
2473
  ]
2428
2474
  },
@@ -2431,25 +2477,23 @@
2431
2477
  },
2432
2478
  {
2433
2479
  "kind": "field",
2434
- "name": "_resultRows",
2480
+ "name": "_plots",
2435
2481
  "type": {
2436
- "text": "Record<string, unknown>[]"
2482
+ "text": "PlotEntry[]",
2483
+ "references": [
2484
+ {
2485
+ "name": "PlotEntry",
2486
+ "start": 0,
2487
+ "end": 9
2488
+ }
2489
+ ]
2437
2490
  },
2438
2491
  "privacy": "private",
2439
2492
  "default": "[]"
2440
2493
  },
2441
2494
  {
2442
2495
  "kind": "field",
2443
- "name": "_rowCount",
2444
- "type": {
2445
- "text": "number"
2446
- },
2447
- "privacy": "private",
2448
- "default": "0"
2449
- },
2450
- {
2451
- "kind": "field",
2452
- "name": "_executionTimeMs",
2496
+ "name": "_currentPlotIndex",
2453
2497
  "type": {
2454
2498
  "text": "number"
2455
2499
  },
@@ -2458,59 +2502,39 @@
2458
2502
  },
2459
2503
  {
2460
2504
  "kind": "field",
2461
- "name": "_error",
2505
+ "name": "_webRReady",
2462
2506
  "type": {
2463
- "text": "string | null"
2507
+ "text": "boolean"
2464
2508
  },
2465
2509
  "privacy": "private",
2466
- "default": "null"
2510
+ "default": "false"
2467
2511
  },
2468
2512
  {
2469
2513
  "kind": "field",
2470
- "name": "_schema",
2514
+ "name": "_webRLoading",
2471
2515
  "type": {
2472
- "text": "SchemaTable[]",
2473
- "references": [
2474
- {
2475
- "name": "SchemaTable",
2476
- "start": 0,
2477
- "end": 11
2478
- }
2479
- ]
2516
+ "text": "boolean"
2480
2517
  },
2481
2518
  "privacy": "private",
2482
- "default": "[]"
2483
- },
2484
- {
2485
- "kind": "field",
2486
- "name": "_expandedTables",
2487
- "privacy": "private",
2488
- "default": "new Set<string>()"
2519
+ "default": "true"
2489
2520
  },
2490
2521
  {
2491
2522
  "kind": "field",
2492
- "name": "_sortColumn",
2523
+ "name": "_loadingMessage",
2493
2524
  "type": {
2494
- "text": "string | null"
2525
+ "text": "string"
2495
2526
  },
2496
2527
  "privacy": "private",
2497
- "default": "null"
2528
+ "default": "\"Initializing WebR...\""
2498
2529
  },
2499
2530
  {
2500
2531
  "kind": "field",
2501
- "name": "_sortDirection",
2532
+ "name": "_running",
2502
2533
  "type": {
2503
- "text": "SortDirection",
2504
- "references": [
2505
- {
2506
- "name": "SortDirection",
2507
- "start": 0,
2508
- "end": 13
2509
- }
2510
- ]
2534
+ "text": "boolean"
2511
2535
  },
2512
2536
  "privacy": "private",
2513
- "default": "null"
2537
+ "default": "false"
2514
2538
  },
2515
2539
  {
2516
2540
  "kind": "field",
@@ -2525,7 +2549,7 @@
2525
2549
  "kind": "field",
2526
2550
  "name": "_compactView",
2527
2551
  "type": {
2528
- "text": "\"code\" | \"results\" | \"schema\""
2552
+ "text": "\"code\" | \"plots\" | \"console\""
2529
2553
  },
2530
2554
  "privacy": "private",
2531
2555
  "default": "\"code\""
@@ -2534,19 +2558,19 @@
2534
2558
  "kind": "field",
2535
2559
  "name": "_rightPane",
2536
2560
  "type": {
2537
- "text": "\"results\" | \"schema\""
2561
+ "text": "\"plots\" | \"console\""
2538
2562
  },
2539
2563
  "privacy": "private",
2540
- "default": "\"results\""
2564
+ "default": "\"console\""
2541
2565
  },
2542
2566
  {
2543
2567
  "kind": "field",
2544
- "name": "_runner",
2568
+ "name": "_unreadConsoleCount",
2545
2569
  "type": {
2546
- "text": "Worker | null"
2570
+ "text": "number"
2547
2571
  },
2548
2572
  "privacy": "private",
2549
- "default": "null"
2573
+ "default": "0"
2550
2574
  },
2551
2575
  {
2552
2576
  "kind": "field",
@@ -2567,12 +2591,35 @@
2567
2591
  },
2568
2592
  {
2569
2593
  "kind": "field",
2570
- "name": "_execId",
2594
+ "name": "_runnerIframe",
2571
2595
  "type": {
2572
- "text": "number"
2596
+ "text": "HTMLIFrameElement | null",
2597
+ "references": [
2598
+ {
2599
+ "name": "HTMLIFrameElement",
2600
+ "package": "dom",
2601
+ "start": 0,
2602
+ "end": 17
2603
+ }
2604
+ ]
2573
2605
  },
2574
2606
  "privacy": "private",
2575
- "default": "0"
2607
+ "default": "null"
2608
+ },
2609
+ {
2610
+ "kind": "field",
2611
+ "name": "_runnerPort",
2612
+ "type": {
2613
+ "text": "MessagePort | null"
2614
+ },
2615
+ "privacy": "private",
2616
+ "default": "null"
2617
+ },
2618
+ {
2619
+ "kind": "field",
2620
+ "name": "_runnerChannelId",
2621
+ "privacy": "private",
2622
+ "readonly": true
2576
2623
  },
2577
2624
  {
2578
2625
  "kind": "method",
@@ -2584,19 +2631,6 @@
2584
2631
  "name": "_initRunner",
2585
2632
  "privacy": "private"
2586
2633
  },
2587
- {
2588
- "kind": "method",
2589
- "name": "_postToRunner",
2590
- "privacy": "private",
2591
- "parameters": [
2592
- {
2593
- "name": "msg",
2594
- "type": {
2595
- "text": "Record<string, unknown>"
2596
- }
2597
- }
2598
- ]
2599
- },
2600
2634
  {
2601
2635
  "kind": "method",
2602
2636
  "name": "_onMessage",
@@ -2610,11 +2644,6 @@
2610
2644
  }
2611
2645
  ]
2612
2646
  },
2613
- {
2614
- "kind": "method",
2615
- "name": "_requestSchema",
2616
- "privacy": "private"
2617
- },
2618
2647
  {
2619
2648
  "kind": "method",
2620
2649
  "name": "_runCode",
@@ -2643,84 +2672,55 @@
2643
2672
  },
2644
2673
  {
2645
2674
  "kind": "method",
2646
- "name": "_resetDatabase",
2675
+ "name": "_prevPlot",
2647
2676
  "privacy": "private"
2648
2677
  },
2649
2678
  {
2650
- "kind": "field",
2651
- "name": "_boundOnKeydown",
2679
+ "kind": "method",
2680
+ "name": "_nextPlot",
2652
2681
  "privacy": "private"
2653
2682
  },
2654
2683
  {
2655
2684
  "kind": "method",
2656
- "name": "_onKeydown",
2657
- "privacy": "private",
2658
- "parameters": [
2659
- {
2660
- "name": "e",
2661
- "type": {
2662
- "text": "KeyboardEvent",
2663
- "references": [
2664
- {
2665
- "name": "KeyboardEvent",
2666
- "package": "dom",
2667
- "start": 0,
2668
- "end": 13
2669
- }
2670
- ]
2671
- }
2672
- }
2673
- ]
2685
+ "name": "_savePlot",
2686
+ "privacy": "private"
2674
2687
  },
2675
2688
  {
2676
2689
  "kind": "method",
2677
- "name": "_toggleTable",
2678
- "privacy": "private",
2679
- "parameters": [
2680
- {
2681
- "name": "name",
2682
- "type": {
2683
- "text": "string"
2684
- }
2685
- }
2686
- ]
2690
+ "name": "_clearPlots",
2691
+ "privacy": "private"
2687
2692
  },
2688
2693
  {
2689
2694
  "kind": "method",
2690
- "name": "_insertSelectQuery",
2695
+ "name": "_clearConsole",
2696
+ "privacy": "private"
2697
+ },
2698
+ {
2699
+ "kind": "method",
2700
+ "name": "_switchRightPane",
2691
2701
  "privacy": "private",
2692
2702
  "parameters": [
2693
2703
  {
2694
- "name": "tableName",
2704
+ "name": "pane",
2695
2705
  "type": {
2696
- "text": "string"
2706
+ "text": "\"plots\" | \"console\""
2697
2707
  }
2698
2708
  }
2699
2709
  ]
2700
2710
  },
2701
2711
  {
2702
2712
  "kind": "method",
2703
- "name": "_toggleSort",
2713
+ "name": "_switchView",
2704
2714
  "privacy": "private",
2705
2715
  "parameters": [
2706
2716
  {
2707
- "name": "columnName",
2717
+ "name": "view",
2708
2718
  "type": {
2709
- "text": "string"
2719
+ "text": "\"code\" | \"plots\" | \"console\""
2710
2720
  }
2711
2721
  }
2712
2722
  ]
2713
2723
  },
2714
- {
2715
- "kind": "method",
2716
- "name": "_getSortedRows",
2717
- "privacy": "private",
2718
- "return": {
2719
- "type": {
2720
- "text": "Record<string, unknown>[]"
2721
- }
2722
- }
2723
- },
2724
2724
  {
2725
2725
  "kind": "method",
2726
2726
  "name": "_renderEditorPane",
@@ -2737,12 +2737,12 @@
2737
2737
  },
2738
2738
  {
2739
2739
  "kind": "method",
2740
- "name": "_renderResultsView",
2740
+ "name": "_renderPlotViewer",
2741
2741
  "privacy": "private"
2742
2742
  },
2743
2743
  {
2744
2744
  "kind": "method",
2745
- "name": "_renderSchemaView",
2745
+ "name": "_renderConsoleView",
2746
2746
  "privacy": "private"
2747
2747
  },
2748
2748
  {
@@ -2779,26 +2779,26 @@
2779
2779
  "name": "SigveloElement",
2780
2780
  "package": "@mcp-b/wc-support/base/sigvelo-element"
2781
2781
  },
2782
- "tagName": "sigvelo-sql-editor",
2782
+ "tagName": "sigvelo-r-editor",
2783
2783
  "customElement": true,
2784
- "summary": "An in-browser PostgreSQL editor powered by PGlite (WASM). Runs\nSQL queries locally with no server. Includes a results table, schema\nbrowser with autocompletion, and optional dataset preloading via the\n`setup-sql` attribute."
2784
+ "summary": "A WebR-powered R code editor with integrated console output and plot\nviewer. Runs R code in the browser via WebAssembly. The editor pane uses\nCodeMirror with R syntax highlighting, while the right pane shows captured\nplots and console output in separate tabs."
2785
2785
  }
2786
2786
  ],
2787
2787
  "exports": [
2788
2788
  {
2789
2789
  "kind": "js",
2790
- "name": "SigveloSqlEditor",
2790
+ "name": "SigveloREditor",
2791
2791
  "declaration": {
2792
- "name": "SigveloSqlEditor",
2793
- "module": "src/components/sql-editor/sql-editor.ts"
2792
+ "name": "SigveloREditor",
2793
+ "module": "src/components/r-editor/r-editor.ts"
2794
2794
  }
2795
2795
  },
2796
2796
  {
2797
2797
  "kind": "custom-element-definition",
2798
- "name": "sigvelo-sql-editor",
2798
+ "name": "sigvelo-r-editor",
2799
2799
  "declaration": {
2800
- "name": "SigveloSqlEditor",
2801
- "module": "src/components/sql-editor/sql-editor.ts"
2800
+ "name": "SigveloREditor",
2801
+ "module": "src/components/r-editor/r-editor.ts"
2802
2802
  }
2803
2803
  }
2804
2804
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mcp-b/interactive-components",
3
- "version": "0.2.21",
3
+ "version": "0.2.22",
4
4
  "description": "Sigvelo interactive code editor components built with Lit.",
5
5
  "keywords": [
6
6
  "code-editor",
@@ -59,8 +59,8 @@
59
59
  "@pyscript/core": "0.7.19",
60
60
  "vite-plugin-static-copy": "^3.4.0",
61
61
  "webr": "0.5.8",
62
- "@mcp-b/wc-support": "0.2.18",
63
- "@mcp-b/web-components": "0.2.21"
62
+ "@mcp-b/wc-support": "0.2.19",
63
+ "@mcp-b/web-components": "0.2.22"
64
64
  },
65
65
  "devDependencies": {
66
66
  "@custom-elements-manifest/analyzer": "^0.10.10",