Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@markprompt/web

Package Overview
Dependencies
Maintainers
1
Versions
220
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@markprompt/web - npm Package Compare versions

Comparing version 0.2.2-beta27 to 0.2.2-beta28

7

dist/index.d.ts

@@ -13,2 +13,9 @@ import 'client-only';

dark?: boolean;
accentColor?: string;
idToRefMap?: {
[key: string]: {
label: string;
href: string;
};
};
};

@@ -15,0 +22,0 @@ }

24

dist/markprompt-content.d.ts

@@ -12,26 +12,32 @@ import { LitElement } from 'lit';

model: OpenAIModelId;
iDontKnowMessage: "Sorry, I am not sure how to answer that.";
completionsUrl: "https://api.markprompt.com/v1/completions";
iDontKnowMessage: any;
completionsUrl: any;
projectKey: string;
dark: boolean;
accentColor: string;
responseStyle: string;
referenceItemStyle: string;
placeholder: string;
prompt: string;
idToRefMap: {};
loading: boolean;
answer: string;
references: any[];
static styles: import("lit").CSSResult;
static styles: any;
onInput(event: Event): void;
scrollToBottom(): void;
getRefFromId(id: string): any;
onSubmit(event: Event): Promise<void>;
renderMarkdown(markdown: string): Promise<import("lit-html/directive").DirectiveResult<typeof import("lit-html/directives/unsafe-html").UnsafeHTMLDirective>>;
render(): import("lit-html").TemplateResult<1>;
renderMarkdown(markdown: string): Promise<any>;
render(): any;
}
export declare class Caret extends LitElement {
static styles: import("lit").CSSResult;
render(): import("lit-html").TemplateResult<1>;
static styles: any;
render(): any;
}
export declare class ProseBlock extends LitElement {
class: string;
static styles: import("lit").CSSResult;
render(): import("lit-html").TemplateResult<1>;
static styles: any;
render(): any;
}
//# sourceMappingURL=markprompt-content.d.ts.map

@@ -1,2 +0,2 @@

var u=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var o=(l,p,t,e)=>{for(var i=e>1?void 0:e?y(p,t):p,d=l.length-1,c;d>=0;d--)(c=l[d])&&(i=(e?c(p,t,i):c(i))||i);return e&&i&&u(p,t,i),i};import{LitElement as w,html as n,css as g,nothing as m}from"lit";import{customElement as f,property as s}from"lit/decorators.js";import{classMap as b}from"lit/directives/class-map.js";import{I_DONT_KNOW_MESSAGE as v,MARKPROMPT_COMPLETIONS_URL as x,DEFAULT_MODEL as z,submitPrompt as k}from"@markprompt/core";import{unified as S}from"unified";import $ from"remark-parse";import I from"remark-rehype";import T from"rehype-sanitize";import q from"rehype-stringify";import E from"remark-gfm";import{until as A}from"lit/directives/until.js";import{unsafeHTML as R}from"lit/directives/unsafe-html.js";let r=class extends w{constructor(){super(...arguments);this.model=z;this.iDontKnowMessage=v;this.completionsUrl=x;this.projectKey="";this.dark=!1;this.accentColor="";this.responseStyle="";this.referenceItemStyle="";this.placeholder="Ask me anything\u2026";this.prompt="";this.idToRefMap={};this.loading=!1;this.answer="";this.references=[]}onInput(t){const e=t.target;this.prompt=e.value}scrollToBottom(){const t=this.renderRoot.querySelector("#response");t.scrollTop=t.scrollHeight}getRefFromId(t){}async onSubmit(t){t.preventDefault(),this.prompt!==""&&(this.answer="",this.references=[],this.loading=!0,await k(this.prompt,this.projectKey,e=>{this.scrollToBottom(),this.answer+=e},e=>{this.scrollToBottom(),this.references=e},{model:this.model,iDontKnowMessage:this.iDontKnowMessage,completionsUrl:this.completionsUrl}),this.loading=!1)}async renderMarkdown(t){const e=await S().use($).use(E).use(I,{allowDangerousHtml:!0}).use(T).use(q).process(t);return typeof e.value!="string"?"":R(e.value)}render(){return n`
var u=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var o=(l,p,t,e)=>{for(var i=e>1?void 0:e?y(p,t):p,d=l.length-1,c;d>=0;d--)(c=l[d])&&(i=(e?c(p,t,i):c(i))||i);return e&&i&&u(p,t,i),i};import{LitElement as w,html as n,css as g,nothing as m}from"lit";import{customElement as f,property as s}from"lit/decorators.js";import{classMap as b}from"lit/directives/class-map.js";import{I_DONT_KNOW_MESSAGE as v,MARKPROMPT_COMPLETIONS_URL as x,DEFAULT_MODEL as z,submitPrompt as k}from"@markprompt/core";import{unified as S}from"unified";import $ from"remark-parse";import I from"remark-rehype";import T from"rehype-sanitize";import q from"rehype-stringify";import E from"remark-gfm";import{until as A}from"lit/directives/until.js";import{unsafeHTML as C}from"lit/directives/unsafe-html.js";let r=class extends w{constructor(){super(...arguments);this.model=z;this.iDontKnowMessage=v;this.completionsUrl=x;this.projectKey="";this.dark=!1;this.accentColor="";this.responseStyle="";this.referenceItemStyle="";this.placeholder="Ask me anything\u2026";this.prompt="";this.idToRefMap={};this.loading=!1;this.answer="";this.references=[]}onInput(t){const e=t.target;this.prompt=e.value}scrollToBottom(){const t=this.renderRoot.querySelector("#response");t.scrollTop=t.scrollHeight}getRefFromId(t){}async onSubmit(t){t.preventDefault(),this.prompt!==""&&(this.answer="",this.references=[],this.loading=!0,await k(this.prompt,this.projectKey,e=>{this.scrollToBottom(),this.answer+=e},e=>{this.scrollToBottom(),this.references=e},{model:this.model,iDontKnowMessage:this.iDontKnowMessage,completionsUrl:this.completionsUrl}),this.loading=!1)}async renderMarkdown(t){const e=await S().use($).use(E).use(I,{allowDangerousHtml:!0}).use(T).use(q).process(t);return typeof e.value!="string"?"":C(e.value)}render(){return n`
<div class="root">

@@ -229,4 +229,3 @@ <div class="prompt">

box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px 0px,
rgba(0, 0, 0, 0) 0px 0px 0px 0px,
rgba(217, 70, 219, 0.9) 0px 0px 3px 0px;
rgba(0, 0, 0, 0) 0px 0px 0px 0px, currentColor 0px 0px 3px 0px;
border-radius: 1px;

@@ -233,0 +232,0 @@ }

{
"name": "@markprompt/web",
"version": "0.2.2-beta27",
"version": "0.2.2-beta28",
"description": "A web component for adding GPT-4 powered search using the Markprompt API.",

@@ -5,0 +5,0 @@ "author": "Motif",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc