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

@zag-js/clipboard

Package Overview
Dependencies
Maintainers
1
Versions
343
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@zag-js/clipboard - npm Package Compare versions

Comparing version

to
0.0.0-dev-20240619194623

5

dist/index.d.ts
import * as _zag_js_anatomy from '@zag-js/anatomy';
import { RequiredBy, PropTypes, CommonProperties, NormalizeProps } from '@zag-js/types';
import * as _zag_js_core from '@zag-js/core';
import { StateMachine } from '@zag-js/core';
import { Machine, StateMachine } from '@zag-js/core';

@@ -46,2 +46,3 @@ declare const anatomy: _zag_js_anatomy.AnatomyInstance<"root" | "control" | "trigger" | "indicator" | "input" | "label">;

type Send = StateMachine.Send<StateMachine.AnyEventObject>;
type Service = Machine<MachineContext, MachineState, StateMachine.AnyEventObject>;
interface IndicatorProps {

@@ -84,2 +85,2 @@ copied: boolean;

export { type MachineApi as Api, type UserDefinedContext as Context, type CopyStatusDetails, type ElementIds, type IndicatorProps, anatomy, connect, contextProps, indicatorProps, machine, props, splitIndicatorProps };
export { type MachineApi as Api, type UserDefinedContext as Context, type CopyStatusDetails, type ElementIds, type IndicatorProps, type Service, anatomy, connect, contextProps, indicatorProps, machine, props, splitIndicatorProps };

6

dist/index.js

@@ -44,5 +44,5 @@ "use strict";

var dom = (0, import_dom_query.createScope)({
getRootId: (ctx) => ctx.ids?.root ?? `clip-${ctx.id}`,
getInputId: (ctx) => ctx.ids?.input ?? `clip-input-${ctx.id}`,
getLabelId: (ctx) => ctx.ids?.label ?? `clip-label-${ctx.id}`,
getRootId: (ctx) => ctx.ids?.root ?? `clip:${ctx.id}`,
getInputId: (ctx) => ctx.ids?.input ?? `clip:${ctx.id}:input`,
getLabelId: (ctx) => ctx.ids?.label ?? `clip:${ctx.id}:label`,
getInputEl: (ctx) => dom.getById(ctx, dom.getInputId(ctx)),

@@ -49,0 +49,0 @@ writeToClipboard: (ctx) => copyText(dom.getDoc(ctx), ctx.value)

{
"name": "@zag-js/clipboard",
"version": "0.0.0-dev-20240619115122",
"version": "0.0.0-dev-20240619194623",
"description": "Core logic for the clipboard widget implemented as a state machine",

@@ -31,7 +31,7 @@ "keywords": [

"dependencies": {
"@zag-js/anatomy": "0.0.0-dev-20240619115122",
"@zag-js/core": "0.0.0-dev-20240619115122",
"@zag-js/dom-query": "0.0.0-dev-20240619115122",
"@zag-js/utils": "0.0.0-dev-20240619115122",
"@zag-js/types": "0.0.0-dev-20240619115122"
"@zag-js/anatomy": "0.0.0-dev-20240619194623",
"@zag-js/core": "0.0.0-dev-20240619194623",
"@zag-js/dom-query": "0.0.0-dev-20240619194623",
"@zag-js/utils": "0.0.0-dev-20240619194623",
"@zag-js/types": "0.0.0-dev-20240619194623"
},

@@ -38,0 +38,0 @@ "devDependencies": {

@@ -5,5 +5,5 @@ import { createScope, getWindow } from "@zag-js/dom-query"

export const dom = createScope({
getRootId: (ctx: Ctx) => ctx.ids?.root ?? `clip-${ctx.id}`,
getInputId: (ctx: Ctx) => ctx.ids?.input ?? `clip-input-${ctx.id}`,
getLabelId: (ctx: Ctx) => ctx.ids?.label ?? `clip-label-${ctx.id}`,
getRootId: (ctx: Ctx) => ctx.ids?.root ?? `clip:${ctx.id}`,
getInputId: (ctx: Ctx) => ctx.ids?.input ?? `clip:${ctx.id}:input`,
getLabelId: (ctx: Ctx) => ctx.ids?.label ?? `clip:${ctx.id}:label`,
getInputEl: (ctx: Ctx) => dom.getById<HTMLInputElement>(ctx, dom.getInputId(ctx)),

@@ -10,0 +10,0 @@ writeToClipboard: (ctx: Ctx) => copyText(dom.getDoc(ctx), ctx.value),

@@ -1,2 +0,2 @@

import type { StateMachine as S } from "@zag-js/core"
import type { Machine, StateMachine as S } from "@zag-js/core"
import type { CommonProperties, PropTypes, RequiredBy } from "@zag-js/types"

@@ -50,2 +50,4 @@

export type Service = Machine<MachineContext, MachineState, S.AnyEventObject>
/* -----------------------------------------------------------------------------

@@ -52,0 +54,0 @@ * Component API

@@ -11,2 +11,3 @@ export { anatomy } from "./clipboard.anatomy"

IndicatorProps,
Service,
} from "./clipboard.types"

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet