open-index/open-npm huggingface dataset:
npm package: @google-web-components/google-apis
Description: Web components to load Google API libraries
Latest version: 3.0.1

google-apis
===========

Webcomponents that load the corresponding Google APIs.

Available APIs:
* Google JavaScript API (`gapi`)
* Legacy Google JavaScript API Loader
* Google Maps JavaScript API
* Google+ JavaScript API
* Google Drive Realtime API
* Google Youtube Iframe API


See element documentation on https://www.webcomponents.org/element/@google-web-components/google-apis for usage.
npm package: @google/3dom
Description: An isolated scene graph facade for web-based 3D libraries
Latest version: 0.3.0

# 3DOM 

3DOM is a library that makes it easy to run custom, possibly-untrusted scripts
that manipulate a scene graph. 3DOM invokes scripts in a worker, and 3DOM
scripts act on a normalized scene graph API designed in the image of the glTF
file format.

3DOM is designed to be implemented for multiple 3D libraries. To support 
this goal, it uses a facade pattern that can be adapted for different backing
APIs. Currently, only Three.js is has an implementation, but we hope to include
more facades in the future.

Although 3DOM was designed to support `<model-viewer>`, you can use 3DOM with
any Three.js scene.

## Implementation example

There are two important constructs to consider when implementing 3DOM:

 - The graft: a facade that wraps over your Three.js scene
 - The execution context: makes it easy to evaluate script in a scene graph worker

The following example applies 3DOM to a Three.js scene graph and invokes script
to operate on the scene graph from a worker:

```javascript
import {ThreeDOMExecutionContext} from '@google/3dom/lib/context.js';
import {ModelGraft} from '@google/3dom/lib/facade/three-js/model-graft.js';

import {GLTFLoader} from 'three/examples/jsm/loaders/GLTFLoader.js';

const gltfLoader = new GLTFLoader();
const modelUrl = './Astronaut.glb';

gltfLoader.load(modelUrl, (gltf) => {
  const executionContext =
      new ThreeDOMExecutionContext(['material-properties']);

  const graft = new ModelGraft(modelUrl, gltf);

  executionContext.changeModel(graft);

  executionContext.eval(`
console.log('Hello from a 3DOM worker!');

// Manipulate the scene graph:
model.materials[0].pbrMetallicRoughness.setBaseColorFactor([1, 0, 0, 1]);`);
});
```

## Development

To get started, follow the instructions in [the main README.md file](../../README.md).

The following commands are available when developing `<model-viewer>`:

Command                         | Description
------------------------------- | -----------
`npm run build`                 | Builds all 3DOM distributable files
`npm run test`                  | Run 3DOM unit tests
`npm run watch:test`            | Run unit tests via Karma in "watch" mode
`npm run serve`                 | Starts a web server and opens the demo
`npm run clean`                 | Deletes all build artifacts
`npm run dev`                   | Starts `tsc` and Karma in "watch" mode, and starts a web server pointing to the demo
`npm run update:package-lock`   | Regenerates package-lock.json; do this when adding or removing dependencies
npm package: @google/actionengine
Description: Action Engine allows agentic streaming systems with well-defined representations for context, operations, and session management.
Author: Google DeepMind
Latest version: 0.0.5

# Action Engine TypeScript
Action Engine allows agentic streaming systems with well-defined representations for context, operations, and session management.

🚧 This repository is under heavy development. Expect bugs and potentially breaking changes.
npm package: @google/cloud-analytics
Description: TypeScript/JavaScript client logging for Cloud Analytics.
Author: Google Inc.
Latest version: 0.1.1

# Cloud Analytics: Typescript

Cloud Analytics is a library used for logging product usage metrics for 
Cloud products.  Data is stored in the Concord Data Warehouse in a privacy 
compliant manner. 

## How to use the library
Logging a single event can be done by creating an instance of CloudAnalytics 
and passing an event to logEvent.
 
``` typescript
import {CloudAnalytics} from './cloud_analytics';

const cloudAnalytics = new CloudAnalytics(
        'TEST',
        'testApiKey');

const concordEvent = {
    type: 'eventType',
    name: 'eventName',
    projectNumber: '1234567890',
    latency: 123,
    metadata: [
      {key: 'test1', value: 'data1'},
      {key: 'test2', value: 'data2'},
    ],
    userSessionId: '12345',
  };

cloudAnalytics.logEvent(concordEvent);
```

### Batching Events
Batching can be configured by calling enableBatchMode with a desired flush 
interval.  Events will be queued until the specified interval is reached, or
until various browser environment events occur. These include document page 
hide, window beforeUnload & unload.  For Node.JS these include the beforeExit 
SIGHUP events.
 
In the below snippet these two calls to logEvent are batched and sent along
in the same HTTP request.
 
 ``` typescript
 import {CloudAnalytics} from './cloud_analytics';
 
 const cloudAnalytics = new CloudAnalytics(
         'TEST',
         'testApiKey');

 cloudAnalytics.enableBatchMode(1000);
 
 const concordEventOne = {
     type: 'eventType',
     name: 'eventName',
     projectNumber: '1234567890',
     latency: 123,
     metadata: [
       {key: 'test1', value: 'data1'},
       {key: 'test2', value: 'data2'},
     ],
     userSessionId: '12345',
   };

 cloudAnalytics.logEvent(concordEventOne);

 const concordEventOne = {
     type: 'eventType',
     name: 'eventName',
     projectNumber: '1234567890',
     latency: 456,
     metadata: [
       {key: 'test1', value: 'data1'},
       {key: 'test2', value: 'data2'},
     ],
     userSessionId: '12345',
   };
 
 
 cloudAnalytics.logEvent(concordEventOne);
 ```