Socket
Book a DemoInstallSign in
Socket

starstuff

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

starstuff

A UI library for JXA

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

Starstuff

A UI library for JXA

NOTE: This is a new project and under heavy development, just figuring things out right now.

Why?

The code required to build UIs using Cocoa can be quite verbose. Startstuff provides a familiar, chainable API for creating those UIs.

Installation

npm install --save starstuff

Usage

import starstuff from 'starstuff';

// Create a new NSWindow. `$mainWindow` is a Starstuff object.
// Startstuff does not prevent access to original Cocoa
// objects, they are stored in the `el` property.
// ex; $mainWindow.el
var $mainWindow = starstuff.window({
  title: 'Choose an Image Window',
  rect: [0, 0, 600, 85]
}).delegate(appDelegate);

$mainWindow.append(starstuff.fieldLabel({
  id: 'fileFieldLabel',
  value: 'Image: (jpg, png, or gif):',
  rect: [25, ($mainWindow.height() - 40), 200, 24]
}))
.append(starstuff.textField({
  id: 'fileField',
  editable: false,
  rect: [25, ($mainWindow.height() - 60), 350, 24]
}))
.append(starstuff.button({
  id: 'chooseButton',
  title: 'Choose an image...',
  rect: [375, ($mainWindow.height() - 62), 150, 25],
  target: appDelegate,
  action: 'click'
}));

API Reference

window({options})

fieldLabel({options})

textField({options})

button({options})

image({options})

openPanel({options})

Contributing

npm install

To compile the source–written using es6–with Babel run:

npm run build

To recompile as you make changes run:

npm run watch

Keywords

jxa

FAQs

Package last updated on 11 Aug 2015

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.