0.8.0 • Published 10 months ago

@puzzlelabs/puzzle-glossary-react v0.8.0

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

Puzzle Glossary

Puzzle Labs is an AI content workflow engine. It lies at the intersection of people, processes, and technology used to improve teams’ content workflows. Teams get a 10x accelerating boost to their content operations processes by using Puzzle.

Recommended Install

npm install @puzzlelabs/puzzle-glossary @puzzlelabs/puzzle-glossary-react

Highlight Widget Example

import {StrictMode} from "react";
import {createRoot} from "react-dom/client";
import {HighlightZone} from "@puzzlelabs/puzzle-glossary-react";
import {highlightWidgetManager} from "@puzzlelabs/puzzle-glossary";
import {defineCustomElements} from '@puzzlelabs/puzzle-glossary/dist/loader';

defineCustomElements();

const App = () => (
  <HighlightZone as='p'>
    Search openai We are on the verge of a creative renaissance.
  </HighlightZone>
);

const root = createRoot(document.getElementById("root"));

root.render(
  <StrictMode>
    <App/>
  </StrictMode>
);

// For react you not needed specify selectors
highlightWidgetManager.config = {
  hasMarkAll: true,
  puzzleBranding: true,
  hasMarkHyperlink: true,
  callToAction: {
    text: 'CTA',
    link: 'https://puzzlelabs.ai',
  },
};

highlightWidgetManager.theme = {
  mode: 'light',
  // fontFamily: 'Inter',
  // marker: {
  //   color: 'black',
  //   type: 'highlight',
  // },
  // resource: {
  //   color: 'black',
  // },
  // callToAction: {
  //     color: 'black',
  //     backgroundColor: 'black',
  // },
  // modal: {
  //     primaryColor: 'black',
  //     secondaryColor: 'black',
  //     backgroundColor: 'black',
  // }
};

highlightWidgetManager.handlers = {
  onCopyClick: console.log,
  onMarkerHover: console.log,
  onMarkerClick: console.log,
  onResourceClick: console.log,
  onCtaClick: console.log,
  onEvent: console.log,
}

// For react you need call only init without mark
highlightWidgetManager.init('6437d691b3c98451b429460f');

Page Widget Example

import './index.css';
import {StrictMode} from "react";
import {createRoot} from "react-dom/client";
import {PageWidget} from "@puzzlelabs/puzzle-glossary-react";
import {defineCustomElements} from '@puzzlelabs/puzzle-glossary/dist/loader';

defineCustomElements();

// For remix use this method of component initialization
// import {defineCustomElementsFromUnPkg} from "@puzzlelabs/puzzle-glossary";
// defineCustomElementsFromUnPkg();

const PageWidgetExample = () => (
  <PageWidget apiKey='6437d691b3c98451b429460f'/>
)

const root = createRoot(document.getElementById("root"));

root.render(
  <StrictMode>
    <PageWidgetExample/>
  </StrictMode>
);
0.7.2

10 months ago

0.7.1

10 months ago

0.7.0

11 months ago

0.6.3-rc.35

11 months ago

0.6.3-rc.36

11 months ago

0.6.3-rc.37

11 months ago

0.8.0

10 months ago

0.6.3-rc.30

11 months ago

0.6.3-rc.31

11 months ago

0.6.3-rc.34

11 months ago

0.6.3-rc.32

11 months ago

0.6.3-rc.33

11 months ago

0.6.3-rc.27

11 months ago

0.6.3-rc.28

11 months ago

0.6.3-rc.26

11 months ago

0.6.3-rc.29

11 months ago

0.6.3-rc.12

11 months ago

0.6.3-rc.13

11 months ago

0.6.3-rc.10

11 months ago

0.6.3-rc.11

11 months ago

0.6.3-rc.7

12 months ago

0.6.3-rc.8

12 months ago

0.6.3-rc.5

12 months ago

0.6.3-rc.6

12 months ago

0.6.3-rc.9

12 months ago

0.6.3-rc.16

11 months ago

0.6.3-rc.17

11 months ago

0.6.3-rc.0

1 year ago

0.6.3-rc.14

11 months ago

0.6.3-rc.15

11 months ago

0.6.3-rc.3

1 year ago

0.6.3-rc.4

12 months ago

0.6.3-rc.18

11 months ago

0.6.3-rc.1

1 year ago

0.6.3-rc.19

11 months ago

0.6.3-rc.2

1 year ago

0.5.8

1 year ago

0.5.7

1 year ago

0.5.9

1 year ago

0.6.3-rc.20

11 months ago

0.6.3-rc.23

11 months ago

0.6.3-rc.24

11 months ago

0.6.3-rc.21

11 months ago

0.6.3-rc.22

11 months ago

0.4.4

1 year ago

0.6.3-rc.25

11 months ago

0.6.4

12 months ago

0.6.1

1 year ago

0.6.0

1 year ago

0.1.10

1 year ago

0.3.0

1 year ago

0.2.0

1 year ago

0.1.9

1 year ago

0.4.1

1 year ago

0.4.3

1 year ago

0.4.2

1 year ago

0.1.2

1 year ago

0.1.8

1 year ago

0.1.7

1 year ago

0.1.4

1 year ago

0.1.3

1 year ago

0.1.6

1 year ago

0.1.5

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago

0.0.12

1 year ago

0.0.11

1 year ago

0.0.10

1 year ago

0.0.9

1 year ago

0.0.8

1 year ago

0.0.4

1 year ago