@north-light/cli 0.3.508 → 0.3.510
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/api/client.d.ts +2 -1
- package/dist/api/client.js +3 -3
- package/dist/api/contract.d.ts +1 -1
- package/dist/api/contract.js +1 -1
- package/dist/api/dto/docs.d.ts +4 -0
- package/dist/api/routes.d.ts +1 -0
- package/dist/api/routes.js +1 -1
- package/dist/builtin-memory/crouter-sdk/release-notes.md +6 -0
- package/dist/builtin-memory/northlight-apps/providers/device.md +1 -1
- package/dist/clients/attach/assets/mermaid.min.js +3631 -0
- package/dist/clients/attach/render/doc-links.d.ts +2 -5
- package/dist/clients/attach/render/doc-links.js +1 -1
- package/dist/clients/attach/session/document-links.d.ts +6 -18
- package/dist/clients/attach/session/document-links.js +1 -1
- package/dist/clients/attach/session/file-links.d.ts +0 -2
- package/dist/clients/attach/session/file-links.js +1 -1
- package/dist/clients/attach/viewer.js +558 -625
- package/dist/core/config.js +1 -1
- package/dist/core/graph/events.d.ts +1 -0
- package/dist/core/graph/events.js +6 -6
- package/dist/core/user-settings.d.ts +4 -4
- package/dist/core/user-settings.js +1 -1
- package/dist/daemon/api/document-listener.d.ts +7 -0
- package/dist/daemon/api/document-listener.js +11 -0
- package/dist/daemon/api/document-merge.d.ts +2 -0
- package/dist/daemon/api/document-merge.js +1 -0
- package/dist/daemon/api/document-secret.d.ts +2 -0
- package/dist/daemon/api/document-secret.js +1 -0
- package/dist/daemon/api/handlers/docs.d.ts +14 -0
- package/dist/daemon/api/handlers/docs.js +1 -1
- package/dist/daemon/api/handlers/document-access.d.ts +2 -0
- package/dist/daemon/api/handlers/document-access.js +1 -0
- package/dist/daemon/api/operations.js +1 -1
- package/dist/daemon/api/server.js +1 -1
- package/dist/daemon/api/vendor-signin.d.ts +1 -0
- package/dist/daemon/api/vendor-signin.js +1 -1
- package/dist/daemon/crtrd.js +9 -9
- package/dist/doc-editor/editor.css +1 -0
- package/dist/doc-editor/editor.js +53 -0
- package/dist/types.d.ts +2 -9
- package/dist/types.js +1 -1
- package/docs/apps/providers/device.md +1 -1
- package/docs/sdk/release-notes.md +6 -0
- package/package.json +13 -2
- package/packages/crouter-identity/package.json +1 -1
- package/runtime.lock.json +364 -12
- package/dist/clients/attach/session/doc-html.d.ts +0 -8
- package/dist/clients/attach/session/doc-html.js +0 -66
- package/dist/clients/attach/session/doc-materialize.d.ts +0 -57
- package/dist/clients/attach/session/doc-materialize.js +0 -3
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
/** The fragment a rendered document link carries. iTerm strips it before
|
|
2
|
-
* invoking Semantic History; the viewer recognizes a document by its path. */
|
|
3
|
-
export declare const DOC_OPEN_FRAGMENT = "crtr-doc-open";
|
|
4
1
|
/** What the renderer needs from the viewer. Every call is synchronous and reads
|
|
5
2
|
* live viewer state; a miss may schedule a fetch that re-renders later. */
|
|
6
3
|
export interface DocLinkContext {
|
|
@@ -8,8 +5,8 @@ export interface DocLinkContext {
|
|
|
8
5
|
selfNodeId: string;
|
|
9
6
|
/** A node's display name, when known. */
|
|
10
7
|
nodeName(nodeId: string): string | undefined;
|
|
11
|
-
/** The
|
|
12
|
-
|
|
8
|
+
/** The browser URL of a document ref, absent on remote attach. */
|
|
9
|
+
urlFor(ref: string): string | undefined;
|
|
13
10
|
}
|
|
14
11
|
/** Install (or clear) the viewer's document-link context. */
|
|
15
12
|
export declare function setDocLinkContext(context: DocLinkContext | undefined): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var $=Object.defineProperty;var
|
|
1
|
+
var $=Object.defineProperty;var o=(e,n)=>$(e,"name",{value:n,configurable:!0});const l=/\[\[([^[\]\n]+?)\]\]/g,x=/^[a-z0-9]+-[a-z0-9]+-[a-z0-9]+$/,p=o(e=>`\x1B[2m${e}\x1B[22m`,"DIM"),D=o(e=>`\x1B[4m${e}\x1B[24m`,"UNDERLINE");let c;function I(e){c=e}o(I,"setDocLinkContext");function N(e,n){const t=e.indexOf("/");if(t<=0)return{name:e};const r=e.slice(0,t);return r===n?.selfNodeId||n?.nodeName(r)!==void 0||x.test(r)?{nodeId:r,name:e.slice(t+1)}:{name:e}}o(N,"splitDocRef");function f(e,n=c){const{nodeId:t,name:r}=N(e,n);return t===void 0?{name:r}:t===n?.selfNodeId?{name:r}:{name:r,owner:n?.nodeName(t)??t.slice(t.lastIndexOf("-")+1)}}o(f,"docLinkLabel");function L(e,n=c){const t=f(e,n);return t.owner===void 0?t.name:`${t.name} \xB7 ${t.owner}`}o(L,"docLinkText");function w(e){return[...e.matchAll(l)].map(n=>n[1].trim()).filter(n=>n!=="")}o(w,"extractDocRefs");function k(e,n=c){return n===void 0||!e.includes("[[")?e:e.replace(l,(t,r)=>{const i=r.trim();if(i==="")return t;const d=f(i,n),s=n.urlFor(i),u=m(d.name),a=s===void 0?D(u):`[${u}](${s})`;return d.owner===void 0?a:`${a}${p(` \xB7 ${m(d.owner)}`)}`})}o(k,"rewriteProseDocLinks");function m(e){return e.replace(/([\\[\]*_`<>])/g,"\\$1")}o(m,"escapeLabel");export{f as docLinkLabel,L as docLinkText,w as extractDocRefs,k as rewriteProseDocLinks,I as setDocLinkContext,N as splitDocRef};
|
|
@@ -1,24 +1,12 @@
|
|
|
1
1
|
import type { CanvasSource } from '../../../core/canvas/source.js';
|
|
2
|
-
import type { DocLinkOpenMode } from '../../../types.js';
|
|
3
|
-
export interface DocumentLinks {
|
|
4
|
-
/** Whether a clicked local path is a materialized document. */
|
|
5
|
-
isDocumentPath(path: string): boolean;
|
|
6
|
-
/** Re-read a clicked document and return the path to open (its current revision). */
|
|
7
|
-
prepareOpen(path: string): Promise<{
|
|
8
|
-
path: string;
|
|
9
|
-
} | {
|
|
10
|
-
notice: string;
|
|
11
|
-
}>;
|
|
12
|
-
/** The save-back a reattaching viewer was handed, if any. */
|
|
13
|
-
consumeSaveBack(notify: (message: string) => void): Promise<void>;
|
|
14
|
-
dispose(): void;
|
|
15
|
-
}
|
|
16
2
|
export declare function createDocumentLinks(opts: {
|
|
17
3
|
selfNodeId: string;
|
|
18
4
|
remote: boolean;
|
|
19
5
|
canvasSource: CanvasSource;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
6
|
+
port: number;
|
|
7
|
+
fetchSecret: () => Promise<string>;
|
|
8
|
+
onSecretError: (err: unknown) => void;
|
|
23
9
|
refresh: () => void;
|
|
24
|
-
}):
|
|
10
|
+
}): {
|
|
11
|
+
dispose(): void;
|
|
12
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var u=Object.defineProperty;var t=(e,o)=>u(e,"name",{value:o,configurable:!0});import{setDocLinkContext as s}from"../render/doc-links.js";function h(e){const o=new Map;let d=!1,f=!1,i;e.remote||e.fetchSecret().then(n=>{i=n,f||e.refresh()},e.onSecretError);const c=t(()=>{d||(d=!0,e.canvasSource.listNodes().then(n=>{for(const r of n)o.set(r.node_id,r.name);f||e.refresh()},()=>{d=!1}))},"loadRoster"),a={selfNodeId:e.selfNodeId,nodeName:t(n=>{const r=o.get(n);return r===void 0&&c(),r},"nodeName"),urlFor:t(n=>e.remote||i===void 0?void 0:`http://127.0.0.1:${e.port}/r/${n.split("/").map(encodeURIComponent).join("/")}?t=${i}`,"urlFor")};return s(a),{dispose(){f=!0,s(void 0)}}}t(h,"createDocumentLinks");export{h as createDocumentLinks};
|
|
@@ -17,8 +17,6 @@ export declare function openLinkedFileInPane(opts: {
|
|
|
17
17
|
cwd: string;
|
|
18
18
|
nodeId: string;
|
|
19
19
|
observer: boolean;
|
|
20
|
-
/** A materialized canvas document: the reattaching viewer saves its edit back. */
|
|
21
|
-
saveBackEnv?: string;
|
|
22
20
|
/** Clear viewer-local pane identity immediately before the pane runs Neovim. */
|
|
23
21
|
beforeRespawn: () => void;
|
|
24
22
|
}): LinkedFileOpenResult;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var f=Object.defineProperty;var r=(e,n)=>f(e,"name",{value:n,configurable:!0});import{existsSync as o}from"node:fs";import{nvimAvailable as s,nvimShellCommand as l}from"../../../core/nvim-launch.js";import{respawnPaneInBackground as u,shellQuote as h,viewerSplitEnv as a}from"../../../core/runtime/placement-tmux.js";const d="\x1B_crtr-file-open;",c="\x1B\\";function w(e){const n=e.indexOf(d);if(n===-1)return;const t=n+d.length,i=e.indexOf(c,t);return i===-1?void 0:{file:m(e.slice(t,i)),remaining:e.slice(0,n)+e.slice(i+c.length)}}r(w,"extractFileOpenInput");function m(e){const n=e.startsWith("'")?x(e):p(e);return n!==void 0&&n.startsWith("/")&&!/[\x00-\x1f\x7f]/.test(n)?n:void 0}r(m,"decodeShellEscapedPath");function x(e){let n="",t=1;for(;;){const i=e.indexOf("'",t);if(i===-1)return;if(n+=e.slice(t,i),t=i+1,t===e.length)return n;if(e.slice(t,t+3)!=="\\''")return;n+="'",t+=3}}r(x,"decodeSingleQuotedPath");function p(e){let n="";for(let t=0;t<e.length;t++){if(e[t]!=="\\"){n+=e[t];continue}const i=e[++t];if(i===void 0)return;n+=i}return n}r(p,"decodeBackslashPath");function E(e){if(!o(e.file))return"missing";if(!s())return"no_nvim";const n=`crtr surface attach to ${h(e.nodeId)}${e.observer?" --observer":""}`,t=`${l("edit",[e.file])} || :; exec ${n}`;return e.beforeRespawn(),u({pane:e.pane,cwd:e.cwd,env:a(),command:t})?"opened":"failed"}r(E,"openLinkedFileInPane");export{w as extractFileOpenInput,E as openLinkedFileInPane};
|