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

luucy-embed

Package Overview
Dependencies
Maintainers
0
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

luucy-embed

Embed Luucy into your webpage and connect to your plugin

  • 1.0.5
  • latest
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

Luucy Embed

Embed luucy into your webpage! Connect to your own plugin and exchange messages between your plugin and your webpage.

React Component

A react component rendering and managing the LUUCY embed can be found in ../lib/react/luucy-embed.tsx.

Example usage in Code:

import { useCallback } from 'react';
import { LuucyEmbed, type LuucyEmbedData } from 'luucy-embed/lib/react';

export const SampleEmbed = () => {
  const logMessage = useCallback((message: object) => {
    console.log(JSON.stringify(message));
  }, []);
  const logError = useCallback((message: string) => console.error, []);

  return(
    <LuucyEmbed
      data = {
        source: 'https://app.luucy.ch',
        workspaceUrl: 'LUUCY_Testing_LUUCY_Embed_Sample',
        projectId: 10273,
        variantId: 33419,
        pluginName: 'sample-embed-plugin'
      }
      onMessage={logMessage}
      onError={logError}
    />
  )

Example Applications

Sample React App

A sample react app is available in sample-next-app/.

A deployed version to test with is available at luucy.gitlab.io/sdk/luucy-embed/.

Sample LUUCY Plugin

A sample LUUCY Plugin is available in sample-luucy-plugin/.

A deployed version is available in the following Workspace:

  • baseUrl: https://app.luucy.ch
  • workspaceUrl: LUUCY_Testing_LUUCY_Embed_Sample
  • projectId: 10273
  • variantId: 33419
  • pluginName: sample-embed-plugin

You can directly open to test both the sample react app and sample plugin together.

Vanilla Javascript

A full HTML + JS example is available in sample-html-app/.

FAQs

Package last updated on 25 Jul 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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