@histoire/vendors 1.0.0-beta.1 → 1.0.0-beta.3

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 (54) hide show
  1. package/build/floating-ui-frames.mjs +28 -0
  2. package/dist/client/b-floating-vue.js +6 -2
  3. package/dist/client/node_modules/@babel/helper-string-parser/package.json +1 -1
  4. package/dist/client/node_modules/@babel/helper-validator-identifier/package.json +1 -1
  5. package/dist/client/node_modules/@babel/parser/package.json +7 -7
  6. package/dist/client/node_modules/@babel/parser/typings/babel-parser.d.ts +24 -26
  7. package/dist/client/node_modules/@babel/types/lib/index-legacy.d.ts +183 -183
  8. package/dist/client/node_modules/@babel/types/lib/index.d.ts +203 -208
  9. package/dist/client/node_modules/@babel/types/package.json +6 -6
  10. package/dist/client/node_modules/@floating-ui/core/dist/floating-ui.core.d.mts +75 -68
  11. package/dist/client/node_modules/@floating-ui/core/dist/floating-ui.core.d.ts +75 -68
  12. package/dist/client/node_modules/@floating-ui/core/package.json +3 -3
  13. package/dist/client/node_modules/@floating-ui/utils/dist/floating-ui.utils.d.mts +5 -3
  14. package/dist/client/node_modules/@floating-ui/utils/dist/floating-ui.utils.d.ts +5 -3
  15. package/dist/client/node_modules/@floating-ui/utils/package.json +2 -2
  16. package/dist/client/node_modules/@jridgewell/sourcemap-codec/package.json +2 -1
  17. package/dist/client/node_modules/@jridgewell/sourcemap-codec/types/range-mappings.d.mts +5 -0
  18. package/dist/client/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.mts +2 -0
  19. package/dist/client/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.mts +4 -2
  20. package/dist/client/node_modules/csstype/index.d.ts +2326 -782
  21. package/dist/client/node_modules/csstype/package.json +26 -26
  22. package/dist/client/node_modules/entities/dist/commonjs/decode.d.ts +2 -0
  23. package/dist/client/node_modules/entities/dist/esm/decode.d.ts +2 -0
  24. package/dist/client/node_modules/entities/package.json +18 -11
  25. package/dist/client/node_modules/nanoid/package.json +3 -3
  26. package/dist/client/node_modules/postcss/lib/at-rule.d.ts +0 -1
  27. package/dist/client/node_modules/postcss/lib/comment.d.ts +0 -1
  28. package/dist/client/node_modules/postcss/lib/container.d.ts +17 -26
  29. package/dist/client/node_modules/postcss/lib/css-syntax-error.d.ts +0 -1
  30. package/dist/client/node_modules/postcss/lib/declaration.d.ts +4 -5
  31. package/dist/client/node_modules/postcss/lib/document.d.ts +0 -1
  32. package/dist/client/node_modules/postcss/lib/fromJSON.d.ts +1 -1
  33. package/dist/client/node_modules/postcss/lib/input.d.ts +0 -1
  34. package/dist/client/node_modules/postcss/lib/lazy-result.d.ts +3 -4
  35. package/dist/client/node_modules/postcss/lib/list.d.ts +1 -1
  36. package/dist/client/node_modules/postcss/lib/no-work-result.d.ts +0 -1
  37. package/dist/client/node_modules/postcss/lib/node.d.ts +2 -3
  38. package/dist/client/node_modules/postcss/lib/parse.d.ts +1 -1
  39. package/dist/client/node_modules/postcss/lib/postcss.d.mts +0 -3
  40. package/dist/client/node_modules/postcss/lib/postcss.d.ts +10 -4
  41. package/dist/client/node_modules/postcss/lib/previous-map.d.ts +0 -1
  42. package/dist/client/node_modules/postcss/lib/processor.d.ts +0 -1
  43. package/dist/client/node_modules/postcss/lib/result.d.ts +0 -1
  44. package/dist/client/node_modules/postcss/lib/root.d.ts +0 -1
  45. package/dist/client/node_modules/postcss/lib/rule.d.ts +12 -12
  46. package/dist/client/node_modules/postcss/lib/stringifier.d.ts +0 -1
  47. package/dist/client/node_modules/postcss/lib/stringify.d.ts +1 -1
  48. package/dist/client/node_modules/postcss/lib/warning.d.ts +0 -1
  49. package/dist/client/node_modules/postcss/package.json +45 -45
  50. package/dist/client/node_modules/source-map-js/package.json +14 -7
  51. package/dist/client/node_modules/source-map-js/source-map.d.ts +177 -63
  52. package/package.json +3 -2
  53. package/rollup.config.mjs +11 -1
  54. package/tsconfig.json +3 -1
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Read an ancestor frame only when positioning needs traversal and parent is same-origin.
3
+ * Backport follows Floating UI's current getFrameElement WindowProxy guard:
4
+ * https://github.com/floating-ui/floating-ui/blob/master/packages/utils/src/dom.ts
5
+ * @param {Window} window Source window owning measured element.
6
+ * @param {boolean} needed False for reference/offset-parent coordinates in one document.
7
+ * @returns {Element | null} Permitted containing frame, otherwise no ancestor traversal.
8
+ */
9
+ export function getFloatingUiFrame(window, needed = true) {
10
+ return needed && window.parent && Object.getPrototypeOf(window.parent) ? window.frameElement : null
11
+ }
12
+
13
+ /**
14
+ * Patch pinned Floating UI 1.1.1 during vendor build; source dependencies stay untouched.
15
+ * Fail on upstream changes rather than silently shipping an obsolete backport.
16
+ * @param {string} code Resolved dependency module source.
17
+ * @param {string} id Rollup module identity.
18
+ * @returns {string | null} Guarded dependency code or no transform for unrelated modules.
19
+ */
20
+ export function guardFloatingUiFrameReads(code, id) {
21
+ if (!/\/@floating-ui\/dom\/dist\/floating-ui\.dom\.(?:mjs|esm\.js)$/.test(id.replaceAll('\\', '/'))) return null
22
+ const first = 'let currentIFrame = win.frameElement;'
23
+ const next = 'currentIFrame = getWindow(currentIFrame).frameElement;'
24
+ if (!code.includes(first) || !code.includes(next)) throw new Error('Floating UI frame backport requires review')
25
+ return `${getFloatingUiFrame.toString()}\n${code
26
+ .replace(first, 'let currentIFrame = getFloatingUiFrame(win, Boolean(offsetParent && offsetWin !== win));')
27
+ .replace(next, 'currentIFrame = getFloatingUiFrame(getWindow(currentIFrame));')}`
28
+ }
@@ -1183,6 +1183,10 @@ const size = function (options) {
1183
1183
  };
1184
1184
  };
1185
1185
 
1186
+ function getFloatingUiFrame(window, needed = true) {
1187
+ return needed && window.parent && Object.getPrototypeOf(window.parent) ? window.frameElement : null
1188
+ }
1189
+
1186
1190
  function getWindow(node) {
1187
1191
  var _node$ownerDocument;
1188
1192
  return ((_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
@@ -1354,7 +1358,7 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
1354
1358
  if (domElement) {
1355
1359
  const win = getWindow(domElement);
1356
1360
  const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;
1357
- let currentIFrame = win.frameElement;
1361
+ let currentIFrame = getFloatingUiFrame(win, Boolean(offsetParent && offsetWin !== win));
1358
1362
  while (currentIFrame && offsetParent && offsetWin !== win) {
1359
1363
  const iframeScale = getScale(currentIFrame);
1360
1364
  const iframeRect = currentIFrame.getBoundingClientRect();
@@ -1367,7 +1371,7 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
1367
1371
  height *= iframeScale.y;
1368
1372
  x += iframeRect.x;
1369
1373
  y += iframeRect.y;
1370
- currentIFrame = getWindow(currentIFrame).frameElement;
1374
+ currentIFrame = getFloatingUiFrame(getWindow(currentIFrame));
1371
1375
  }
1372
1376
  }
1373
1377
  return {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@babel/helper-string-parser",
3
- "version": "7.27.1",
3
+ "version": "7.29.15",
4
4
  "description": "A utility package to parse strings",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@babel/helper-validator-identifier",
3
- "version": "7.28.5",
3
+ "version": "7.29.7",
4
4
  "description": "Validate identifier/keywords name",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@babel/parser",
3
- "version": "7.28.5",
3
+ "version": "7.29.15",
4
4
  "description": "A JavaScript parser",
5
5
  "author": "The Babel Team (https://babel.dev/team)",
6
6
  "homepage": "https://babel.dev/docs/en/next/babel-parser",
@@ -35,14 +35,14 @@
35
35
  },
36
36
  "# dependencies": "This package doesn't actually have runtime dependencies. @babel/types is only needed for type definitions.",
37
37
  "dependencies": {
38
- "@babel/types": "^7.28.5"
38
+ "@babel/types": "^7.29.15"
39
39
  },
40
40
  "devDependencies": {
41
- "@babel/code-frame": "^7.27.1",
42
- "@babel/helper-check-duplicate-nodes": "^7.27.1",
43
- "@babel/helper-fixtures": "^7.28.0",
44
- "@babel/helper-string-parser": "^7.27.1",
45
- "@babel/helper-validator-identifier": "^7.28.5",
41
+ "@babel/code-frame": "^7.29.7",
42
+ "@babel/helper-check-duplicate-nodes": "^7.29.7",
43
+ "@babel/helper-fixtures": "^7.29.7",
44
+ "@babel/helper-string-parser": "^7.29.15",
45
+ "@babel/helper-validator-identifier": "^7.29.7",
46
46
  "charcodes": "^0.2.0"
47
47
  },
48
48
  "bin": "./bin/babel-parser.js",
@@ -3,30 +3,10 @@
3
3
  /* eslint-disable @typescript-eslint/consistent-type-imports, @typescript-eslint/no-redundant-type-constituents */
4
4
  import { File, Expression } from '@babel/types';
5
5
 
6
- declare class Position {
7
- line: number;
8
- column: number;
9
- index: number;
10
- constructor(line: number, col: number, index: number);
11
- }
12
-
13
- type SyntaxPlugin = "flow" | "typescript" | "jsx" | "pipelineOperator" | "placeholders";
14
- type ParseErrorCode = "BABEL_PARSER_SYNTAX_ERROR" | "BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED";
15
- interface ParseErrorSpecification<ErrorDetails> {
16
- code: ParseErrorCode;
17
- reasonCode: string;
18
- syntaxPlugin?: SyntaxPlugin;
19
- missingPlugin?: string | string[];
20
- loc: Position;
21
- details: ErrorDetails;
22
- pos: number;
23
- }
24
- type ParseError$1<ErrorDetails> = SyntaxError & ParseErrorSpecification<ErrorDetails>;
25
-
26
6
  type BABEL_8_BREAKING = false;
27
7
  type IF_BABEL_7<V> = false extends BABEL_8_BREAKING ? V : never;
28
8
 
29
- type Plugin$1 =
9
+ type Plugin =
30
10
  | "asyncDoExpressions"
31
11
  | IF_BABEL_7<"asyncGenerators">
32
12
  | IF_BABEL_7<"bigInt">
@@ -39,7 +19,7 @@ type Plugin$1 =
39
19
  | "deferredImportEvaluation"
40
20
  | "decoratorAutoAccessors"
41
21
  | "destructuringPrivate"
42
- | "deprecatedImportAssert"
22
+ | IF_BABEL_7<"deprecatedImportAssert">
43
23
  | "doExpressions"
44
24
  | IF_BABEL_7<"dynamicImport">
45
25
  | IF_BABEL_7<"explicitResourceManagement">
@@ -84,7 +64,7 @@ type ParserPluginWithOptions =
84
64
  | ["flow", FlowPluginOptions]
85
65
  | ["typescript", TypeScriptPluginOptions];
86
66
 
87
- type PluginConfig = Plugin$1 | ParserPluginWithOptions;
67
+ type PluginConfig = Plugin | ParserPluginWithOptions;
88
68
 
89
69
  interface DecoratorsPluginOptions {
90
70
  decoratorsBeforeExport?: boolean;
@@ -116,8 +96,6 @@ interface TypeScriptPluginOptions {
116
96
  disallowAmbiguousJSXLike?: boolean;
117
97
  }
118
98
 
119
- type Plugin = PluginConfig;
120
-
121
99
  type SourceType = "script" | "commonjs" | "module" | "unambiguous";
122
100
  interface Options {
123
101
  /**
@@ -212,7 +190,7 @@ interface Options {
212
190
  /**
213
191
  * Array containing the plugins that you want to enable.
214
192
  */
215
- plugins?: Plugin[];
193
+ plugins?: PluginConfig[];
216
194
  /**
217
195
  * Should the parser work in strict mode.
218
196
  * Defaults to true if sourceType === 'module'. Otherwise, false.
@@ -241,6 +219,26 @@ interface Options {
241
219
  createImportExpressions?: boolean;
242
220
  }
243
221
 
222
+ declare class Position {
223
+ line: number;
224
+ column: number;
225
+ index: number;
226
+ constructor(line: number, col: number, index: number);
227
+ }
228
+
229
+ type SyntaxPlugin = "flow" | "typescript" | "jsx" | "functionBind" | "pipelineOperator" | "placeholders";
230
+ type ParseErrorCode = "BABEL_PARSER_SYNTAX_ERROR" | "BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED";
231
+ interface ParseErrorSpecification<ErrorDetails> {
232
+ code: ParseErrorCode;
233
+ reasonCode: string;
234
+ syntaxPlugin?: SyntaxPlugin;
235
+ missingPlugin?: string | string[];
236
+ loc: Position;
237
+ details: ErrorDetails;
238
+ pos: number;
239
+ }
240
+ type ParseError$1<ErrorDetails> = SyntaxError & ParseErrorSpecification<ErrorDetails>;
241
+
244
242
  type ParserOptions = Partial<Options>;
245
243
  type ParseError = ParseError$1<object>;
246
244
  type ParseResult<Result extends File | Expression = File> = Result & {