GithubHelp home page GithubHelp logo

zawilliams / lokney Goto Github PK

View Code? Open in Web Editor NEW

This project forked from inventsable/lokney

0.0 1.0 0.0 29 KB

Utility components for Adobe CEP panels to greatly simplify the overhead of Adobe specific coding

Vue 99.04% JavaScript 0.96%

lokney's Introduction

lokney License: MIT

NPM

Vue utility components for Adobe CEP panels to greatly simplify the overhead of Adobe specific coding.

<div id="app">
  <Panel script-path="['./host/myScript.jsx', './host/anotherScript.jsx']">
    <div id="content"></div>
  </Panel>
  <Menus debug refresh
    :context="[
      {
        label: 'This is a disabled menu item',
        enabled: false
      },
      {
        label: 'This activates a method within this file on clicking this item',
        callback: this.localMethod
      }
    ]"
    :flyout="[
      {
        label: 'This flyout menu has a JSON structure!',
      },
      {
        label: 'Supporting infinite nesting!',
        menu: [
          {
            label: 'Hello world!'
          }
        ]
      }
    ]"
  />
</div>
<!-- Within a given App.vue, with no need for methods or data inside <script> -->
<div id="app">
  <!-- Path to script can be specified as attribute, supporting multiple files -->
  <Panel script-path="['./host/myScript.jsx', './host/anotherScript.jsx']">
    <!-- Place extension content or <router-view/> inside this <Panel> component -->
    <div id="content"></div>
  </Panel>
  <!-- 
    Menus can be anywhere in your code, even per router page. Add props like "debug" and "refresh" to easily 
    append launching debug port and refreshing your extension to context and flyout menus.

    Any change to a :context or :flyout Array will automatically rebuild the given menu and update instantly.
  -->
  <Menus debug refresh
      :context="[
          {
            label: 'This is a disabled menu item',
            enabled: false
          },
          {
            label: 'Nested menus',
            menu: [
              { label: 'Hello' },
              { label: 'World' }
              {
                label: 'Nested again',
                menu: [
                  { label: 'Hello' },
                  { label: 'World' }
                ]
              }
            ]
          }
          {
            label: 'This activates a method within this file on clicking this item',
            enabled: true,
            callback: this.localMethod
          }
      ]"
    />
</div>

All host app themes, scrollbars, UI change events, script loading, menus (context and flyout), debugger launching, easy refresh of panel via menu and more handed with the above.


Installation and use

npm install lokney

Within ./src/main.js (use anywhere in project with no need to import per component file):

import { Panel, Menus } from 'lokney'

Vue.use('Panel', Panel);
Vue.use('Menus', Menus);

// Include imports above Vue initialization
new Vue({
  router,
  render: h => h(App)
}).$mount("#app");

Within App.vue or a given .vue file:

<script>
// Import as many or few components as you need
import { Panel, Menus } from 'lokney';

export default {
  components: {
    Panel,
    Menus
  }
}
</script>

Components

lokney's People

Contributors

inventsable avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.