New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@blac/react

Package Overview
Dependencies
Maintainers
1
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@blac/react - npm Package Compare versions

Comparing version 0.0.15 to 0.0.16

17

dist/blac-react.esm.js
import { Blac } from 'blac';
import React, { createContext, useMemo, useContext, useSyncExternalStore } from 'react';
// import { BlocConstructor } from "blac";
// export interface ProviderItem {
// id: string;
// parent?: string;
// bloc: BlocBase<any>;
// }
// interface ProviderOptions<B> {
// bloc: BlocConstructor<B>;
// debug?: boolean;
// }
class BlacReact {

@@ -29,5 +19,6 @@ static pluginKey = "blacReact";

static getInstance(throwError = true) {
const blac = globalThis.blac;
// const blac = (globalThis as any).blac;
const blac = BlacContext._currentValue;
if (!blac) {
throw new Error("BlacReact: blac instance not found");
throw new Error("BlacReact: blac instance not found, the <BlacApp> provider component might be missing");
}

@@ -41,3 +32,3 @@ const blacReact = blac.getPluginKey(BlacReact.pluginKey);

setup() {
globalThis.blac = this.blac;
// (globalThis as any).blac = this.blac;
this.blac.addPluginKey(BlacReact.pluginKey, this);

@@ -44,0 +35,0 @@ }

@@ -6,12 +6,2 @@ 'use strict';

// import { BlocConstructor } from "blac";
// export interface ProviderItem {
// id: string;
// parent?: string;
// bloc: BlocBase<any>;
// }
// interface ProviderOptions<B> {
// bloc: BlocConstructor<B>;
// debug?: boolean;
// }
class BlacReact {

@@ -32,5 +22,6 @@ static pluginKey = "blacReact";

static getInstance(throwError = true) {
const blac = globalThis.blac;
// const blac = (globalThis as any).blac;
const blac = BlacContext._currentValue;
if (!blac) {
throw new Error("BlacReact: blac instance not found");
throw new Error("BlacReact: blac instance not found, the <BlacApp> provider component might be missing");
}

@@ -44,3 +35,3 @@ const blacReact = blac.getPluginKey(BlacReact.pluginKey);

setup() {
globalThis.blac = this.blac;
// (globalThis as any).blac = this.blac;
this.blac.addPluginKey(BlacReact.pluginKey, this);

@@ -47,0 +38,0 @@ }

{
"name": "@blac/react",
"version": "0.0.15",
"version": "0.0.16",
"license": "MIT",

@@ -36,2 +36,3 @@ "main": "dist/blac-react.js",

"@vitejs/plugin-react": "^4.0.3",
"highlight.js": "^11.8.0",
"react": "^18.2.0",

@@ -38,0 +39,0 @@ "react-dom": "^18.2.0",

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