@osdk/api 2.8.0-beta.27 → 2.8.0-beta.29

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 (78) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/build/browser/derivedProperties/DerivedProperty.js.map +1 -1
  3. package/build/browser/index.js.map +1 -1
  4. package/build/browser/object/Media.js.map +1 -1
  5. package/build/browser/public/shapes-internal.js +2 -0
  6. package/build/browser/public/shapes-internal.js.map +1 -0
  7. package/build/browser/public/unstable.js +2 -0
  8. package/build/browser/public/unstable.js.map +1 -1
  9. package/build/browser/shapes/InlineShapeConfig.js +2 -0
  10. package/build/browser/shapes/InlineShapeConfig.js.map +1 -0
  11. package/build/browser/shapes/ShapeBuilder.js +243 -0
  12. package/build/browser/shapes/ShapeBuilder.js.map +1 -0
  13. package/build/browser/shapes/ShapeDefinition.js +59 -0
  14. package/build/browser/shapes/ShapeDefinition.js.map +1 -0
  15. package/build/browser/shapes/computeShapeId.js +97 -0
  16. package/build/browser/shapes/computeShapeId.js.map +1 -0
  17. package/build/browser/shapes/configToShapeDefinition.js +115 -0
  18. package/build/browser/shapes/configToShapeDefinition.js.map +1 -0
  19. package/build/browser/shapes/index.js +31 -0
  20. package/build/browser/shapes/index.js.map +1 -0
  21. package/build/browser/shapes/internal.js +2 -0
  22. package/build/browser/shapes/internal.js.map +1 -0
  23. package/build/cjs/{ObjectSet-By-T_QQB.d.cts → ObjectSet-DkBNIajH.d.cts} +16 -11
  24. package/build/cjs/index.d.cts +2 -2
  25. package/build/cjs/public/shapes-internal.cjs +4 -0
  26. package/build/cjs/public/shapes-internal.cjs.map +1 -0
  27. package/build/cjs/public/shapes-internal.d.cts +4 -0
  28. package/build/cjs/public/unstable.cjs +401 -0
  29. package/build/cjs/public/unstable.cjs.map +1 -1
  30. package/build/cjs/public/unstable.d.cts +57 -3
  31. package/build/cjs/shapes-internal-DQ2ODZcP.d.cts +152 -0
  32. package/build/esm/derivedProperties/DerivedProperty.js.map +1 -1
  33. package/build/esm/index.js.map +1 -1
  34. package/build/esm/object/Media.js.map +1 -1
  35. package/build/esm/public/shapes-internal.js +2 -0
  36. package/build/esm/public/shapes-internal.js.map +1 -0
  37. package/build/esm/public/unstable.js +2 -0
  38. package/build/esm/public/unstable.js.map +1 -1
  39. package/build/esm/shapes/InlineShapeConfig.js +2 -0
  40. package/build/esm/shapes/InlineShapeConfig.js.map +1 -0
  41. package/build/esm/shapes/ShapeBuilder.js +243 -0
  42. package/build/esm/shapes/ShapeBuilder.js.map +1 -0
  43. package/build/esm/shapes/ShapeDefinition.js +59 -0
  44. package/build/esm/shapes/ShapeDefinition.js.map +1 -0
  45. package/build/esm/shapes/computeShapeId.js +97 -0
  46. package/build/esm/shapes/computeShapeId.js.map +1 -0
  47. package/build/esm/shapes/configToShapeDefinition.js +115 -0
  48. package/build/esm/shapes/configToShapeDefinition.js.map +1 -0
  49. package/build/esm/shapes/index.js +31 -0
  50. package/build/esm/shapes/index.js.map +1 -0
  51. package/build/esm/shapes/internal.js +2 -0
  52. package/build/esm/shapes/internal.js.map +1 -0
  53. package/build/types/derivedProperties/DerivedProperty.d.ts +1 -10
  54. package/build/types/derivedProperties/DerivedProperty.d.ts.map +1 -1
  55. package/build/types/index.d.ts +1 -1
  56. package/build/types/index.d.ts.map +1 -1
  57. package/build/types/object/Media.d.ts +14 -0
  58. package/build/types/object/Media.d.ts.map +1 -1
  59. package/build/types/public/shapes-internal.d.ts +1 -0
  60. package/build/types/public/shapes-internal.d.ts.map +1 -0
  61. package/build/types/public/unstable.d.ts +2 -0
  62. package/build/types/public/unstable.d.ts.map +1 -1
  63. package/build/types/shapes/InlineShapeConfig.d.ts +29 -0
  64. package/build/types/shapes/InlineShapeConfig.d.ts.map +1 -0
  65. package/build/types/shapes/ShapeBuilder.d.ts +21 -0
  66. package/build/types/shapes/ShapeBuilder.d.ts.map +1 -0
  67. package/build/types/shapes/ShapeDefinition.d.ts +167 -0
  68. package/build/types/shapes/ShapeDefinition.d.ts.map +1 -0
  69. package/build/types/shapes/computeShapeId.d.ts +14 -0
  70. package/build/types/shapes/computeShapeId.d.ts.map +1 -0
  71. package/build/types/shapes/configToShapeDefinition.d.ts +6 -0
  72. package/build/types/shapes/configToShapeDefinition.d.ts.map +1 -0
  73. package/build/types/shapes/index.d.ts +5 -0
  74. package/build/types/shapes/index.d.ts.map +1 -0
  75. package/build/types/shapes/internal.d.ts +1 -0
  76. package/build/types/shapes/internal.d.ts.map +1 -0
  77. package/package.json +10 -1
  78. package/shapes-internal.d.ts +17 -0
@@ -0,0 +1,167 @@
1
+ import type { WhereClause } from "../aggregate/WhereClause.js";
2
+ import type { ObjectOrInterfaceDefinition, PropertyKeys } from "../ontology/ObjectOrInterface.js";
3
+ import type { CompileTimeMetadata } from "../ontology/ObjectTypeDefinition.js";
4
+ import type { OsdkBase } from "../OsdkBase.js";
5
+ import type { LinkedType, LinkNames } from "../util/LinkUtils.js";
6
+ export declare const SourcePrimaryKeySymbol: unique symbol;
7
+ export declare function isSourcePkSymbol(value: unknown): value is symbol;
8
+ declare const ShapeDefinitionBrand: unique symbol;
9
+ declare const ShapeLinkResultBrand: unique symbol;
10
+ /** Configuration for how a derived link is loaded at runtime. */
11
+ export interface DerivedLinkConfig {
12
+ defer?: boolean;
13
+ }
14
+ /** The result of calling `ShapeLinkBuilder.as()`, binding a link traversal to a target shape. */
15
+ export interface ShapeLinkResult<TARGET_SHAPE extends ShapeDefinition<ObjectOrInterfaceDefinition>> {
16
+ readonly __linkResultBrand: typeof ShapeLinkResultBrand;
17
+ readonly targetShape: TARGET_SHAPE;
18
+ readonly objectSetDef: ShapeLinkObjectSetDef;
19
+ readonly config: DerivedLinkConfig;
20
+ }
21
+ /** A single link traversal step in a derived link's object set definition. */
22
+ export interface ShapeLinkSegment {
23
+ readonly type: "pivotTo";
24
+ readonly linkName: string;
25
+ readonly sourceType?: string;
26
+ readonly targetType?: string;
27
+ }
28
+ /** Sort clause for a derived link's result set. */
29
+ export interface ShapeLinkOrderBy {
30
+ readonly property: string;
31
+ readonly direction: "asc" | "desc";
32
+ }
33
+ /** A set operation (union/intersect/subtract) applied to a derived link's object set. */
34
+ export interface ShapeLinkSetOperation {
35
+ readonly type: "union" | "intersect" | "subtract";
36
+ readonly other: ShapeLinkObjectSetDef;
37
+ }
38
+ /** Serializable definition of a derived link's object set: link traversals, filters, ordering, and set operations. */
39
+ export interface ShapeLinkObjectSetDef {
40
+ readonly segments: readonly ShapeLinkSegment[];
41
+ readonly where?: WhereClause<ObjectOrInterfaceDefinition>;
42
+ readonly orderBy?: readonly ShapeLinkOrderBy[];
43
+ readonly limit?: number;
44
+ readonly distinct?: boolean;
45
+ readonly setOperations?: readonly ShapeLinkSetOperation[];
46
+ }
47
+ /** How a shape handles null values for a selected property. */
48
+ export type NullabilityOp = {
49
+ type: "require"
50
+ } | {
51
+ type: "dropIfNull"
52
+ } | {
53
+ type: "withDefault"
54
+ defaultValue: unknown
55
+ } | {
56
+ type: "withTransform"
57
+ transform: (value: unknown) => unknown
58
+ } | {
59
+ type: "select"
60
+ };
61
+ /** Per-property configuration stored in a shape's `__props` map. */
62
+ export interface ShapePropertyConfig {
63
+ readonly nullabilityOp: NullabilityOp;
64
+ }
65
+ /** A derived link definition stored in a shape's `__derivedLinks` array. */
66
+ export interface ShapeDerivedLinkDef<TARGET_SHAPE extends ShapeDefinition<ObjectOrInterfaceDefinition> = ShapeDefinition<ObjectOrInterfaceDefinition>> {
67
+ readonly name: string;
68
+ readonly objectSetDef: ShapeLinkObjectSetDef;
69
+ readonly targetShape: TARGET_SHAPE;
70
+ readonly config: DerivedLinkConfig;
71
+ }
72
+ /**
73
+ * Type projection from an OSDK type. `__props` is the single source of truth for property config.
74
+ *
75
+ * @typeParam BASE - The base ObjectTypeDefinition or InterfaceDefinition
76
+ * @typeParam SELECTED_PROPS - Record of selected properties and their transformed types
77
+ * @typeParam DERIVED_LINKS - Record of derived link names to their result types
78
+ */
79
+ export interface ShapeDefinition<
80
+ BASE extends ObjectOrInterfaceDefinition,
81
+ SELECTED_PROPS extends Record<string, unknown> = {},
82
+ DERIVED_LINKS extends Record<string, ShapeDefinition<ObjectOrInterfaceDefinition>> = {}
83
+ > {
84
+ readonly [ShapeDefinitionBrand]: true;
85
+ readonly __shapeId: string;
86
+ readonly __debugName: string | undefined;
87
+ readonly __baseType: BASE;
88
+ readonly __baseTypeApiName: string;
89
+ readonly __props: Readonly<Record<string, unknown>>;
90
+ readonly __derivedLinks: readonly unknown[];
91
+ readonly __selectedPropsType: SELECTED_PROPS;
92
+ readonly __derivedLinksType: DERIVED_LINKS;
93
+ }
94
+ export type ShapeBaseType<S extends ShapeDefinition<ObjectOrInterfaceDefinition>> = S extends ShapeDefinition<infer BASE, infer _P, infer _L> ? BASE : never;
95
+ export type ShapeSelectedProps<S extends ShapeDefinition<ObjectOrInterfaceDefinition>> = S extends ShapeDefinition<infer _B, infer PROPS, infer _L> ? PROPS : never;
96
+ export type ShapeDerivedLinks<S extends ShapeDefinition<ObjectOrInterfaceDefinition>> = S extends ShapeDefinition<infer _B, infer _P, infer LINKS> ? LINKS : never;
97
+ export type ShapeInstance<S extends ShapeDefinition<ObjectOrInterfaceDefinition>> = S extends ShapeDefinition<infer BASE, infer PROPS, infer LINKS> ? OsdkBase<BASE> & {
98
+ readonly $rid: string
99
+ } & PROPS & { [K in keyof LINKS] : LINKS[K] extends ShapeDefinition<ObjectOrInterfaceDefinition> ? ShapeInstance<LINKS[K]>[] : never } : never;
100
+ export type PropertyType<
101
+ BASE extends ObjectOrInterfaceDefinition,
102
+ K extends PropertyKeys<BASE>
103
+ > = CompileTimeMetadata<BASE>["props"][K];
104
+ export type RequiredProperty<T> = NonNullable<T>;
105
+ export interface ShapeLinkBuilder<
106
+ SOURCE extends ObjectOrInterfaceDefinition,
107
+ CURRENT extends ObjectOrInterfaceDefinition
108
+ > {
109
+ pivotTo<L extends LinkNames<CURRENT>>(link: L): ShapeLinkBuilder<SOURCE, LinkedType<CURRENT, L>>;
110
+ where(clause: WhereClause<CURRENT>): ShapeLinkBuilder<SOURCE, CURRENT>;
111
+ union(...others: ShapeLinkBuilder<SOURCE, CURRENT>[]): ShapeLinkBuilder<SOURCE, CURRENT>;
112
+ intersect(...others: ShapeLinkBuilder<SOURCE, CURRENT>[]): ShapeLinkBuilder<SOURCE, CURRENT>;
113
+ subtract(...others: ShapeLinkBuilder<SOURCE, CURRENT>[]): ShapeLinkBuilder<SOURCE, CURRENT>;
114
+ orderBy<K extends PropertyKeys<CURRENT>>(property: K, direction?: "asc" | "desc"): ShapeLinkBuilder<SOURCE, CURRENT>;
115
+ limit(n: number): ShapeLinkBuilder<SOURCE, CURRENT>;
116
+ distinct(): ShapeLinkBuilder<SOURCE, CURRENT>;
117
+ as<TARGET_SHAPE extends ShapeDefinition<CURRENT>>(shape: TARGET_SHAPE, config?: DerivedLinkConfig): ShapeLinkResult<TARGET_SHAPE>;
118
+ readonly $primaryKey: symbol;
119
+ }
120
+ export interface ShapeLinkBuilderInternal extends ShapeLinkBuilder<ObjectOrInterfaceDefinition, ObjectOrInterfaceDefinition> {
121
+ toObjectSetDef(): ShapeLinkObjectSetDef;
122
+ }
123
+ export interface ShapeBuilder<
124
+ BASE extends ObjectOrInterfaceDefinition,
125
+ PROPS extends Record<string, unknown> = {},
126
+ LINKS extends Record<string, ShapeDefinition<ObjectOrInterfaceDefinition>> = {}
127
+ > {
128
+ select<K extends Exclude<PropertyKeys<BASE>, keyof PROPS>>(...props: K[]): ShapeBuilder<BASE, PROPS & { [P in K] : PropertyType<BASE, P> }, LINKS>;
129
+ require<K extends Exclude<PropertyKeys<BASE>, keyof PROPS>>(...props: K[]): ShapeBuilder<BASE, PROPS & { [P in K] : RequiredProperty<PropertyType<BASE, P>> }, LINKS>;
130
+ dropIfNull<K extends Exclude<PropertyKeys<BASE>, keyof PROPS>>(...props: K[]): ShapeBuilder<BASE, PROPS & { [P in K] : RequiredProperty<PropertyType<BASE, P>> }, LINKS>;
131
+ withDefault<
132
+ K extends Exclude<PropertyKeys<BASE>, keyof PROPS>,
133
+ V extends NonNullable<PropertyType<BASE, K>>
134
+ >(prop: K, defaultValue: V): ShapeBuilder<BASE, PROPS & { [P in K] : NonNullable<PropertyType<BASE, P>> }, LINKS>;
135
+ withTransform<
136
+ K extends Exclude<PropertyKeys<BASE>, keyof PROPS>,
137
+ R
138
+ >(prop: K, transform: (value: PropertyType<BASE, K>) => R): ShapeBuilder<BASE, PROPS & { [P in K] : R }, LINKS>;
139
+ deriveLink<
140
+ NAME extends string,
141
+ TARGET_SHAPE extends ShapeDefinition<ObjectOrInterfaceDefinition>
142
+ >(name: NAME, builder: (linkBuilder: ShapeLinkBuilder<BASE, BASE>) => ShapeLinkResult<TARGET_SHAPE>): ShapeBuilder<BASE, PROPS, LINKS & { [K in NAME] : TARGET_SHAPE }>;
143
+ build(): ShapeDefinition<BASE, PROPS, LINKS>;
144
+ }
145
+ export interface LinkLoadConfig {
146
+ pageSize?: number;
147
+ autoFetchMore?: boolean | number;
148
+ streamUpdates?: boolean;
149
+ defer?: boolean;
150
+ }
151
+ export interface LinkStatus {
152
+ isLoading: boolean;
153
+ error: Error | undefined;
154
+ hasMore: boolean;
155
+ fetchMore: () => Promise<void>;
156
+ }
157
+ export interface NullabilityViolation {
158
+ property: string;
159
+ primaryKey: unknown;
160
+ constraint: "require" | "dropIfNull" | "transformError";
161
+ }
162
+ export declare class ShapeNullabilityError extends Error {
163
+ readonly shape: ShapeDefinition<ObjectOrInterfaceDefinition>;
164
+ readonly violations: readonly NullabilityViolation[];
165
+ constructor(shape: ShapeDefinition<ObjectOrInterfaceDefinition>, violations: readonly NullabilityViolation[]);
166
+ }
167
+ export {};
@@ -0,0 +1 @@
1
+ {"mappings":"AAgBA,cAAc,mBAAmB,6BAA8B;AAC/D,cACE,6BACA,oBACK,kCAAmC;AAC1C,cAAc,2BAA2B,qCAAsC;AAC/E,cAAc,gBAAgB,gBAAiB;AAC/C,cAAc,YAAY,iBAAiB,sBA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,WAAW,UAAU,QAAQ,aAAa,aAAa,QACrD,GAAG,OAAO,MACT,aACD,MACA,WAAW,KAAK,KAAI,iBAAiB,aAAa,MAAM,OACxD;CAGF;EACE,UAAU,QAAQ,aAAa,aAAa;EAC5C,UAAU,YAAY,aAAa,MAAM;GAEzCC,MAAM,GACNC,cAAc,IACb,aACD,MACA,WAAW,KAAK,KAAI,YAAY,aAAa,MAAM,OACnD;CAGF;EACE,UAAU,QAAQ,aAAa,aAAa;EAC5C;GAEAD,MAAM,GACNE,YAAYC,OAAO,aAAa,MAAM,OAAO,IAC5C,aAAa,MAAM,WAAW,KAAK,KAAI,KAAK;CAE/C;EACE;EACA,qBAAqB,gBAAgB;GAErCC,MAAM,MACNC,UACEC,aAAa,iBAAiB,MAAM,UACjC,gBAAgB,gBACpB,aAAa,MAAM,OAAO,WAAW,KAAK,QAAO;CAEpD,SAAS,gBAAgB,MAAM,OAAO;AACvC;AAED,iBAAiB,eAAe;CAC9B;CACA;CACA;CACA;AACD;AAED,iBAAiB,WAAW;CAC1B;CACA,OAAO;CACP;CACA,iBAAiB;AAClB;AAED,iBAAiB,qBAAqB;CACpC;CACA;CACA,YAAY,YAAY,eAAe;AACxC;AAED,OAAO,cAAM,8BAA8B,MAAM;CAE7C,gBAAuB,gBAAgB;CACvC,8BAAqC;CAFvC,YACkBC,OAAO,gBAAgB,8BACvBC,qBAAqB;AASxC","names":["SourcePrimaryKeySymbol: unique symbol","value: unknown","ShapeDefinitionBrand: unique symbol","ShapeLinkResultBrand: unique symbol","link: L","clause: WhereClause<CURRENT>","property: K","direction?: \"asc\" | \"desc\"","n: number","shape: TARGET_SHAPE","config?: DerivedLinkConfig","prop: K","defaultValue: V","transform: (value: PropertyType<BASE, K>) => R","value: PropertyType<BASE, K>","name: NAME","builder: (\n linkBuilder: ShapeLinkBuilder<BASE, BASE>,\n ) => ShapeLinkResult<TARGET_SHAPE>","linkBuilder: ShapeLinkBuilder<BASE, BASE>","shape: ShapeDefinition<ObjectOrInterfaceDefinition>","violations: readonly NullabilityViolation[]"],"sources":["../../../src/shapes/ShapeDefinition.ts"],"version":3,"file":"ShapeDefinition.d.ts"}
@@ -0,0 +1,14 @@
1
+ import type { ShapeDerivedLinkDef, ShapePropertyConfig } from "./ShapeDefinition.js";
2
+ interface ShapeIdInput {
3
+ baseTypeApiName: string;
4
+ props: Record<string, ShapePropertyConfig>;
5
+ derivedLinks: readonly ShapeDerivedLinkDef[];
6
+ }
7
+ /**
8
+ * Computes a stable, deterministic identifier for a shape definition.
9
+ * The ID uniquely represents the combination of base type, property
10
+ * selections/nullability configs, and derived link definitions so
11
+ * that identical shapes produce the same ID across calls.
12
+ */
13
+ export declare function computeShapeId(input: ShapeIdInput): string;
14
+ export {};
@@ -0,0 +1 @@
1
+ {"mappings":"AAgBA,cACE,qBAEA,2BACK,sBAAuB;UAEpB,aAAa;CACrB;CACA,OAAO,eAAe;CACtB,uBAAuB;AACxB;;;;;;;AAoBD,OAAO,iBAAS,eAAeA,OAAO","names":["input: ShapeIdInput"],"sources":["../../../src/shapes/computeShapeId.ts"],"version":3,"file":"computeShapeId.d.ts"}
@@ -0,0 +1,6 @@
1
+ import type { ObjectOrInterfaceDefinition } from "../ontology/ObjectOrInterface.js";
2
+ import type { InferShapeDefinition, InlineShapeConfig } from "./InlineShapeConfig.js";
3
+ export declare function configToShapeDefinition<
4
+ BASE extends ObjectOrInterfaceDefinition,
5
+ const C extends InlineShapeConfig<BASE>
6
+ >(baseType: BASE, config: C): InferShapeDefinition<BASE, C>;
@@ -0,0 +1 @@
1
+ {"mappings":"AAgBA,cAAc,mCAAmC,kCAAmC;AAEpF,cACE,sBACA,yBACK,wBAAyB;AAWhC,OAAO,iBAAS;CACd,aAAa;OACP,UAAU,kBAAkB;EAElCA,UAAU,MACVC,QAAQ,IACP,qBAAqB,MAAM","names":["baseType: BASE","config: C"],"sources":["../../../src/shapes/configToShapeDefinition.ts"],"version":3,"file":"configToShapeDefinition.d.ts"}
@@ -0,0 +1,5 @@
1
+ export type { LinkLoadConfig, LinkStatus, NullabilityViolation, PropertyType, RequiredProperty, ShapeBaseType, ShapeBuilder, ShapeDefinition, ShapeDerivedLinks, ShapeInstance, ShapeLinkBuilder, ShapeLinkResult } from "./ShapeDefinition.js";
2
+ export type { InferShapeDefinition, InlineLinkConfig, InlineShapeConfig } from "./InlineShapeConfig.js";
3
+ export { isSourcePkSymbol, ShapeNullabilityError, SourcePrimaryKeySymbol } from "./ShapeDefinition.js";
4
+ export { createShapeBuilder } from "./ShapeBuilder.js";
5
+ export { configToShapeDefinition } from "./configToShapeDefinition.js";
@@ -0,0 +1 @@
1
+ {"mappings":"AAiBA,cACE,gBACA,YACA,sBACA,cACA,kBACA,eACA,cACA,iBACA,mBACA,eACA,kBACA,uBACK;AAGP,cACE,sBACA,kBACA,yBACK;AAGP,SACE,kBACA,uBACA,8BACK;AAGP,SAAS,0BAA0B;AAGnC,SAAS,+BAA+B","names":[],"sources":["../../../src/shapes/index.ts"],"version":3,"file":"index.d.ts"}
@@ -0,0 +1 @@
1
+ export type { DerivedLinkConfig, NullabilityOp, ShapeDerivedLinkDef, ShapeLinkObjectSetDef, ShapeLinkOrderBy, ShapeLinkSegment, ShapeLinkSetOperation, ShapePropertyConfig } from "./ShapeDefinition.js";
@@ -0,0 +1 @@
1
+ {"mappings":"AAgBA,cACE,mBACA,eACA,qBACA,uBACA,kBACA,kBACA,uBACA,2BACK","names":[],"sources":["../../../src/shapes/internal.ts"],"version":3,"file":"internal.d.ts"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@osdk/api",
3
- "version": "2.8.0-beta.27",
3
+ "version": "2.8.0-beta.29",
4
4
  "description": "",
5
5
  "access": "public",
6
6
  "license": "Apache-2.0",
@@ -18,6 +18,15 @@
18
18
  "require": "./build/cjs/index.cjs",
19
19
  "default": "./build/browser/index.js"
20
20
  },
21
+ "./shapes-internal": {
22
+ "browser": "./build/browser/public/shapes-internal.js",
23
+ "import": {
24
+ "types": "./build/types/public/shapes-internal.d.ts",
25
+ "default": "./build/esm/public/shapes-internal.js"
26
+ },
27
+ "require": "./build/cjs/public/shapes-internal.cjs",
28
+ "default": "./build/browser/public/shapes-internal.js"
29
+ },
21
30
  "./unstable": {
22
31
  "browser": "./build/browser/public/unstable.js",
23
32
  "import": {
@@ -0,0 +1,17 @@
1
+ /*
2
+ * Copyright 2025 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ export * from "./build/cjs/public/shapes-internal.cjs";