@particle-academy/google-slides-ui 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md ADDED
@@ -0,0 +1,35 @@
1
+ # Changelog
2
+
3
+ All notable changes to `@particle-academy/google-slides-ui`,
4
+ `@particle-academy/google-slides-js`, `particle-academy/google-slides-php` and
5
+ `fancy-google-slides`.
6
+
7
+ The four packages share one version, because they are generated from one
8
+ `provider/` definition and a version that meant something different in each
9
+ would be a version nobody could reason about.
10
+
11
+ ## [0.1.0] — 2026-08-23
12
+
13
+ First release.
14
+
15
+ ### Added
16
+
17
+ - `presentation_create` — create a blank Google Slides presentation from a
18
+ title. `POST /v1/presentations`.
19
+ - A top-level `Presentation` faker, so the node runs on a canvas with no Google
20
+ account.
21
+
22
+ ### Content in the request is ignored
23
+
24
+ The request type is the full `Presentation`, but Google's discovery method says
25
+ provided content is ignored. It can accept a caller-supplied `presentationId`;
26
+ this simple action leaves ID generation to Google and sends only `title`.
27
+
28
+ ### No sandbox, and no idempotency
29
+
30
+ Google has no Slides test estate. A test presentation is a real presentation in
31
+ a real Drive. `presentations.create` also declares no idempotency key, so a retry
32
+ can create a second presentation and the action is honestly
33
+ `unsafe-to-replay`.
34
+
35
+ [0.1.0]: https://github.com/Fancy-Friends/google-slides/releases/tag/v0.1.0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Particle Academy
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,51 @@
1
+ # Google Slides
2
+
3
+ Google Slides for [fancy-flow][flow] — as **four imported, versioned packages**, one
4
+ per runtime. Not vendored source: a copy cannot be upgraded, and third-party APIs
5
+ change.
6
+
7
+ [flow]: https://github.com/Particle-Academy/fancy-flow
8
+
9
+ | Runtime | Package | Install |
10
+ |---|---|---|
11
+ | Authoring surface (every host) | `@particle-academy/google-slides-ui` | `npm install @particle-academy/google-slides-ui` |
12
+ | Node | `@particle-academy/google-slides-js` | `npm install @particle-academy/google-slides-js` |
13
+ | PHP 8.4+ | `particle-academy/google-slides-php` | `composer require particle-academy/google-slides-php` |
14
+ | Python 3.11+ | `fancy-google-slides` | `pip install fancy-google-slides` |
15
+
16
+ The `ui` package is the editor surface and is React on every host — a PHP or
17
+ Python project installs it *and* its own runtime package, and never the `js` one.
18
+
19
+ ## What it costs you
20
+
21
+ One dependency: `@particle-academy/fancy-connector-core` (or
22
+ `particle-academy/fancy-connector-core` on Composer), which the `js` and `php`
23
+ packages pull in themselves. The Python package has **zero** runtime
24
+ dependencies.
25
+
26
+ **No Google Slides SDK.** Plain HTTP, deliberately: a vendor SDK is third-party code
27
+ subject to the kit's full approval bar, and one per provider is hundreds of
28
+ dependencies nobody is tracking.
29
+
30
+ ## Run it before you have credentials
31
+
32
+ Every operation ships a **faker**, whether or not Google Slides has a sandbox. Set a
33
+ node's mode to `fake` and it returns the shape Google Slides actually publishes — the
34
+ same field names, deterministically — so you can wire the downstream nodes before
35
+ touching an account, a key, or a network.
36
+
37
+ ## This repository is generated
38
+
39
+ `provider/` is the source. Everything under `packages/` is emitted from it and
40
+ **must not be hand-edited** — CI regenerates and diffs on every push, and the
41
+ next protocol sync destroys anything it finds. See [`AGENTS.md`](AGENTS.md).
42
+
43
+ ## Two namespaces, which do not match on purpose
44
+
45
+ The repo is `github.com/Fancy-Friends/google-slides`; the packages publish under
46
+ `particle-academy`. Nothing derives one from the other — the names come from
47
+ weaver's `friends.json` and nowhere else.
48
+
49
+ ## Licence
50
+
51
+ MIT.
package/dist/index.cjs ADDED
@@ -0,0 +1,113 @@
1
+ 'use strict';
2
+
3
+ var connectors = require('@particle-academy/fancy-flow/connectors');
4
+
5
+ // src/service.ts
6
+ var CONNECTOR_API_VERSION = 1;
7
+ var GOOGLE_SLIDES_SERVICE = {
8
+ service: "google_slides",
9
+ serviceTitle: "Google Slides",
10
+ domain: "productivity",
11
+ sandbox: "none"
12
+ };
13
+ var GOOGLE_SLIDES_CREDENTIALS = [
14
+ {
15
+ "key": "clientId",
16
+ "label": "OAuth client ID",
17
+ "scope": "provider",
18
+ "secret": false,
19
+ "help": "From Google Cloud Console -> APIs & Services -> Credentials. ONE value for the whole installation, not per connected account."
20
+ },
21
+ {
22
+ "key": "clientSecret",
23
+ "label": "OAuth client secret",
24
+ "scope": "provider",
25
+ "secret": true,
26
+ "help": "The client secret for the same OAuth app. One value for the whole installation."
27
+ },
28
+ {
29
+ "key": "accessToken",
30
+ "label": "Access token",
31
+ "scope": "account",
32
+ "secret": true,
33
+ "help": "Per connected Google account, and it expires after ONE HOUR. The host refreshes it with the refresh token."
34
+ },
35
+ {
36
+ "key": "refreshToken",
37
+ "label": "Refresh token",
38
+ "scope": "account",
39
+ "secret": true,
40
+ "help": "Per connected Google account. Google issues one only when the consent request asks for offline access; without it the connection dies within the hour."
41
+ }
42
+ ];
43
+ var GOOGLE_SLIDES_OAUTH = {
44
+ "flow": "authorization_code",
45
+ "authorizeUrl": "https://accounts.google.com/o/oauth2/v2/auth",
46
+ "tokenUrl": "https://oauth2.googleapis.com/token",
47
+ "scopes": [
48
+ "https://www.googleapis.com/auth/presentations"
49
+ ],
50
+ "accessTokenCredential": "accessToken",
51
+ "refreshTokenCredential": "refreshToken",
52
+ "accessTokenTtlSeconds": 3600
53
+ };
54
+ function googleSlidesMeta(role, operation, docs) {
55
+ return { ...GOOGLE_SLIDES_SERVICE, role, operation, docs };
56
+ }
57
+ var GOOGLE_SLIDES_PRESENTATION_KIND = "@particle-academy/google_slides_presentation";
58
+ var GOOGLE_SLIDES_PRESENTATION_OPERATION = "presentation_create";
59
+ var GOOGLE_SLIDES_PRESENTATION_META = googleSlidesMeta("action", "create a blank presentation", "https://developers.google.com/workspace/slides/api/reference/rest/v1/presentations/create");
60
+ var GOOGLE_SLIDES_PRESENTATION_OUTPUT = [
61
+ {
62
+ "path": "data.presentationId",
63
+ "type": "string",
64
+ "description": "The id of the created presentation."
65
+ },
66
+ {
67
+ "path": "data.title",
68
+ "type": "string",
69
+ "description": "The title Google stored."
70
+ }
71
+ ];
72
+ var googleSlidesPresentationKind = connectors.defineConnectorKind(GOOGLE_SLIDES_PRESENTATION_META, {
73
+ name: GOOGLE_SLIDES_PRESENTATION_KIND,
74
+ aliases: ["google_slides_presentation"],
75
+ label: "Google Slides presentation",
76
+ description: "Create a blank Google Slides presentation.",
77
+ inputs: [{ id: "in" }],
78
+ outputs: [{ id: "out" }],
79
+ sideEffects: "unsafe-to-replay",
80
+ outputShape: GOOGLE_SLIDES_PRESENTATION_OUTPUT,
81
+ configSchema: [
82
+ {
83
+ "type": "text",
84
+ "key": "title",
85
+ "label": "Title",
86
+ "required": true,
87
+ "description": "The title of the new blank presentation."
88
+ }
89
+ ],
90
+ defaultConfig: {
91
+ "mode": "auto"
92
+ },
93
+ renderBody: ({ config }) => connectors.summarize(GOOGLE_SLIDES_PRESENTATION_META, config, "create a blank presentation")
94
+ });
95
+
96
+ // src/index.ts
97
+ var GOOGLE_SLIDES_KINDS = [
98
+ googleSlidesPresentationKind
99
+ ];
100
+
101
+ exports.CONNECTOR_API_VERSION = CONNECTOR_API_VERSION;
102
+ exports.GOOGLE_SLIDES_CREDENTIALS = GOOGLE_SLIDES_CREDENTIALS;
103
+ exports.GOOGLE_SLIDES_KINDS = GOOGLE_SLIDES_KINDS;
104
+ exports.GOOGLE_SLIDES_OAUTH = GOOGLE_SLIDES_OAUTH;
105
+ exports.GOOGLE_SLIDES_PRESENTATION_KIND = GOOGLE_SLIDES_PRESENTATION_KIND;
106
+ exports.GOOGLE_SLIDES_PRESENTATION_META = GOOGLE_SLIDES_PRESENTATION_META;
107
+ exports.GOOGLE_SLIDES_PRESENTATION_OPERATION = GOOGLE_SLIDES_PRESENTATION_OPERATION;
108
+ exports.GOOGLE_SLIDES_PRESENTATION_OUTPUT = GOOGLE_SLIDES_PRESENTATION_OUTPUT;
109
+ exports.GOOGLE_SLIDES_SERVICE = GOOGLE_SLIDES_SERVICE;
110
+ exports.googleSlidesMeta = googleSlidesMeta;
111
+ exports.googleSlidesPresentationKind = googleSlidesPresentationKind;
112
+ //# sourceMappingURL=index.cjs.map
113
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/service.ts","../src/kinds/presentation-create.ts","../src/index.ts"],"names":["defineConnectorKind","summarize"],"mappings":"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","file":"index.cjs","sourcesContent":["/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/manifest.json by weaver's generator.\n * A hand-edit here is destroyed by the next protocol sync, which is worse than\n * being rejected, because it works until it silently does not. Fix\n * provider/manifest.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- google_slides\n */\n\n/**\n * Google Slides's identity on the authoring surface, shared by every Google\n * Slides node.\n *\n * This file must import nothing from the js package: a PHP or Python project\n * installs the ui package and never that one, and the import would be a\n * dangling module the moment it did.\n *\n * ## The sandbox trap\n *\n * Google has no sandbox for Slides. A test presentation is a real one in a\n * real Drive, so every create is real -- use the faker while developing and\n * clean up any live test presentations.\n */\n\nimport type { ConnectorMeta } from \"@particle-academy/fancy-flow/connectors\";\n\n/**\n * The connector API version this package was GENERATED against.\n *\n * A literal, never imported — an imported constant lets an upgrade rewrite the\n * very claim it exists to detect.\n */\nexport const CONNECTOR_API_VERSION = 1;\n\n/** The parts of a connector's identity that belong to the SERVICE, not the node. */\nexport const GOOGLE_SLIDES_SERVICE = {\n service: \"google_slides\",\n serviceTitle: \"Google Slides\",\n domain: \"productivity\",\n sandbox: \"none\",\n} as const satisfies Pick<ConnectorMeta, \"service\" | \"serviceTitle\" | \"domain\" | \"sandbox\">;\n\n/** The credentials a Google Slides connection holds. */\nexport const GOOGLE_SLIDES_CREDENTIALS = [\n {\n \"key\": \"clientId\",\n \"label\": \"OAuth client ID\",\n \"scope\": \"provider\",\n \"secret\": false,\n \"help\": \"From Google Cloud Console -> APIs & Services -> Credentials. ONE value for the whole installation, not per connected account.\"\n },\n {\n \"key\": \"clientSecret\",\n \"label\": \"OAuth client secret\",\n \"scope\": \"provider\",\n \"secret\": true,\n \"help\": \"The client secret for the same OAuth app. One value for the whole installation.\"\n },\n {\n \"key\": \"accessToken\",\n \"label\": \"Access token\",\n \"scope\": \"account\",\n \"secret\": true,\n \"help\": \"Per connected Google account, and it expires after ONE HOUR. The host refreshes it with the refresh token.\"\n },\n {\n \"key\": \"refreshToken\",\n \"label\": \"Refresh token\",\n \"scope\": \"account\",\n \"secret\": true,\n \"help\": \"Per connected Google account. Google issues one only when the consent request asks for offline access; without it the connection dies within the hour.\"\n }\n] as const;\n\n/**\n * The OAuth2 exchange Google Slides requires — DECLARED here, performed by the\n * host.\n *\n * A consent screen needs a browser, a redirect URI and somewhere to persist\n * the result, and all three belong to the host; a package that ran the dance\n * itself would have to own a web server. So this says precisely enough for a\n * host to do it.\n *\n * The access token lasts 3600 seconds. A host that never refreshes will work\n * all afternoon and be broken by morning, which is why the lifetime is stated\n * rather than left to be discovered.\n */\nexport const GOOGLE_SLIDES_OAUTH = {\n \"flow\": \"authorization_code\",\n \"authorizeUrl\": \"https://accounts.google.com/o/oauth2/v2/auth\",\n \"tokenUrl\": \"https://oauth2.googleapis.com/token\",\n \"scopes\": [\n \"https://www.googleapis.com/auth/presentations\"\n ],\n \"accessTokenCredential\": \"accessToken\",\n \"refreshTokenCredential\": \"refreshToken\",\n \"accessTokenTtlSeconds\": 3600\n} as const;\n\n/** Build a Google Slides node's connector metadata from the operation it performs. */\nexport function googleSlidesMeta(\n role: ConnectorMeta[\"role\"],\n operation: string,\n docs: string,\n): ConnectorMeta {\n return { ...GOOGLE_SLIDES_SERVICE, role, operation, docs };\n}\n","/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/actions/presentation-create.json by weaver's generator.\n * A hand-edit here is destroyed by the next protocol sync, which is worse than\n * being rejected, because it works until it silently does not. Fix\n * provider/actions/presentation-create.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- google_slides\n */\n\n/**\n * Google Slides presentation — Create a blank Google Slides presentation.\n *\n * https://developers.google.com/workspace/slides/api/reference/rest/v1/presentations/create\n *\n * `unsafe-to-replay`.\n */\n\nimport type { NodeKindDefinition } from \"@particle-academy/fancy-flow/engine\";\nimport { defineConnectorKind, summarize, type OutputField } from \"@particle-academy/fancy-flow/connectors\";\nimport { googleSlidesMeta } from \"../service.js\";\n\nexport const GOOGLE_SLIDES_PRESENTATION_KIND = \"@particle-academy/google_slides_presentation\";\nexport const GOOGLE_SLIDES_PRESENTATION_OPERATION = \"presentation_create\";\n\nexport const GOOGLE_SLIDES_PRESENTATION_META = googleSlidesMeta(\"action\", \"create a blank presentation\", \"https://developers.google.com/workspace/slides/api/reference/rest/v1/presentations/create\");\n\n/**\n * What this node emits — the \"ingredients\" a downstream node can reference.\n *\n * fancy-flow reads `outputShape` off the kind and offers it in the variable\n * picker, so declaring it is the whole of the work: an author configuring the\n * next node picks `{{ $json.data.id }}` off a list instead of typing a path\n * and hoping.\n */\nexport const GOOGLE_SLIDES_PRESENTATION_OUTPUT: OutputField[] = [\n {\n \"path\": \"data.presentationId\",\n \"type\": \"string\",\n \"description\": \"The id of the created presentation.\"\n },\n {\n \"path\": \"data.title\",\n \"type\": \"string\",\n \"description\": \"The title Google stored.\"\n }\n];\n\nexport const googleSlidesPresentationKind: NodeKindDefinition = defineConnectorKind(GOOGLE_SLIDES_PRESENTATION_META, {\n name: GOOGLE_SLIDES_PRESENTATION_KIND,\n aliases: [\"google_slides_presentation\"],\n label: \"Google Slides presentation\",\n description: \"Create a blank Google Slides presentation.\",\n inputs: [{ id: \"in\" }],\n outputs: [{ id: \"out\" }],\n sideEffects: \"unsafe-to-replay\",\n outputShape: GOOGLE_SLIDES_PRESENTATION_OUTPUT,\n configSchema: [\n {\n \"type\": \"text\",\n \"key\": \"title\",\n \"label\": \"Title\",\n \"required\": true,\n \"description\": \"The title of the new blank presentation.\"\n }\n ],\n defaultConfig: {\n \"mode\": \"auto\"\n },\n renderBody: ({ config }) =>\n summarize(GOOGLE_SLIDES_PRESENTATION_META, config as Record<string, unknown>, \"create a blank presentation\"),\n});\n","/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/manifest.json by weaver's generator.\n * A hand-edit here is destroyed by the next protocol sync, which is worse than\n * being rejected, because it works until it silently does not. Fix\n * provider/manifest.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- google_slides\n */\n\n/**\n * Google Slides's node kinds for fancy-flow.\n *\n * Install this on every host. The TypeScript executors live in the js\n * package's `./flow` subpath; PHP and Python hosts run their own and need only\n * this.\n */\n\nexport * from \"./service.js\";\nexport * from \"./kinds/presentation-create.js\";\n\nimport type { NodeKindDefinition } from \"@particle-academy/fancy-flow/engine\";\nimport { googleSlidesPresentationKind } from \"./kinds/presentation-create.js\";\n\n/** Every Google Slides kind, for a host that registers the lot. */\nexport const GOOGLE_SLIDES_KINDS: NodeKindDefinition[] = [\n googleSlidesPresentationKind,\n];\n"]}
@@ -0,0 +1,130 @@
1
+ import * as _particle_academy_fancy_flow_connectors from '@particle-academy/fancy-flow/connectors';
2
+ import { ConnectorMeta, OutputField } from '@particle-academy/fancy-flow/connectors';
3
+ import { NodeKindDefinition } from '@particle-academy/fancy-flow/engine';
4
+
5
+ /**
6
+ * GENERATED FILE — do not edit.
7
+ *
8
+ * Emitted from provider/manifest.json by weaver's generator.
9
+ * A hand-edit here is destroyed by the next protocol sync, which is worse than
10
+ * being rejected, because it works until it silently does not. Fix
11
+ * provider/manifest.json (or weaver's template/) and regenerate:
12
+ *
13
+ * npm run provider -- google_slides
14
+ */
15
+ /**
16
+ * Google Slides's identity on the authoring surface, shared by every Google
17
+ * Slides node.
18
+ *
19
+ * This file must import nothing from the js package: a PHP or Python project
20
+ * installs the ui package and never that one, and the import would be a
21
+ * dangling module the moment it did.
22
+ *
23
+ * ## The sandbox trap
24
+ *
25
+ * Google has no sandbox for Slides. A test presentation is a real one in a
26
+ * real Drive, so every create is real -- use the faker while developing and
27
+ * clean up any live test presentations.
28
+ */
29
+
30
+ /**
31
+ * The connector API version this package was GENERATED against.
32
+ *
33
+ * A literal, never imported — an imported constant lets an upgrade rewrite the
34
+ * very claim it exists to detect.
35
+ */
36
+ declare const CONNECTOR_API_VERSION = 1;
37
+ /** The parts of a connector's identity that belong to the SERVICE, not the node. */
38
+ declare const GOOGLE_SLIDES_SERVICE: {
39
+ readonly service: "google_slides";
40
+ readonly serviceTitle: "Google Slides";
41
+ readonly domain: "productivity";
42
+ readonly sandbox: "none";
43
+ };
44
+ /** The credentials a Google Slides connection holds. */
45
+ declare const GOOGLE_SLIDES_CREDENTIALS: readonly [{
46
+ readonly key: "clientId";
47
+ readonly label: "OAuth client ID";
48
+ readonly scope: "provider";
49
+ readonly secret: false;
50
+ readonly help: "From Google Cloud Console -> APIs & Services -> Credentials. ONE value for the whole installation, not per connected account.";
51
+ }, {
52
+ readonly key: "clientSecret";
53
+ readonly label: "OAuth client secret";
54
+ readonly scope: "provider";
55
+ readonly secret: true;
56
+ readonly help: "The client secret for the same OAuth app. One value for the whole installation.";
57
+ }, {
58
+ readonly key: "accessToken";
59
+ readonly label: "Access token";
60
+ readonly scope: "account";
61
+ readonly secret: true;
62
+ readonly help: "Per connected Google account, and it expires after ONE HOUR. The host refreshes it with the refresh token.";
63
+ }, {
64
+ readonly key: "refreshToken";
65
+ readonly label: "Refresh token";
66
+ readonly scope: "account";
67
+ readonly secret: true;
68
+ readonly help: "Per connected Google account. Google issues one only when the consent request asks for offline access; without it the connection dies within the hour.";
69
+ }];
70
+ /**
71
+ * The OAuth2 exchange Google Slides requires — DECLARED here, performed by the
72
+ * host.
73
+ *
74
+ * A consent screen needs a browser, a redirect URI and somewhere to persist
75
+ * the result, and all three belong to the host; a package that ran the dance
76
+ * itself would have to own a web server. So this says precisely enough for a
77
+ * host to do it.
78
+ *
79
+ * The access token lasts 3600 seconds. A host that never refreshes will work
80
+ * all afternoon and be broken by morning, which is why the lifetime is stated
81
+ * rather than left to be discovered.
82
+ */
83
+ declare const GOOGLE_SLIDES_OAUTH: {
84
+ readonly flow: "authorization_code";
85
+ readonly authorizeUrl: "https://accounts.google.com/o/oauth2/v2/auth";
86
+ readonly tokenUrl: "https://oauth2.googleapis.com/token";
87
+ readonly scopes: readonly ["https://www.googleapis.com/auth/presentations"];
88
+ readonly accessTokenCredential: "accessToken";
89
+ readonly refreshTokenCredential: "refreshToken";
90
+ readonly accessTokenTtlSeconds: 3600;
91
+ };
92
+ /** Build a Google Slides node's connector metadata from the operation it performs. */
93
+ declare function googleSlidesMeta(role: ConnectorMeta["role"], operation: string, docs: string): ConnectorMeta;
94
+
95
+ declare const GOOGLE_SLIDES_PRESENTATION_KIND = "@particle-academy/google_slides_presentation";
96
+ declare const GOOGLE_SLIDES_PRESENTATION_OPERATION = "presentation_create";
97
+ declare const GOOGLE_SLIDES_PRESENTATION_META: _particle_academy_fancy_flow_connectors.ConnectorMeta;
98
+ /**
99
+ * What this node emits — the "ingredients" a downstream node can reference.
100
+ *
101
+ * fancy-flow reads `outputShape` off the kind and offers it in the variable
102
+ * picker, so declaring it is the whole of the work: an author configuring the
103
+ * next node picks `{{ $json.data.id }}` off a list instead of typing a path
104
+ * and hoping.
105
+ */
106
+ declare const GOOGLE_SLIDES_PRESENTATION_OUTPUT: OutputField[];
107
+ declare const googleSlidesPresentationKind: NodeKindDefinition;
108
+
109
+ /**
110
+ * GENERATED FILE — do not edit.
111
+ *
112
+ * Emitted from provider/manifest.json by weaver's generator.
113
+ * A hand-edit here is destroyed by the next protocol sync, which is worse than
114
+ * being rejected, because it works until it silently does not. Fix
115
+ * provider/manifest.json (or weaver's template/) and regenerate:
116
+ *
117
+ * npm run provider -- google_slides
118
+ */
119
+ /**
120
+ * Google Slides's node kinds for fancy-flow.
121
+ *
122
+ * Install this on every host. The TypeScript executors live in the js
123
+ * package's `./flow` subpath; PHP and Python hosts run their own and need only
124
+ * this.
125
+ */
126
+
127
+ /** Every Google Slides kind, for a host that registers the lot. */
128
+ declare const GOOGLE_SLIDES_KINDS: NodeKindDefinition[];
129
+
130
+ export { CONNECTOR_API_VERSION, GOOGLE_SLIDES_CREDENTIALS, GOOGLE_SLIDES_KINDS, GOOGLE_SLIDES_OAUTH, GOOGLE_SLIDES_PRESENTATION_KIND, GOOGLE_SLIDES_PRESENTATION_META, GOOGLE_SLIDES_PRESENTATION_OPERATION, GOOGLE_SLIDES_PRESENTATION_OUTPUT, GOOGLE_SLIDES_SERVICE, googleSlidesMeta, googleSlidesPresentationKind };
@@ -0,0 +1,130 @@
1
+ import * as _particle_academy_fancy_flow_connectors from '@particle-academy/fancy-flow/connectors';
2
+ import { ConnectorMeta, OutputField } from '@particle-academy/fancy-flow/connectors';
3
+ import { NodeKindDefinition } from '@particle-academy/fancy-flow/engine';
4
+
5
+ /**
6
+ * GENERATED FILE — do not edit.
7
+ *
8
+ * Emitted from provider/manifest.json by weaver's generator.
9
+ * A hand-edit here is destroyed by the next protocol sync, which is worse than
10
+ * being rejected, because it works until it silently does not. Fix
11
+ * provider/manifest.json (or weaver's template/) and regenerate:
12
+ *
13
+ * npm run provider -- google_slides
14
+ */
15
+ /**
16
+ * Google Slides's identity on the authoring surface, shared by every Google
17
+ * Slides node.
18
+ *
19
+ * This file must import nothing from the js package: a PHP or Python project
20
+ * installs the ui package and never that one, and the import would be a
21
+ * dangling module the moment it did.
22
+ *
23
+ * ## The sandbox trap
24
+ *
25
+ * Google has no sandbox for Slides. A test presentation is a real one in a
26
+ * real Drive, so every create is real -- use the faker while developing and
27
+ * clean up any live test presentations.
28
+ */
29
+
30
+ /**
31
+ * The connector API version this package was GENERATED against.
32
+ *
33
+ * A literal, never imported — an imported constant lets an upgrade rewrite the
34
+ * very claim it exists to detect.
35
+ */
36
+ declare const CONNECTOR_API_VERSION = 1;
37
+ /** The parts of a connector's identity that belong to the SERVICE, not the node. */
38
+ declare const GOOGLE_SLIDES_SERVICE: {
39
+ readonly service: "google_slides";
40
+ readonly serviceTitle: "Google Slides";
41
+ readonly domain: "productivity";
42
+ readonly sandbox: "none";
43
+ };
44
+ /** The credentials a Google Slides connection holds. */
45
+ declare const GOOGLE_SLIDES_CREDENTIALS: readonly [{
46
+ readonly key: "clientId";
47
+ readonly label: "OAuth client ID";
48
+ readonly scope: "provider";
49
+ readonly secret: false;
50
+ readonly help: "From Google Cloud Console -> APIs & Services -> Credentials. ONE value for the whole installation, not per connected account.";
51
+ }, {
52
+ readonly key: "clientSecret";
53
+ readonly label: "OAuth client secret";
54
+ readonly scope: "provider";
55
+ readonly secret: true;
56
+ readonly help: "The client secret for the same OAuth app. One value for the whole installation.";
57
+ }, {
58
+ readonly key: "accessToken";
59
+ readonly label: "Access token";
60
+ readonly scope: "account";
61
+ readonly secret: true;
62
+ readonly help: "Per connected Google account, and it expires after ONE HOUR. The host refreshes it with the refresh token.";
63
+ }, {
64
+ readonly key: "refreshToken";
65
+ readonly label: "Refresh token";
66
+ readonly scope: "account";
67
+ readonly secret: true;
68
+ readonly help: "Per connected Google account. Google issues one only when the consent request asks for offline access; without it the connection dies within the hour.";
69
+ }];
70
+ /**
71
+ * The OAuth2 exchange Google Slides requires — DECLARED here, performed by the
72
+ * host.
73
+ *
74
+ * A consent screen needs a browser, a redirect URI and somewhere to persist
75
+ * the result, and all three belong to the host; a package that ran the dance
76
+ * itself would have to own a web server. So this says precisely enough for a
77
+ * host to do it.
78
+ *
79
+ * The access token lasts 3600 seconds. A host that never refreshes will work
80
+ * all afternoon and be broken by morning, which is why the lifetime is stated
81
+ * rather than left to be discovered.
82
+ */
83
+ declare const GOOGLE_SLIDES_OAUTH: {
84
+ readonly flow: "authorization_code";
85
+ readonly authorizeUrl: "https://accounts.google.com/o/oauth2/v2/auth";
86
+ readonly tokenUrl: "https://oauth2.googleapis.com/token";
87
+ readonly scopes: readonly ["https://www.googleapis.com/auth/presentations"];
88
+ readonly accessTokenCredential: "accessToken";
89
+ readonly refreshTokenCredential: "refreshToken";
90
+ readonly accessTokenTtlSeconds: 3600;
91
+ };
92
+ /** Build a Google Slides node's connector metadata from the operation it performs. */
93
+ declare function googleSlidesMeta(role: ConnectorMeta["role"], operation: string, docs: string): ConnectorMeta;
94
+
95
+ declare const GOOGLE_SLIDES_PRESENTATION_KIND = "@particle-academy/google_slides_presentation";
96
+ declare const GOOGLE_SLIDES_PRESENTATION_OPERATION = "presentation_create";
97
+ declare const GOOGLE_SLIDES_PRESENTATION_META: _particle_academy_fancy_flow_connectors.ConnectorMeta;
98
+ /**
99
+ * What this node emits — the "ingredients" a downstream node can reference.
100
+ *
101
+ * fancy-flow reads `outputShape` off the kind and offers it in the variable
102
+ * picker, so declaring it is the whole of the work: an author configuring the
103
+ * next node picks `{{ $json.data.id }}` off a list instead of typing a path
104
+ * and hoping.
105
+ */
106
+ declare const GOOGLE_SLIDES_PRESENTATION_OUTPUT: OutputField[];
107
+ declare const googleSlidesPresentationKind: NodeKindDefinition;
108
+
109
+ /**
110
+ * GENERATED FILE — do not edit.
111
+ *
112
+ * Emitted from provider/manifest.json by weaver's generator.
113
+ * A hand-edit here is destroyed by the next protocol sync, which is worse than
114
+ * being rejected, because it works until it silently does not. Fix
115
+ * provider/manifest.json (or weaver's template/) and regenerate:
116
+ *
117
+ * npm run provider -- google_slides
118
+ */
119
+ /**
120
+ * Google Slides's node kinds for fancy-flow.
121
+ *
122
+ * Install this on every host. The TypeScript executors live in the js
123
+ * package's `./flow` subpath; PHP and Python hosts run their own and need only
124
+ * this.
125
+ */
126
+
127
+ /** Every Google Slides kind, for a host that registers the lot. */
128
+ declare const GOOGLE_SLIDES_KINDS: NodeKindDefinition[];
129
+
130
+ export { CONNECTOR_API_VERSION, GOOGLE_SLIDES_CREDENTIALS, GOOGLE_SLIDES_KINDS, GOOGLE_SLIDES_OAUTH, GOOGLE_SLIDES_PRESENTATION_KIND, GOOGLE_SLIDES_PRESENTATION_META, GOOGLE_SLIDES_PRESENTATION_OPERATION, GOOGLE_SLIDES_PRESENTATION_OUTPUT, GOOGLE_SLIDES_SERVICE, googleSlidesMeta, googleSlidesPresentationKind };
package/dist/index.js ADDED
@@ -0,0 +1,101 @@
1
+ import { defineConnectorKind, summarize } from '@particle-academy/fancy-flow/connectors';
2
+
3
+ // src/service.ts
4
+ var CONNECTOR_API_VERSION = 1;
5
+ var GOOGLE_SLIDES_SERVICE = {
6
+ service: "google_slides",
7
+ serviceTitle: "Google Slides",
8
+ domain: "productivity",
9
+ sandbox: "none"
10
+ };
11
+ var GOOGLE_SLIDES_CREDENTIALS = [
12
+ {
13
+ "key": "clientId",
14
+ "label": "OAuth client ID",
15
+ "scope": "provider",
16
+ "secret": false,
17
+ "help": "From Google Cloud Console -> APIs & Services -> Credentials. ONE value for the whole installation, not per connected account."
18
+ },
19
+ {
20
+ "key": "clientSecret",
21
+ "label": "OAuth client secret",
22
+ "scope": "provider",
23
+ "secret": true,
24
+ "help": "The client secret for the same OAuth app. One value for the whole installation."
25
+ },
26
+ {
27
+ "key": "accessToken",
28
+ "label": "Access token",
29
+ "scope": "account",
30
+ "secret": true,
31
+ "help": "Per connected Google account, and it expires after ONE HOUR. The host refreshes it with the refresh token."
32
+ },
33
+ {
34
+ "key": "refreshToken",
35
+ "label": "Refresh token",
36
+ "scope": "account",
37
+ "secret": true,
38
+ "help": "Per connected Google account. Google issues one only when the consent request asks for offline access; without it the connection dies within the hour."
39
+ }
40
+ ];
41
+ var GOOGLE_SLIDES_OAUTH = {
42
+ "flow": "authorization_code",
43
+ "authorizeUrl": "https://accounts.google.com/o/oauth2/v2/auth",
44
+ "tokenUrl": "https://oauth2.googleapis.com/token",
45
+ "scopes": [
46
+ "https://www.googleapis.com/auth/presentations"
47
+ ],
48
+ "accessTokenCredential": "accessToken",
49
+ "refreshTokenCredential": "refreshToken",
50
+ "accessTokenTtlSeconds": 3600
51
+ };
52
+ function googleSlidesMeta(role, operation, docs) {
53
+ return { ...GOOGLE_SLIDES_SERVICE, role, operation, docs };
54
+ }
55
+ var GOOGLE_SLIDES_PRESENTATION_KIND = "@particle-academy/google_slides_presentation";
56
+ var GOOGLE_SLIDES_PRESENTATION_OPERATION = "presentation_create";
57
+ var GOOGLE_SLIDES_PRESENTATION_META = googleSlidesMeta("action", "create a blank presentation", "https://developers.google.com/workspace/slides/api/reference/rest/v1/presentations/create");
58
+ var GOOGLE_SLIDES_PRESENTATION_OUTPUT = [
59
+ {
60
+ "path": "data.presentationId",
61
+ "type": "string",
62
+ "description": "The id of the created presentation."
63
+ },
64
+ {
65
+ "path": "data.title",
66
+ "type": "string",
67
+ "description": "The title Google stored."
68
+ }
69
+ ];
70
+ var googleSlidesPresentationKind = defineConnectorKind(GOOGLE_SLIDES_PRESENTATION_META, {
71
+ name: GOOGLE_SLIDES_PRESENTATION_KIND,
72
+ aliases: ["google_slides_presentation"],
73
+ label: "Google Slides presentation",
74
+ description: "Create a blank Google Slides presentation.",
75
+ inputs: [{ id: "in" }],
76
+ outputs: [{ id: "out" }],
77
+ sideEffects: "unsafe-to-replay",
78
+ outputShape: GOOGLE_SLIDES_PRESENTATION_OUTPUT,
79
+ configSchema: [
80
+ {
81
+ "type": "text",
82
+ "key": "title",
83
+ "label": "Title",
84
+ "required": true,
85
+ "description": "The title of the new blank presentation."
86
+ }
87
+ ],
88
+ defaultConfig: {
89
+ "mode": "auto"
90
+ },
91
+ renderBody: ({ config }) => summarize(GOOGLE_SLIDES_PRESENTATION_META, config, "create a blank presentation")
92
+ });
93
+
94
+ // src/index.ts
95
+ var GOOGLE_SLIDES_KINDS = [
96
+ googleSlidesPresentationKind
97
+ ];
98
+
99
+ export { CONNECTOR_API_VERSION, GOOGLE_SLIDES_CREDENTIALS, GOOGLE_SLIDES_KINDS, GOOGLE_SLIDES_OAUTH, GOOGLE_SLIDES_PRESENTATION_KIND, GOOGLE_SLIDES_PRESENTATION_META, GOOGLE_SLIDES_PRESENTATION_OPERATION, GOOGLE_SLIDES_PRESENTATION_OUTPUT, GOOGLE_SLIDES_SERVICE, googleSlidesMeta, googleSlidesPresentationKind };
100
+ //# sourceMappingURL=index.js.map
101
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/service.ts","../src/kinds/presentation-create.ts","../src/index.ts"],"names":[],"mappings":"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","file":"index.js","sourcesContent":["/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/manifest.json by weaver's generator.\n * A hand-edit here is destroyed by the next protocol sync, which is worse than\n * being rejected, because it works until it silently does not. Fix\n * provider/manifest.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- google_slides\n */\n\n/**\n * Google Slides's identity on the authoring surface, shared by every Google\n * Slides node.\n *\n * This file must import nothing from the js package: a PHP or Python project\n * installs the ui package and never that one, and the import would be a\n * dangling module the moment it did.\n *\n * ## The sandbox trap\n *\n * Google has no sandbox for Slides. A test presentation is a real one in a\n * real Drive, so every create is real -- use the faker while developing and\n * clean up any live test presentations.\n */\n\nimport type { ConnectorMeta } from \"@particle-academy/fancy-flow/connectors\";\n\n/**\n * The connector API version this package was GENERATED against.\n *\n * A literal, never imported — an imported constant lets an upgrade rewrite the\n * very claim it exists to detect.\n */\nexport const CONNECTOR_API_VERSION = 1;\n\n/** The parts of a connector's identity that belong to the SERVICE, not the node. */\nexport const GOOGLE_SLIDES_SERVICE = {\n service: \"google_slides\",\n serviceTitle: \"Google Slides\",\n domain: \"productivity\",\n sandbox: \"none\",\n} as const satisfies Pick<ConnectorMeta, \"service\" | \"serviceTitle\" | \"domain\" | \"sandbox\">;\n\n/** The credentials a Google Slides connection holds. */\nexport const GOOGLE_SLIDES_CREDENTIALS = [\n {\n \"key\": \"clientId\",\n \"label\": \"OAuth client ID\",\n \"scope\": \"provider\",\n \"secret\": false,\n \"help\": \"From Google Cloud Console -> APIs & Services -> Credentials. ONE value for the whole installation, not per connected account.\"\n },\n {\n \"key\": \"clientSecret\",\n \"label\": \"OAuth client secret\",\n \"scope\": \"provider\",\n \"secret\": true,\n \"help\": \"The client secret for the same OAuth app. One value for the whole installation.\"\n },\n {\n \"key\": \"accessToken\",\n \"label\": \"Access token\",\n \"scope\": \"account\",\n \"secret\": true,\n \"help\": \"Per connected Google account, and it expires after ONE HOUR. The host refreshes it with the refresh token.\"\n },\n {\n \"key\": \"refreshToken\",\n \"label\": \"Refresh token\",\n \"scope\": \"account\",\n \"secret\": true,\n \"help\": \"Per connected Google account. Google issues one only when the consent request asks for offline access; without it the connection dies within the hour.\"\n }\n] as const;\n\n/**\n * The OAuth2 exchange Google Slides requires — DECLARED here, performed by the\n * host.\n *\n * A consent screen needs a browser, a redirect URI and somewhere to persist\n * the result, and all three belong to the host; a package that ran the dance\n * itself would have to own a web server. So this says precisely enough for a\n * host to do it.\n *\n * The access token lasts 3600 seconds. A host that never refreshes will work\n * all afternoon and be broken by morning, which is why the lifetime is stated\n * rather than left to be discovered.\n */\nexport const GOOGLE_SLIDES_OAUTH = {\n \"flow\": \"authorization_code\",\n \"authorizeUrl\": \"https://accounts.google.com/o/oauth2/v2/auth\",\n \"tokenUrl\": \"https://oauth2.googleapis.com/token\",\n \"scopes\": [\n \"https://www.googleapis.com/auth/presentations\"\n ],\n \"accessTokenCredential\": \"accessToken\",\n \"refreshTokenCredential\": \"refreshToken\",\n \"accessTokenTtlSeconds\": 3600\n} as const;\n\n/** Build a Google Slides node's connector metadata from the operation it performs. */\nexport function googleSlidesMeta(\n role: ConnectorMeta[\"role\"],\n operation: string,\n docs: string,\n): ConnectorMeta {\n return { ...GOOGLE_SLIDES_SERVICE, role, operation, docs };\n}\n","/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/actions/presentation-create.json by weaver's generator.\n * A hand-edit here is destroyed by the next protocol sync, which is worse than\n * being rejected, because it works until it silently does not. Fix\n * provider/actions/presentation-create.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- google_slides\n */\n\n/**\n * Google Slides presentation — Create a blank Google Slides presentation.\n *\n * https://developers.google.com/workspace/slides/api/reference/rest/v1/presentations/create\n *\n * `unsafe-to-replay`.\n */\n\nimport type { NodeKindDefinition } from \"@particle-academy/fancy-flow/engine\";\nimport { defineConnectorKind, summarize, type OutputField } from \"@particle-academy/fancy-flow/connectors\";\nimport { googleSlidesMeta } from \"../service.js\";\n\nexport const GOOGLE_SLIDES_PRESENTATION_KIND = \"@particle-academy/google_slides_presentation\";\nexport const GOOGLE_SLIDES_PRESENTATION_OPERATION = \"presentation_create\";\n\nexport const GOOGLE_SLIDES_PRESENTATION_META = googleSlidesMeta(\"action\", \"create a blank presentation\", \"https://developers.google.com/workspace/slides/api/reference/rest/v1/presentations/create\");\n\n/**\n * What this node emits — the \"ingredients\" a downstream node can reference.\n *\n * fancy-flow reads `outputShape` off the kind and offers it in the variable\n * picker, so declaring it is the whole of the work: an author configuring the\n * next node picks `{{ $json.data.id }}` off a list instead of typing a path\n * and hoping.\n */\nexport const GOOGLE_SLIDES_PRESENTATION_OUTPUT: OutputField[] = [\n {\n \"path\": \"data.presentationId\",\n \"type\": \"string\",\n \"description\": \"The id of the created presentation.\"\n },\n {\n \"path\": \"data.title\",\n \"type\": \"string\",\n \"description\": \"The title Google stored.\"\n }\n];\n\nexport const googleSlidesPresentationKind: NodeKindDefinition = defineConnectorKind(GOOGLE_SLIDES_PRESENTATION_META, {\n name: GOOGLE_SLIDES_PRESENTATION_KIND,\n aliases: [\"google_slides_presentation\"],\n label: \"Google Slides presentation\",\n description: \"Create a blank Google Slides presentation.\",\n inputs: [{ id: \"in\" }],\n outputs: [{ id: \"out\" }],\n sideEffects: \"unsafe-to-replay\",\n outputShape: GOOGLE_SLIDES_PRESENTATION_OUTPUT,\n configSchema: [\n {\n \"type\": \"text\",\n \"key\": \"title\",\n \"label\": \"Title\",\n \"required\": true,\n \"description\": \"The title of the new blank presentation.\"\n }\n ],\n defaultConfig: {\n \"mode\": \"auto\"\n },\n renderBody: ({ config }) =>\n summarize(GOOGLE_SLIDES_PRESENTATION_META, config as Record<string, unknown>, \"create a blank presentation\"),\n});\n","/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/manifest.json by weaver's generator.\n * A hand-edit here is destroyed by the next protocol sync, which is worse than\n * being rejected, because it works until it silently does not. Fix\n * provider/manifest.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- google_slides\n */\n\n/**\n * Google Slides's node kinds for fancy-flow.\n *\n * Install this on every host. The TypeScript executors live in the js\n * package's `./flow` subpath; PHP and Python hosts run their own and need only\n * this.\n */\n\nexport * from \"./service.js\";\nexport * from \"./kinds/presentation-create.js\";\n\nimport type { NodeKindDefinition } from \"@particle-academy/fancy-flow/engine\";\nimport { googleSlidesPresentationKind } from \"./kinds/presentation-create.js\";\n\n/** Every Google Slides kind, for a host that registers the lot. */\nexport const GOOGLE_SLIDES_KINDS: NodeKindDefinition[] = [\n googleSlidesPresentationKind,\n];\n"]}
package/package.json ADDED
@@ -0,0 +1,67 @@
1
+ {
2
+ "name": "@particle-academy/google-slides-ui",
3
+ "version": "0.1.0",
4
+ "description": "Google Slides's authoring surface for fancy-flow — the node kinds, their config schemas and their declared output shapes. React on every host; carries no executor.",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "git+https://github.com/Fancy-Friends/google-slides.git"
8
+ },
9
+ "homepage": "https://github.com/Fancy-Friends/google-slides#readme",
10
+ "bugs": "https://github.com/Fancy-Friends/google-slides/issues",
11
+ "type": "module",
12
+ "main": "./dist/index.cjs",
13
+ "module": "./dist/index.js",
14
+ "types": "./dist/index.d.ts",
15
+ "exports": {
16
+ ".": {
17
+ "import": {
18
+ "types": "./dist/index.d.ts",
19
+ "default": "./dist/index.js"
20
+ },
21
+ "require": {
22
+ "types": "./dist/index.d.cts",
23
+ "default": "./dist/index.cjs"
24
+ }
25
+ },
26
+ "./package.json": "./package.json"
27
+ },
28
+ "files": [
29
+ "dist",
30
+ "README.md",
31
+ "CHANGELOG.md",
32
+ "LICENSE"
33
+ ],
34
+ "scripts": {
35
+ "build": "tsup",
36
+ "lint": "tsc --noEmit",
37
+ "test": "node --import tsx --test tests/*.test.ts",
38
+ "prepublishOnly": "tsup"
39
+ },
40
+ "dependencies": {},
41
+ "peerDependencies": {
42
+ "@particle-academy/fancy-flow": ">=0.48.0 <2.0"
43
+ },
44
+ "devDependencies": {
45
+ "@particle-academy/fancy-flow": ">=0.48.0 <2.0",
46
+ "@types/node": "^26.2.0",
47
+ "tsup": "^8.5.0",
48
+ "tsx": "^4.19.0",
49
+ "typescript": "^5.8.0"
50
+ },
51
+ "publishConfig": {
52
+ "access": "public"
53
+ },
54
+ "keywords": [
55
+ "google_slides",
56
+ "productivity",
57
+ "connector",
58
+ "fancy-flow",
59
+ "fancy-ui",
60
+ "particle-academy"
61
+ ],
62
+ "license": "MIT",
63
+ "sideEffects": false,
64
+ "engines": {
65
+ "node": ">=22"
66
+ }
67
+ }