sagadeck 1.7.1 → 1.9.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.
Files changed (105) hide show
  1. package/README.md +55 -4
  2. package/SKILL.md +10 -3
  3. package/bin/sagadeck.js +23 -0
  4. package/docs/ANDAMENTO.md +483 -1
  5. package/docs/PLANO-MELHORIAS.md +180 -0
  6. package/docs/REFERENCIA.md +184 -105
  7. package/package.json +34 -2
  8. package/src/ai/commands.js +2 -2
  9. package/src/ai/deck-ai.js +14 -5
  10. package/src/ai/ia-check.js +127 -0
  11. package/src/ai/ia-config.js +2 -2
  12. package/src/ai/llm.js +5 -1
  13. package/src/ai/map-analysis-run.js +119 -0
  14. package/src/ai/map-data.js +221 -0
  15. package/src/ai/quality.js +1 -1
  16. package/src/ai/video-generation.js +70 -25
  17. package/src/build.js +51 -15
  18. package/src/elements.js +39 -1
  19. package/src/export/browser.js +23 -1
  20. package/src/export/pptx.js +9 -3
  21. package/src/export/shots.js +10 -3
  22. package/src/fiscal/normalize.js +19 -0
  23. package/src/fs-retry.js +37 -2
  24. package/src/import/office.js +5 -4
  25. package/src/layouts.js +114 -99
  26. package/src/lessons.js +1 -1
  27. package/src/library.js +7 -7
  28. package/src/map-analysis.js +109 -0
  29. package/src/map-config.js +89 -0
  30. package/src/map-routing.js +82 -0
  31. package/src/map-services.js +60 -0
  32. package/src/map.js +274 -0
  33. package/src/mcp/server.js +17 -0
  34. package/src/motion.js +20 -6
  35. package/src/purpose.js +1 -1
  36. package/src/runtime/base.css +105 -329
  37. package/src/runtime/fit.js +3 -2
  38. package/src/runtime/fonts/amatic-sc.css +3 -0
  39. package/src/runtime/fonts/bebas-neue.css +2 -0
  40. package/src/runtime/fonts/cabin-sketch.css +2 -0
  41. package/src/runtime/fonts/fraunces.css +3 -0
  42. package/src/runtime/fonts/gelasio.css +3 -0
  43. package/src/runtime/fonts/ibm-plex-mono.css +4 -0
  44. package/src/runtime/fonts/index.json +10 -1
  45. package/src/runtime/fonts/itim.css +2 -0
  46. package/src/runtime/fonts/montserrat.css +2 -0
  47. package/src/runtime/fonts/space-grotesk.css +2 -0
  48. package/src/runtime/map-background.js +91 -0
  49. package/src/runtime/map.js +266 -0
  50. package/src/runtime/runtime.js +81 -100
  51. package/src/runtime/skins/caderno.css +33 -0
  52. package/src/runtime/skins/cartaz.css +27 -0
  53. package/src/runtime/skins/infografico.css +29 -0
  54. package/src/runtime/skins/lousa.css +22 -0
  55. package/src/runtime/skins/musgo.css +42 -0
  56. package/src/runtime/vendor/LEAFLET-LICENSE.txt +26 -0
  57. package/src/runtime/vendor/MAPLIBRE-LEAFLET-LICENSE.txt +15 -0
  58. package/src/runtime/vendor/MAPLIBRE-LICENSE.txt +116 -0
  59. package/src/runtime/vendor/geo-contornos.json +1 -0
  60. package/src/runtime/vendor/leaflet.css +661 -0
  61. package/src/runtime/vendor/leaflet.js +6 -0
  62. package/src/runtime/vendor/maplibre-gl.css +1 -0
  63. package/src/runtime/vendor/maplibre-gl.js +825 -0
  64. package/src/runtime/vendor/maplibre-leaflet.js +234 -0
  65. package/src/runtime/vendor/maplibre-worker.js +10 -0
  66. package/src/studio/ai-chat-route.js +20 -0
  67. package/src/studio/assets/imagens/tour-mapa-botao.jpg +0 -0
  68. package/src/studio/assets/imagens/tour-mapa-editor.jpg +0 -0
  69. package/src/studio/command-approval.js +2 -3
  70. package/src/studio/demo-decks.js +6 -2
  71. package/src/studio/export-jobs.js +86 -0
  72. package/src/studio/exporting.js +36 -18
  73. package/src/studio/feature-demos.js +144 -0
  74. package/src/studio/geo-routes.js +138 -0
  75. package/src/studio/ia-routes.js +9 -0
  76. package/src/studio/layout-samples.js +78 -16
  77. package/src/studio/library-routes.js +0 -9
  78. package/src/studio/project.js +2 -1
  79. package/src/studio/public/ai-settings.js +6 -3
  80. package/src/studio/public/app.js +46 -52
  81. package/src/studio/public/explorer.js +23 -8
  82. package/src/studio/public/export-status.js +154 -0
  83. package/src/studio/public/index.html +17 -10
  84. package/src/studio/public/library.css +12 -3
  85. package/src/studio/public/library.html +3 -0
  86. package/src/studio/public/library.js +39 -12
  87. package/src/studio/public/map-data.js +158 -0
  88. package/src/studio/public/map-editor.js +676 -0
  89. package/src/studio/public/map-fields.js +21 -0
  90. package/src/studio/public/map-settings.js +86 -0
  91. package/src/studio/public/slide-form.js +19 -16
  92. package/src/studio/public/style.css +58 -0
  93. package/src/studio/public/ui-icons.js +1 -1
  94. package/src/studio/public/viewers.js +2 -1
  95. package/src/studio/public/visual-editor.js +1 -1
  96. package/src/studio/server.js +34 -9
  97. package/src/studio/snapshot.js +8 -4
  98. package/src/studio/template-collections.js +1 -1
  99. package/src/studio/tour.js +158 -0
  100. package/src/themes.js +154 -0
  101. package/templates/cenario-e-ciencia.yaml +1 -21
  102. package/templates/ensaio-api.yaml +3 -3
  103. package/templates/cenario/Texto no cen/303/241rio.yaml" +0 -171
  104. package/templates/cenario/imagens/cidade.svg +0 -30
  105. package/templates/cenario/imagens/pessoa.svg +0 -15
@@ -0,0 +1,234 @@
1
+ /* jshint esversion: 6, -W008, -W030, -W083 */
2
+ // Generated from src/leaflet-maplibre-gl.mjs. Run `npm run build` to update.
3
+ (function(global, factory) {
4
+ typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("leaflet"), require("maplibre-gl")) : typeof define === "function" && define.amd ? define([
5
+ "exports",
6
+ "leaflet",
7
+ "maplibre-gl"
8
+ ], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global.MaplibreGLLeaflet = {}, global.L, global.maplibregl));
9
+ })(this, function(exports, leaflet, maplibre_gl) {
10
+ Object.defineProperty(exports, "__esModule", { value: true });
11
+ //#region \0rolldown/runtime.js
12
+ var __create = Object.create;
13
+ var __defProp = Object.defineProperty;
14
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
15
+ var __getOwnPropNames = Object.getOwnPropertyNames;
16
+ var __getProtoOf = Object.getPrototypeOf;
17
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
18
+ var __copyProps = (to, from, except, desc) => {
19
+ if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
20
+ key = keys[i];
21
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
22
+ get: ((k) => from[k]).bind(null, key),
23
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
24
+ });
25
+ }
26
+ return to;
27
+ };
28
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
29
+ value: mod,
30
+ enumerable: true
31
+ }) : target, mod));
32
+ //#endregion
33
+ leaflet = __toESM(leaflet, 1);
34
+ maplibre_gl = __toESM(maplibre_gl, 1);
35
+ //#region src/leaflet-maplibre-gl.mjs
36
+ var L = leaflet.default || leaflet;
37
+ var MaplibreGL = L.Layer.extend({
38
+ options: {
39
+ updateInterval: 32,
40
+ padding: .1,
41
+ interactive: false,
42
+ pane: "tilePane"
43
+ },
44
+ initialize: function(options) {
45
+ L.setOptions(this, options);
46
+ this._throttledUpdate = L.Util.throttle(this._update, this.options.updateInterval, this);
47
+ },
48
+ onAdd: function(map) {
49
+ if (!this._container) this._initContainer();
50
+ var paneName = this.getPaneName();
51
+ map.getPane(paneName).appendChild(this._container);
52
+ this._initGL();
53
+ this._offset = this._map.containerPointToLayerPoint([0, 0]);
54
+ if (map.options.zoomAnimation) L.DomEvent.on(map._proxy, L.DomUtil.TRANSITION_END, this._transitionEnd, this);
55
+ },
56
+ onRemove: function(map) {
57
+ if (this._map._proxy && this._map.options.zoomAnimation) L.DomEvent.off(this._map._proxy, L.DomUtil.TRANSITION_END, this._transitionEnd, this);
58
+ var paneName = this.getPaneName();
59
+ map.getPane(paneName).removeChild(this._container);
60
+ this._glMap.remove();
61
+ this._glMap = null;
62
+ },
63
+ getEvents: function() {
64
+ return {
65
+ move: this._throttledUpdate,
66
+ zoomanim: this._animateZoom,
67
+ zoom: this._pinchZoom,
68
+ zoomstart: this._zoomStart,
69
+ zoomend: this._zoomEnd,
70
+ resize: this._resize
71
+ };
72
+ },
73
+ getAttribution: function() {
74
+ if (this.options.attributionControl) return this.options.attributionControl.customAttribution;
75
+ var map = this._glMap;
76
+ if (map && this.options.attributionControl !== false) {
77
+ var style = map.getStyle();
78
+ if (style && style.sources) return Object.keys(style.sources).map(function(sourceId) {
79
+ var source = map.getSource(sourceId);
80
+ return source && typeof source.attribution === "string" ? source.attribution.trim() : null;
81
+ }).filter(Boolean).join(", ");
82
+ }
83
+ return "";
84
+ },
85
+ getMaplibreMap: function() {
86
+ return this._glMap;
87
+ },
88
+ getCanvas: function() {
89
+ return this._glMap.getCanvas();
90
+ },
91
+ getSize: function() {
92
+ return this._map.getSize().multiplyBy(1 + this.options.padding * 2);
93
+ },
94
+ getBounds: function() {
95
+ var halfSize = this.getSize().multiplyBy(.5);
96
+ var center = this._map.latLngToContainerPoint(this._map.getCenter());
97
+ return L.latLngBounds(this._map.containerPointToLatLng(center.subtract(halfSize)), this._map.containerPointToLatLng(center.add(halfSize)));
98
+ },
99
+ getContainer: function() {
100
+ return this._container;
101
+ },
102
+ getPaneName: function() {
103
+ return this._map.getPane(this.options.pane) ? this.options.pane : "tilePane";
104
+ },
105
+ _roundPoint: function(p) {
106
+ return {
107
+ x: Math.round(p.x),
108
+ y: Math.round(p.y)
109
+ };
110
+ },
111
+ _initContainer: function() {
112
+ var container = this._container = L.DomUtil.create("div", "leaflet-gl-layer");
113
+ this._resizeContainer();
114
+ var offset = this._map.getSize().multiplyBy(this.options.padding);
115
+ var topLeft = this._map.containerPointToLayerPoint([0, 0]).subtract(offset);
116
+ L.DomUtil.setPosition(container, this._roundPoint(topLeft));
117
+ },
118
+ _resizeContainer: function() {
119
+ var size = this.getSize();
120
+ this._container.style.width = size.x + "px";
121
+ this._container.style.height = size.y + "px";
122
+ },
123
+ _initGL: function() {
124
+ var center = this._map.getCenter();
125
+ var options = L.extend({}, this.options, {
126
+ container: this._container,
127
+ center: [center.lng, center.lat],
128
+ zoom: this._map.getZoom() - 1,
129
+ attributionControl: false
130
+ });
131
+ this._glMap = new maplibre_gl.Map(options);
132
+ var _map = this._map;
133
+ var _currentAttribution = this.getAttribution();
134
+ var _getAttribution = this.getAttribution.bind(this);
135
+ this._glMap.on("load", function() {
136
+ if (_map && _map.attributionControl) {
137
+ _map.attributionControl.removeAttribution(_currentAttribution);
138
+ _map.attributionControl.addAttribution(_getAttribution());
139
+ }
140
+ });
141
+ if (this._glMap.setTransformConstrain) this._glMap.setTransformConstrain(function(center, zoom) {
142
+ return {
143
+ center,
144
+ zoom
145
+ };
146
+ });
147
+ else {
148
+ var transform = this._glMap.transform;
149
+ var transformProto = Object.getPrototypeOf(transform);
150
+ var latRangeDescriptor = Object.getOwnPropertyDescriptor(transformProto, "latRange");
151
+ if (!latRangeDescriptor || latRangeDescriptor.set || latRangeDescriptor.writable) transform.latRange = null;
152
+ var maxValidLatitudeDescriptor = Object.getOwnPropertyDescriptor(transformProto, "maxValidLatitude");
153
+ if (!maxValidLatitudeDescriptor || maxValidLatitudeDescriptor.set || maxValidLatitudeDescriptor.writable) transform.maxValidLatitude = Infinity;
154
+ if (transform._helper && transform._helper._latRange) transform._helper._latRange = [-Infinity, Infinity];
155
+ }
156
+ this._transformGL(this._glMap);
157
+ if (this._glMap._canvas.canvas) this._glMap._actualCanvas = this._glMap._canvas.canvas;
158
+ else this._glMap._actualCanvas = this._glMap._canvas;
159
+ var canvas = this._glMap._actualCanvas;
160
+ L.DomUtil.addClass(canvas, "leaflet-image-layer");
161
+ L.DomUtil.addClass(canvas, "leaflet-zoom-animated");
162
+ if (this.options.interactive) L.DomUtil.addClass(canvas, "leaflet-interactive");
163
+ if (this.options.className) L.DomUtil.addClass(canvas, this.options.className);
164
+ },
165
+ _update: function(e) {
166
+ if (!this._map) return;
167
+ this._offset = this._map.containerPointToLayerPoint([0, 0]);
168
+ if (this._zooming) return;
169
+ var container = this._container, gl = this._glMap, offset = this._map.getSize().multiplyBy(this.options.padding), topLeft = this._map.containerPointToLayerPoint([0, 0]).subtract(offset);
170
+ L.DomUtil.setPosition(container, this._roundPoint(topLeft));
171
+ this._transformGL(gl);
172
+ },
173
+ _transformGL: function(gl) {
174
+ var center = this._map.getCenter();
175
+ gl.jumpTo({
176
+ center: [center.lng, center.lat],
177
+ zoom: this._map.getZoom() - 1
178
+ });
179
+ },
180
+ _pinchZoom: function(e) {
181
+ this._glMap.jumpTo({
182
+ zoom: this._map.getZoom() - 1,
183
+ center: this._map.getCenter()
184
+ });
185
+ },
186
+ _animateZoom: function(e) {
187
+ var scale = this._map.getZoomScale(e.zoom);
188
+ var padding = this._map.getSize().multiplyBy(this.options.padding * scale);
189
+ var viewHalf = this.getSize()._divideBy(2);
190
+ var topLeft = this._map.project(e.center, e.zoom)._subtract(viewHalf)._add(this._map._getMapPanePos().add(padding))._round();
191
+ var offset = this._map.project(this._map.getBounds().getNorthWest(), e.zoom)._subtract(topLeft);
192
+ L.DomUtil.setTransform(this._glMap._actualCanvas, offset.subtract(this._offset), scale);
193
+ },
194
+ _zoomStart: function(e) {
195
+ this._zooming = true;
196
+ },
197
+ _zoomEnd: function() {
198
+ var scale = this._map.getZoomScale(this._map.getZoom());
199
+ L.DomUtil.setTransform(this._glMap._actualCanvas, null, scale);
200
+ this._zooming = false;
201
+ this._update();
202
+ },
203
+ _transitionEnd: function(e) {
204
+ L.Util.requestAnimFrame(function() {
205
+ var zoom = this._map.getZoom();
206
+ var center = this._map.getCenter();
207
+ var offset = this._map.latLngToContainerPoint(this._map.getBounds().getNorthWest());
208
+ this._resizeContainer();
209
+ L.DomUtil.setTransform(this._glMap._actualCanvas, offset, 1);
210
+ this._glMap.once("moveend", L.Util.bind(function() {
211
+ this._zoomEnd();
212
+ }, this));
213
+ this._glMap.jumpTo({
214
+ center,
215
+ zoom: zoom - 1
216
+ });
217
+ }, this);
218
+ },
219
+ _resize: function(e) {
220
+ this._transitionEnd(e);
221
+ }
222
+ });
223
+ var maplibreGL = function(options) {
224
+ return new MaplibreGL(options);
225
+ };
226
+ if (Object.isExtensible(L)) {
227
+ L.MaplibreGL = MaplibreGL;
228
+ L.maplibreGL = maplibreGL;
229
+ }
230
+ //#endregion
231
+ exports.MaplibreGL = MaplibreGL;
232
+ exports.default = maplibreGL;
233
+ exports.maplibreGL = maplibreGL;
234
+ });