npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@adobe/cc-ext-uxp-types

v7.3.1

Published

Typescript definitions for the Adobe UXP JS API

Downloads

906

Readme

cc-ext-uxp-types

Type Definitions for Adobe UXP (Unified Extensibility Platform).

UXP (Unified Extensibility Platform) is powered by a modern JavaScript engine, offers a curated selection of UI components and a more streamlined workflow for plugin developers to build plugins for the UXP-powered Host Applications(e.g Adobe Photoshop, Adobe InDesign and Adobe XD). UXP provides a set of common JavaScript APIs that are available in these Host Applications and the types are available for these common set of UXP JavaScript APIs in this repo.These types have been auto generated using an internal script within UXP codebase.

Note: Type definitions for the Host Application provided JavaScript APIs are present in separate repo and will need to be installed separately.

Installation

Instructions for how to download/install the UXP Type Definitions onto your machine.

Example:

npm install @adobe/cc-ext-uxp-types

Config

For using the UXP Type Definitions within your code editor, you need to create a tsconfig.json in your typescript project and add reference to the type declaration in compilerOptions. To make sure that UXP types do not conflict with the available web standard DOM types, update the required lib options to exclude these standard types.(Refer: https://www.typescriptlang.org/tsconfig#lib) Note: Please use jsconfig.json for JavaScript projects

ts/jsconfig.json:

{
  "compilerOptions": {
     ..., // your existing configuration 
    // typeRoots override defaults, so be sure to include the implicit @types as well
    "typeRoots": [
      "node_modules/@types",
      "node_modules/@adobe/cc-ext-uxp-types"
    ],
    // Note that "DOM" is not included in lib options to exclude web DOM types
    "lib": ["ES2015"] // required ES version
  }
}

Once you have setup the configuration, you will be able to leverage the type definitions for type suggestions, API usage and information, auto imports etc

Known Issues

  • UXP code is primarily written in JavaScript, and not all parameters in the type definitions are explicitly specified with the accurate types. Consequently, you may encounter "any" types for some parameters.
  • Type definitions for some of the UXP supported globals such as "window", "navigator" are not currently available.
    Please refer to the UXP documentation for the available types.
  • Inherited properties show the names of derived class and not base class (known issue on the internal library being used ) for eg
 const document = new Document();
 document.isConnected();

Type information will show isConnected as a property of Document (inherited) and not of the base class which is Node here.

  • Typedef API suggestions would not appear when the element is created with the document.createElement API for eg:
const img = document.createElement("img");

img would not show expected type suggestions as per the current limitation. However an element created through constructor as below would show the correct type as expected:

const imgElement = new HTMLImageElement();

Please note that we will be gradually improving the type definitions and adding accurate types for UXP APIs along with some of the issues mentioned above. If you encounter any issues or have suggestions for improvements, please feel free to report them as a github issue here.

Licensing

See LICENSE for more information.