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

@rallie/vue

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rallie/vue - npm Package Compare versions

Comparing version 0.5.0-alpha.0 to 0.5.0

global.d.ts

7

dist/hooks.d.ts

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

import { UnwrapRef } from 'vue';
import { App, Connector, State, ReadOnlyState } from 'rallie';
export declare function getStateHook<T extends object>(state: State<T> | ReadOnlyState<T>): <P>(getter: (_state: T) => P) => import("vue").Ref<import("vue").UnwrapRef<P>>;
export declare function getBroadcastHooks<BroadcastEvents>(app: App): (events: Partial<BroadcastEvents>) => void;
export declare function getUnicastHooks<UnicastEvents>(app: App | Connector): (events: Partial<UnicastEvents>) => void;
export declare function getStateHook<T extends object>(state: State<T> | ReadOnlyState<T>): <P>(getter: (_state: T) => P) => import("vue").Ref<UnwrapRef<P>>;
export declare function getBroadcastHook<BroadcastEvents>(app: App): (events: Partial<BroadcastEvents>) => void;
export declare function getUnicastHook<UnicastEvents>(app: App | Connector): (events: Partial<UnicastEvents>) => void;
import { ref, onBeforeUnmount, onBeforeMount } from 'vue';
// import { effect } from '@rallie/core'
function getStateHook(state) {

@@ -15,3 +16,3 @@ return function (getter) {

}
function getBroadcastHooks(app) {
function getBroadcastHook(app) {
return function (events) {

@@ -27,3 +28,3 @@ var offBroadcast = null;

}
function getUnicastHooks(app) {
function getUnicastHook(app) {
return function (events) {

@@ -39,3 +40,13 @@ var offUnicast = null;

}
// export function useRallieState<P> (getter: () => P) {
// const stateRef = ref(getter())
// const runner = effect(() => {
// stateRef.value = getter() as UnwrapRef<P>
// })
// onBeforeUnmount(() => {
// runner.effect.stop()
// })
// return stateRef
// }
export { getBroadcastHooks, getStateHook, getUnicastHooks };
export { getBroadcastHook, getStateHook, getUnicastHook };

@@ -7,2 +7,3 @@ (function (global, factory) {

// import { effect } from '@rallie/core'
function getStateHook(state) {

@@ -20,3 +21,3 @@ return function (getter) {

}
function getBroadcastHooks(app) {
function getBroadcastHook(app) {
return function (events) {

@@ -32,3 +33,3 @@ var offBroadcast = null;

}
function getUnicastHooks(app) {
function getUnicastHook(app) {
return function (events) {

@@ -44,6 +45,16 @@ var offUnicast = null;

}
// export function useRallieState<P> (getter: () => P) {
// const stateRef = ref(getter())
// const runner = effect(() => {
// stateRef.value = getter() as UnwrapRef<P>
// })
// onBeforeUnmount(() => {
// runner.effect.stop()
// })
// return stateRef
// }
exports.getBroadcastHooks = getBroadcastHooks;
exports.getBroadcastHook = getBroadcastHook;
exports.getStateHook = getStateHook;
exports.getUnicastHooks = getUnicastHooks;
exports.getUnicastHook = getUnicastHook;

@@ -50,0 +61,0 @@ Object.defineProperty(exports, '__esModule', { value: true });

{
"name": "@rallie/vue",
"version": "0.5.0-alpha.0",
"version": "0.5.0",
"description": "vue binding for rallie",

@@ -22,9 +22,8 @@ "author": "runnan <1608272694@qq.com>",

"dependencies": {
"rallie": "^0.5.0-alpha.0"
"rallie": "^0.5.0"
},
"peerDependencies": {
"react": "^17.0.2",
"react-dom": "^17.0.2"
"vue": ">=3.2.6"
},
"gitHead": "66a13f57c77ddf86a279447e2d13f9a2b897f984"
"gitHead": "221e72d8d8e680fbd8bc2073f306f8dd34c320ac"
}

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

import { onBeforeUnmount, onBeforeMount, ref } from 'vue'
import { onBeforeUnmount, onBeforeMount, ref, UnwrapRef } from 'vue'
import { App, Connector, State, ReadOnlyState } from 'rallie'
// import { effect } from '@rallie/core'

@@ -8,3 +9,3 @@ export function getStateHook<T extends object> (state: State<T> | ReadOnlyState<T>) {

const unwatch = state.watch(getter).do((value) => {
stateRef.value = value
stateRef.value = value as UnwrapRef<P>
})

@@ -41,1 +42,12 @@ onBeforeUnmount(() => {

}
// export function useRallieState<P> (getter: () => P) {
// const stateRef = ref(getter())
// const runner = effect(() => {
// stateRef.value = getter() as UnwrapRef<P>
// })
// onBeforeUnmount(() => {
// runner.effect.stop()
// })
// return stateRef
// }
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"jsx": "preserve",
"outDir": "./dist", /* Redirect output structure to the directory. */
"rootDir": "./src", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
"composite": true, /* Enable project compilation */
"composite": true /* Enable project compilation */
},
"exclude": [
"test",
"dist"
"dist",
"test"
],
"include": [
"./global.d.ts",
"./src"
]
}

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