aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/tensorboard/components/tf_imports/BUILD
blob: b067a6380b1717269beec83096c3070c346f78f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
package(default_visibility = ["//tensorflow:internal"])

load("//tensorflow/tensorboard:hacks.bzl", "tensorboard_typescript_bundle")
load("//tensorflow/tensorboard:web.bzl", "ts_web_library")

licenses(["notice"])  # Apache 2.0

ts_web_library(
    name = "webcomponentsjs",
    srcs = ["@org_definitelytyped//:webcomponents.js.d.ts"],
    path = "/webcomponentsjs",
    exports = ["@org_polymer_webcomponentsjs"],
)

ts_web_library(
    name = "polymer",
    srcs = ["@org_definitelytyped//:polymer.d.ts"],
    path = "/polymer",
    exports = ["@org_polymer"],
    deps = [":webcomponentsjs"],
)

ts_web_library(
    name = "lodash",
    srcs = [
        "lodash.html",
        "@org_definitelytyped//:lodash.d.ts",
    ],
    path = "/tf-imports",
    deps = ["@com_lodash"],
)

ts_web_library(
    name = "threejs",
    srcs = [
        "threejs.html",
        "@org_definitelytyped//:three.d.ts",
        "@org_threejs//:OrbitControls.js",
        "@org_threejs//:three.js",
    ],
    path = "/tf-imports",
)

ts_web_library(
    name = "numericjs",
    srcs = [
        "numericjs.html",
        "@com_numericjs//:numeric.js",
    ],
    path = "/tf-imports",
)

ts_web_library(
    name = "weblas",
    srcs = [
        "weblas.html",
        "@io_github_waylonflinn_weblas//:weblas.js",
    ],
    path = "/tf-imports",
)

ts_web_library(
    name = "graphlib",
    srcs = [
        "graphlib.html",
        "@io_github_cpettitt_graphlib//:graphlib.core.min.js",
    ],
    path = "/tf-imports",
    deps = [":lodash"],
)

ts_web_library(
    name = "dagre",
    srcs = [
        "dagre.html",
        "@io_github_cpettitt_dagre//:dagre.core.min.js",
    ],
    path = "/tf-imports",
    deps = [
        ":graphlib",
        ":lodash",
    ],
)

ts_web_library(
    name = "d3",
    srcs = [
        "d3.d.ts",
        "d3.html",
        "@org_d3js//:d3.min.js",
    ],
    path = "/tf-imports",
)

ts_web_library(
    name = "plottable",
    srcs = [
        "plottable.d.ts",
        "plottable.html",
        "@com_palantir_plottable//:plottable.css",
        "@com_palantir_plottable//:plottable.js",
    ],
    path = "/tf-imports",
    deps = [":d3"],
)

ts_web_library(
    name = "web_component_tester",
    testonly = 1,
    exports = [
        ":chai_typings",
        ":mocha_typings",
        ":sinon_typings",
        "@org_npmjs_registry_web_component_tester",
    ],
)

ts_web_library(
    name = "chai_typings",
    testonly = 1,
    srcs = ["@org_definitelytyped//:chai.d.ts"],
    path = "/chai",
    visibility = ["//visibility:private"],
)

ts_web_library(
    name = "mocha_typings",
    testonly = 1,
    srcs = ["@org_definitelytyped//:mocha.d.ts"],
    path = "/mocha",
    visibility = ["//visibility:private"],
)

ts_web_library(
    name = "sinon_typings",
    testonly = 1,
    srcs = ["@org_definitelytyped//:sinon.d.ts"],
    path = "/sinonjs",
    visibility = ["//visibility:private"],
)

# Generate single TypeScript typings file for d3.js with no ES6 imports.
#
# The DefinitelyTyped definition of d3 v4 was written under the assumption that
# we want to use d3 in a modularized way. We don't want to do that because its
# import statements use NodeJS namespaces, and the Web Compiler only supports
# W3C, ECMA, and IETF standards.
tensorboard_typescript_bundle(
    name = "d3_typings",
    out = "d3.d.ts",
    namespace_srcs = {"d3": [
        "d3-transition.d.ts",
        "@org_definitelytyped_types_d3_path//:index.d.ts",
        "@org_definitelytyped_types_d3_time//:index.d.ts",
        "@org_definitelytyped_types_d3_dsv//:index.d.ts",
        "@org_definitelytyped_types_d3_color//:index.d.ts",
        "@org_definitelytyped_types_d3_selection//:index.d.ts",
        "@org_definitelytyped_types_d3_shape//:index.d.ts",
        "@org_definitelytyped_types_d3_scale//:index.d.ts",
        "@org_definitelytyped_types_d3_request//:index.d.ts",
        "@org_definitelytyped_types_d3_interpolate//:index.d.ts",
        "@org_definitelytyped_types_d3_drag//:index.d.ts",
        "@org_definitelytyped_types_d3_brush//:index.d.ts",
        "@org_definitelytyped_types_d3_axis//:index.d.ts",
        "@org_definitelytyped_types_d3_zoom//:index.d.ts",
        "@org_definitelytyped_types_d3_array//:index.d.ts",
        "@org_definitelytyped_types_d3_chord//:index.d.ts",
        "@org_definitelytyped_types_d3_collection//:index.d.ts",
        "@org_definitelytyped_types_d3_dispatch//:index.d.ts",
        "@org_definitelytyped_types_d3_ease//:index.d.ts",
        "@org_definitelytyped_types_d3_force//:index.d.ts",
        "@org_definitelytyped_types_d3_format//:index.d.ts",
        "@org_definitelytyped_types_d3_hierarchy//:index.d.ts",
        "@org_definitelytyped_types_d3_polygon//:index.d.ts",
        "@org_definitelytyped_types_d3_quadtree//:index.d.ts",
        "@org_definitelytyped_types_d3_queue//:index.d.ts",
        "@org_definitelytyped_types_d3_random//:index.d.ts",
        "@org_definitelytyped_types_d3_timer//:index.d.ts",
        "@org_definitelytyped_types_d3_voronoi//:index.d.ts",
    ]},
)

# It would be nice if Plottable released a .d.ts file for plottable.js like
# they did for previous versions.
tensorboard_typescript_bundle(
    name = "plottable_typings",
    out = "plottable.d.ts",
    namespace_srcs = {
        "Plottable": [
            "@com_palantir_plottable//:build/src/core/dataset.d.ts",
            "@com_palantir_plottable//:build/src/core/interfaces.d.ts",
            "@com_palantir_plottable//:build/src/core/version.d.ts",
        ],
        "Plottable.Animators": [
            "@com_palantir_plottable//:build/src/animators/animator.d.ts",
            "@com_palantir_plottable//:build/src/animators/easingAnimator.d.ts",
            "@com_palantir_plottable//:build/src/animators/nullAnimator.d.ts",
        ],
        "Plottable.Axes": [
            "@com_palantir_plottable//:build/src/axes/axis.d.ts",
            "@com_palantir_plottable//:build/src/axes/categoryAxis.d.ts",
            "@com_palantir_plottable//:build/src/axes/numericAxis.d.ts",
            "@com_palantir_plottable//:build/src/axes/timeAxis.d.ts",
        ],
        "Plottable.Components": [
            "@com_palantir_plottable//:build/src/components/component.d.ts",
            "@com_palantir_plottable//:build/src/components/componentContainer.d.ts",
            "@com_palantir_plottable//:build/src/components/dragBoxLayer.d.ts",
            "@com_palantir_plottable//:build/src/components/dragLineLayer.d.ts",
            "@com_palantir_plottable//:build/src/components/gridlines.d.ts",
            "@com_palantir_plottable//:build/src/components/group.d.ts",
            "@com_palantir_plottable//:build/src/components/guideLineLayer.d.ts",
            "@com_palantir_plottable//:build/src/components/interpolatedColorLegend.d.ts",
            "@com_palantir_plottable//:build/src/components/label.d.ts",
            "@com_palantir_plottable//:build/src/components/legend.d.ts",
            "@com_palantir_plottable//:build/src/components/plotGroup.d.ts",
            "@com_palantir_plottable//:build/src/components/selectionBoxLayer.d.ts",
            "@com_palantir_plottable//:build/src/components/table.d.ts",
            "@com_palantir_plottable//:build/src/components/xDragBoxLayer.d.ts",
            "@com_palantir_plottable//:build/src/components/yDragBoxLayer.d.ts",
        ],
        "Plottable.Configs": [
            "@com_palantir_plottable//:build/src/core/config.d.ts",
        ],
        "Plottable.Formatters": [
            "@com_palantir_plottable//:build/src/core/formatters.d.ts",
        ],
        "Plottable.RenderController": [
            "@com_palantir_plottable//:build/src/core/renderController.d.ts",
        ],
        "Plottable.RenderPolicies": [
            "@com_palantir_plottable//:build/src/core/renderPolicy.d.ts",
        ],
        "Plottable.SymbolFactories": [
            "@com_palantir_plottable//:build/src/core/symbolFactories.d.ts",
        ],
        "Plottable.Dispatchers": [
            "@com_palantir_plottable//:build/src/dispatchers/dispatcher.d.ts",
            "@com_palantir_plottable//:build/src/dispatchers/keyDispatcher.d.ts",
            "@com_palantir_plottable//:build/src/dispatchers/mouseDispatcher.d.ts",
            "@com_palantir_plottable//:build/src/dispatchers/touchDispatcher.d.ts",
        ],
        "Plottable.Drawers": [
            "@com_palantir_plottable//:build/src/drawers/arcDrawer.d.ts",
            "@com_palantir_plottable//:build/src/drawers/arcOutlineDrawer.d.ts",
            "@com_palantir_plottable//:build/src/drawers/areaDrawer.d.ts",
            "@com_palantir_plottable//:build/src/drawers/canvasBuffer.d.ts",
            "@com_palantir_plottable//:build/src/drawers/canvasDrawer.d.ts",
            "@com_palantir_plottable//:build/src/drawers/drawStep.d.ts",
            "@com_palantir_plottable//:build/src/drawers/drawer.d.ts",
            "@com_palantir_plottable//:build/src/drawers/lineDrawer.d.ts",
            "@com_palantir_plottable//:build/src/drawers/rectangleDrawer.d.ts",
            "@com_palantir_plottable//:build/src/drawers/segmentDrawer.d.ts",
            "@com_palantir_plottable//:build/src/drawers/svgDrawer.d.ts",
            "@com_palantir_plottable//:build/src/drawers/symbolDrawer.d.ts",
        ],
        "Plottable.Interactions": [
            "@com_palantir_plottable//:build/src/interactions/clickInteraction.d.ts",
            "@com_palantir_plottable//:build/src/interactions/dragInteraction.d.ts",
            "@com_palantir_plottable//:build/src/interactions/interaction.d.ts",
            "@com_palantir_plottable//:build/src/interactions/keyInteraction.d.ts",
            "@com_palantir_plottable//:build/src/interactions/panZoomInteraction.d.ts",
            "@com_palantir_plottable//:build/src/interactions/pointerInteraction.d.ts",
        ],
        "Plottable.Plots": [
            "@com_palantir_plottable//:build/src/plots/areaPlot.d.ts",
            "@com_palantir_plottable//:build/src/plots/barPlot.d.ts",
            "@com_palantir_plottable//:build/src/plots/clusteredBarPlot.d.ts",
            "@com_palantir_plottable//:build/src/plots/commons.d.ts",
            "@com_palantir_plottable//:build/src/plots/linePlot.d.ts",
            "@com_palantir_plottable//:build/src/plots/piePlot.d.ts",
            "@com_palantir_plottable//:build/src/plots/plot.d.ts",
            "@com_palantir_plottable//:build/src/plots/rectanglePlot.d.ts",
            "@com_palantir_plottable//:build/src/plots/scatterPlot.d.ts",
            "@com_palantir_plottable//:build/src/plots/segmentPlot.d.ts",
            "@com_palantir_plottable//:build/src/plots/stackedAreaPlot.d.ts",
            "@com_palantir_plottable//:build/src/plots/stackedBarPlot.d.ts",
            "@com_palantir_plottable//:build/src/plots/waterfallPlot.d.ts",
            "@com_palantir_plottable//:build/src/plots/xyPlot.d.ts",
        ],
        "Plottable.Scales": [
            "@com_palantir_plottable//:build/src/scales/index.d.ts",
            "@com_palantir_plottable//:build/src/scales/categoryScale.d.ts",
            "@com_palantir_plottable//:build/src/scales/colorScale.d.ts",
            "@com_palantir_plottable//:build/src/scales/interpolatedColorScale.d.ts",
            "@com_palantir_plottable//:build/src/scales/linearScale.d.ts",
            "@com_palantir_plottable//:build/src/scales/modifiedLogScale.d.ts",
            "@com_palantir_plottable//:build/src/scales/quantitativeScale.d.ts",
            "@com_palantir_plottable//:build/src/scales/scale.d.ts",
            "@com_palantir_plottable//:build/src/scales/timeScale.d.ts",
        ],
        "Plottable.Scales.TickGenerators": [
            "@com_palantir_plottable//:build/src/scales/tickGenerators.d.ts",
        ],
        "Plottable.Utils": [
            "@com_palantir_plottable//:build/src/utils/addD3SelectionMulti.d.ts",
            "@com_palantir_plottable//:build/src/utils/bucket.d.ts",
            "@com_palantir_plottable//:build/src/utils/callbackSet.d.ts",
            "@com_palantir_plottable//:build/src/utils/coerceD3.d.ts",
            "@com_palantir_plottable//:build/src/utils/entityStore.d.ts",
            "@com_palantir_plottable//:build/src/utils/makeEnum.d.ts",
            "@com_palantir_plottable//:build/src/utils/map.d.ts",
            "@com_palantir_plottable//:build/src/utils/set.d.ts",
            "@com_palantir_plottable//:build/src/utils/transformAwareTranslator.d.ts",
        ],
        "Plottable.Utils.Array": [
            "@com_palantir_plottable//:build/src/utils/arrayUtils.d.ts",
        ],
        "Plottable.Utils.Color": [
            "@com_palantir_plottable//:build/src/utils/colorUtils.d.ts",
        ],
        "Plottable.Utils.DOM": [
            "@com_palantir_plottable//:build/src/utils/domUtils.d.ts",
        ],
        "Plottable.Utils.Math": [
            "@com_palantir_plottable//:build/src/utils/mathUtils.d.ts",
        ],
        "Plottable.Utils.Stacking": [
            "@com_palantir_plottable//:build/src/utils/stackingUtils.d.ts",
        ],
        "Plottable.Utils.Window": [
            "@com_palantir_plottable//:build/src/utils/windowUtils.d.ts",
        ],
    },
    namespace_symbol_aliases = {
        "Plottable.Animators": {
            "AttributeToAppliedProjector": "Plottable.AttributeToAppliedProjector",
            "SimpleSelection": "Plottable.SimpleSelection",
        },
        "Plottable.Axes": {
            "Component": "Plottable.Components.Component",
            "Formatter": "Plottable.Formatters.Formatter",
            "Point": "Plottable.Point",
            "QuantitativeScale": "Plottable.Scales.QuantitativeScale",
            "Scale": "Plottable.Scales.Scale",
            "Scales": "Plottable.Scales",
            "SimpleSelection": "Plottable.SimpleSelection",
            "SpaceRequest": "Plottable.SpaceRequest",
        },
        "Plottable.Components": {
            "Bounds": "Plottable.Bounds",
            "Formatter": "Plottable.Formatters.Formatter",
            "IEntity": "Plottable.IEntity",
            "Interactions": "Plottable.Interactions",
            "Plots": "Plottable.Plots",
            "Point": "Plottable.Point",
            "QuantitativeScale": "Plottable.Scales.QuantitativeScale",
            "Scales": "Plottable.Scales",
            "SimpleSelection": "Plottable.SimpleSelection",
            "SpaceRequest": "Plottable.SpaceRequest",
            "SymbolFactory": "Plottable.SymbolFactories.SymbolFactory",
        },
        "Plottable.RenderController": {
            "Component": "Plottable.Components.Component",
            "RenderPolicies": "Plottable.RenderPolicies",
        },
        "Plottable.SymbolFactories": {
            "d3Shape": "d3",
        },
        "Plottable.Dispatchers": {
            "Component": "Plottable.Components.Component",
            "Dispatchers": "Plottable.Dispatchers",
            "Point": "Plottable.Point",
        },
        "Plottable.Drawers": {
            "AttributeToAppliedProjector": "Plottable.AttributeToAppliedProjector",
            "AttributeToProjector": "Plottable.AttributeToProjector",
            "Dataset": "Plottable.Dataset",
            "IAccessor": "Plottable.IAccessor",
            "IAnimator": "Plottable.Animators.IAnimator",
            "SimpleSelection": "Plottable.SimpleSelection",
            "SymbolFactory": "Plottable.SymbolFactories.SymbolFactory",
        },
        "Plottable.Interactions": {
            "Component": "Plottable.Components.Component",
            "Point": "Plottable.Point",
            "TransformableScale": "Plottable.Scales.TransformableScale",
        },
        "Plottable.Plots": {
            "AppliedDrawStep": "Plottable.Drawers.AppliedDrawStep",
            "AttributeToProjector": "Plottable.AttributeToProjector",
            "Bounds": "Plottable.Bounds",
            "Component": "Plottable.Components.Component",
            "Dataset": "Plottable.Dataset",
            "DrawStep": "Plottable.Drawers.DrawStep",
            "Drawers": "Plottable.Drawers",
            "Formatter": "Plottable.Formatters.Formatter",
            "IAccessor": "Plottable.IAccessor",
            "IAnimator": "Plottable.Animators.IAnimator",
            "IDrawer": "Plottable.Drawers.IDrawer",
            "IEntity": "Plottable.IEntity",
            "IScaleCallback": "Plottable.Scales.IScaleCallback",
            "Plots": "Plottable.Plots",
            "Point": "Plottable.Point",
            "Projector": "Plottable.Projector",
            "ProxyDrawer": "Plottable.Drawers.ProxyDrawer",
            "QuantitativeScale": "Plottable.Scales.QuantitativeScale",
            "Range": "Plottable.Range",
            "Scale": "Plottable.Scales.Scale",
            "SimpleSelection": "Plottable.SimpleSelection",
            "SymbolFactory": "Plottable.SymbolFactories.SymbolFactory",
            "TransformableScale": "Plottable.Scales.TransformableScale",
            "Utils": "Plottable.Utils",
            "d3Shape": "d3",
        },
        "Plottable.Scales": {
            "Dataset": "Plottable.Dataset",
            "Scales": "Plottable.Scales",
        },
        "Plottable.Scales.TickGenerators": {
            "QuantitativeScale": "Plottable.Scales.QuantitativeScale",
        },
        "Plottable.Utils": {
            "Bounds": "Plottable.Bounds",
            "Component": "Plottable.Components.Component",
            "Dataset": "Plottable.Dataset",
            "IAccessor": "Plottable.IAccessor",
            "Point": "Plottable.Point",
            "Range": "Plottable.Range",
            "SimpleSelection": "Plottable.SimpleSelection",
            "Utils": "Plottable.Utils",
        },
    },
    namespace_symbol_aliases_public = {
        "Plottable": {
            "Axis": "Plottable.Axes.Axis",
            "AxisOrientation": "Plottable.Axes.AxisOrientation",
            "ClickCallback": "Plottable.Interactions.ClickCallback",
            "Component": "Plottable.Components.Component",
            "ComponentCallback": "Plottable.Components.ComponentCallback",
            "ComponentContainer": "Plottable.Components.ComponentContainer",
            "Dispatcher": "Plottable.Dispatchers.Dispatcher",
            "DragBoxCallback": "Plottable.Components.DragBoxCallback",
            "DragCallback": "Plottable.Interactions.DragCallback",
            "EaseFn": "Plottable.Animators.EaseFn",
            "EaseName": "Plottable.Animators.EaseName",
            "Easing": "Plottable.Animators.Easing",
            "Formatter": "Plottable.Formatters.Formatter",
            "IAnimator": "Plottable.Animators.IAnimator",
            "IDragLineCallback": "Plottable.Components.IDragLineCallback",
            "IDrawer": "Plottable.Drawers.IDrawer",
            "IResizeHandler": "Plottable.Components.IResizeHandler",
            "IScaleCallback": "Plottable.Scales.IScaleCallback",
            "Interaction": "Plottable.Interactions.Interaction",
            "Key": "Plottable.Interactions.Key",
            "KeyCallback": "Plottable.Interactions.KeyCallback",
            "Null": "Plottable.Animators.Null",
            "Plot": "Plottable.Plots.Plot",
            "PointerCallback": "Plottable.Interactions.PointerCallback",
            "ProxyDrawer": "Plottable.Drawers.ProxyDrawer",
            "QuantitativeScale": "Plottable.Scales.QuantitativeScale",
            "Renderer": "Plottable.Plots.Renderer",
            "Scale": "Plottable.Scales.Scale",
            "SymbolFactory": "Plottable.SymbolFactories.SymbolFactory",
            "TimeInterval": "Plottable.Axes.TimeInterval",
            "TransformableScale": "Plottable.Scales.TransformableScale",
            "XAlignment": "Plottable.Components.XAlignment",
            "XYPlot": "Plottable.Plots.XYPlot",
            "YAlignment": "Plottable.Components.YAlignment",
        },
    },
)

# Removes the 'declare module' block inside this file, but keeps its content.
genrule(
    name = "kludge_d3_transition",
    srcs = ["@org_definitelytyped_types_d3_transition//:index.d.ts"],
    outs = ["d3-transition.d.ts"],
    cmd = "sed '/^declare module/d' $< | awk '/^}$$/ && !p {p++;next}1' >$@",
)

filegroup(
    name = "all_files",
    srcs = glob(["**"]),
    tags = ["notsan"],
)