How to use @lumino/datastore - 3 common examples

To help you get started, we’ve selected a few @lumino/datastore examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jupyterlab / lumino / examples / example-datastore / src / widget.ts View on Github external
} from './collaborator';

/**
 * The time that a collaborator name hover persists.
 */
const HOVER_TIMEOUT = 1000;

/**
 * A schema for an editor model. Currently contains two fields, the current
 * value and whether the model is read only. Other fields could include
 * language, mimetype, and collaborator cursors.
 */
export const EDITOR_SCHEMA = {
  id: 'editor',
  fields: {
    readOnly: Fields.Boolean(),
    text: Fields.Text(),
    collaborators: Fields.Map()
  }
};

/**
 * An interface representing a location in an editor.
 */
export interface IPosition extends JSONObject {
  /**
   * The cursor line number.
   */
  readonly line: number;

  /**
   * The cursor column number.
github jupyterlab / lumino / examples / example-datastore / src / widget.ts View on Github external
/**
 * The time that a collaborator name hover persists.
 */
const HOVER_TIMEOUT = 1000;

/**
 * A schema for an editor model. Currently contains two fields, the current
 * value and whether the model is read only. Other fields could include
 * language, mimetype, and collaborator cursors.
 */
export const EDITOR_SCHEMA = {
  id: 'editor',
  fields: {
    readOnly: Fields.Boolean(),
    text: Fields.Text(),
    collaborators: Fields.Map()
  }
};

/**
 * An interface representing a location in an editor.
 */
export interface IPosition extends JSONObject {
  /**
   * The cursor line number.
   */
  readonly line: number;

  /**
   * The cursor column number.
   */
  readonly column: number;
github jupyterlab / lumino / examples / example-datastore / src / widget.ts View on Github external
/**
 * The time that a collaborator name hover persists.
 */
const HOVER_TIMEOUT = 1000;

/**
 * A schema for an editor model. Currently contains two fields, the current
 * value and whether the model is read only. Other fields could include
 * language, mimetype, and collaborator cursors.
 */
export const EDITOR_SCHEMA = {
  id: 'editor',
  fields: {
    readOnly: Fields.Boolean(),
    text: Fields.Text(),
    collaborators: Fields.Map()
  }
};

/**
 * An interface representing a location in an editor.
 */
export interface IPosition extends JSONObject {
  /**
   * The cursor line number.
   */
  readonly line: number;

  /**
   * The cursor column number.
   */

@lumino/datastore

Lumino DataStore

BSD-3-Clause
Latest version published 1 year ago

Package Health Score

71 / 100
Full package analysis

Similar packages