openalgo-charts 2.3.2 → 2.4.5
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/README.md +68 -39
- package/dist/draw/index.d.ts +18 -2
- package/dist/index.d.ts +2541 -1758
- package/dist/indicators/index.d.ts +103 -8
- package/dist/openalgo-charts.draw.mjs +1 -1
- package/dist/openalgo-charts.draw.mjs.map +1 -1
- package/dist/openalgo-charts.indicators.mjs +1 -1
- package/dist/openalgo-charts.indicators.mjs.map +1 -1
- package/dist/openalgo-charts.mjs +1 -1
- package/dist/openalgo-charts.mjs.map +1 -1
- package/dist/openalgo-charts.standalone.js +1 -1
- package/dist/openalgo-charts.standalone.js.map +1 -1
- package/dist/openalgo-charts.trade.mjs +1 -1
- package/dist/openalgo-charts.trade.mjs.map +1 -1
- package/dist/openalgo-charts.transform.mjs +1 -1
- package/dist/openalgo-charts.transform.mjs.map +1 -1
- package/dist/openalgo-charts.webgl.mjs +1 -1
- package/dist/openalgo-charts.webgl.mjs.map +1 -1
- package/dist/openalgo-charts.widget.mjs +1 -1
- package/dist/openalgo-charts.widget.mjs.map +1 -1
- package/dist/openalgo-charts.workspace.mjs +2 -0
- package/dist/openalgo-charts.workspace.mjs.map +1 -0
- package/dist/profile/index.d.ts +31 -0
- package/dist/trade/index.d.ts +15 -4
- package/dist/transform/index.d.ts +41 -2
- package/dist/webgl/index.d.ts +39 -0
- package/dist/widget/index.d.ts +96 -8
- package/dist/workspace/index.d.ts +170 -0
- package/package.json +8 -2
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{parseAlertsDocument as e}from"./openalgo-charts.mjs";const t=5242880;class n extends Error{constructor(e){super(e),this.name="WorkspaceDocumentError"}}const r=new Set(["__proto__","prototype","constructor","apikey","secret","clientsecret","apisecret","password","passwordhash","token","accesstoken","refreshtoken","authtoken","authorization","credentials","credential","auth","armed","oneclick","orders","positions","balances","balance","accountbalance","accountid","account"]);function o(e){if("string"==typeof e){if(e.length>t||(new TextEncoder).encode(e).length>t)throw new n("Document size limit exceeded");try{e=JSON.parse(e)}catch{throw new n("Invalid document JSON")}}let o=0,a=0;const s=new Set,i=(e,c,d=!1)=>{if(++o>1e5)throw new n("Document node limit exceeded");if(c>32)throw new n("Document depth limit exceeded");if(null===e||"boolean"==typeof e)return e;if("string"==typeof e){if(a+=e.length,a>t)throw new n("Document size limit exceeded");return e}if("number"==typeof e&&Number.isFinite(e))return e;if("object"!=typeof e)throw new n("Document values must be finite JSON data");if(s.has(e))throw new n("Document contains a cycle");if(!Array.isArray(e)&&![Object.prototype,null].includes(Object.getPrototypeOf(e)))throw new n("Document objects must be plain records");if(d)for(const t of Reflect.ownKeys(e)){if(Array.isArray(e)&&"length"===t)continue;const r=Object.getOwnPropertyDescriptor(e,t);if("string"!=typeof t||!r.enumerable||Array.isArray(e)&&(!/^(0|[1-9]\d*)$/.test(t)||Number(t)>=e.length))throw new n("Opaque payload properties must survive JSON")}let p;if(s.add(e),Array.isArray(e)){if(e.length>1e5)throw new n("Document array limit exceeded");const t=[];for(let r=0;r<e.length;r++){const o=Object.getOwnPropertyDescriptor(e,String(r));if(!o||!("value"in o))throw new n("Document arrays must contain data values");t.push(i(o.value,c+1,d))}p=t}else{const o={};for(const s of Object.keys(e)){const p=s.toLowerCase().replace(/[^a-z0-9_]/g,"").replace(/_/g,"");if(r.has(s)||r.has(p)){if(d)throw new n("Opaque payload contains a private workspace field");continue}if(a+=s.length,a>t)throw new n("Document size limit exceeded");const l=Object.getOwnPropertyDescriptor(e,s);if(!("value"in l))throw new n("Document accessors are not allowed");o[s]=i(l.value,c+1,d||"payload"===s)}p=o}return s.delete(e),p},c=i(e,0);if((new TextEncoder).encode(JSON.stringify(c)).length>t)throw new n("Document size limit exceeded");return c}function a(e,t){if(null===e||"object"!=typeof e||Array.isArray(e))throw new n(`${t} must be an object`);return e}function s(e,t,r){if(!Array.isArray(e)||e.length>r)throw new n(`${t} must be an array within the ${r} item limit`);return e}function i(e,t,r=200,o=!1){if("string"!=typeof e||!o&&0===e.trim().length||e.length>r||Array.from(e).some(e=>e.charCodeAt(0)<32))throw new n(`${t} must be ${o?"0":"1"}-${r} characters`);return e.trim()}function c(e,t,r,o=Number.MAX_SAFE_INTEGER,a=!1){if("number"!=typeof e||!Number.isFinite(e)||e<r||e>o||a&&!Number.isInteger(e))throw new n(`${t} must be ${a?"an integer":"a number"} between ${r} and ${o}`);return e}function d(e,t,r){if(void 0===e&&void 0!==r)return r;if("boolean"!=typeof e)throw new n(`${t} must be a boolean`);return e}function p(e,t,r,o){if(void 0===e&&void 0!==o)return o;if("string"!=typeof e||!r.includes(e))throw new n(`${t} is not supported`);return e}const l=1;function u(e,t){if(e.kind!==t||1!==e.version)throw new n(`Unsupported ${t} kind or version`);const r=c(e.createdAt,"createdAt",0);return{version:1,id:i(e.id,"id",100),name:i(e.name,"name",120),createdAt:r,updatedAt:c(e.updatedAt,"updatedAt",r)}}function w(e,t=!0){const r=new Set;return s(e,"indicators",256).map(e=>{const o=a(e,"indicator"),s={indicatorId:i(o.indicatorId,"indicatorId"),settings:a(o.settings,"indicator settings"),paneIndex:c(o.paneIndex,"indicator paneIndex",0,31,!0)};if(void 0!==o.visible&&(s.visible=d(o.visible,"indicator visibility")),t&&void 0!==o.instanceId){if(s.instanceId=i(o.instanceId,"indicator instanceId"),r.has(s.instanceId))throw new n("Duplicate indicator instance ID");r.add(s.instanceId)}return s})}function m(e){return w(o(e))}function h(t){const r=a(t,"chart");if(1!==r.version)throw new n("Unsupported chart version");const o={version:1};void 0!==r.timezone&&(o.timezone=i(r.timezone,"timezone",100));for(const e of["navigation","canvas","statusLine","watermark","trading","events","axisChrome"])void 0!==r[e]&&Object.assign(o,{[e]:a(r[e],e)});if(void 0!==r.viewport){const e=a(r.viewport,"viewport"),t=c(e.from,"viewport.from",-Number.MAX_SAFE_INTEGER);o.viewport={from:t,to:c(e.to,"viewport.to",t)}}if(void 0!==r.barSpacing&&(o.barSpacing=c(r.barSpacing,"barSpacing",Number.MIN_VALUE)),void 0!==r.grid){const e=a(r.grid,"grid");o.grid={vertLines:d(e.vertLines,"vertical grid"),horzLines:d(e.horzLines,"horizontal grid")}}if(void 0!==r.crosshairMode&&(o.crosshairMode=p(r.crosshairMode,"crosshairMode",["normal","magnet"])),void 0!==r.crosshairSnapToBar&&(o.crosshairSnapToBar=d(r.crosshairSnapToBar,"crosshairSnapToBar")),void 0!==r.indicators&&(o.indicators=w(r.indicators)),void 0!==r.alerts)try{o.alerts=e(r.alerts)}catch(e){throw new n(e instanceof Error?e.message:"Invalid alert document")}if(void 0!==r.drawings){if(null===r.drawings||"object"!=typeof r.drawings)throw new n("drawings must be a document or array");o.drawings=r.drawings}return void 0!==r.panes&&(o.panes=s(r.panes,"chart panes",32).map(e=>{const t=a(e,"chart pane"),r=a(t.priceScale,"price scale"),o={weight:c(t.weight,"pane weight",Number.MIN_VALUE),priceScale:{marginTop:c(r.marginTop,"marginTop",0,1),marginBottom:c(r.marginBottom,"marginBottom",0,1),minMove:c(r.minMove,"minMove",0),mode:p(r.mode,"scale mode",["linear","logarithmic","percentage","indexed-to-100"]),inverted:d(r.inverted,"inverted"),autoScale:d(r.autoScale,"autoScale")}};if(o.priceScale.marginTop+o.priceScale.marginBottom>=1)throw new n("Price scale margins leave no chart area");if(void 0!==r.range){const e=a(r.range,"scale range"),t=c(e.min,"range.min",-Number.MAX_SAFE_INTEGER),s=c(e.max,"range.max",t);if(s===t)throw new n("Price scale range must have positive width");o.priceScale.range={min:t,max:s}}return o})),void 0!==r.series&&(o.series=s(r.series,"series descriptors",512).map(e=>{const t=a(e,"series"),r=t.priceScaleId;if("string"!=typeof r)throw new n("priceScaleId must be a string");return{type:i(t.type,"series type"),style:a(t.style,"series style"),paneIndex:c(t.paneIndex,"series paneIndex",0,31,!0),priceScaleId:r}})),o}function f(e){const t=a(e,"workspace pane"),r=a(t.settings??{},"settings");for(const e of Object.values(r))if(!["string","number","boolean"].includes(typeof e))throw new n("Chart settings must be scalar values");const o=s(t.comparisons??[],"comparisons",32).map(e=>{const t=a(e,"comparison"),n={id:i(t.id,"comparison id",100),symbol:i(t.symbol,"comparison symbol"),exchange:i(t.exchange,"comparison exchange",200,!0),visible:d(t.visible,"comparison visibility",!0)};return void 0!==t.color&&(n.color=i(t.color,"comparison color",200)),n});if(new Set(o.map(e=>e.id)).size!==o.length)throw new n("Duplicate comparison ID");const c={id:i(t.id,"pane id",100),symbol:i(t.symbol,"symbol"),exchange:i(t.exchange,"exchange",200,!0),interval:i(t.interval,"interval",100),chartType:i(t.chartType,"chartType",100),chart:h(t.chart),settings:r,volume:d(t.volume,"volume",!0),magnet:p(t.magnet,"magnet",["off","weak","strong"],"off"),stay:d(t.stay,"stay",!1),comparisons:o,comparisonMode:p(t.comparisonMode,"comparisonMode",["price","percent"],"percent")};return void 0!==t.historyPeriod&&(c.historyPeriod=i(t.historyPeriod,"historyPeriod",100)),c}function v(e){const t=s(e.panes,"panes",16).map(f);if(0===t.length)throw new n("A workspace needs at least one pane");const r=new Set(t.map(e=>e.id));if(r.size!==t.length)throw new n("Duplicate pane ID");const o=i(e.activePaneId,"activePaneId",100);if(!r.has(o))throw new n("Focused pane is missing");const p=a(e.layout,"layout"),l=c(p.rows,"rows",1,8,!0),u=c(p.columns,"columns",1,8,!0),w=new Set,m=new Set,h=s(p.slots,"layout slots",16).map(e=>{const t=a(e,"slot"),o={paneId:i(t.paneId,"slot paneId",100),row:c(t.row,"row",0,l-1,!0),column:c(t.column,"column",0,u-1,!0),rowSpan:c(t.rowSpan??1,"rowSpan",1,l,!0),columnSpan:c(t.columnSpan??1,"columnSpan",1,u,!0)};if(!r.has(o.paneId)||w.has(o.paneId))throw new n("Invalid or duplicate layout pane ID");if(w.add(o.paneId),o.row+o.rowSpan>l||o.column+o.columnSpan>u)throw new n("Layout slot is outside the grid");for(let e=o.row;e<o.row+o.rowSpan;e++)for(let t=o.column;t<o.column+o.columnSpan;t++){const r=e*u+t;if(m.has(r))throw new n("Layout slots overlap");m.add(r)}return o});if(w.size!==t.length)throw new n("Every pane needs one layout slot");const v=a(e.sync??{},"sync"),g={layout:{rows:l,columns:u,slots:h},panes:t,activePaneId:o,sync:{crosshair:d(v.crosshair,"crosshair sync",!0),viewport:d(v.viewport,"viewport sync",!0),symbol:d(v.symbol,"symbol sync",!1),interval:d(v.interval,"interval sync",!1)}};void 0!==p.preset&&(g.layout.preset=i(p.preset,"layout preset",100));for(const[e,t]of[["rowWeights",l],["columnWeights",u]]){if(void 0===p[e])continue;const r=s(p[e],e,8).map(t=>c(t,e,Number.MIN_VALUE,1e3));if(r.length!==t)throw new n(`${e} must match the number of grid tracks`);g.layout[e]=r}return g}function g(e){const t=a(o(e),"workspace");return{kind:"workspace",...u(t,"workspace"),...v(t)}}function y(e){return v(a(o(e),"workspace"))}function b(e){const t=a(o(e),"indicator template");return{kind:"indicator-template",...u(t,"indicator-template"),indicators:w(t.indicators,!1)}}function I(e,t){const r=a(o(e),"widget");if(1!==r.version||void 0!==r.kind)throw new n("Unsupported widget state");const s=null===r.rail?{}:a(r.rail??{},"rail");return g({kind:"workspace",version:1,id:t.id,name:t.name,createdAt:t.now,updatedAt:t.now,panes:[{id:"p0",symbol:r.symbol,exchange:r.exchange??"",interval:r.interval,chartType:r.chartType,chart:r.chart,magnet:s.magnet??"off",stay:s.stay??!1,settings:{"widget.theme":p(r.theme,"theme",["light","dark"],"dark")}}],layout:{rows:1,columns:1,slots:[{paneId:"p0",row:0,column:0,rowSpan:1,columnSpan:1}]},activePaneId:"p0"})}class k extends Error{constructor(){super("The saved workspace changed in another session. Reload and retry."),this.name="WorkspaceConflictError"}}function _(e){const t=a(o(e),"workspace catalog");if(1!==t.version)throw new n("Unsupported workspace catalog version");const r=s(t.workspaces,"workspaces",100).map(g),p=s(t.templates,"templates",100).map(b),l=[...r,...p].map(e=>e.id);if(new Set(l).size!==l.length)throw new n("Duplicate document ID");const u=new Set(r.map(e=>e.id)),w=s(t.recentWorkspaceIds,"recent workspaces",10).map(e=>i(e,"recent workspace ID",100));if(new Set(w).size!==w.length||w.some(e=>!u.has(e)))throw new n("Invalid recent workspace IDs");const m=null===t.activeWorkspaceId?null:i(t.activeWorkspaceId,"active workspace ID",100);if(null!==m&&!u.has(m))throw new n("Active workspace is missing");return{version:1,revision:c(t.revision,"catalog revision",0,Number.MAX_SAFE_INTEGER,!0),workspaces:r,templates:p,recentWorkspaceIds:w,activeWorkspaceId:m,autosave:d(t.autosave,"autosave")}}function S(e){const t=a(o(e),"document");if("workspace"===t.kind)return g(t);if("indicator-template"===t.kind)return b(t);throw new n("Unsupported document kind")}class A{constructor(e,t,r={}){Object.defineProperty(this,"_storage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_namespace",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_now",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_id",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_queue",{enumerable:!0,configurable:!0,writable:!0,value:Promise.resolve()}),this._storage=e,this._namespace=i(t,"storage namespace"),this._now=r.now??Date.now,this._id=r.id??(()=>{if(!globalThis.crypto?.randomUUID)throw new n("Supply an ID factory when crypto.randomUUID is unavailable");return globalThis.crypto.randomUUID()})}get namespace(){return this._namespace}async load(){return await this._queue,this._read()}async createWorkspace(e,t){const n=y(t),r=i(e,"name",120);return this._transact(e=>{const t=this._now(),o=g({...n,kind:"workspace",version:1,id:this._newId(e),name:r,createdAt:t,updatedAt:t});return e.workspaces.push(o),o})}async saveWorkspace(e,t){const n=y(t);return this._transact(t=>{const r=this._find(t,"workspace",e),o=g({...r,...n,updatedAt:this._updatedAt(r)});return t.workspaces[t.workspaces.indexOf(r)]=o,o})}async createTemplate(e,t){const n=m(t),r=i(e,"name",120);return this._transact(e=>{const t=this._now(),o=b({kind:"indicator-template",version:1,id:this._newId(e),name:r,createdAt:t,updatedAt:t,indicators:n});return e.templates.push(o),o})}async saveTemplate(e,t){const n=m(t);return this._transact(t=>{const r=this._find(t,"indicator-template",e),o=b({...r,indicators:n,updatedAt:this._updatedAt(r)});return t.templates[t.templates.indexOf(r)]=o,o})}async rename(e,t,n){const r=i(n,"name",120);return this._transact(n=>{const o=this._find(n,e,t);o.name=r,o.updatedAt=this._updatedAt(o)})}async duplicate(e,t,n){const r=i(n,"name",120);return this._transact(n=>this._insert(n,this._find(n,e,t),r))}async remove(e,t){return this._transact(n=>{this._find(n,e,t),"indicator-template"===e?n.templates=n.templates.filter(e=>e.id!==t):(n.workspaces=n.workspaces.filter(e=>e.id!==t),n.recentWorkspaceIds=n.recentWorkspaceIds.filter(e=>e!==t),n.activeWorkspaceId===t&&(n.activeWorkspaceId=n.recentWorkspaceIds[0]??null))})}async openWorkspace(e,t={}){const n=void 0===t.expectedRevision?void 0:c(t.expectedRevision,"expected revision",0,Number.MAX_SAFE_INTEGER,!0);return this._transact(t=>{if(void 0!==n&&t.revision!==n)throw new k;const r=this._find(t,"workspace",e);return t.activeWorkspaceId=r.id,t.recentWorkspaceIds=[r.id,...t.recentWorkspaceIds.filter(e=>e!==r.id)].slice(0,10),r},t.signal)}async setAutosave(e){const t=d(e,"autosave");return this._transact(e=>{e.autosave=t})}async importDocument(e){const t=S(e);return this._transact(e=>this._insert(e,t,t.name))}async exportDocument(e,t){const n=await this.load();return JSON.stringify(this._find(n,e,t),null,2)}async _read(){const e=await this._storage.read(this._namespace);return null===e?{version:1,revision:0,workspaces:[],templates:[],recentWorkspaceIds:[],activeWorkspaceId:null,autosave:!1}:_(e)}_transact(e,t){const n=this._queue.then(async()=>{t?.throwIfAborted();const n=await this._read();t?.throwIfAborted();const r=n.revision,a=e(n);n.revision++;const s=_(n);return t?.throwIfAborted(),await this._storage.write(this._namespace,s,r,{signal:t}),void 0===a?a:o(a)});return this._queue=n.then(()=>{},()=>{}),n}_find(e,t,r){if("workspace"!==t&&"indicator-template"!==t)throw new n("Unsupported document kind");const o=i(r,"document ID",100),a=("workspace"===t?e.workspaces:e.templates).find(e=>e.id===o);if(!a)throw new n(`Saved ${t} does not exist`);return a}_updatedAt(e){return Math.max(e.updatedAt,c(this._now(),"current time",0))}_newId(e){const t=i(this._id(),"generated document ID",100);if([...e.workspaces,...e.templates].some(e=>e.id===t))throw new n("Generated document ID collision");return t}_insert(e,t,n){const r=this._now(),o=S({...t,name:n,id:this._newId(e),createdAt:r,updatedAt:r});return"workspace"===o.kind?e.workspaces.push(o):e.templates.push(o),o}}function x(e,t="openalgo-chart-workspaces"){const r=i(t,"database name");let o=null,a=null,s=!1;const d=()=>new Error("Workspace storage is closed. Create a new adapter to reconnect.");function p(){return s?Promise.reject(d()):o||(o=new Promise((t,n)=>{const o=e.open(r,1);let i=!1;o.onupgradeneeded=()=>{o.result.objectStoreNames.contains("catalogs")||o.result.createObjectStore("catalogs")},o.onblocked=()=>{i=!0,n(new Error("Workspace database is blocked by another session. Close that session and retry."))},o.onerror=()=>{i=!0,n(o.error??new Error("Cannot open workspace database"))},o.onsuccess=()=>{const e=o.result;if(s||i)return e.close(),void n(d());a=e,e.onversionchange=()=>{s=!0,e.close(),a=null},e.onclose=()=>{s=!0,a=null},t(e)}}).catch(e=>{throw o=null,e}),o)}return{async read(e){const t=i(e,"storage namespace"),n=await p();return new Promise((e,r)=>{const o=n.transaction("catalogs","readonly"),a=o.objectStore("catalogs").get(t);let s=null;a.onsuccess=()=>{s=a.result??null},o.oncomplete=()=>e(s),o.onabort=()=>r(o.error??new Error("Workspace read was aborted"))})},async write(e,t,r,o){const a=o?.signal;a?.throwIfAborted();const s=i(e,"storage namespace"),d=c(r,"expected revision",0,Number.MAX_SAFE_INTEGER,!0),l=_(t);if(l.revision!==d+1)throw new n("A write must advance the catalog revision by one");const u=await p();return a?.throwIfAborted(),new Promise((e,t)=>{const n=u.transaction("catalogs","readwrite"),r=n.objectStore("catalogs"),o=r.get(s);let i;const c=()=>{try{n.abort(),i=a?.reason}catch{}},p=()=>a?.removeEventListener("abort",c);a?.addEventListener("abort",c,{once:!0}),o.onsuccess=()=>{try{const e=o.result;if((void 0===e?0:_(e).revision)!==d)throw new k;r.put(l,s)}catch(e){i=e,n.abort()}},n.oncomplete=()=>{p(),e()},n.onabort=()=>{p(),t(i??n.error??new Error("Workspace save was aborted"))}})},async close(){s=!0,a&&(a.close(),a=null),o&&await o.catch(()=>{})}}}function D(e,t,r,o,a){if("replace"!==r&&"append"!==r)throw new n("Unsupported indicator template mode");const s=m(e),i=m(t);for(const e of i)delete e.instanceId;if("append"===r){const e=Math.max(0,...s.map(e=>e.paneIndex));if(!Number.isInteger(a)||a<=e||a>32)throw new n("Invalid next indicator pane");const t=[...new Set(i.map(e=>e.paneIndex).filter(e=>e>0))].sort((e,t)=>e-t);for(const e of i)if(e.paneIndex>0&&(e.paneIndex=a+t.indexOf(e.paneIndex)),e.paneIndex>31)throw new n("Indicator pane limit exceeded")}const c="replace"===r?i:[...s,...i];if(c.length>256)throw new n("At most 256 indicator instances are supported");const d=[...new Set(c.filter(e=>!o.has(e.indicatorId)).map(e=>e.indicatorId))];if(d.length)throw new n(`Missing indicators: ${d.join(", ")}`);return c}export{l as WORKSPACE_VERSION,k as WorkspaceConflictError,n as WorkspaceDocumentError,A as WorkspaceRepository,x as createIndexedDbWorkspaceStorage,I as migrateWidgetWorkspace,m as parseIndicatorStates,b as parseIndicatorTemplate,_ as parseWorkspaceCatalog,g as parseWorkspaceDocument,y as parseWorkspacePayload,D as planIndicatorTemplate};
|
|
2
|
+
//# sourceMappingURL=openalgo-charts.workspace.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"openalgo-charts.workspace.mjs","sources":["../src/workspace/json.ts","../src/workspace/documents.ts","../src/workspace/repository.ts","../src/workspace/indexed-db.ts","../src/workspace/templates.ts"],"sourcesContent":[null,null,null,null,null],"names":["MAX_DOCUMENT_BYTES","WorkspaceDocumentError","Error","constructor","message","super","this","name","privateKeys","Set","readJson","input","length","TextEncoder","encode","JSON","parse","nodes","characters","ancestors","visit","value","depth","opaque","Number","isFinite","has","Array","isArray","Object","prototype","includes","getPrototypeOf","key","Reflect","ownKeys","property","getOwnPropertyDescriptor","enumerable","test","result","add","out","i","descriptor","String","push","keys","normalized","toLowerCase","replace","delete","stringify","record","label","list","max","string","empty","trim","from","some","char","charCodeAt","number","min","MAX_SAFE_INTEGER","integer","isInteger","boolean","fallback","undefined","choice","values","WORKSPACE_VERSION","metadata","kind","version","createdAt","id","updatedAt","indicatorStates","preserveIdentity","ids","map","item","entry","indicatorId","settings","paneIndex","visible","instanceId","parseIndicatorStates","chartState","source","timezone","assign","viewport","view","to","barSpacing","MIN_VALUE","grid","vertLines","horzLines","crosshairMode","crosshairSnapToBar","indicators","alerts","parseAlertsDocument","error","drawings","panes","pane","scale","priceScale","weight","marginTop","marginBottom","minMove","mode","inverted","autoScale","range","series","scaleId","priceScaleId","type","style","paneState","comparisons","symbol","exchange","color","size","interval","chartType","chart","volume","magnet","stay","comparisonMode","historyPeriod","payload","activePaneId","layout","rows","columns","seen","cells","slots","slot","paneId","row","column","rowSpan","columnSpan","r","c","cell","sync","crosshair","preset","count","weights","parseWorkspaceDocument","parseWorkspacePayload","parseIndicatorTemplate","migrateWidgetWorkspace","meta","rail","now","theme","WorkspaceConflictError","parseWorkspaceCatalog","workspaces","templates","workspaceIds","recentWorkspaceIds","activeWorkspaceId","revision","autosave","documentOf","WorkspaceRepository","storage","namespace","options","defineProperty","Promise","resolve","_storage","_namespace","_now","Date","_id","globalThis","crypto","randomUUID","load","_queue","_read","createWorkspace","title","_transact","catalog","doc","_newId","saveWorkspace","existing","_find","_updatedAt","indexOf","createTemplate","saveTemplate","rename","duplicate","_insert","remove","filter","openWorkspace","expected","expectedRevision","slice","signal","setAutosave","enabled","importDocument","exportDocument","read","mutate","operation","then","async","throwIfAborted","next","write","find","Math","createIndexedDbWorkspaceStorage","factory","databaseName","opening","connection","closed","closedError","open","reject","request","failed","onupgradeneeded","objectStoreNames","contains","createObjectStore","onblocked","onerror","onsuccess","db","close","onversionchange","onclose","catch","transaction","objectStore","get","oncomplete","onabort","store","failure","cancel","abort","reason","cleanup","removeEventListener","addEventListener","once","previous","put","planIndicatorTemplate","current","incoming","available","nextPaneIndex","additions","lastOccupied","groups","index","sort","a","b","planned","missing","join"],"mappings":"4DAEO,MAAMA,EAAqB,QAE5B,MAAOC,UAA+BC,MAC1C,WAAAC,CAAYC,GAAmBC,MAAMD,GAAUE,KAAKC,KAAO,wBAA0B,EAGvF,MAAMC,EAAc,IAAIC,IAAI,CAC1B,YAAa,YAAa,cAAe,SAAU,SAAU,eAAgB,YAC7E,WAAY,eAAgB,QAAS,cAAe,eAAgB,YAAa,gBACjF,cAAe,aAAc,OAAQ,QAAS,WAAY,SAAU,YAAa,WACjF,UAAW,iBAAkB,YAAa,YAGtC,SAAUC,EAASC,GACvB,GAAqB,iBAAVA,EAAoB,CAC7B,GAAIA,EAAMC,OAASZ,IAAsB,IAAIa,aAAcC,OAAOH,GAAOC,OAASZ,EAChF,MAAM,IAAIC,EAAuB,gCAEnC,IAAMU,EAAQI,KAAKC,MAAML,EAAQ,CACjC,MAAQ,MAAM,IAAIV,EAAuB,wBAA0B,CACrE,CACA,IAAIgB,EAAQ,EACRC,EAAa,EACjB,MAAMC,EAAY,IAAIV,IAChBW,EAAQ,CAACC,EAAgBC,EAAeC,GAAS,KACrD,KAAMN,EAAQ,IAAQ,MAAM,IAAIhB,EAAuB,gCACvD,GAAIqB,EAAQ,GAAI,MAAM,IAAIrB,EAAuB,iCACjD,GAAc,OAAVoB,GAAmC,kBAAVA,EAAqB,OAAOA,EACzD,GAAqB,iBAAVA,EAAoB,CAE7B,GADAH,GAAcG,EAAMT,OAChBM,EAAalB,EAAoB,MAAM,IAAIC,EAAuB,gCACtE,OAAOoB,CACT,CACA,GAAqB,iBAAVA,GAAsBG,OAAOC,SAASJ,GAAQ,OAAOA,EAChE,GAAqB,iBAAVA,EAAoB,MAAM,IAAIpB,EAAuB,4CAChE,GAAIkB,EAAU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,WAATA,EAAmB,MAAM,IAAIvH,EAAuB,uCAC9E,MAAMkR,EAAWvL,EAAqB0L,GAChCI,EAAY9L,EAAqB2L,GAEvC,IAAK,MAAMlM,KAAQqM,SAAkBrM,EAAKM,WAC1C,GAAa,WAAT6B,EAAmB,CACrB,MAAMmK,EAAe9C,KAAKrL,IAAI,KAAM2N,EAAS/L,IAAIC,GAAQA,EAAKI,YAC9D,IAAKjE,OAAO4C,UAAUqN,IAAkBA,GAAiBE,GAAgBF,EAAgB,GACvF,MAAM,IAAIxR,EAAuB,+BAEnC,MAAM2R,EAAS,IAAI,IAAInR,IAAIiR,EAAUtM,IAAIC,GAAQA,EAAKI,WAAWiI,OAAOmE,GAASA,EAAQ,KAAKC,KAAK,CAACC,EAAGC,IAAMD,EAAIC,GACjH,IAAK,MAAM3M,KAAQqM,EAEjB,GADIrM,EAAKI,UAAY,IAAGJ,EAAKI,UAAYgM,EAAgBG,EAAOzE,QAAQ9H,EAAKI,YACzEJ,EAAKI,UAAY,GAAI,MAAM,IAAIxF,EAAuB,gCAE9D,CACA,MAAMgS,EAAmB,YAATzK,EAAqBkK,EAAY,IAAIP,KAAaO,GAClE,GAAIO,EAAQrR,OAAS,IAAK,MAAM,IAAIX,EAAuB,iDAC3D,MAAMiS,EAAU,IAAI,IAAIzR,IAAIwR,EAAQvE,OAAOrI,IAASmM,EAAU9P,IAAI2D,EAAKE,cAAcH,IAAIC,GAAQA,EAAKE,eACtG,GAAI2M,EAAQtR,OAAQ,MAAM,IAAIX,EAAuB,uBAAuBiS,EAAQC,KAAK,SACzF,OAAOF,CACT"}
|
package/dist/profile/index.d.ts
CHANGED
|
@@ -73,6 +73,28 @@ interface Bar {
|
|
|
73
73
|
low: number;
|
|
74
74
|
close: number;
|
|
75
75
|
volume?: number;
|
|
76
|
+
/**
|
|
77
|
+
* Open interest: contracts outstanding at the end of this bar. Optional,
|
|
78
|
+
* because only a derivatives feed carries it; on a cash instrument it is
|
|
79
|
+
* absent, and absent is not zero. Zero is a real reading on a contract nobody
|
|
80
|
+
* holds.
|
|
81
|
+
*
|
|
82
|
+
* **It is a level, not a flow, and that is the whole reason it needs saying
|
|
83
|
+
* here.** Volume is a quantity traded *during* the bar, so folding five
|
|
84
|
+
* one-minute bars into a five-minute bar adds five volumes together. Open
|
|
85
|
+
* interest is a position *as at* the bar, so the same fold takes the last
|
|
86
|
+
* one and adding them would produce a number five times too large that still
|
|
87
|
+
* looks entirely plausible on a chart.
|
|
88
|
+
*
|
|
89
|
+
* Every aggregation path in this library therefore treats the two
|
|
90
|
+
* differently: `mergeBars`, the higher-timeframe fold in `securitySeries`,
|
|
91
|
+
* and the tick-to-bar builders all sum volume and carry the latest open
|
|
92
|
+
* interest. A transform that maps one source bar to one output bar passes it
|
|
93
|
+
* through; one that invents bars from price alone (Renko, Point and Figure)
|
|
94
|
+
* does not carry it at all, because a synthetic bar has no instant to be the
|
|
95
|
+
* position as at.
|
|
96
|
+
*/
|
|
97
|
+
oi?: number;
|
|
76
98
|
/**
|
|
77
99
|
* Per-bar colour override, honoured by every Family-A renderer: candles and
|
|
78
100
|
* OHLC bars take it on body, border and wick together, histogram and column
|
|
@@ -83,6 +105,15 @@ interface Bar {
|
|
|
83
105
|
* two. Neither is expressible with one colour for the whole series.
|
|
84
106
|
*/
|
|
85
107
|
color?: string;
|
|
108
|
+
/**
|
|
109
|
+
* Wick colour for this bar alone, over `color`. A study that paints candles
|
|
110
|
+
* with a translucent body and a solid wick cannot say so with one colour,
|
|
111
|
+
* and without this a per-bar override always set the two together. Read by
|
|
112
|
+
* the candle renderers only; absent means the wick follows `color`.
|
|
113
|
+
*/
|
|
114
|
+
wickColor?: string;
|
|
115
|
+
/** Border colour for this bar alone, on the same terms as `wickColor`. */
|
|
116
|
+
borderColor?: string;
|
|
86
117
|
}
|
|
87
118
|
|
|
88
119
|
/**
|
package/dist/trade/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { IPrimitive, PrimitiveHost, ZOrder, PrimitiveRenderContext, PrimitiveHit } from 'openalgo-charts';
|
|
1
|
+
import { IPrimitive, PrimitiveHost, ZOrder, PrimitiveRenderContext, PrimitiveHit, TradingCapabilitySource, Instrument } from 'openalgo-charts';
|
|
2
|
+
export { TradingCapabilities, TradingCapabilityError, TradingCapabilityRequest, TradingCapabilityResult, TradingCapabilitySource, TradingOperation, assertTradingCapability, checkTradingCapability } from 'openalgo-charts';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* Trade-layer data model (ARCHITECTURE.md §9). Broker-agnostic shapes the
|
|
@@ -339,6 +340,8 @@ interface ModifyPatch {
|
|
|
339
340
|
* implement `OrderFeed` for the engine's write path.
|
|
340
341
|
*/
|
|
341
342
|
interface OrderFeed {
|
|
343
|
+
/** Optional support declaration; a configured provider can report unavailable metadata. */
|
|
344
|
+
readonly capabilities?: TradingCapabilitySource;
|
|
342
345
|
place(req: PlaceRequest & {
|
|
343
346
|
mode: TradeMode;
|
|
344
347
|
}): Promise<{
|
|
@@ -394,6 +397,8 @@ interface ModifyOptions {
|
|
|
394
397
|
}
|
|
395
398
|
interface OrderEngineOptions {
|
|
396
399
|
feed: OrderFeed;
|
|
400
|
+
/** Host restrictions combined with the feed's, rechecked before every write. */
|
|
401
|
+
capabilities?: TradingCapabilitySource;
|
|
397
402
|
constraints: OrderConstraints;
|
|
398
403
|
mode?: TradeMode;
|
|
399
404
|
/** Armed = fire immediately; otherwise the gate must approve each order. */
|
|
@@ -402,7 +407,7 @@ interface OrderEngineOptions {
|
|
|
402
407
|
minModifyIntervalMs?: number;
|
|
403
408
|
now?: () => number;
|
|
404
409
|
idGen?: () => string;
|
|
405
|
-
/** Called
|
|
410
|
+
/** Called for modify validation and unsupported modify/cancel operations. */
|
|
406
411
|
onValidationError?: (reason: string) => void;
|
|
407
412
|
/**
|
|
408
413
|
* How many settled orders stay readable before the oldest are dropped. A
|
|
@@ -421,6 +426,7 @@ interface PlaceResult {
|
|
|
421
426
|
}
|
|
422
427
|
declare class OrderEngine {
|
|
423
428
|
private readonly _feed;
|
|
429
|
+
private readonly _capabilities?;
|
|
424
430
|
private readonly _constraints;
|
|
425
431
|
private readonly _mode;
|
|
426
432
|
private readonly _armed;
|
|
@@ -448,7 +454,9 @@ declare class OrderEngine {
|
|
|
448
454
|
* about this order yet, however far `state` has advanced on transport results.
|
|
449
455
|
*/
|
|
450
456
|
brokerStatus(clientId: string): OrderStatus | undefined;
|
|
451
|
-
|
|
457
|
+
private _capability;
|
|
458
|
+
private _orderCapability;
|
|
459
|
+
placeOrder(request: PlaceRequest): Promise<PlaceResult>;
|
|
452
460
|
/** One-click market order. Omitting `opts` is exactly the previous behaviour. */
|
|
453
461
|
placeMarket(symbol: string, side: OrderSide, qty: number, opts?: MarketOrderOptions): Promise<PlaceResult>;
|
|
454
462
|
/** Link two orders as OCO: when one fills/cancels, the other is cancelled. */
|
|
@@ -548,6 +556,9 @@ declare class FakeBroker implements OrderFeed {
|
|
|
548
556
|
private _notify;
|
|
549
557
|
}
|
|
550
558
|
|
|
559
|
+
/** Use the adapter's quantity grid directly; this function never converts units or places orders. */
|
|
560
|
+
declare function orderConstraintsForInstrument(instrument: Instrument): OrderConstraints;
|
|
561
|
+
|
|
551
562
|
/**
|
|
552
563
|
* Depth-of-market ladder (ARCHITECTURE.md §9.4). Docked to the right of the
|
|
553
564
|
* plot, price-aligned to the price scale. Depth-agnostic: it reads the level
|
|
@@ -608,4 +619,4 @@ declare class DomLadder implements IPrimitive {
|
|
|
608
619
|
|
|
609
620
|
declare const TRADE_TIER: "trade";
|
|
610
621
|
|
|
611
|
-
export { BracketGroup, type BracketState, type ClientOrderState, DEFAULT_DOM_LADDER_OPTIONS, DomLadder, type DomLadderOptions, FakeBroker, type GateFn, type IntentState, type LadderRow, type LadderTier, type MarketOrderOptions, type ModifyOptions, type ModifyPatch, type Order, type OrderConstraints, OrderEngine, type OrderEngineOptions, type OrderEvent, type OrderFeed, type OrderRole, type OrderSide, type OrderStatus, type OrderType, type PlaceRequest, type PlaceResult, type Position, PositionMarker, type PreflightFailure, type PriceBand, TRADE_TIER, TradeController, type TradeHost, type TradeMode, type ValidationCode, type ValidationResult, WorkingOrderLine, bracketValid, breakeven, buildRows, canTransition, isPreflightFailure, isTerminal, isWorking, ladderCapability, riskReward, transition, unrealizedPnl, unrealizedPnlPercent, validateOrder, validatePrice, validateQuantity, visibleRows, withinPriceBand };
|
|
622
|
+
export { BracketGroup, type BracketState, type ClientOrderState, DEFAULT_DOM_LADDER_OPTIONS, DomLadder, type DomLadderOptions, FakeBroker, type GateFn, type IntentState, type LadderRow, type LadderTier, type MarketOrderOptions, type ModifyOptions, type ModifyPatch, type Order, type OrderConstraints, OrderEngine, type OrderEngineOptions, type OrderEvent, type OrderFeed, type OrderRole, type OrderSide, type OrderStatus, type OrderType, type PlaceRequest, type PlaceResult, type Position, PositionMarker, type PreflightFailure, type PriceBand, TRADE_TIER, TradeController, type TradeHost, type TradeMode, type ValidationCode, type ValidationResult, WorkingOrderLine, bracketValid, breakeven, buildRows, canTransition, isPreflightFailure, isTerminal, isWorking, ladderCapability, orderConstraintsForInstrument, riskReward, transition, unrealizedPnl, unrealizedPnlPercent, validateOrder, validatePrice, validateQuantity, visibleRows, withinPriceBand };
|
|
@@ -11,6 +11,28 @@ interface Bar {
|
|
|
11
11
|
low: number;
|
|
12
12
|
close: number;
|
|
13
13
|
volume?: number;
|
|
14
|
+
/**
|
|
15
|
+
* Open interest: contracts outstanding at the end of this bar. Optional,
|
|
16
|
+
* because only a derivatives feed carries it; on a cash instrument it is
|
|
17
|
+
* absent, and absent is not zero. Zero is a real reading on a contract nobody
|
|
18
|
+
* holds.
|
|
19
|
+
*
|
|
20
|
+
* **It is a level, not a flow, and that is the whole reason it needs saying
|
|
21
|
+
* here.** Volume is a quantity traded *during* the bar, so folding five
|
|
22
|
+
* one-minute bars into a five-minute bar adds five volumes together. Open
|
|
23
|
+
* interest is a position *as at* the bar, so the same fold takes the last
|
|
24
|
+
* one and adding them would produce a number five times too large that still
|
|
25
|
+
* looks entirely plausible on a chart.
|
|
26
|
+
*
|
|
27
|
+
* Every aggregation path in this library therefore treats the two
|
|
28
|
+
* differently: `mergeBars`, the higher-timeframe fold in `securitySeries`,
|
|
29
|
+
* and the tick-to-bar builders all sum volume and carry the latest open
|
|
30
|
+
* interest. A transform that maps one source bar to one output bar passes it
|
|
31
|
+
* through; one that invents bars from price alone (Renko, Point and Figure)
|
|
32
|
+
* does not carry it at all, because a synthetic bar has no instant to be the
|
|
33
|
+
* position as at.
|
|
34
|
+
*/
|
|
35
|
+
oi?: number;
|
|
14
36
|
/**
|
|
15
37
|
* Per-bar colour override, honoured by every Family-A renderer: candles and
|
|
16
38
|
* OHLC bars take it on body, border and wick together, histogram and column
|
|
@@ -21,6 +43,15 @@ interface Bar {
|
|
|
21
43
|
* two. Neither is expressible with one colour for the whole series.
|
|
22
44
|
*/
|
|
23
45
|
color?: string;
|
|
46
|
+
/**
|
|
47
|
+
* Wick colour for this bar alone, over `color`. A study that paints candles
|
|
48
|
+
* with a translucent body and a solid wick cannot say so with one colour,
|
|
49
|
+
* and without this a per-bar override always set the two together. Read by
|
|
50
|
+
* the candle renderers only; absent means the wick follows `color`.
|
|
51
|
+
*/
|
|
52
|
+
wickColor?: string;
|
|
53
|
+
/** Border colour for this bar alone, on the same terms as `wickColor`. */
|
|
54
|
+
borderColor?: string;
|
|
24
55
|
}
|
|
25
56
|
|
|
26
57
|
/**
|
|
@@ -279,6 +310,13 @@ interface EvaluateOptions {
|
|
|
279
310
|
* leg produces a gap rather than a guess.
|
|
280
311
|
*/
|
|
281
312
|
primary?: string;
|
|
313
|
+
/**
|
|
314
|
+
* Omitted by default. 'sum' reports the activity of distinct expression legs,
|
|
315
|
+
* once each, without price coefficients or signs. This is combined leg
|
|
316
|
+
* activity, not a traded quantity of the synthetic instrument. All matched
|
|
317
|
+
* legs must have finite nonnegative volume; otherwise volume stays absent.
|
|
318
|
+
*/
|
|
319
|
+
volume?: 'sum';
|
|
282
320
|
}
|
|
283
321
|
/**
|
|
284
322
|
* The syntax tree behind a parsed expression. Exported so the type of
|
|
@@ -339,8 +377,9 @@ declare function isPlainSymbol(source: string): boolean;
|
|
|
339
377
|
* chart.addSeries('line').setData(bars);
|
|
340
378
|
* ```
|
|
341
379
|
*
|
|
342
|
-
*
|
|
343
|
-
*
|
|
380
|
+
* Volume is absent by default. Opt into `volume: 'sum'` to report the combined
|
|
381
|
+
* activity of the matched legs, independently of the price expression.
|
|
382
|
+
* Open interest is always absent: an expression has no single contract position.
|
|
344
383
|
*/
|
|
345
384
|
declare function evaluateExpression(expr: SymbolExpression, legs: Readonly<Record<string, readonly Bar[]>>, options?: EvaluateOptions): Bar[];
|
|
346
385
|
|
package/dist/webgl/index.d.ts
CHANGED
|
@@ -11,6 +11,28 @@ interface Bar {
|
|
|
11
11
|
low: number;
|
|
12
12
|
close: number;
|
|
13
13
|
volume?: number;
|
|
14
|
+
/**
|
|
15
|
+
* Open interest: contracts outstanding at the end of this bar. Optional,
|
|
16
|
+
* because only a derivatives feed carries it; on a cash instrument it is
|
|
17
|
+
* absent, and absent is not zero. Zero is a real reading on a contract nobody
|
|
18
|
+
* holds.
|
|
19
|
+
*
|
|
20
|
+
* **It is a level, not a flow, and that is the whole reason it needs saying
|
|
21
|
+
* here.** Volume is a quantity traded *during* the bar, so folding five
|
|
22
|
+
* one-minute bars into a five-minute bar adds five volumes together. Open
|
|
23
|
+
* interest is a position *as at* the bar, so the same fold takes the last
|
|
24
|
+
* one and adding them would produce a number five times too large that still
|
|
25
|
+
* looks entirely plausible on a chart.
|
|
26
|
+
*
|
|
27
|
+
* Every aggregation path in this library therefore treats the two
|
|
28
|
+
* differently: `mergeBars`, the higher-timeframe fold in `securitySeries`,
|
|
29
|
+
* and the tick-to-bar builders all sum volume and carry the latest open
|
|
30
|
+
* interest. A transform that maps one source bar to one output bar passes it
|
|
31
|
+
* through; one that invents bars from price alone (Renko, Point and Figure)
|
|
32
|
+
* does not carry it at all, because a synthetic bar has no instant to be the
|
|
33
|
+
* position as at.
|
|
34
|
+
*/
|
|
35
|
+
oi?: number;
|
|
14
36
|
/**
|
|
15
37
|
* Per-bar colour override, honoured by every Family-A renderer: candles and
|
|
16
38
|
* OHLC bars take it on body, border and wick together, histogram and column
|
|
@@ -21,6 +43,15 @@ interface Bar {
|
|
|
21
43
|
* two. Neither is expressible with one colour for the whole series.
|
|
22
44
|
*/
|
|
23
45
|
color?: string;
|
|
46
|
+
/**
|
|
47
|
+
* Wick colour for this bar alone, over `color`. A study that paints candles
|
|
48
|
+
* with a translucent body and a solid wick cannot say so with one colour,
|
|
49
|
+
* and without this a per-bar override always set the two together. Read by
|
|
50
|
+
* the candle renderers only; absent means the wick follows `color`.
|
|
51
|
+
*/
|
|
52
|
+
wickColor?: string;
|
|
53
|
+
/** Border colour for this bar alone, on the same terms as `wickColor`. */
|
|
54
|
+
borderColor?: string;
|
|
24
55
|
}
|
|
25
56
|
|
|
26
57
|
/**
|
|
@@ -75,6 +106,14 @@ interface SeriesStyle {
|
|
|
75
106
|
* so whoever builds those readings owns their formatting.
|
|
76
107
|
*/
|
|
77
108
|
precision?: number;
|
|
109
|
+
/**
|
|
110
|
+
* Draw every point this many bars to the right of the bar it belongs to
|
|
111
|
+
* (negative: left). The data is untouched and keeps its own times; only the
|
|
112
|
+
* painted position moves, so the last `barOffset` points of a series land in
|
|
113
|
+
* the right margin, past the newest bar. Autoscale follows what is drawn in
|
|
114
|
+
* view. Default 0.
|
|
115
|
+
*/
|
|
116
|
+
barOffset?: number;
|
|
78
117
|
color?: string;
|
|
79
118
|
lineWidth?: number;
|
|
80
119
|
/** Line dash style for line/step/area/HLC series. Default 'solid'. */
|
package/dist/widget/index.d.ts
CHANGED
|
@@ -1,6 +1,23 @@
|
|
|
1
|
-
import { ShortcutListItem, ChartTheme, Chart, ChartObjects, ChartSettingsInput, ContextMenuEvent, IndicatorApi, ChartSettingsTabId, ChartSettingsValues, DataLoadingController, SeriesApi, RestoreReport, ChartOptions, DataFeed, DataLoadingOptions, Bar } from 'openalgo-charts';
|
|
1
|
+
import { ShortcutListItem, ChartTheme, Chart, ChartObjects, AlertController, ChartSettingsInput, TradingCapabilitySource, TradingCapabilityRequest, ContextMenuEvent, IndicatorApi, ChartSettingsTabId, ChartSettingsValues, AlertSource, DataLoadingController, SeriesApi, RestoreReport, ChartOptions, DataFeed, DataLoadingOptions, Bar } from 'openalgo-charts';
|
|
2
2
|
import { DrawingController, MagnetMode, SettingsField } from 'openalgo-charts/draw';
|
|
3
3
|
|
|
4
|
+
/** English source keys keep fallback messages available without a locale bundle. */
|
|
5
|
+
type WidgetBuiltinMessage = "Add a study to the chart" | "Add level" | "Added {name}" | "Alerts" | "Alerts are unavailable in this host" | "Alerts..." | "Armed" | "Auto-fit to the data" | "Axis settings..." | "Bar close" | "Bar close evaluates confirmed values. Intrabar touch can fire on a wick that is absent from final history." | "Behind the series" | "Bring to front" | "Buy limit at {price}" | "Buy market" | "Buy stop at {price}" | "C" | "Cancel" | "Candle condition" | "Candle condition is unavailable" | "Capture" | "Capture chart" | "Chart alerts" | "Chart branding" | "Chart controls" | "Chart copied" | "Chart data download started" | "Chart header" | "Chart menu" | "Chart objects" | "Chart settings" | "Chart toolbar" | "Chart type" | "Claimed by {name}" | "Click for strong: every anchor lands on the nearest O/H/L/C" | "Click for weak: snaps when O/H/L/C is within a few pixels" | "Click to switch the magnet off" | "Close" | "Color" | "Compare with" | "Copy drawing" | "Copy failed: {error}" | "Copy image" | "Copy {count} drawings" | "Could not change lock for {name}" | "Could not change visibility for {name}" | "Could not focus {name}" | "Could not load" | "Could not load older history" | "Could not load {symbol} {interval}" | "Could not load {symbol} {interval}: {error}" | "Could not open settings for {name}" | "Could not remove {name}" | "Could not save this alert" | "Could not select {name}" | "Create alert" | "Create alert at {price}..." | "Create drawing alert..." | "Create study alert..." | "Cursor" | "Custom" | "Cut drawing" | "Cut {count} drawings" | "Dark" | "Dark theme" | "Data export failed: {error}" | "Default level" | "Defaults" | "Delete" | "Delete drawing" | "Delete {count} drawings" | "Disable" | "Disable {name}" | "Disabled" | "Dismiss" | "Done" | "Download PNG" | "Download SVG" | "Download chart data (CSV)" | "Draw" | "Drawing" | "Drawing actions" | "Drawing level is unavailable" | "Drawing text" | "Drawing tools" | "Duplicate" | "Edit" | "Edit alert" | "Edit levels..." | "Edit on chart" | "Edit text" | "Edit the expiry before enabling this alert" | "Enable" | "Enable {name}" | "Enabled" | "Enter a valid expiry date and time in UTC" | "Enter an expiry date and time in UTC" | "Every match" | "Expired" | "Expires {time} UTC" | "Finish" | "Fit all bars" | "Focus" | "Focus {name}" | "H" | "Hidden" | "Hide" | "Hide drawing" | "Hide {name}" | "History is stale for {symbol} {interval}" | "History is stale for {symbol} {interval}. Reload to retry." | "History is stale. Refreshing {symbol} {interval}" | "History retention limit reached" | "In front of the series" | "Indicators" | "Indicators..." | "Input plot" | "Inputs" | "Interval" | "Interval {code}" | "Intrabar touch" | "Invert" | "Keep tool armed" | "Keyboard shortcuts" | "L" | "Label" | "Last fired {time} UTC" | "Level" | "Levels" | "Light" | "Light theme" | "Loading" | "Loading older history" | "Loading {symbol} {interval}" | "Lock" | "Lock drawing" | "Lock {name}" | "Locked" | "Magnet off" | "Magnet strong: every anchor lands on the nearest O/H/L/C" | "Magnet weak: snaps when O/H/L/C is within a few pixels" | "Magnet: {mode}" | "More" | "Move the scale to the left" | "Move the scale to the right" | "No alerts. Create an alert for this chart." | "No bars for {symbol} {interval}" | "No data" | "No drawings to remove" | "No indicator on the chart to configure" | "No indicator to configure" | "No indicators are registered. Import the indicators tier to fill this list." | "No levels. Add one, or reset to the defaults." | "No match" | "No objects match your search." | "No objects on this chart." | "Nothing measured on this scale yet" | "Nothing to configure on this chart yet." | "Nothing to paste" | "O" | "OI" | "OK" | "Objects" | "Objects panel requires an object model" | "Off: one drawing per pick" | "On: the tool stays armed after each drawing" | "Once" | "One drawing per pick" | "Open interest is unavailable for this instrument." | "Order" | "Order entry is locked by the host" | "Order entry is locked during replay" | "Order entry is unavailable" | "Order entry is unavailable: {reason}" | "Other" | "PNG, SVG, CSV or the clipboard" | "Pane {number}" | "Paste" | "Pick an indicator from the legend first" | "Pin price per bar" | "Pin to rail" | "Pinned. Right-click to unpin" | "Plot" | "Price" | "Price chart" | "Price {price}" | "Price {price} to {upper}" | "Properties" | "Properties of the selection..." | "Properties..." | "Ratio" | "Redo" | "Refreshing {symbol} {interval}" | "Remove" | "Remove all drawings ({count})" | "Remove level" | "Remove {name}" | "Removed {count} drawing" | "Removed {count} drawings" | "Reset" | "Restore defaults" | "Restore this tab" | "Retry" | "Retry chart data" | "Retry older history" | "Retry {name}" | "Right-click to remove all" | "Save" | "Saved a PNG of the chart" | "Saved an SVG of the chart" | "Scale" | "Search indicators" | "Search name, type or pane" | "Search objects" | "Searching" | "Select a drawing first" | "Select a drawing with levels first" | "Select a text drawing first" | "Select all ({count})" | "Select an input plot on the drawing pane" | "Select one first. Right-click to remove all" | "Select {name}" | "Selected" | "Selected drawing" | "Sell limit at {price}" | "Sell market" | "Sell stop at {price}" | "Send to back" | "Settings" | "Settings for {name}" | "Settings..." | "Show" | "Show drawing" | "Show labels" | "Show {name}" | "Source" | "Stay: {mode}" | "Stays selected, so the eye brings it back" | "Studies" | "Study" | "Study instance is unavailable" | "Study plot is unavailable" | "Style" | "Switch to the dark theme" | "Switch to the light theme" | "Symbol" | "Symbol search results" | "Symbols" | "Text" | "That indicator is no longer on the chart" | "That side is already in use" | "That text is off the chart" | "The canvas produced no image" | "The chart changed; reopen Capture for its current source" | "The chart changed; reopen the menu before placing an order" | "The chart layout could not be saved" | "The chart layout could not be saved: {error}" | "The current plot value is unavailable. The alert waits for observed values." | "The indicator picker is not in this build" | "The instrument context changed. Reopen the editor for the intended instrument." | "The saved layout could not be restored: {error}" | "The settings dialog is not in this build" | "Theme" | "These drawings share no settings." | "This alert was removed" | "This runtime cannot save files" | "Tools" | "Tools stay armed after each drawing" | "Trade" | "Triggered" | "Unavailable candle condition" | "Unavailable drawing" | "Unavailable study" | "Undo" | "Unlock" | "Unlock drawing" | "Unlock {name}" | "Unlocked" | "Unpin from rail" | "Unsupported" | "Visible" | "Vol" | "Wait for this chart to finish loading its data" | "locked" | "needs https or localhost" | "nothing measured" | "nothing on this side" | "object" | "off" | "on" | "on chart" | "on chart x{count}" | "one instance on the chart" | "other side taken" | "paste it anywhere" | "text stays text" | "{count} alert" | "{count} alerts" | "{count} bars" | "{count} chart shortcut struck through: the same chord arms a drawing tool here and takes precedence." | "{count} chart shortcuts struck through: the same chord arms a drawing tool here and takes precedence." | "{count} drawings" | "{count} instances on the chart" | "{count} objects" | "{group}: chevron for the rest" | "{group}: chevron for the rest. Double-click keeps it armed" | "{name} / {plot}: {value}" | "{name} / {plot}: {value} to {upper}" | "{name} has nothing to configure" | "{name} settings" | "{name} settings..." | "{name} stays armed until Escape" | "{seconds}s cooldown" | "{shown} of {count} objects";
|
|
6
|
+
/** Schema keys name descriptor metadata, never saved user values. */
|
|
7
|
+
type WidgetMessageKey = WidgetBuiltinMessage | `schema.${string}`;
|
|
8
|
+
type WidgetMessageValues = Readonly<Record<string, string | number>>;
|
|
9
|
+
/** A synchronous host catalog. Missing entries return undefined or null. */
|
|
10
|
+
type WidgetTranslator = (key: WidgetMessageKey, fallback: string, values: WidgetMessageValues) => string | null | undefined;
|
|
11
|
+
interface WidgetTranslationOptions {
|
|
12
|
+
/** Translates widget-owned text. Omit to preserve English rendering. */
|
|
13
|
+
translate?: WidgetTranslator;
|
|
14
|
+
}
|
|
15
|
+
/** Required interpolation names are inferred from the English source message. */
|
|
16
|
+
type WidgetMessageParameters<Message extends string> = Message extends `${string}{${infer Name}}${infer Rest}` ? Readonly<Record<Name, string | number> & WidgetMessageParameters<Rest>> : Readonly<Record<never, never>>;
|
|
17
|
+
/** Resolve a message, then interpolate literal values once. Output is plain text. */
|
|
18
|
+
declare function widgetText<K extends WidgetBuiltinMessage>(context: WidgetTranslationOptions, key: K, ...args: [keyof WidgetMessageParameters<K>] extends [never] ? [values?: WidgetMessageValues] : [values: WidgetMessageParameters<K>]): string;
|
|
19
|
+
declare function widgetText(context: WidgetTranslationOptions, key: `schema.${string}`, values: WidgetMessageValues, fallback: string): string;
|
|
20
|
+
|
|
4
21
|
/**
|
|
5
22
|
* The widget keymap: one place every chord the shell, the rail and the
|
|
6
23
|
* dialogs answer to is registered, resolved and listed.
|
|
@@ -215,7 +232,7 @@ interface Toaster {
|
|
|
215
232
|
* Mount the toast stack into `host` (an empty element the shell positions
|
|
216
233
|
* over the chart). `doc` is the host's document unless given, for a fake DOM.
|
|
217
234
|
*/
|
|
218
|
-
declare function mountToasts(host: HTMLElement, doc?: Document): Toaster;
|
|
235
|
+
declare function mountToasts(host: HTMLElement, doc?: Document, translation?: WidgetTranslationOptions): Toaster;
|
|
219
236
|
|
|
220
237
|
/**
|
|
221
238
|
* Design tokens for the widget chrome, as CSS custom properties derived from
|
|
@@ -402,7 +419,7 @@ type DialogMount = (ctx: WidgetContext, anchor?: HTMLElement) => DialogHandle;
|
|
|
402
419
|
* tier and registered here; a shell built without one renders the control
|
|
403
420
|
* that would open it disabled, with its state visible, rather than dead.
|
|
404
421
|
*/
|
|
405
|
-
type WidgetDialogName = 'settings' | 'indicatorPicker' | 'indicatorSettings' | 'drawingProperties' | 'contextMenu' | 'levelEditor' | 'textEditor';
|
|
422
|
+
type WidgetDialogName = 'settings' | 'indicatorPicker' | 'indicatorSettings' | 'drawingProperties' | 'contextMenu' | 'levelEditor' | 'textEditor' | 'alertEditor' | 'alerts';
|
|
406
423
|
/** Make a dialog's mount function known to every shell. Returns a disposer. */
|
|
407
424
|
declare function registerWidgetDialog(name: WidgetDialogName, mount: DialogMount): () => void;
|
|
408
425
|
/** Register several at once, from a module's exports. */
|
|
@@ -522,6 +539,8 @@ interface WidgetContext {
|
|
|
522
539
|
readonly draw: DrawingController;
|
|
523
540
|
/** Live inventory owned by the widget, optional for custom contexts. */
|
|
524
541
|
readonly objects?: ChartObjects;
|
|
542
|
+
/** Trader alerts owned by the widget, optional for custom contexts. */
|
|
543
|
+
readonly alerts?: AlertController;
|
|
525
544
|
/** The `.oac-widget` element every piece of chrome lives in. */
|
|
526
545
|
readonly root: HTMLElement;
|
|
527
546
|
readonly document: Document;
|
|
@@ -534,6 +553,7 @@ interface WidgetContext {
|
|
|
534
553
|
/** Per-widget persisted preferences; `enabled` is false when `persist` is off. */
|
|
535
554
|
readonly storage: WidgetStorage;
|
|
536
555
|
readonly locale: string | undefined;
|
|
556
|
+
readonly translate?: WidgetTranslator;
|
|
537
557
|
toast(message: string, kind?: ToastKind): ToastHandle;
|
|
538
558
|
/**
|
|
539
559
|
* Show `el` over the widget: positioned from `opts.anchor` (or centred as a
|
|
@@ -702,8 +722,11 @@ interface TopbarOptions {
|
|
|
702
722
|
onIndicators(anchor: HTMLElement): boolean;
|
|
703
723
|
/** A text control for the host's object inventory, omitted without a handler. */
|
|
704
724
|
onObjects?(anchor: HTMLElement): boolean;
|
|
725
|
+
onAlerts?(anchor: HTMLElement): boolean;
|
|
705
726
|
settingsAvailable(): boolean;
|
|
706
727
|
indicatorsAvailable(): boolean;
|
|
728
|
+
/** Refuse CSV export while the host is replacing or recovering its data. */
|
|
729
|
+
dataAvailable?(): boolean;
|
|
707
730
|
}
|
|
708
731
|
interface TopbarHandle {
|
|
709
732
|
readonly el: HTMLElement;
|
|
@@ -756,7 +779,7 @@ interface FormControl {
|
|
|
756
779
|
custom?: string;
|
|
757
780
|
}
|
|
758
781
|
type FormValues = Readonly<Record<string, unknown>>;
|
|
759
|
-
interface FormOptions {
|
|
782
|
+
interface FormOptions extends WidgetTranslationOptions {
|
|
760
783
|
values: FormValues;
|
|
761
784
|
/** Every edit, with the value in the control's declared type. */
|
|
762
785
|
onChange(key: string, value: unknown): void;
|
|
@@ -774,6 +797,8 @@ interface FormOptions {
|
|
|
774
797
|
* slider one edit on release, which is what a per-edit undo history wants.
|
|
775
798
|
*/
|
|
776
799
|
live?: boolean;
|
|
800
|
+
/** Keep an invalid numeric draft visible for validation when a form is saved. */
|
|
801
|
+
preserveInvalidNumbers?: boolean;
|
|
777
802
|
/** Renders the control column of a `custom` row. Null skips the row. */
|
|
778
803
|
custom?(control: FormControl, row: HTMLElement): HTMLElement | null;
|
|
779
804
|
}
|
|
@@ -790,14 +815,18 @@ interface FormHandle {
|
|
|
790
815
|
* Chart-settings and indicator inputs. `source` becomes a select over the
|
|
791
816
|
* canonical price sources; a `colorPair` keeps its two or three keys.
|
|
792
817
|
*/
|
|
793
|
-
declare function controlsFromInputs(inputs: readonly ChartSettingsInput[]): FormControl[];
|
|
818
|
+
declare function controlsFromInputs(inputs: readonly ChartSettingsInput[], translation?: FormTranslationOptions): FormControl[];
|
|
819
|
+
interface FormTranslationOptions extends WidgetTranslationOptions {
|
|
820
|
+
/** Stable descriptor scope, for example settings or indicator.ema. */
|
|
821
|
+
scope: string;
|
|
822
|
+
}
|
|
794
823
|
/**
|
|
795
824
|
* Draw-tier fields. `lineStyle` is a select with a fixed option list, an
|
|
796
825
|
* `opacity` is a slider read in percent, `levels` is left to the dialog (the
|
|
797
826
|
* level editor is its own surface), and the text tool's content is the one
|
|
798
827
|
* multi-line box.
|
|
799
828
|
*/
|
|
800
|
-
declare function controlsFromFields(fields: readonly SettingsField[]): FormControl[];
|
|
829
|
+
declare function controlsFromFields(fields: readonly SettingsField[], translation?: FormTranslationOptions): FormControl[];
|
|
801
830
|
/** What every mount function returns: the shell's `DialogHandle` plus the node and a liveness probe. */
|
|
802
831
|
interface PanelHandle {
|
|
803
832
|
el: HTMLElement;
|
|
@@ -848,6 +877,12 @@ type MenuEntry = MenuItem | {
|
|
|
848
877
|
interface ContextMenuHooks {
|
|
849
878
|
/** Order entry. Without it no trade rows are drawn: the engine places no orders itself. */
|
|
850
879
|
onOrder?(order: OrderRequest): void;
|
|
880
|
+
/** Omitted capabilities preserve the host's existing supported order routes. */
|
|
881
|
+
tradingCapabilities?: TradingCapabilitySource;
|
|
882
|
+
/** Required when the capability declaration limits live or analyzer mode. */
|
|
883
|
+
tradingMode?: TradingCapabilityRequest['mode'];
|
|
884
|
+
/** Host replay selection or workspace transitions that also prevent order entry. */
|
|
885
|
+
tradingLocked?(): boolean;
|
|
851
886
|
/** Extra rows a host appends, built per event. */
|
|
852
887
|
items?(e: ContextMenuEvent): MenuEntry[];
|
|
853
888
|
}
|
|
@@ -961,7 +996,22 @@ interface TextEditorHandle extends PanelHandle {
|
|
|
961
996
|
*/
|
|
962
997
|
declare function mountTextEditor(ctx: WidgetContext, _anchor?: HTMLElement, opts?: TextEditorOptions): TextEditorHandle;
|
|
963
998
|
|
|
964
|
-
|
|
999
|
+
interface AlertEditorOptions {
|
|
1000
|
+
/** Edit this record; omit to create a new alert. */
|
|
1001
|
+
alertId?: string;
|
|
1002
|
+
/** Seed a draft from a plot, clicked price or drawing anchor. */
|
|
1003
|
+
source?: AlertSource;
|
|
1004
|
+
onClose?(): void;
|
|
1005
|
+
}
|
|
1006
|
+
interface AlertsPanelOptions {
|
|
1007
|
+
onClose?(): void;
|
|
1008
|
+
}
|
|
1009
|
+
/** Draft edits never arm an alert until Save. Closing always discards the draft. */
|
|
1010
|
+
declare function mountAlertEditor(ctx: WidgetContext, anchor?: HTMLElement, opts?: AlertEditorOptions): PanelHandle;
|
|
1011
|
+
/** All lifecycle states remain visible until explicitly deleted. */
|
|
1012
|
+
declare function mountAlertsPanel(ctx: WidgetContext, anchor?: HTMLElement, opts?: AlertsPanelOptions): PanelHandle;
|
|
1013
|
+
|
|
1014
|
+
/** The mounts under the names the shell's registry knows them by. */
|
|
965
1015
|
declare const WIDGET_DIALOGS: {
|
|
966
1016
|
settings: typeof mountSettingsDialog;
|
|
967
1017
|
indicatorPicker: typeof mountIndicatorPicker;
|
|
@@ -970,6 +1020,8 @@ declare const WIDGET_DIALOGS: {
|
|
|
970
1020
|
contextMenu: typeof mountContextMenu;
|
|
971
1021
|
levelEditor: typeof mountLevelEditor;
|
|
972
1022
|
textEditor: typeof mountTextEditor;
|
|
1023
|
+
alertEditor: typeof mountAlertEditor;
|
|
1024
|
+
alerts: typeof mountAlertsPanel;
|
|
973
1025
|
};
|
|
974
1026
|
/**
|
|
975
1027
|
* The rules the dialogs add to the widget stylesheet. Scoped under
|
|
@@ -997,6 +1049,7 @@ interface MobileOptions {
|
|
|
997
1049
|
onSettings(anchor: HTMLElement): boolean;
|
|
998
1050
|
onIndicators(anchor: HTMLElement): boolean;
|
|
999
1051
|
onObjects(anchor: HTMLElement): boolean;
|
|
1052
|
+
onAlerts?(anchor: HTMLElement): boolean;
|
|
1000
1053
|
onProperties(anchor: HTMLElement): boolean;
|
|
1001
1054
|
settingsAvailable(): boolean;
|
|
1002
1055
|
indicatorsAvailable(): boolean;
|
|
@@ -1077,6 +1130,8 @@ interface WidgetOptions extends Omit<ChartOptions, 'theme'> {
|
|
|
1077
1130
|
storage?: StorageLike | null;
|
|
1078
1131
|
/** BCP 47 tag for the numbers on the status line. Default: the runtime's. */
|
|
1079
1132
|
locale?: string;
|
|
1133
|
+
/** Host translations for widget chrome and dialogs, with English fallback. */
|
|
1134
|
+
translate?: WidgetTranslator;
|
|
1080
1135
|
/** Show the Indicators button. Default true. */
|
|
1081
1136
|
indicators?: boolean;
|
|
1082
1137
|
/** Symbol lookup for the top bar's box, called as the user types. */
|
|
@@ -1087,6 +1142,12 @@ interface WidgetOptions extends Omit<ChartOptions, 'theme'> {
|
|
|
1087
1142
|
now?: () => number;
|
|
1088
1143
|
/** Order entry from the right-click menu. Without it the menu draws no trade rows. */
|
|
1089
1144
|
onOrder?: (order: OrderRequest) => void;
|
|
1145
|
+
/** Supported host order routes, optionally resolved again for each request. */
|
|
1146
|
+
tradingCapabilities?: TradingCapabilitySource;
|
|
1147
|
+
/** The requested execution mode when the host capabilities constrain it. */
|
|
1148
|
+
tradingMode?: TradingCapabilityRequest['mode'];
|
|
1149
|
+
/** Locks order entry during host replay selection or workspace transitions. */
|
|
1150
|
+
tradingLocked?: () => boolean;
|
|
1090
1151
|
/** Host CSP nonce for the widget and dialog stylesheet, assigned before insertion. */
|
|
1091
1152
|
styleNonce?: string;
|
|
1092
1153
|
}
|
|
@@ -1114,6 +1175,7 @@ interface Widget {
|
|
|
1114
1175
|
readonly dataController: DataLoadingController | null;
|
|
1115
1176
|
readonly chart: Chart;
|
|
1116
1177
|
readonly draw: DrawingController;
|
|
1178
|
+
readonly alerts: AlertController;
|
|
1117
1179
|
/** Shared inventory and supported actions for drawings, indicators and registered profiles. */
|
|
1118
1180
|
readonly objects: ChartObjects;
|
|
1119
1181
|
/** The `.oac-widget` element. */
|
|
@@ -1136,6 +1198,8 @@ interface Widget {
|
|
|
1136
1198
|
openIndicatorPicker(): boolean;
|
|
1137
1199
|
/** Open the searchable object inventory. False after destruction. */
|
|
1138
1200
|
openObjects(): boolean;
|
|
1201
|
+
/** Open trader alerts and their lifecycle states. False after destruction. */
|
|
1202
|
+
openAlerts(): boolean;
|
|
1139
1203
|
getState(): WidgetState;
|
|
1140
1204
|
restoreState(state: unknown): WidgetRestoreReport;
|
|
1141
1205
|
/** Load (or reload) bars from the feed for the current symbol and interval. */
|
|
@@ -1248,6 +1312,30 @@ declare const WIDGET_CSS: string;
|
|
|
1248
1312
|
*/
|
|
1249
1313
|
declare function injectWidgetStyles(doc: Document, extra?: string, nonce?: string): HTMLStyleElement;
|
|
1250
1314
|
|
|
1315
|
+
interface AlertUiOptions extends WidgetTranslationOptions {
|
|
1316
|
+
chart: Chart;
|
|
1317
|
+
draw: DrawingController;
|
|
1318
|
+
alerts: AlertController;
|
|
1319
|
+
theme?: WidgetThemeName;
|
|
1320
|
+
chartTheme?: ChartTheme;
|
|
1321
|
+
locale?: string;
|
|
1322
|
+
styleNonce?: string;
|
|
1323
|
+
/** Suspend host keyboard shortcuts while any alert dialog is open. */
|
|
1324
|
+
onOpenChange?(open: boolean): void;
|
|
1325
|
+
}
|
|
1326
|
+
interface AlertUi {
|
|
1327
|
+
readonly root: HTMLElement;
|
|
1328
|
+
openList(anchor?: HTMLElement): boolean;
|
|
1329
|
+
openEditor(options?: AlertEditorOptions): boolean;
|
|
1330
|
+
isOpen(): boolean;
|
|
1331
|
+
close(): void;
|
|
1332
|
+
setTheme(name: WidgetThemeName, theme?: ChartTheme): void;
|
|
1333
|
+
/** Releases UI only. The host still owns its chart and controllers. */
|
|
1334
|
+
destroy(): void;
|
|
1335
|
+
}
|
|
1336
|
+
/** Mount shared alert dialogs over a custom host's positioned chart container. */
|
|
1337
|
+
declare function createAlertUi(container: HTMLElement, options: AlertUiOptions): AlertUi;
|
|
1338
|
+
|
|
1251
1339
|
/**
|
|
1252
1340
|
* Widget tier (opt-in: "openalgo-charts/widget").
|
|
1253
1341
|
*
|
|
@@ -1273,4 +1361,4 @@ declare function injectWidgetStyles(doc: Document, extra?: string, nonce?: strin
|
|
|
1273
1361
|
*/
|
|
1274
1362
|
declare const WIDGET_TIER: "widget";
|
|
1275
1363
|
|
|
1276
|
-
export { type Box, type BusHandler, CHART_TYPE_LABELS, type ChartShortcutSource, type ContextMenuHooks, type ContextMenuOptions, DEFAULT_INTERVALS, DEFAULT_LOOKBACK_BARS, DIALOG_CSS, type DialogHandle, type DialogMount, type DrawingPropertiesOptions, type FormControl, type FormHandle, type FormKind, type FormOptions, type IndicatorPickerOptions, type IndicatorSettingsOptions, type IndicatorSettingsTab, type KeyAction, type KeyBinding, type KeyBindingOptions, type KeyConflict, type KeyEventLike, type KeyScope, Keymap, type KeymapGroup, type KeymapOptions, type LevelEditorOptions, MAGNET_MODES, MIN_PRICE_DIGITS, type MenuEntry, type MenuItem, type MenuOptions, type MenuRow, type MobileHandle, type MobileMode, type MobileOptions, OBJECTS_PANEL_CSS, type ObjectsPanelOptions, type OrderRequest, type OverlayOptions, type OverlayStack, type PanelHandle, RAIL_GROUPS, RAIL_PREFS_KEY, RAIL_WIDTH, type RailGroup, type RailGroupItem, type RailHandle, type RailOptions, type RailPrefs, type Rgba, SAVE_DEBOUNCE_MS, SEARCH_DEBOUNCE_MS, STATE_KEY, STATUSLINE_HEIGHT, STORAGE_PREFIX, type SettingsDialogOptions, type Size, type StatuslineHandle, type StatuslineOptions, type StorageLike, type SymbolMatch, type SymbolSearch, TIP_DWELL_MS, TOAST_LEAVE_MS, TOAST_MAX, TOAST_MS, TOKEN_PREFIX, TOPBAR_HEIGHT, type TextEditorHandle, type TextEditorOptions, type TipController, type TipSide, type TipSource, type TipSpec, type ToastHandle, type ToastKind, type ToastOptions, type Toaster, type TopbarHandle, type TopbarOptions, type TopbarState, WIDGET_CSS, WIDGET_DIALOGS, WIDGET_FONT, WIDGET_MONO, WIDGET_STATE_VERSION, WIDGET_STYLE_ID, WIDGET_TIER, type Widget, WidgetBus, type WidgetBusEvents, type WidgetChartState, type WidgetContext, type WidgetDialogName, type WidgetEventName, type WidgetOptions, type WidgetRestoreReport, type WidgetState, WidgetStorage, type WidgetThemeName, type WidgetTokens, applyTokens, attachContextMenu, boxIn, captureName, chartTypeChoices, chartTypeLabel, contextMenuEntries, controlsFromFields, controlsFromInputs, createOverlayStack, createTipController, createWidget, defaultStorage, downloadText, esc, eventKeyCombo, focusable, focusables, formatColor, formatKeyCombo, fromChartCombo, glyph, h, inTextField, injectWidgetStyles, intervalLabel, loadWindow, luminance, mix, mountContextMenu, mountDrawingProperties, mountIndicatorPicker, mountIndicatorSettings, mountLevelEditor, mountMobile, mountObjectsPanel, mountRail, mountSettingsDialog, mountStatusline, mountTextEditor, mountToasts, mountTopbar, openMenu, openShortcutsPanel, parseColor, parseKeyCombo, placeBelow, placeBeside, placeTip, priceDigits, registerWidgetDialog, registerWidgetDialogs, registeredWidgetDialogs, renderForm, resolveTheme, sanitizeRailPrefs, stripView, themeMode, token, toolGlyph, toolName, unregisterWidgetDialog, widgetDialog, widgetTokens, withAlpha };
|
|
1364
|
+
export { type AlertEditorOptions, type AlertUi, type AlertUiOptions, type AlertsPanelOptions, type Box, type BusHandler, CHART_TYPE_LABELS, type ChartShortcutSource, type ContextMenuHooks, type ContextMenuOptions, DEFAULT_INTERVALS, DEFAULT_LOOKBACK_BARS, DIALOG_CSS, type DialogHandle, type DialogMount, type DrawingPropertiesOptions, type FormControl, type FormHandle, type FormKind, type FormOptions, type FormTranslationOptions, type IndicatorPickerOptions, type IndicatorSettingsOptions, type IndicatorSettingsTab, type KeyAction, type KeyBinding, type KeyBindingOptions, type KeyConflict, type KeyEventLike, type KeyScope, Keymap, type KeymapGroup, type KeymapOptions, type LevelEditorOptions, MAGNET_MODES, MIN_PRICE_DIGITS, type MenuEntry, type MenuItem, type MenuOptions, type MenuRow, type MobileHandle, type MobileMode, type MobileOptions, OBJECTS_PANEL_CSS, type ObjectsPanelOptions, type OrderRequest, type OverlayOptions, type OverlayStack, type PanelHandle, RAIL_GROUPS, RAIL_PREFS_KEY, RAIL_WIDTH, type RailGroup, type RailGroupItem, type RailHandle, type RailOptions, type RailPrefs, type Rgba, SAVE_DEBOUNCE_MS, SEARCH_DEBOUNCE_MS, STATE_KEY, STATUSLINE_HEIGHT, STORAGE_PREFIX, type SettingsDialogOptions, type Size, type StatuslineHandle, type StatuslineOptions, type StorageLike, type SymbolMatch, type SymbolSearch, TIP_DWELL_MS, TOAST_LEAVE_MS, TOAST_MAX, TOAST_MS, TOKEN_PREFIX, TOPBAR_HEIGHT, type TextEditorHandle, type TextEditorOptions, type TipController, type TipSide, type TipSource, type TipSpec, type ToastHandle, type ToastKind, type ToastOptions, type Toaster, type TopbarHandle, type TopbarOptions, type TopbarState, WIDGET_CSS, WIDGET_DIALOGS, WIDGET_FONT, WIDGET_MONO, WIDGET_STATE_VERSION, WIDGET_STYLE_ID, WIDGET_TIER, type Widget, type WidgetBuiltinMessage, WidgetBus, type WidgetBusEvents, type WidgetChartState, type WidgetContext, type WidgetDialogName, type WidgetEventName, type WidgetMessageKey, type WidgetMessageParameters, type WidgetMessageValues, type WidgetOptions, type WidgetRestoreReport, type WidgetState, WidgetStorage, type WidgetThemeName, type WidgetTokens, type WidgetTranslationOptions, type WidgetTranslator, applyTokens, attachContextMenu, boxIn, captureName, chartTypeChoices, chartTypeLabel, contextMenuEntries, controlsFromFields, controlsFromInputs, createAlertUi, createOverlayStack, createTipController, createWidget, defaultStorage, downloadText, esc, eventKeyCombo, focusable, focusables, formatColor, formatKeyCombo, fromChartCombo, glyph, h, inTextField, injectWidgetStyles, intervalLabel, loadWindow, luminance, mix, mountAlertEditor, mountAlertsPanel, mountContextMenu, mountDrawingProperties, mountIndicatorPicker, mountIndicatorSettings, mountLevelEditor, mountMobile, mountObjectsPanel, mountRail, mountSettingsDialog, mountStatusline, mountTextEditor, mountToasts, mountTopbar, openMenu, openShortcutsPanel, parseColor, parseKeyCombo, placeBelow, placeBeside, placeTip, priceDigits, registerWidgetDialog, registerWidgetDialogs, registeredWidgetDialogs, renderForm, resolveTheme, sanitizeRailPrefs, stripView, themeMode, token, toolGlyph, toolName, unregisterWidgetDialog, widgetDialog, widgetText, widgetTokens, withAlpha };
|