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
223
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.5.0 to 0.6.0

2

dist/index.d.ts
import { type MarkpromptOptions } from './types.js';
/**
* Render a markprompt dialog button.
* Render a markprompt dialog.
*

@@ -5,0 +5,0 @@ * @param projectKey Your Markprompt project key

@@ -1,4 +0,4 @@

import { type SubmitPromptOptions } from '@markprompt/core';
import { type SubmitPromptOptions, type SubmitSearchQueryOptions } from '@markprompt/core';
import type { FlattenedSearchResult } from '@markprompt/react';
type MarkpromptOptions = SubmitPromptOptions & {
type MarkpromptOptions = {
close?: {

@@ -22,13 +22,4 @@ /**

};
search?: {
prompt?: SubmitPromptOptions & {
/**
* Enable search
* @default false
**/
enable?: boolean;
/** Callback to transform a search result into an href */
getResultHref?: (result: FlattenedSearchResult) => string;
};
prompt?: {
/**
* Label for the prompt input

@@ -60,2 +51,14 @@ * @default "Ask me anything…"

};
/**
* Enable and configure search functionality
*/
search?: SubmitSearchQueryOptions & {
/**
* Enable search
* @default false
**/
enable?: boolean;
/** Callback to transform a search result into an href */
getResultHref?: (result: FlattenedSearchResult) => string;
};
trigger?: {

@@ -67,2 +70,8 @@ /**

label?: string;
/**
* Should the trigger button be displayed as a floating button at the bottom right of the page?
* Setting this to false will display a trigger button in the element passed
* to the `markprompt` function.
*/
floating?: boolean;
};

@@ -69,0 +78,0 @@ title?: {

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

@@ -39,3 +39,3 @@ "repository": {

"devDependencies": {
"@markprompt/react": "0.5.0",
"@markprompt/react": "0.6.0",
"@radix-ui/react-accessible-icon": "^1.0.3",

@@ -42,0 +42,0 @@ "@types/react": "^18.2.6",

@@ -13,21 +13,4 @@ # `@markprompt/web`

</a>
<a aria-label="Coverage" href="https://app.codecov.io/gh/motifland/markprompt-js/tree/main/packages%2Fweb">
<img alt="" src="https://codecov.io/gh/motifland/markprompt-js/branch/main/graph/badge.svg" />
</a>
</p>
## Table of Contents
- [Installation](#installation)
- [Usage](#usage)
- [Usage via `<script>` tag](#usage-via-script-tag)
- [API](#api)
- [`markprompt(projectKey, container, options?)`](#markpromptprojectkey-container-options)
- [Arguments](#arguments)
- [Options](#options)
- [Documentation](#documentation)
- [Community](#community)
- [Authors](#authors)
- [License](#license)
## Installation

@@ -47,3 +30,3 @@

<!-- load from a CDN: -->
<link rel="stylesheet" href="https://esm.sh/@markprompt/css@0.1.1?css" />
<link rel="stylesheet" href="https://esm.sh/@markprompt/css@0.2.0?css" />
```

@@ -62,3 +45,3 @@

markprompt('<project-key>', markpromptEl, {
markprompt('YOUR-PROJECT-KEY', markpromptEl, {
references: {

@@ -73,3 +56,3 @@ transformReferenceId: (referenceId) => ({

where `project-key` can be obtained in your project settings on [Markprompt.com](https://markprompt.com/).
where `YOUR-PROJECT-KEY` can be obtained in your project settings on [Markprompt.com](https://markprompt.com/).

@@ -140,7 +123,7 @@ Options are optional and allow you to configure the texts used in the component to some extent. You will most likely want to pass `transformReferenceId` to transform your reference ids into links to your corresponding documentation.

rel="stylesheet"
href="https://unpkg.com/@markprompt/css@0.1.1/markprompt.css"
href="https://unpkg.com/@markprompt/css@0.2.0/markprompt.css"
/>
<script>
window.markprompt = {
projectKey: `<your-project-key>`,
projectKey: `YOUR-PROJECT-KEY`,
container: `#markprompt`,

@@ -159,3 +142,3 @@ options: {

async
src="https://unpkg.com/@markprompt/web@0.4.1/dist/init.js"
src="https://unpkg.com/@markprompt/web@0.5.0/dist/init.js"
></script>

@@ -205,7 +188,7 @@ ```

The full documentation for `@markprompt/web` can be found on the [Markprompt docs](https://markprompt.com/docs#%40markprompt%2Fweb).
The full documentation for `@markprompt/web` can be found on the [Markprompt docs](https://markprompt.com/docs#javascript).
## Community
- [Twitter @markprompt](https://twitter.com/markprompt)
- [Twitter](https://twitter.com/markprompt)
- [Discord](https://discord.gg/MBMh4apz6X)

@@ -212,0 +195,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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